Sentence Similarity
ANEForge
Safetensors
sentence-transformers
bert
apple-neural-engine
text-embeddings-inference
Instructions to use aneforge/gte-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ANEForge
How to use aneforge/gte-small with ANEForge:
# Run this model's encoder on the Apple Neural Engine, without CoreML. from aneforge.sentence_transformers import SentenceTransformer model = SentenceTransformer("aneforge/gte-small") embeddings = model.encode(["Hello from the Neural Engine"], normalize_embeddings=True) - sentence-transformers
How to use aneforge/gte-small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("aneforge/gte-small") 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
|
Download README.md from aneforge/gte-small: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/aneforge/gte-small/resolve/main/README.md
- Command line
-
hf download hf://aneforge/gte-small/README.md
-
curl -L -o README.md https://huggingface.co/aneforge/gte-small/resolve/main/README.md
1.05 kB
metadata
license: mit
library_name: aneforge
base_model: thenlper/gte-small
pipeline_tag: sentence-similarity
tags:
- aneforge
- apple-neural-engine
- sentence-transformers
GTE-small (ANEForge)
An unmodified duplicate of thenlper/gte-small, tagged for use with
ANEForge so the weights load and run directly on the
Apple Neural Engine (no CoreML). Weights are byte-identical to the source; see the original repo for
the model details. Licensed mit from the source.
Use with ANEForge
# pip install "aneforge[models]"
from aneforge.sentence_transformers import SentenceTransformer
model = SentenceTransformer("aneforge/gte-small")
emb = model.encode(["Hello from the Neural Engine"], normalize_embeddings=True)
ANEForge compiles the model's graph into a single ANE program and streams the weights from this repo
via huggingface_hub. See the docs and the paper.