Skip to main content

langchain-aneforge

LangChain embeddings that run on the Apple Neural Engine, via ANEForge. The encoder runs on the ANE with no CoreML, matching the fp32 reference to cosine ~1.0 at a fraction of the GPU's energy.

pip install langchain-aneforge

Apple Silicon macOS only (ANEForge reaches the engine through a built dispatch shim; see the ANEForge install notes).

Use

from langchain_aneforge import ANEEmbeddings

emb = ANEEmbeddings(model="sentence-transformers/all-MiniLM-L6-v2")
vec = emb.embed_query("the Apple Neural Engine runs networks at low power")
docs = emb.embed_documents(["one passage", "another passage"])

ANEEmbeddings is a standard langchain_core.embeddings.Embeddings, so it drops into any LangChain retriever or vector store:

from langchain_community.vectorstores import FAISS

store = FAISS.from_texts(["...", "..."], ANEEmbeddings())
hits = store.similarity_search("query", k=3)

model is any BERT-family sentence encoder on the Hugging Face hub. Its pooling mode and normalize flag are read from the model's own sentence-transformers config, so mean-pooled (MiniLM, E5) and cls-pooled (BGE, GTE) models both produce correct vectors. Pass int8=True to stream int8 weights (half the size, cosine ~0.9999).

License

MIT. Not affiliated with or endorsed by Apple or LangChain.

Release files for langchain-aneforge 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-aneforge 0.1.0
File Size Uploaded
langchain_aneforge-0.1.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-aneforge 0.1.0
File Interpreter ABI Platform
langchain_aneforge-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / langchain_aneforge-0.1.0.tar.gz

Download URL langchain_aneforge-0.1.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
011bfbfc6265e5b7eca2690f61dd87f9da3c704950d7e077cffec6dba5f11bfd
BLAKE2b-256 checksum
How to use checksums
50f8e51817890745862db1177bde38677c803bf25566267fe782807282ff0c3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release files / langchain_aneforge-0.1.0-py3-none-any.whl

Download URL langchain_aneforge-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e55d1c442a111296b4bac6fe414555b5955625d3579d7980236c4928f31e0e88
BLAKE2b-256 checksum
How to use checksums
596fe5b45847f60ad69460fc1644c9a129285c45d5786d48c4e54b95b0910fbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page