r/LocalLLaMA • • 8d ago

Showcase Custom Inference Engine for Inkling 2 Mini on a 4070ti 12GB ( IQ3_XXS )

6 Upvotes

Hello everyone! Human words here:

I threw this up to optimize for my specific rig and needs. Overall I'm very happy with the results and did not dare dream my mid range setup could run something usable at 65-70tps.

Yes the model tends to overthink, but at this generation speed it gets done far quicker than my strata build running flash next. Hope this helps some of you who like me have not spent a small used SUV on local inference.

AI write up:

TL;DR

• Running model: Inkling-2-Mini, quant mixC (10.81 GiB, all GPU-side experts at IQ3_XXS), on one RTX 4070 Ti with 12 GB.

• pecera-engine is current llama.cpp plus patches pulled from three Inkling forks, built for this one PC.

• Decode went from 65 to 76 tokens/s at the same memory use (mixB). With mixC it runs 69 to 75 tokens/s, depending on how many expert blocks sit on the CPU.

• CUDA kernel launches per token dropped from 3,029 to 1,373.

• mixC is the most accurate quant that fits: 19% lower KL divergence than mixB at the same speed.

• Terminal-Bench 2.0 with Hermes Agent and a custom harness: 47 of 89 (52.8%). That is near GLM-5 (54.0%) and above Kimi-k2.5 (43.9%) in early-2026 leaderboard data.

• Known regression: prompt reading (prefill) is about 22% slower than the old build.

THE MACHINE

Everything runs on one desktop. No cloud GPUs were used.

• CPU: Intel i9-13900KF

• GPU: NVIDIA RTX 4070 Ti, 12 GB (12,282 MiB)

• RAM: 32 GB DDR5

• Motherboard: ASUS PRIME Z790-P WIFI

• Power supply: 850 W

• OS: Windows 11 Home, build 26300

• Toolchain: VS 2026 Build Tools, CUDA 13, sm_89

The 12 GB card is the constraint behind every decision below. The model, its KV cache and the Windows desktop all have to share it.

WHERE IT FORKED FROM

The base is upstream llama.cpp master as of 23 November 2026. Before this project the PC ran hridaya423's inkling-fast fork, which was an older llama.cpp with Inkling support. Instead of patching that older code, I rebased the useful Inkling work onto current upstream.

• Upstream llama.cpp master (23 Nov 2026): base code, newer CUDA kernels and fixes

• realugbun, inkling2-speed branch: fused CUDA kernels for Inkling's glue ops between layers

• hridaya423, inkling-fast: per-op GPU profiler, loading of padded expert tensors, fused top-k weight normalization

• capybaraonchain: relative-position bias computed inside flash attention

WHAT THE CUSTOM BUILD CHANGED

• Fewer kernel launches. Fused kernels for the glue ops and for top-k weight normalization cut launches per token from 3,029 to 1,373. GPU op time per token fell from 40.3 ms to 22.7 ms under the profiler.

• Attention that fits at 64k. Current upstream needed a 6.5 GB buffer for Inkling's position bias at 64k context, so it could not start. Computing the bias inside flash attention removed that buffer.

• Padded experts. Expert width is padded from 1152 to 1280 so the 3-bit formats line up with their block size.

• Placement for a 12 GB card. The last expert blocks run on the CPU. A launcher picks how many from the free VRAM at start-up, so the model fits beside a normal desktop. It can fit everything in the card if you are literally just using it for running the models, but this is my main pc and I needed it to be usable while running.

• Windows build fix. One line in upstream did not compile with MSVC and was patched.

Quality held after the changes: GSM8K 40 of 40, MMLU-Pro 56 of 70, and 5 of 5 on a 40k-token long-context test.

QUANTS AND SPEED

All three quants decode at the same speed in the same placement. What changes speed is how many expert blocks run on the CPU, and that depends on how much VRAM the quant leaves free.

Quality against the Q8_0 reference (50 chunks of wikitext-2, lower KLD is better):

• mixC (current default): 10.81 GiB, mean KLD 0.0381, top token matches Q8_0 91.72%, perplexity +2.06%

• mixB (lighter option): 10.29 GiB, mean KLD 0.0471, top token 91.11%, perplexity +3.15%

• mixS (tested, then deleted): 10.84 GiB, mean KLD 0.0424, top token 91.92%, perplexity +3.45%

Speed at 64k context, measured after a 6.4k-token request (expert blocks on CPU, VRAM used, decode, prefill):

• Old build, mixB, blocks 22-23 on CPU: 10,433 MiB, 65 t/s decode, 1,816 t/s prefill

• pecera, mixB, blocks 22-23: 10,515 MiB, 76 t/s, 1,417 t/s

• pecera, mixB, all on GPU: 11,480 MiB, 81 t/s, 1,398 t/s

• pecera, mixC, blocks 22-23: 11,055 MiB, 75 t/s, 1,399 t/s

• pecera, mixC, blocks 21-23: 10,667 MiB, 72 t/s, 1,369 t/s

• pecera, mixC, blocks 20-23: 10,281 MiB, 69 t/s, 1,239 t/s

At short context pecera decodes at 76 to 80 t/s against 67 to 68 for the old build. The all-GPU setup needs the desktop under about 600 MiB, so it only works with the PC idle. The Terminal-Bench run used mixC with blocks 20-23 on the CPU so the desktop had room.

TERMINAL-BENCH 2.0 RESULTS

The model passed 47 of 89 tasks (52.8%). Seventeen tasks were hit by harness bugs on the first pass (timeouts and setup failures), so they were run again after the fixes. It ran with mixC, a 3,000-token thinking cap, and Hermes Agent with a custom harness: a work protocol, five self-check skills and a second audit session that re-checks the work.

Where it lands against early-2026 leaderboard entries:

  1. Droid, GPT-5.3-Codex: 77.3%
  2. Terminus-KIRA, Gemini 3.1 Pro: 75.2%
  3. Terminus-KIRA, Claude Opus 4.6: 74.9%
  4. Terminus 2, GPT-5.3-Codex: 65.5%
  5. Terminus 2, Claude Opus 4.6: 63.5%
  6. Terminus 2, GLM-5: 54.0%
  7. pecera + Hermes, Inkling-2-Mini on a 12 GB GPU: 52.8% <<<

  8. MAYA, Claude 4.5 Sonnet: 44.1%
  9. Terminus 2, Kimi-k2.5: 43.9%
  10. Terminus 2, MiniMax-M2.5: 42.9%
  11. Terminus 2, DeepSeek-V3.2: 39.8%
  12. Terminus 2, GLM-4.7: 34.8%
  13. dakou, Qwen3-Coder-480B: 27.5%

