ANEForge: Python for direct computation on the Apple Neural Engine
Paper • 2606.17090 • Published • 3
Run aneforge/gte-small 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:
Use HF Jobs to fine-tune https://huggingface.co/aneforge/gte-small. 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.
Use HF Jobs to run batch inference with https://huggingface.co/aneforge/gte-small 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.
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)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]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.
# 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.
Base model
thenlper/gte-small