This repository was archived by the owner on Jan 15, 2026. It is now read-only.
feat!: Add support for custom embedding models and related tests - #32
Merged
Merged
Conversation
- Introduced a new tokenizer configuration file for custom models. - Modified the fastembed.ts to handle custom embedding models with appropriate options. - Created a new test suite for custom embedding models to validate initialization and embedding functionality. - Updated TypeScript configuration to exclude model directories from compilation.
* Refactored multiple tests to initialize `FlagEmbedding` with `EmbeddingModel.CUSTOM`. * Ensured consistent model path and name usage across tests. * Updated expected values in the canonical values test for accuracy.
Contributor
Author
|
about the models/ directory it's just to perform tests |
anush008
reviewed
Sep 14, 2025
…m model tests to include file downloads and improve test structure.
Contributor
Author
|
it's ok for test they download config /tokenizer/ model from sentence-transformers HF repo |
anush008
approved these changes
Sep 15, 2025
anush008
left a comment
Owner
There was a problem hiding this comment.
LGTM @solarpush. Thanks for the contribution.
Contributor
Author
|
Thanks for your work! In the future, I’d propose adding precision selection for quantified ONNX (01, 02, 03, 04), if you’re okay with it. and maybe add in readme the CUSTOM usage too. Thanks you |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for custom embedding models
This PR introduces support for loading custom embedding models in addition to the predefined set.
CUSTOMenum option to allow initialization with user-provided models.fastembed.tsto handle initialization with a custom model directory (modelAbsoluteDirPath) and optionalmodelName.tokenizer.json,config.json, etc.).