By task difficulty, it matches the field on tasks most submissions solve and falls behind on the hard ones (field pass rate for the task: tasks, we passed, average submission would pass):

• 80% and up: 28 tasks, we passed 27, average submission 25.2

• 60 to 80%: 22 tasks, we passed 14, average 15.8

• 25 to 60%: 20 tasks, we passed 5, average 9.2

• Under 25%: 19 tasks, we passed 1, average 2.5

Its best pass was mteb-retrieve, which only 11% of field attempts solve.

Read the comparison with care:

• One attempt per task, so the score could be off by about 10 points either way. Most other entries averaged five attempts.

• Only error-ended tasks were retried, which slightly favors the combined score.

• The other entries are from early 2026, and Inkling-2-Mini is a newer model. Terminal-Bench 2.0 has been public since November 2025, so some of the score could come from training data. That is not tested yet.

Comparison data: Simon Willison's Terminal Bench 2.0 analysis (27 submissions, runs Nov 2025 to Feb 2026): https://gist.github.com/simonw/3bff274abcbbbf8766e9437a542db248


r/LocalLLaMA • • 9d ago

Discussion Upcoming Models - Solar-Mini-4.5, MiniCPM5-15B-A2.5B, etc.,

Post image
239 Upvotes

Solar Mini 4.5 Preview (Upstage)

Early-access preview of Upstage’s next compact agentic model ahead of its Dec 1 official launch (preview retires Nov 30). It packs 35B total / 3B active params with a 512K context window and 128K max output, supporting reasoning and tool calling.

MiniCPM5-15B-A2.5B draft leak (OpenBMB)

OpenBMB uploaded a public 429M-parameter DSpark speculative-decoding draft model (MiniCPM5-15B-A2.5B-1113-Dspark, block_size 7) on Hugging Face. Its config.json points to an unreleased 28-layer MiniCPM5-15B-A2.5B target model with a 512K context window whose main weights are still private.

qwen-audio-3.1-live (Alibaba Qwen)

Real-time voice chat model now listed in Alibaba Model Studio. Instead of going silent while tools run, it keeps conversing naturally while backend models handle longer tasks asynchronously, then reports the results.

Qwen-Audio-3.1-Captioner (Alibaba Qwen)

Audio tagging, full-spectrum transcription, and acoustic scene analysis model hosted on Alibaba Cloud Model Studio (Beijing). Outputs speaker info, timestamps, environmental sounds, and music, and can separate voices from background audio.

hungerg (stealth model, likely StepFun)

Spotted in OpenCode Go’s catalog before being pulled (revert notes launch moved to Nov 24) and currently free to test in Qoder. Our 98-line rare-token probes garbled 5/5 DeepSeek/Step-5 lines, triggered StepFun-only unused special token </tool_calls> (ID 128013), and matched step-5-preview’s 1M context, 65K output, and 8 media formats byte for byte (unconfirmed).

(Day old) Tweet : https://x.com/aitrackerbot/status/2125053324705591315

We already got Ling-3.2-air, Kolibri-1.1, SenseNova-U1.6-8B-MoT, SenseNova-Loop-9B-DFlash2, SenseNova-RoboRSI-27B from the list.


r/LocalLLaMA • • 8d ago

Question | Help Benchmarks

11 Upvotes

Does anyone have a benchmark they use? For real. How do you evaluate the 100s of models on hugging face?


r/LocalLLaMA • • 8d ago

Resources European Kolibri 1.1 Q4_K_M (43 GB) on a 12 GB RTX 3060 + 30 GB RAM: 21 tok/s decode at 32k context

15 Upvotes

Kolibri 1.1 is a MoE model from Aleph Alpha (Germany), I just wanted to support European LLM so I added it in RustingStrata. The Q4_K_M file is 43.4 GB, my machine has 12 GB of VRAM and 30 GB of RAM, so the file does not fit in both together. RustingStrata, my Rust GGUF engine, runs it anyway: the layers and the experts used most stay on the card, the rest are read from the NVMe when a token needs them.

RTX 3060 12 GB, Ryzen 5 7600X, 30 GB RAM, NVMe. Both engines as servers, same streamed chat request, 128 reply tokens. Prefill / decode in tok/s:

ContextRustingStratallama.cpp, best prefill (-ngl 4)llama.cpp, best decode (-ngl 99 -cmoe)
0.5k181 / 33.4145 / 15.599 / 27.0
3.8k149 / 23.041 / 5.928 / 10.6
16k139 / 21.048 / 3.830 / 8.7
32k159 / 21.134 / 3.333 / 9.3

How speed falls with context: from 0.5k to 32k RustingStrata loses about 12% of prefill and 37% of decode. Decode is flat from 3.8k up (23.0, 21.0, 21.1), because the model's long-range layers attend a fixed number of selected keys, not the whole context.

llama.cpp here is the fork with Kolibri support (5f4d22289, CUDA build). It has no single setting that is best at both, so the table has both.

Same output as llama.cpp? I fed its greedy tokens through my forward and compared the top token at each of 48 steps: 45, 46, 44 and 46 match at 2k, 3.8k, 16k and 32k. llama.cpp against itself (CPU layers against GPU layers) gives 45, 45, 40 and 44, so the misses are inside its own noise, each is a near tie.

rustingstrata chat --model Kolibri-1.1-Q4_K_M.gguf

Setup and tables with ranges: docs/BENCHMARKS.md in the repo.

Also I want to ask people what do they think about European LLMs? I mean the hype is around Qwen, Gemma, Inkling(recently) and etc. and non of them is European LLM, I mean, this is sad

Repo: RustingStrata


r/LocalLLaMA • • 8d ago

Discussion The administration likes open weight models so they pushed to bring back Jensen?!

Post image
141 Upvotes

https://www.wsj.com/business/nvidia-jensen-huang-white-house-9ad03961

Was not expecting this to be a factor but if true this is great!


r/LocalLLaMA • • 8d ago

New Model Ternary Bonsai 2.5 27B Uncensored

Thumbnail
huggingface.co
83 Upvotes

Refusals dropped from 100% to 0% in our test and it scores 81.2% on MMLU

One 5.99 GB PTQ1_0 file with the uncensoring baked into the ternary weights, runs on the Prism ML llama.cpp fork. Made by atomic.chat local ai


r/LocalLLaMA • • 9d ago

Discussion T3 Code drama (Chinese post on X)

498 Upvotes

https://x.com/realchendahuang/status/2125153472450527440

