Switch to bge-small-en-v1.5 for asymmetric query/passage embeddings
All checks were successful
Build and push container image / build-and-push (push) Successful in 4m10s

Replace all-MiniLM-L6-v2 with bge-small-en-v1.5, which separates
short search queries from package descriptions via the retrieval
instruction. Requests now default to query mode and opt out with
type=passage for documents. Uses the export's pooled, L2-normalized
sentence_embedding output instead of manual mean pooling.
This commit is contained in:
Christoph Haas 2026-09-13 22:10:01 +02:00
parent 1b4d24cada
commit 111af2d66e
3 changed files with 68 additions and 110 deletions

View file

@ -41,9 +41,9 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# Download model and tokenizer files
RUN curl -sL -o /app/model.onnx https://huggingface.co/onnx-community/all-MiniLM-L6-v2-ONNX/resolve/main/onnx/model.onnx && \
curl -sL -o /app/model.onnx_data https://huggingface.co/onnx-community/all-MiniLM-L6-v2-ONNX/resolve/main/onnx/model.onnx_data && \
curl -sL -o /app/tokenizer.json https://huggingface.co/onnx-community/all-MiniLM-L6-v2-ONNX/resolve/main/tokenizer.json && \
RUN curl -sL -o /app/model.onnx https://huggingface.co/onnx-community/bge-small-en-v1.5-ONNX/resolve/main/onnx/model.onnx && \
curl -sL -o /app/model.onnx_data https://huggingface.co/onnx-community/bge-small-en-v1.5-ONNX/resolve/main/onnx/model.onnx_data && \
curl -sL -o /app/tokenizer.json https://huggingface.co/onnx-community/bge-small-en-v1.5-ONNX/resolve/main/tokenizer.json && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*