Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
LLM text generation on the Apple Neural Engine (via ANEForge)
ANEForge
runs computation on the Apple Neural
Engine (ANE) directly, without CoreML.
aneforge.llm.from_pretrained
loads a
Llama- or
Qwen-family causal LM
from the Hub by repo id and runs prefill + resident-KV-cache decode
on the engine.
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+.
import aneforge
works anywhere; compiling and dispatching to the
ANE needs the hardware.
Use
from transformers import AutoTokenizer
import aneforge.llm as llm
name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"# any Llama/Qwen-family causal LM by repo id
tok = AutoTokenizer.from_pretrained(name)
model = llm.from_pretrained(name) # compress="int8" / "int4" to stream quantized weights
prompt = "The Apple Neural Engine is"
ids = tok(prompt)["input_ids"]
out = model.generate(ids, max_new_tokens=32, eos_id=tok.eos_token_id)
print(prompt + tok.decode(out)) # decode runs on the ANE, KV cache resident across steps
compress="int8"
/
"int4"
streams quantized weights from the engine's dequant path
(
4x smaller for int4, accuracy-gated). Larger models are bounded by the ANE program size;
small (
1B) models fit comfortably.
Measured:
on an M5 Pro,
TinyLlama-1.1B-Chat-v1.0
(fp16) decodes at ~62 tok/s with the
KV cache resident on the engine, generating coherent text end to end. Decode throughput is
latency-bound and varies by chip; see the
ane-rooflines dataset
.
Why the ANE
The ANE is the fixed-function accelerator on every recent Apple device. ANEForge compiles the
decoder to a single ANE program and dispatches it through the same daemon and kernel-driver
stack Apple's own frameworks use, keeping the KV cache and weights resident across steps so
each decode step is one on-engine dispatch.
llm-text-generation huggingface.co is an AI model on huggingface.co that provides llm-text-generation's model effect (), which can be used instantly with this aneforge llm-text-generation model. huggingface.co supports a free trial of the llm-text-generation model, and also provides paid use of the llm-text-generation. Support call llm-text-generation model through api, including Node.js, Python, http.
llm-text-generation huggingface.co is an online trial and call api platform, which integrates llm-text-generation's modeling effects, including api services, and provides a free online trial of llm-text-generation, you can try llm-text-generation online for free by clicking the link below.
aneforge llm-text-generation online free url in huggingface.co:
llm-text-generation is an open source model from GitHub that offers a free installation service, and any user can find llm-text-generation on GitHub to install. At the same time, huggingface.co provides the effect of llm-text-generation install, users can directly use llm-text-generation installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
llm-text-generation install url in huggingface.co: