Repository navigation
feat(embedding): make vector dimension configurable - #324
Windsander wants to merge 6 commits into
Conversation
- Add dim field to EmbeddingSettings - Use settings.dim in build_embedding_provider - Read dimension from settings in LanceDB table schemas - Add default dim = 1024 in default.toml Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Hi EverOS team, thanks for the great work on this project. We're building CodeKeeper Advance (which will release to Github after we fullfill all features 😊) on top of EverOS. In our setup, we use embedding models like This PR makes the embedding dimension configurable via Happy to adjust naming or implementation based on your feedback. Thanks for reviewing! |
|
Closing this, but the diagnosis was right and it was right two months before anyone filed it as a bug.
The reason I'm closing rather than rebasing is structural: six of this PR's nine files no longer exist at those paths. #481 ( Two other things we want that this PR doesn't carry, and that change the shape of the work: Configurable dim does not fix the silent failure. Set Changing So the plan is a probe plus provenance first — independent of the schema, and on its own it turns #434 from "installed it, nothing is searchable, everything says OK" into one clear error at startup — then the configurable dimension on top of it, with the schema tests this PR's Thanks for the report embedded in this PR; the motivation section is what made the connection to #434 obvious once that landed. |
|
The plan described when this was closed has landed, in #510.
The probe and provenance half went in underneath it, as described. Startup embeds once, measures the model's real output width, and compares it against both the configured What this means for an existing deployment:
It will go out in the next release. Thanks for the report that was embedded in this PR — it had the diagnosis right before the failure was filed. |
|
Got it, Thanks~ |
Motivation
Different embedding models produce vectors with different dimensions (e.g.,
intfloat/multilingual-e5-smalluses 384, whileintfloat/multilingual-e5-largeuses 1024). Currently EverOS hard-codes_DIM = 1024in LanceDB table schemas andbuild_embedding_provider, which prevents using smaller/larger embedding models without patching source code.Changes
dimfield toEmbeddingSettingswith env bindingEVEROS_EMBEDDING__DIM.dim = 1024default indefault.toml.build_embedding_providerto usesettings.dimwhen no explicitdimis passed.agent_case,agent_skill,atomic_fact,episode,foresight,knowledge_topic) to read_DIMfromload_settings().embedding.diminstead of hard-coding 1024.Backward compatibility
The default remains
1024, so existing configurations continue to work without changes.Testing
python -m py_compilepasses for all modified Python files.EVEROS_EMBEDDING__DIMor[embedding].dimis explicitly set.