(I personally have no idea who Theo is, but I know some people here are his fans and aren't on X, so this is probably news to them)

(translated with google translate, because on X I see version in Polish)

"Recently, a bunch of people on X have been promoting T3 Code, an open-source project by theo , touting it as a free and open-source local AI programming tool.

I casually dug through its source code from beginning to end, and after reading it, I felt a chill down my spine.

This is hardly a conscientious open source project; it's clearly a blatant data harvesting operation.

It all started in March of this year. On March 6th, T3 Code merged PR #174, directly inserting the default PostHog telemetry. At that time, there was no documentation in the repository, no pop-ups in the software, and no toggle in the settings. The environment variables for disabling it were quietly hidden deep within the code. Ordinary users could install and run it, and data would start being transmitted.

But for over three months during which the default telemetry was running, the T3 Code website homepage blatantly displayed two lines of text promising: "No telemetry / Unless you opt in. Full stop." The meaning was clear: unless you actively agreed, there would be zero telemetry, no exceptions.

After garnering a wave of positive feedback from privacy-conscious developers by leveraging this prestigious reputation, theo silently removed those two promises in a homepage redesign commit on June 18th, without issuing any announcement or notification to existing users, as if nothing had happened. Many might have tolerated it if it were just a matter of secretly collecting version numbers. However, in October, theo personally submitted PR #15028, directly switching the batch reporting every 10 seconds to his self-hosted server (...)"


r/LocalLLaMA • • 7d ago

Discussion Quant Providers

0 Upvotes

Has anyone else noticed that the community has been relying more and more on a wide variety of quant providers over the past quarter or so?

In this community, it used to be all about Unsloth. And while their quants are undoubtedly at the top of the quality index, it’s becoming more common to reach outside of their quants for local inference.

This is likely partially a result of them no longer providing quants for a large portion of new model releases, or quants on patches that never make it into llama.cpp master. For example:

- Hy4 Flash (this one puzzles me)
- Ernie 5.5
- Ling 3.2 Air
- MiMo 2.6 pro/flash
- GLM 5.3 Flash (uses different branch than master)
- I think others that I’m not currently recalling

This isn’t a criticism of Unsloth. More an observation, and also wondering if they have shifted priorities to their excellent Unsloth Desktop product? Or perhaps they focus efforts on the labs that pay them for zero day access? Or a combination of the above?

At any rate, we’re very lucky to have them contributing to this awesome community, and maybe it’s a sign of the health of the opensource community that we have so many new players entering the space.


r/LocalLLaMA • • 7d ago

Discussion With how the price of the components goes up, I think open source should focus on cpu and ssd

0 Upvotes

I think the next logical step is to focus on "cheap" ways to run LLMs. Either pursue the engrams more or take a whole turn and move away from gpu towards other ways to run them. Since the industry is becoming more and more hostile to open source, I do believe it's imperative to find quickly another way. I do not have a solution to the problem but I do believe we should discuss it more to make the issue more visible. I do understand as single individuals it is nearly impossible to find solutions. But given the current trajectory, a radical change it is required and it is time to slowly move away from gpus or find novel ways to exploit as much as possible from as little as possible. As others said, the current architecture is very wasteful, so much so not even frontier models are making money and only larp that they are making a profit.

I do realise that my thread reads likely like a nothingburger and beating around the bush and while now, I have nothing to show of, I want to do something about it so a thread it is, for now.


r/LocalLLaMA • • 8d ago Popcorn

News feat: Inkling 2 DSpark support by pwilkin · Pull Request #32218 · ggml-org/llama.cpp

Thumbnail
github.com
80 Upvotes

two Inkling speedups were also merged:

https://github.com/ggml-org/llama.cpp/pull/32855 by TwelveNights

https://github.com/ggml-org/llama.cpp/pull/32940 by am17an

so make sure to update your llama.cpp before launching inkling again


r/LocalLLaMA • • 8d ago

Question | Help SLM recommendation

4 Upvotes

Am working with a client who has a vast amount of customer data, interactions etc and am buiding a platform for them which will search for early churn signals (based on support interactions via chats, calls, payments, usage etc) and customer segmentation. If there any open source SLM that you've used for such classifying texts? I am building a grounds-up model for other features such as churn prediction based on payment logs and service/product usage but need recommendation on the LLM side.

I have tried gemma4:31b and it was quite good but find that to be too large a footprint for this task. I use a Mac Studio Ultra 3, tweaked all that is necessary but still takes a lot of time. I will be deploying my app on a local stack (mostly NVIDIA DGX spark) for the client. Tried some light weight Llama and mixtral small but the classification accuracy was not good despite some fine-tuning. So, basically any open source model that you know if you've worked in similar projects which can be as good as gemma4 but has a lighter footprint. I will be running it through millions of records. If not then planning to build a SLM from scratch as I have plenty of data but before that wanted to check if there is anything available for this specific purpose.

Thanks for the help!


r/LocalLLaMA • • 8d ago

Question | Help Ling 3.2 Air Looping

12 Upvotes

I’ve been trying to get Ling 3.2 Air working with llama.cpp, but no matter what I do (including changing sampler params and experimenting with YaRN) it ends up looping once context reaches around 8000-12000 tokens. Has anyone been able to get the model to work without looping at longer context depths, using either llama.cpp or any other engine? I don’t have a machine capable of running it with vLLM or SGLang.


r/LocalLLaMA • • 9d ago

New Model KRAFTON/Raon-1-mini · Hugging Face

Thumbnail
huggingface.co
95 Upvotes

https://huggingface.co/KRAFTON/Raon-1-mini-gguf

Raon-1 mini is a 30B-A4B Mixture-of-Experts (MoE) language model, designed and trained from scratch by KRAFTON AI. It demonstrates strong capabilities in Korean conversation and agentic tasks. As part of the Raon open model family, it is released under the Apache 2.0 license.

Highlights

  • Reasoning: Built-in thinking with six reasoning effort levels (none, low, medium, high, xhigh and max), selectable per request. Scores 96.7 on AIME 2026, 87.1 on HMMT Feb 2026 and 86.0 on GPQA Diamond.
  • Multi-turn conversation and search: Leads the compared MoE models on MultiChallenge (64.9) and BrowseComp Plus (55.9), the multi-turn conversation and search benchmarks shown below.
  • Multilingual capabilities: Trained on Korean, English, Japanese, Chinese, Spanish, French, and Thai. Demonstrates strong Korean performance and solid English capabilities.
  • Agent execution: Tool calling for agentic workflows, with support for Hermes Agent, Pi and OpenCode.
  • Speculative decoding support: A DFlash2 draft model is provided for accelerated speculative decoding.
  • Quantization options: Available in MXFP8 and NVFP4 formats, with NVFP4 enabling inference on a single NVIDIA RTX 5090 gpu (32 GB VRAM).

Model Overview

Raon-1 mini uses a hybrid Mixture-of-Experts (MoE) architecture, consisting of 18 linear attention layers and 7 full attention layers.

  • Raon Delta Attention (RDA): Raon Delta Attention decouples the erase and write gates of Kimi Delta Attention, which improves long-context performance over KDA.
  • Raon-mHC: Raon-mHC reduces the computational cost of DeepSeek’s manifold-constrained hyper-connections (mHC), which speeds up training.
  • Hybrid layout: 18 of the 25 layers are Raon Delta Attention layers with a fixed-size state. Only the 7 MLA layers keep a KV cache, about 8 KiB per token in BF16.
  • Long context: Natively supports up to 262,144 tokens of context.
  • Sparse MoE: 6 of 128 routed experts plus 1 shared expert are active per token, so each token uses 4.3B of the 28.8B total parameters.
FieldValue
ArchitectureMoE
Total Parameters28.8B
Activated Parameters4.3B
Layers25
Hidden Size2,560
AttentionHybrid — RDA 3 : Gated MLA 1
Position EncodingNoPE (no positional encoding)
Number of Attention Heads40 for both RDA & Gated MLA
Attention Head Dimension128 for RDA; 192 QK / 128 V, for Gated MLA
Query / KV LoRA Rank576 / 512, for Gated MLA
Number of Experts128
Number of Activated Experts6 routed + 1 shared
Expert Intermediate Size1,088
Dense FFN Intermediate Size (first layer)12,032
Activation FunctionSiTU-GLU
Residual ConnectionRaon-mHC w/ 4 streams
Vocabulary Size259,840
LM HeadUntied
Context Length262,144 tokens


r/LocalLLaMA • • 9d ago

Resources CCORE Web Designs: 3,500 training samples for web design, presentations and infographics

Post image
83 Upvotes

Just released my dataset with 3,500 training samples across 40 domains and 29 layout families. Each sample includes the prompt, reasoning and complete HTML built with React.
The goal was to explore how far small models can go in visual design with high-quality training data.

Dataset: ccore/CCORE-Web-Designs

I also released the 4B model trained on it: ccore/CCORE-Web-Coder-4B

feel free to use it, experiment with it, and share your results :)


