03 / 15Module 1: Project setupAdvanced
Choose an embedding model
Choose an embedding model before you configure the backend or run any scripts.
The model turns each movie plot summary into a vector of fixed length. That length, the dimension, depends on the model, and you need to set it in your backend.
Clone the repo
If you don't have the project repository locally yet, clone it:
git clone https://bitbucket.org/chromawallet/vector-db-movie-demo.gitcd vector-db-movie-demoCreate your .env file
In the python/ folder, copy the template to create a .env file:
cd pythoncp .env.template .envYou'll edit this file in the next step.
Select your model
Open .env in your editor and uncomment the line for the EMBEDDING_MODEL option you want.
Example:
EMBEDDING_MODEL=sentence-transformers/all-mpnet-base-v2This setting determines which sentence embedding model vectorizes the movie summaries.
You can also use a different model from the Hugging Face Hub, as long as it works with the sentence-transformers library and outputs dense vectors.
Model overview
| Model | Dimensions | Notes |
|---|---|---|
all-MiniLM-L6-v2 | 384 | Compact and fast |
all-mpnet-base-v2 | 768 | Balanced; a sensible default |
all-roberta-large-v1 | 1024 | Higher quality, slower |
intfloat/e5-large-v2 | 1024 | Uses query:/passage: prefixes; strongest for search |
BAAI/bge-large-en-v1.5 | 1024 | Alternative with very strong performance |
Choosing the right model
Bigger models can produce better semantic matches, but they use more memory and take longer to run.
On a GPU, any model in the table should work without problems.
On a CPU, a smaller model keeps processing from becoming slow.
In the next step, you'll enter the model's dimension when configuring your Rell module in chromia.yml.