Views
No views yet
coreai-torch (LLMs: coreai.llm.export) into .aimodel bundles that run on the GPU or the Neural Engine, e.g. Qwen3-8B 4-bit decodes at 94 tok/s on an M4 Max GPU, MLX 90 under the same protocol (apple-silicon-llm-bench, macOS 27 beta, 2026-06)..aimodel)coreai-pipelined GPU engine with one fixed-shape conv state and no custom
kernels.<think>, and generations spend their first few hundred tokens thinking. Budget max-tokens
accordingly; a 200-token cap regularly ends mid-thought.Requires the iOS 27 / macOS 27 beta (Core AI ships with the OS). Conversion code, gates and knowledge base: coreai-model-zoo.
| path | size | prompt tok/s | decode tok/s | oracle gate |
|---|---|---|---|---|
gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym | 3.4 GB | 139.5 | 116.7 | PASS 16/16 |
gpu-pipelined/lfm2_5_2_6b_decode_int4lin | 2.0 GB | 170.6 | 139.2 | PASS 16/16 |
coreai-torch 0.4.1,
llm-benchmark -p 128 -g 256 -n 3, COREAI_CHUNK_THRESHOLD=1. The gate compares the exported
bundle's greedy decode token-for-token against the fp32 eager oracle; transcripts are in the
zoo card directory.int8hu is the quality ship. The head is 128 000 × 2048 = 262 M parameters, so leaving it fp16
costs 524 MB of reads per token; untying and quantizing it to int8 buys +8.6 % decode over
plain int8lin (the 1.2B saw +9.3 % for the same reason). The bundle gets bigger — 3.2 → 3.4 GB
— because untying stores an fp16 embedding and an int8 head instead of one shared table. That is
the trade working, not a regression. int8lin is not published: slower than int8hu and only
0.2 GB smaller, so it has no case of its own.int4lin did not hit the int4 quality cliff, which is worth saying because this family usually
does. Beyond the 16/16 gate, four long greedy generations were read in full — an algorithmic
explanation, iterative Fibonacci with complexity analysis, a clock-arithmetic word problem and a
Japanese instruction — with grammar intact, arithmetic correct and code correct. Four prompts are
not a benchmark: read this as no cliff observed, not int4 is free.int4lin bundle is the still-fp16
embedding. The remaining size lever on this model is the embedding, not the layers.1git clone https://github.com/apple/coreai-models # + the zoo's engine patches, see below
2swift build -c release --product llm-runner
3
4COREAI_CHUNK_THRESHOLD=1 .build/release/llm-runner \
5 --model gpu-pipelined/lfm2_5_2_6b_decode_int8hu_block32_sym \
6 --prompt "Explain why a hash table lookup is O(1) on average but O(n) in the worst case." \
7 --max-tokens 512 --sampling-strategy greedy \
8 --inference-engine-variant coreai-pipelined --warmup off--warmup off matters: default warmup submits a synthetic 256-token prefill, and these bundles
are static-S=1, so it fails with a shape-substitution error before generating anything. The
coreai-pipelined-extra-states patch (which carries the conv state) is in the zoo under apps/.rope_parameters: {rope_theta: 1e7} instead of a flat rope_theta. Read only the flat key and
you fall back to the 1.2B's 1e6 and mis-rotate every position, with no error.tokenizer_config.json declares
tokenizer_class: "TokenizersBackend", which a transformers-4.x AutoTokenizer cannot resolve.
The chat template also lives in its own chat_template.jinja in this era, so the obvious
workaround ships a bundle with no template. Load tokenizer.json directly and carry the
template across.conversion/export_lfm2_decode_pipelined.py.LiquidAI/LFM2.5-2.6B (revision
ab00687315bc1298e9d54e9c4b611dde9867ccc2). Not affiliated with Apple or LiquidAI.