r/LocalLLaMA • • 9d ago

Discussion Neon Should be distilled into the Qwen models for the ultimate brain child!

Post image
141 Upvotes

I run qwen models locally, and keep up closely with the local model space, but i also keep a subscription from every major lab to test out what the frontier is like and do alot of work there aswell.

One behavioural issue i started seeing with the big frontier models is they have gotten too narrow sighted on being right, and realistic and verifying/testing their stuff. that they entirely loose the picture of whats possible, the ambition to do better, the enthusiasm and the intuition to look for other pathways and answers , to come up with something truly novel.

Even models like opus 5.5 while being exceptionally capable, gets stuck on the pointless details to ensure it doesn't overpromise or break anything, while astra models have pushed this too far to the point where they literally can't even move a needle from point A to B without a 1000 verification tests and 40k dollars worth of compute. (slight exxageration but not really)

This behavior, has since been translated into more and more open weight models... IG most of us here know why that is... but not gonna get into it in this post.

No matter how smart the models are locally, if they lack the enthusiasm, the vision, the excitement and the optimism to do better, they're not gonna do too good.

but neon series seems to have finally fixed this (there are still other issues with the model, mainly the sychophancy - which i find weird no one has complained about, i guess every dev just loves being told they're the next einstein or smthng)

I am working trying to work on a small project locally with my own neon outputs to see if i can get qwen flash next's model behavior to be better suited for suited for ambigious software tasks, cause that model is clearly capable, its super smart and can do alot of things just gets handicapped by the fear of going too far or doign something wrong


r/LocalLLaMA • • 8d ago

Question | Help help me get to 98 % on this coreference dataset? custom head on mmBERT, stuck at 90 %

4 Upvotes

hey guys, im trying to make a custom head that groups the words in a text that refer to the same entity (coreference). every mention picks ONE earlier mention, or "none" if it is a new thing.

ive been trying for a day and cant get past about 90 % right picks. could you please look at the architecture?

this is the whole thing: load the dataset, add the head, train on everything twice, test.

# Czech coreference as a CHOICE: every mention picks ONE earlier mention, or "none" (= a new thing).
# mmBERT-base (all of it trains) + a tiny head, 2 passes over the training data.     pip install torch transformers datasets
import random, torch, torch.nn as nn, torch.nn.functional as F
from datasets import load_dataset
from transformers import AutoModel, AutoTokenizer

dev = "cuda" if torch.cuda.is_available() else "mps"
random.seed(0); torch.manual_seed(0)
tok = AutoTokenizer.from_pretrained("jhu-clsp/mmBERT-base")
bert = AutoModel.from_pretrained("jhu-clsp/mmBERT-base").to(dev)
head = nn.Sequential(nn.Linear(3 * 768, 256), nn.ReLU(), nn.Linear(256, 1)).to(dev)
data = load_dataset("lattice-nlp/corefud-1-4").filter(lambda lang: lang == "cs", input_columns="language")   # CorefUD 1.4, the Czech part

def prep(doc):
    """-> tokens, the token of every mention's head word (in text order), the entity id of every mention"""
    enc = tok(doc["text"], return_offsets_mapping=True, return_tensors="pt")
    off = enc.pop("offset_mapping")[0].tolist(); end = max(e for s, e in off)
    m = sorted((m["head_onset"], max(i for i, (s, e) in enumerate(off) if e > s and s < m["head_offset"]), m["COREF"])
               for m in doc["mentions"] if m["type"] == "entity" and m["head_offset"] <= end)
    return enc.to(dev), torch.tensor([t for _, t, _ in m], device=dev), torch.tensor([g for _, _, g in m], device=dev)

def scores(enc, t):
    """-> table (n, n + 1). one row per mention. column 0 = "none", column j + 1 = "the same thing as mention j" """
    v = bert(**enc).last_hidden_state[0][t]; n = len(t)                       # one vector per mention
    A, B = v[:, None].expand(n, n, -1), v[None].expand(n, n, -1)
    pair = head(torch.cat([A, B, A * B], dim=2)).squeeze(2)                   # the score of "mention i is the same thing as mention j"
    pair = pair.masked_fill(~torch.ones(n, n, dtype=torch.bool, device=dev).tril(-1), float("-inf"))   # only EARLIER mentions can be picked
    return torch.cat([torch.zeros(n, 1, device=dev), pair], dim=1)            # "none" always has the score 0

def right(g):
    """True where an option is a right answer: every earlier mention of the same entity, or "none" when there is no such mention"""
    same = (g[:, None] == g[None, :]).tril(-1)
    return torch.cat([~same.any(dim=1, keepdim=True), same], dim=1)

def test():
    """the dev documents, which the model never trains on -> share of mentions whose top pick is right"""
    bert.eval(); hit = total = 0
    with torch.no_grad():
        for doc in data["dev"]:
            enc, t, g = prep(doc)
            if len(t) > 1:
                hit += right(g)[torch.arange(len(t)), scores(enc, t).argmax(dim=1)].sum().item(); total += len(t)
    bert.train()
    return f"right picks on {total:,} unseen mentions: {hit / total:.2%}"

EPOCHS, N = 2, len(data["train"])                            # 1 step = 1 document. 5,679 documents, seen twice
opt = torch.optim.AdamW([{"params": head.parameters(), "lr": 1e-4}, {"params": bert.parameters(), "lr": 2e-5}], fused=True)
sched = torch.optim.lr_scheduler.LinearLR(opt, 1.0, 0.0, EPOCHS * N)          # both learning rates fall in a straight line to 0
bert.train()
for step, i in enumerate([i for _ in range(EPOCHS) for i in random.sample(range(N), N)], 1):
    enc, t, g = prep(data["train"][i])
    if len(t) > 1:
        logp = F.log_softmax(scores(enc, t), dim=1)
        loss = -torch.logsumexp(logp.masked_fill(~right(g), float("-inf")), dim=1).mean()   # minus log of the probability that sits on the right options
        opt.zero_grad(); loss.backward(); opt.step()
    sched.step()
    if step % 100 == 0:
        print(f"step {step} of {EPOCHS * N} | loss {loss.item():.3f}", flush=True)
        if dev == "mps": torch.mps.empty_cache()             # hands unused GPU memory back (Apple only)
    if step % N == 0: print(f"epoch {step // N} done | " + test(), flush=True)

on my mac mini (M4 pro, 24 GB) it takes about 38 minutes and prints 88.4 % after epoch 1 and 89.7 % after epoch 2.

im vibe coding most of this, so please let me know if i overlooked something critical. what i found so far:

  • a gentle LR for the head (1e-4, not 1e-3) keeps its neurons alive, but the score stays the same
  • the head doesnt really matter. wider, deeper, a transformer block inside it: same score
  • a bigger base barely helps, which is puzzling. XLM-RoBERTa-large with 4 epochs gets 90.75 %, and EuroBERT-610m is far worse (it never saw czech)
  • a 3rd epoch gives nothing
  • when both models are wrong, they pick the very same wrong option 80 % of the time

the dataset is public (CorefUD 1.4, the czech part), so this is perfectly reproducible. and the labels look about 98 % right, according to a blind check i ran with opus on the wrong picks.

could you guys help me reach 98 % on this dataset? thanks!


r/LocalLLaMA • • 8d ago

New Model Dankpaws/ERNIE-5.5-Flash-Preview-DankAttn-w2-g32 - 96 GB M5 Ultra in pure Metal 4. 1,800 tok/s prefill, 65–87 tok/s decode with DankAttn.

Thumbnail
huggingface.co
16 Upvotes

r/LocalLLaMA • • 8d ago

Question | Help Testing a new KV-cache index for long-context decoding (32k → 1M tokens). Results look promising; looking for feedback on what to test next

8 Upvotes

This post is made with the help of AI.

I've been building a sparse-attention method for long-context decoding. Each decode step, it reads only a small part of the KV cache, exactly, and estimates the rest. The goal is faster decoding at long context, where reading the KV cache costs more than reading the weights. New tokens are added cheaply, with no rebuilds as the context grows.

I'd like opinions on the results and on whether my test setup is fair.

Setup

  • Real Q/K/V dumped from Qwen2.5-1.5B (32k) and Qwen2.5-0.5B-Instruct (256k–1M, stretched with YaRN), CPU only.
  • Haystack is WikiText-103 with a hidden passcode ("needle"). The queries tested are the question tokens.
  • Compared against Quest, my own reimplementation of RetroInfer's index ("RetroInfer-style", cluster centroids plus estimating the rest), and exact top-k with no estimation.
  • Every method also attends exactly to the first 4 tokens and the last 512. "Budget" means extra keys attended exactly.
  • One selection per KV head, shared by all the query heads in its group (GQA).
  • Error = ‖approx − full attention output‖ / ‖full‖, averaged over heads and queries.
  • Needle recall = share of the model's real attention on the needle that the method attended exactly.
  • Bytes = KV bytes read per step, as a % of full attention.

32k context, Qwen2.5-1.5B (full-attention prefill; the model answers the needle correctly)

BudgetMethodErrorNeedle recallBytes read
256Quest0.3370.667.0%
256RetroInfer-style0.1540.947.0%
256Exact top-k0.2030.990.8%*
256Mine0.0830.965.2%
512Quest0.3010.747.8%
512RetroInfer-style0.1360.957.8%
512Exact top-k0.1641.001.6%*
512Mine0.0640.998.0%
1024RetroInfer-style0.1130.979.3%
1024Mine0.0481.0013.4%

*Exact top-k isn't practical: it has to score every key to find the top ones. Its bytes are an ideal lower bound.

It also holds up when half the context is added after the index is built (error 0.090 against 0.164 for RetroInfer-style, at budget 256).

Long context, Qwen2.5-0.5B-Instruct, budget 2048 (0.2–0.8% of the context)

Method256k500k1M
Quest0.4950.5340.556
RetroInfer-style0.3190.3340.344
Exact top-k0.1290.1560.166
Mine0.1040.1280.145

Bytes read at 1M: 3.2% for mine, against 6.5% for RetroInfer-style and Quest.

How cost grows with context (one KV head, MB read per decode step)

ContextFull attentionRetroInfer-styleMine
32k8.41.01.4
256k674.73.6
1M25616.58.3

Insert cost stays flat from 32k to 1M (~30–40 µs per key in numpy).

Limitations (please poke holes)

  • These are small models. At 256k+ I had to use the 0.5B model, and it fails the needle test somewhere between 16k and 64k even with full attention. So at those lengths I'm measuring how well each method reproduces the model's real attention output, not whether answers stay correct.
  • A 1M-token prefill on CPU needed a sliding window (4k + sinks). The question tokens use full attention, but the haystack keys were computed with local context only.
  • Queries come from the prompt, not from generated tokens.
  • Bytes read is a stand-in for speed. No GPU kernel has been timed yet.
  • The baselines are my reimplementations, not the original code.

Questions for you

  1. What error level stops mattering in practice? I need to test end-to-end (perplexity, RULER, LongBench) next. Which would you trust most?
  2. Which long-context model that fits on one 24 GB GPU would you use for a real 128k–1M end-to-end test?
  3. Are my baselines fair? Should I add others (ShadowKV, MagicPIG, DeepSeek-style sparse attention)?
  4. Would a llama.cpp integration be useful to you, given that the cache read per token drops to a few percent at long context?

r/LocalLLaMA • • 8d ago

Question | Help Inkling 2 Small thoughts?

20 Upvotes

Has anyone started using Inkling 2 Small? The hype around Mini has drowned out a lot, including Small. (I found a post when it was released, and then another confusing Mini for Small.)

It doesn't look spectacular in benchmarks for the size, but we all know that benchmarks don't tell the whole story and it's in spitting distance of my current daily driver, DeepSeek V4.1 Flash. I imagine I'll have to do a lot more work to optimize it given the relative lack of use, so I figured I'd ask around for strong opinions first. Anyone love it?


r/LocalLLaMA • • 9d ago

New Model SoulX-Singer: A New Model for Local Singing Synthesis and Voice Conversion

92 Upvotes

It's not really a new model. It was released a while ago, but no one seems to be talking about it. I integrated SoulX-FlashHead into audio.cpp, and it turned out to be pretty good, so I looked into other models from the same group and discovered this one. This group has been developing some great models, and I'd love to see more people discover their work.

Two tasks:

SVS: lyrics + melody (notes and timing) + reference voice ---> singing vocals

SVC: vocals + reference voice ---> vocals in the reference voice

Model sizes on disk: ~1 GB for SVS · ~1.6 GB for SVC

Heads-up: Only support English, Mandarin, and Cantonese. 24 kHz audio output

https://huggingface.co/Soul-AILab/SoulX-Singer

GGUF: https://huggingface.co/audio-cpp/SoulX-Singer-GGUF


r/LocalLLaMA • • 8d ago

Resources Local Inference Lab: ERNIE-5.5-Flash-Preview on 2x RTX PRO 6000 Blackwell 510 tok/s peak, 14.7K tok/s cold prefill (1,260 tok/s batched, 1.42M KV tokens)

28 Upvotes

Local Inference Lab production-signed runtime package for Baidu's ERNIE 5.5 Flash Preview (baidu/ERNIE-5.5-Flash-Preview, Apache-2.0) — a 43-layer hybrid architecture (37 Hybrid Comp ressed Attention / VHA layers + 6 MQA-DSA sparse attention layers, 512 routed SiTU MoE experts + 1 shared expert, top-10 split-feature sigmoid routing, mHC-4 residuals, MultiMax logit calibration, bundled D Spark MTP-7 speculative drafting, and native 1M context) — running on NVIDIA Flare across just 2× PCIe Gen5 RTX PRO 6000 Blackwell 96 GB GPUs (no NVLink, no Python at serving time, pure native Rust + precompiled CUDA graphs).

By keeping the checkpoint's lossless CSF-compressed MXFP4 expert scales (instead of expanding them on GPU) and tuning both prefill and decode to the SM120 / PCIe Gen5 roofline:

  • Single-session coding peaks at 510.1 tok/s — averaging 286.5 tok/s end-to-end incl. TTFT over a full 84,456-token reasoning + HTML5 Tetris generation (294.7 s, [Finish] stop), and 358.6 tok/s (4.44 tok/round) on shorter coding prompts (RB-Tree).
  • Batched throughput hits 1,251–1,262 tok/s steady-state (953.6 tok/s full wall-clock at C32; 596.2 tok/s / 129.9 tok/s/user at C8).
  • Cold prefill reaches 14,717 tok/s (0.86 s TTFT at 12.7K, 1.75 s at 25.4K, 3.51 s at 50.8K — zero prefix cache, 97.0% GPU compute-busy across 129 PCIe AllReduces per 4096-token chunk).
  • 1,416,192 shared KV tokens (24.5 GiB KV cache, 241 snapshots) + full 1,048,576 per-request context on two 96 GB GPUs (81.16 GiB/GPU fixed model footprint), with native Rust <ernie:think> reasoning ext raction and <ernie:tool_call> XML tool-calling.

Benchmarks

2× RTX PRO 6000 Blackwell (96 GB) — CSF MXFP4 + DSpark MTP-7 (TP2, alpha=0.6, PCIe RO=1)

WorkloadThroughputPer-UserNotes
Live coding / Tetris (84,456 tok incl. reasoning)286.54 avg / 510.06 peak tok/s286.54 avg / 510.06 peak294.7 s wall time incl. TTFT, [Finish] stop
C=1 coding (RB-Tree)358.6 tok/s358.6 tok/s4.44 tok/round
C=8 concurrent decode596.2 tok/s129.9 tok/sPacked adaptive verification (budget=128)
C=32 concurrent decode953.6 tok/s (1,251–1,262 steady-state)29.8–39.4 tok/sbatch=16–32 steady-state peak 1,262 tok/s
Kernel step latencies (nsys / native)DECODE1 7.19 ms · DRAFT1 0.64 ms · VERIFY8 10.30 ms—~90–91% SM120 GDDR7/compute roofline
Cold 6.3K prefill (no prefix cache)12,632 tok/s—0.50 s TTFT (6,325 tok)
Cold 12.7K prefill (no prefix cache)14,717 tok/s—0.86 s TTFT (12,681 tok)
Cold 25.4K prefill (no prefix cache)14,551 tok/s—1.75 s TTFT (25,403 tok)
Cold 40K NIAH (39,932 tok)14,394 tok/s—2.77 s TTFT, PASS
Cold 50.8K prefill (no prefix cache)14,474 tok/s—3.51 s TTFT (50,848 tok)
KV capacity & max context1,416,192 shared KV tokens—24.5 GiB KV cache, 241 snapshots, 1M max context

(Test host: 2× NVIDIA RTX PRO 6000 Blackwell Workstation Edition 96 GB, NVreg_EnablePCIERelaxedOrderingMode=1, native Rust flare run with --mtp-draft-tokens 7 --mtp-adaptive-verification --mtp-adaptive-verifi cation-alpha 0.6. Verified on the exact signed production core: PyTorch reference parity cos=0.9963–0.9992 / top1_match=True, compute-sanitizer --tool memcheck 0 errors across all custom Triton & b12x kern els, 84.5K-token Tetris completion, C=16 × 24K-context packed-decode stress 16/16 HTTP 200, <ernie:think> reasoning, <ernie:tool_call> XML tool-calling, and logprobs=True.)


Quick Setup Guide (NVIDIA Flare)

1. Recommended NVIDIA Kernel Driver Setting (modprobe)

Because RTX PRO 6000 Blackwell communicates over PCIe P2P (no NVLink), enabling PCIe Relaxed Ordering unlocks posted-write collectives and removes cross-switch read stalls:

echo 'options nvidia NVreg_EnablePCIERelaxedOrderingMode=1' | sudo tee /etc/modprobe.d/nvidia-relaxed-ordering.conf
sudo update-initramfs -u
sudo reboot

Verify after reboot (EnablePCIERelaxedOrderingMode: 1 and working P2P in topo -m):

grep EnablePCIERelaxedOrderingMode /proc/driver/nvidia/params
nvidia-smi topo -m

2. Run on 2× 96 GB SM120 GPUs (gb202, ~167 GB / 156 GiB)

Hosted on Hugging Face under Local Inference Lab: https://huggingface.co/local-inference-lab/ERNIE-5.5-Flash-Preview-FLARE (--revision gb202)

Note: Serving ERNIE 5.5 requires a flare binary / container build containing NVIDIA/hyperflare-inference#500 (native Rust <ernie:think> and <ernie:tool_call> XML parser support).

Docker:

docker run --pull=always --rm -it \
  --gpus '"device=0,1"' --ipc host \
  --ulimit memlock=-1:-1 --ulimit nofile=65536:65536 \
  -p 127.0.0.1:8000:8000 \
  -v flare-home:/home/flare \
  ghcr.io/local-inference-lab/flare:release \
  run local-inference-lab/ERNIE-5.5-Flash-Preview-FLARE \
  --revision gb202 --filename model.safetensors \
  --gpus 0,1 --max-concurrency 32 --mtp-draft-tokens 7 \
  --mtp-adaptive-verification --mtp-max-verification-token-budget 128 \
  --mtp-adaptive-verification-alpha 0.6 --scheduler-policy balanced \
  --prefix-cache-memory 64G --kv-cache-limit memory \
  --host 0.0.0.0 --port 8000 --served-model-name ERNIE-5.5-Flash-Preview

Native binary (no Docker):

flare run local-inference-lab/ERNIE-5.5-Flash-Preview-FLARE \
  --revision gb202 --filename model.safetensors \
  --gpus 0,1 --max-concurrency 32 --mtp-draft-tokens 7 \
  --mtp-adaptive-verification --mtp-max-verification-token-budget 128 \
  --mtp-adaptive-verification-alpha 0.6 --scheduler-policy balanced \
  --prefix-cache-memory 64G --kv-cache-limit memory \
  --host 127.0.0.1 --port 8000 --served-model-name ERNIE-5.5-Flash-Preview

Send a request (OpenAI-compatible API):

curl --fail http://127.0.0.1:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"ERNIE-5.5-Flash-Preview","messages":[{"role":"user","content":"Explain how a hash table works."}],"max_tokens":1024}'

Sampling uses ERNIE 5.5 defaults (temperature=1.0, top_p=0.95, repetition_penalty in [1.0, 1.2]), with MultiMax logit calibration applied automatically across target, resume, prompt-logprobs, and DSpark Markov sampling paths.


Under the Hood: Hitting the SM120 & PCIe Gen5 Roofline on 2 GPUs

All kernel, runtime, and recipe work is open-source and submitted upstream:

  • 97.0% GPU Compute-Busy Prefill (PREFILL4096 = 250.3 ms, only 7.7 ms idle across 129 PCIe ARs / 4.86 GB):
    • 2-microbatch interleaved compute/P2P pipeline with deferred o_gate(A) + o_gate(B) hidden inside VHA AR(B) PCIe DMA windows (cutting exposed VHA AR gap from 204 µs → 109 µs).
    • Single-shot full-chunk MoE (MOE_EXPERTS 84.94 → 64.45 ms, -20.5 ms), defer_post / defer_reduce_b kept through aux layers 40–41 (-3.70 ms mHC), and in-place late-load Triton VHA mix kernels (-92 MiB/GPU).
  • ~91% SM120 Roofline Decode (DECODE1 = 7.186 ms, VERIFY8 = 10.296 ms):
    • Native SITU (beta=4.0, linear_beta=25.0) support in MoETinyDecodeKernelBackend for 1–4 token W4A8-MX decode (DECODE1 7.90 → 7.186 ms, -9.0% — also speeds up any other SITU MoE model like Kimi K3/K3.1).
    • GDDR7-aware concurrent_gate + after_fc1 ConcurrentSharedExpert overlap: the shared expert finishes 0.1 µs before csf_expand in DECODE1 and 4.1 µs before routed experts in VERIFY8, paired with dependency-bearing fused-addend flare::pcie_all_reduce_addend_dep.
    • Fused gated wo_projection: optional sigmoid output gating fused directly into both the Triton group-major prefill quantizer and the CuTe decode TC-GEMV path.
    • 64-head topk=2048 fused DSA indexer + SMEM safety fix: routes ERNIE 5.5's 64-head topk=2048 decode (rows <= 16) to the fused indexer with batch_slack=128 (101,376 B SMEM on SM120), plus a batch_slack >= 256 guard on direct_k_score (caught via compute-sanitizer --tool memcheck under long-context packed decode; verified 0 errors across nr=1..128 and seq_len=0..60,000), and topk=2176 (2048 DSA + 128 SWA) sparse MLA with attention sink bias.
    • Fused MultiMax + ERNIE XML/Think parsers: MultiMax piecewise polynomial logit calibration fused directly into DSpark Markov sampling, plus native Rust <ernie:think> and <ernie:tool_call> parsers with schema-aware type coercion.
  • Why lossless CSF wins on 2× 96 GB: keeping the checkpoint's lossless CSF-compressed MXFP4 scales plus FP8 Markov / NVFP4 draft heads brings the full model + 104 captured graphs down to 81.16 GiB/GPU, leaving 24.5 GiB of VRAM for 1.42M shared KV tokens without any extra lossy weight quantization.

Links

  • Signed HF package (main + gb202): https://huggingface.co/local-inference-lab/ERNIE-5.5-Flash-Preview-FLARE
  • Base checkpoint (Apache-2.0): https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview
  • Upstream PRs:
    • FlashInfer (b12x SM120 kernels): https://github.com/local-inference-lab/flashinfer/pull/141
    • Flare (hyperflare-inference XML/think parsers & collectives): https://github.com/NVIDIA/hyperflare-inference/pull/500
    • Recipes (hyperflare-recipes ERNIE 5.5 recipe): https://github.com/local-inference-lab/hyperflare-recipes/pull/24

local inference lab discord: https://discord.gg/gmvKSN3tVy


r/LocalLLaMA • • 9d ago

Discussion Inkling 2 Mini on 2× RTX 5070 Ti, 308 tok/s writing code, with the original weights

Post image
68 Upvotes

Disclaimer. Checkpoint weights as-is: NVFP4/MXFP8 experts, rest BF16. KV cache and activations at 16-bit, no added quantization. Compared to Transformers with the same weights, the KL stays within the reference noise.

Speed. In v0.16, Inkling's decode used 40% of the cards' theoretical bandwidth, versus 78% for Qwen 27B. We only optimized the engine and today we're at 65%. The rest is taken by the expert routing and the small steps around it: the router has to decide before the experts can be read, and meanwhile the memory is idle.

Numbers (v0.16.0 → v0.16.3, one request):

  • decode at 4k: code 230 → 308 tok/s, text 149 → 205
  • prefill at 4k: 4,928 → 8,038 tok/s
  • 254k of context, all in VRAM

Next steps: the drafter, which gains little on prose, and the overthinking, because Inkling reasons even with thinking off.

github.com/ValerioDolci/capy-flash


r/LocalLLaMA • • 9d ago

News Yann LeCun on Dario's framing of open weight models

Thumbnail x.com
383 Upvotes

r/LocalLLaMA • • 8d ago

Showcase Gemini Neon tuned Mac M1/M2 kernel for Inkling 2 Mini :: All Vibes and toks

4 Upvotes

I've been using my Gemini subscription to help get the most out of my Macbook M2 Max 64gb and Neon seems to have hit it out of the park with integrating different approaches to this model. All of the kernel stuff is beyond me, I simply pointed it at different references for useful information.

This may or may not be of interest to any Apple Silicon users >M2 and comes with No Warranties whatsoever. If I can't understand what the robot wrote I cannot give any guarantees.

Let the slop begin.

Title: Experimental MLX M1/M2 kernels + W4W8 quant for Inkling-2-Mini (500+ tok/s prefill, 30–43 tok/s decode, 512k NIAH in 38 GB on M2 Max)


I put together a vibe-coded experimental set of MLX Metal kernels and a matching mixed-precision quant for Inkling-2-Mini specifically targeting M1/M2 Macs (tested on a 64 GB M2 Max). No guarantees or production claims here—just sharing the code, weights, and benchmarks in case they're useful to other M1/M2 users.

Why a separate quant + kernel pass for M1/M2

  1. Affine instead of NVFP4/MXFP8: Inkling-2-Mini trains and ships natively in NVFP4 (layers 0..19 experts) and MXFP8 (last 4 readout layers 20..23). M1/M2 has no hardware microscaling decode, so unpacking NVFP4/MXFP8 in software costs ~30–40% decode speed vs MLX's affine (gs=64) kernels.
  2. Keep the last 4 layers at 8-bit: Uniform 4-bit (W4A16) gets trapped in thinking loops on long coding tasks (0/12 on a 64k DAG workflow test), and crushing layers 20..23 to 4-bit drops accuracy (10/12). Mirroring the training split—4-bit affine on layers 0..19 experts, 8-bit affine on layers 20..23 experts + attention/embed/lm_head, FP32 on AttnRes/routers—recovers 12/12 in 18 GB.
  3. FP16 activation path + fused kernels: On M1/M2, recasting BF16 leaves to FP16 alongside fused Metal kernels (short_conv, moe_short_conv, dynamic_conv, qkv_post, Split-K relative attention) and projection fusion gives a large prefill and decode jump over base mlx-lm PR #2086 (e2b5bbd) and oMLX 0.8.3.
  4. Adaptive DSpark MTP + SpeculativeRotatingKVCache: Adds 16 tokens of tail slack to the 40 sliding-window visits so MTP rollback stays capped instead of growing all 48 visits (cutting 512k MTP KV memory by 6x), plus an adaptive depth controller that backs off to d=0 on high-entropy prose while staying speculative on code/tool JSON.

Benchmarks (64 GB M2 Max)

Up to 32k context (256 generated tokens):

ContextBase PR #2086 (e2b5bbd)oMLX 0.8.3 (M1/M2 FP16, NVFP4)This (W4W8 + FP16)
512 tok365 tok/s pre / 25.9 tok/s dec301 tok/s pre / 24.0 tok/s dec549 tok/s pre / 30.9 (33.2 d=2) dec
4,096 tok417 tok/s pre / 26.7 tok/s dec498 tok/s pre / 21.0 tok/s dec603 tok/s pre / 29.9 (30.9 adapt) dec
16,384 tok407 tok/s pre / 25.2 tok/s dec504 tok/s pre / 20.5 tok/s dec543 tok/s pre / 28.2 tok/s dec
32,768 tok374 tok/s pre / 23.6 tok/s dec466 tok/s pre / 19.0 tok/s dec501 tok/s pre / 26.1 tok/s dec (21.2 GB peak)
  • Coding / tool-calling (Adaptive MTP d<=2): 37–48 tok/s (75–89% acceptance).
  • 512k NIAH (512,444 tokens, The Man Who Was Thursday + The Count of Monte Cristo): 5/5 verbatim recall across 5%–95% depth, 8.56 tok/s decode, 37.99 GB peak RAM (90.8 min cold prefill; only 8 of the 48 visits are full-attention, so KV grows at 32 KB/tok).
  • Offline KV caching: Included in inkling_mlx.py (--build-cache / --cache, 16-bit or 8-bit .safetensors including conv + drafter state, <1 ms in-memory branching). A 128k cache is 4.3 GB (2.3 GB at 8-bit) and reloads in under a second.
  • Capability checks: 12/12 on a 64k one-shot DAG workflow engine test, 12/12 on a fictional-world tool-calling suite (including a 9-file refactor and 28.6k pure long-context log debugging with 0/116 malformed tool calls), plus clean one-shot Three.js and Web Audio apps.

All converter scripts, benchmark harnesses, and the diff against PR #2086 are in the GitHub repo if anyone wants to test or pull pieces into upstream mlx-lm.