e5-embedding-api / README.md
thong7d's picture
Pin E5 model and add verified encoder metadata and normalized endpoint
d8f6ca9 verified
|
Raw History Blame Contribute Delete
1.79 kB
---
title: E5 Embedding Api
emoji: 🚀
colorFrom: indigo
colorTo: yellow
sdk: gradio
sdk_version: 6.30.0
python_version: '3.12'
app_file: app.py
pinned: false
license: mit
---
Pinned multilingual E5 inference. The existing `/encode` endpoint keeps its list output,
prefix handling, empty-input behavior and unit-normalized vectors. The original
SentenceTransformer model includes a Normalize module; its encode flag alone does not
describe the final output normalization. Model/tokenizer weights
are now loaded from the full commit
`3d7cfbdacd47fdda877c5cd8a79fbcc4f2a574f3`.
`/metadata` does not allocate a GPU. `/encode_pinned(text, kind)` accepts `query` or
`passage`, applies that kind's prefix to the exact original text, refuses overlength
inputs instead of truncating them and returns normalized FP32 vectors with contract and
input hashes. Both inference endpoints share a serial GPU queue.
The dependency file selects reviewed Linux x86_64 / CPython 3.12 wheels from this directory's
separate uv.lock. Each URL carries its reviewed SHA-256 fragment. Global pip hash mode is
avoided because the Spaces installer adds its own requirements; those additions and Gradio
OAuth/MCP extras are included in the lock. A requirements hash does not attest the complete
host image. The platform's datasets package is included in the solved graph; startup requires
pip check to pass before loading model weights. Runtime metadata reports that check, exact
package versions and the reviewed source/export hashes. Compare real passage canaries before accepting
a deployment. Metadata is an operational check, not cryptographic remote attestation.
See https://huggingface.co/docs/hub/spaces-zerogpu and
https://huggingface.co/intfloat/multilingual-e5-large for the implementation patterns.