Sentence Similarity
ONNX
sentence-transformers
light-embed
bert
feature-extraction
text-embeddings-inference
Run this model with HF Jobs
Run LightEmbed/baai-llm-embedder-onnx on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/LightEmbed/baai-llm-embedder-onnx. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LightEmbed/baai-llm-embedder-onnx on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use LightEmbed/baai-llm-embedder-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use LightEmbed/baai-llm-embedder-onnx with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("LightEmbed/baai-llm-embedder-onnx") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model.
Browse filesFiles changed (2)
- README.md+45-3
- model_description.jsonAdded+6
123---license: mit---123456789101112131415161718192021222324252627282930313233343536373839404142434445---library_name: light-embedpipeline_tag: sentence-similaritytags:- sentence-transformers- feature-extraction- sentence-similarity---# baai-llm-embedder-onnxThis is the ONNX version of the Sentence Transformers model BAAI/llm-embedder for sentence embedding, optimized for speed and lightweight performance. By utilizing onnxruntime and tokenizers instead of heavier libraries like sentence-transformers and transformers, this version ensures a smaller library size and faster execution. Below are the details of the model:- Base model: BAAI/llm-embedder- Embedding dimension: 768- Max sequence length: 512- File size on disk: 0.41 GBThis ONNX model consists all components in the original sentence transformer model:Transformer, Pooling, Normalize<!--- Describe your model here -->## Usage (LightEmbed)Using this model becomes easy when you have [LightEmbed](https://www.light-embed.net) installed:```pip install -U light-embed```Then you can use the model like this:```pythonfrom light_embed import TextEmbeddingsentences = ["This is an example sentence", "Each sentence is converted"]model = TextEmbedding('BAAI/llm-embedder')embeddings = model.encode(sentences)print(embeddings)```## Citing & AuthorsBinh Nguyen / binhcode25@gmail.com
123456{ "base_model": "BAAI/llm-embedder", "embedding_dim": 768, "max_seq_length": 512, "model_file_size (GB)": 0.41}README.md+45-3
model_description.jsonAdded+6