Instructions to use Sky-Kim/com.sky.sentis.e5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- unity-sentis
How to use Sky-Kim/com.sky.sentis.e5 with unity-sentis:
string modelName = "[Your model name here].sentis"; Model model = ModelLoader.Load(Application.streamingAssetsPath + "/" + modelName); IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model); // Please see provided C# file for more details
- Notebooks
- Google Colab
- Kaggle
sentis-e5
Multilingual E5 small text embedder converted to Unity Inference Engine (Sentis) FP16.
Files
e5_small_fp16.sentis # encoder (384-dim output)
tokenizer.json # HuggingFace tokenizer
E5Embedder.cs # self-contained Unity Sentis inference
Inference
Prefix queries with query: and passages with passage: . The sentence embedding is the
attention-masked mean of last_hidden_state, L2-normalized (so relevance is a plain dot product).
A complete self-contained implementation lives in E5Embedder.cs (tokenization,
masked mean-pool, L2-normalize, sync + async readback). Minimal usage:
var embedder = new E5Embedder(BackendType.CPU);
embedder.Load(modelRoot); // folder holding e5_small_fp16.sentis + tokenizer.json
float[] v = embedder.EmbedText("how tall is the eiffel tower", isQuery: true); // 384-d, L2-normalized
For a GPU backend use
EmbedTextAsync; a synchronous GPU readback can stall or crash on some mobile GPUs.
License & attribution
MIT. Converted from intfloat/multilingual-e5-small (MIT).
- Downloads last month
- 5