Reranking on the Apple Neural Engine (via ANEForge)
ANEForge
runs computation on the Apple Neural
Engine (ANE) directly, without CoreML. Its
CrossEncoder
loads a BERT-family cross-encoder /
reranker from the Hub by repo id and runs the transformer on the engine, matching the
sentence_transformers.CrossEncoder
API.
This is a usage card, not a re-hosted model: it points at the upstream weights and shows how
to run them on the ANE.
Install
pip install aneforge
Apple Silicon, macOS 14+.
Use
from aneforge.sentence_transformers import CrossEncoder
ce = CrossEncoder("cross-encoder/ms-marco-MiniLM-L-6-v2") # any BERT-family cross-encoder
query = "How many people live in Berlin?"
passages = [
"Berlin has about 3.85 million residents.",
"Paris is the capital of France.",
]
scores = ce.predict([(query, p) for p in passages]) # higher = more relevant; transformer on the ANE
ranked = sorted(zip(scores, passages), reverse=True)
Measured
On an M5 Pro,
cross-encoder/ms-marco-MiniLM-L-6-v2
scores a (query, passage) pair in
~0.8 ms
, matching the Hugging Face reference ranking (relerr 5e-4).
Scope
BERT-family cross-encoders with a pooler + classifier head (e.g.
cross-encoder/ms-marco-MiniLM-L-6-v2
,
-L-12-v2
). RoBERTa/XLM-R rerankers (bge-reranker) are a work in progress -- see the repo issues.
Why the ANE
The ANE is the fixed-function accelerator on every recent Apple device. In production it is
reachable only through CoreML, which can silently fall back to CPU/GPU; ANEForge compiles the
transformer to a single ANE program and dispatches it through the same daemon and kernel-driver
stack Apple's own frameworks use.
reranker huggingface.co is an AI model on huggingface.co that provides reranker's model effect (), which can be used instantly with this aneforge reranker model. huggingface.co supports a free trial of the reranker model, and also provides paid use of the reranker. Support call reranker model through api, including Node.js, Python, http.
reranker huggingface.co is an online trial and call api platform, which integrates reranker's modeling effects, including api services, and provides a free online trial of reranker, you can try reranker online for free by clicking the link below.
aneforge reranker online free url in huggingface.co:
reranker is an open source model from GitHub that offers a free installation service, and any user can find reranker on GitHub to install. At the same time, huggingface.co provides the effect of reranker install, users can directly use reranker installed effect in huggingface.co for debugging and trial. It also supports api for free installation.