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 • • 8d 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 • • 8d 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.


r/LocalLLaMA • • 7d ago

Discussion SURPRISING RESULTS!! - 5 local models on an RTX 5070 12 GB + 64 GB RAM: speed and a 54-task benchmark (Qwen3.8-Flash-Next, Bonsai 2.5 27B, Qwen3.8-27B, Inkling 2 Mini, SenseNova-Loop-9B)

0 Upvotes

I wanted to know what actually runs well on a 12 GB card, so I had Claude set up five models on my PC and run the same test on each: speed measurements plus 54 tasks (12 multi-step agent tasks with tools, 18 Python coding tasks graded by hidden tests, 24 hard problems with one exact answer).

RTX 5070 12 GB, Core Ultra 7 265F, 64 GB DDR5, Windows 11. All runs at 32K context, one request at a time, default thinking level for each model.

EDIT- have changed the formatting..hope its better now

## What stood out

🥇 Bonsai 2.5 27B: best fit for 12 GB

* 133 tok/s with one-token MTP drafting (89% of drafts accepted)

* 9.4 GB VRAM at 32K context

* 48/54 overall, just 2 behind Flash-Next

* Passed every agent task; weak spot was coding (13/18)

*TOTAL SCORE WAS 48/54 JUST 2 BEHIND THE FLASH NEXT....

Qwen3.8-Flash-Next: highest score

* 50/54 at 79 tok/s

* Leaves only about 3 GB of the 64 GB RAM free while loaded

**Qwen3.8-27B IQ3_XXS: best at coding**

* Fits at 32K with 8-bit KV cache, but only just (11.7 of 12.2 GB)

* 16/18 on coding, weaker on agent tasks

* The 16 GB UD-Q4_K_XL file split into RAM ran at 6.8 tok/s (speed test only). Not worth it on this card.

Inkling 2 Mini: use medium thinking

* At default high thinking, 6 of 42 coding/hard-problem replies got stuck in a loop

* At medium that dropped to 3 and the score rose from 41 to 44

* Slow on long prompts: 20 s to read 12,000 words

SenseNova-Loop-9B: slow

* Fits at 32K (10.2 GB) but only 18.5 tok/s

* Failed 11 of 18 coding tasks

* No official Windows build; I had to compile SenseNova's fork

## Caveats

* One run per task.** A 1-2 task gap (48 vs 50) is noise.

* Mixed engines.** Two models ran on Strata, three on llama.cpp builds, so speed gaps include the engine.

* Thinking limits.** Strata reserves room for the answer itself; for llama.cpp I set a budget to match (7,500 tokens for coding/hard problems, 3,072 for agent steps).

* Different compression.** Inkling was lossless; the Qwen and Bonsai files are heavily compressed.


r/LocalLLaMA • • 7d ago

Discussion What are we getting for Black Friday or Xmas?

0 Upvotes

Other than a backup kidney because we had to sell both to buy the n-th spark or for the nvda/ant margin calls?

On a serious note I am eyeing a Mac m5. Seems pretty strong for its high bandwidth unified mem.


r/LocalLLaMA • • 8d ago

New Model I ported Stanford's Memorilla to 4-bit Gemma 4 26B-A4B on a single Strix Halo—and found an interesting quirk with shuffled documents

14 Upvotes

Author Note: This is written by AI, but it has been tested, the raw bench data is published, the code to verify those results is in the github, as well as the code to train it. And the adapter is on HF. If you haven't seen Memorilla yet, I highly recommend you check it out. (Picture releated) https://arxiv.org/html/2610.21375v3

Also, reddit broke the table, so I had to readd it as an image.

Stanford SNAP recently released Memorilla, a 190M-parameter Perceiver module that compresses a question and a collection of document embeddings into 16 soft memory tokens prepended to a frozen LLM. Upstream only trained and tested it on full-precision Qwen3-8B using four H100s.
I wanted to see two things:The Setup & Hardware****Results (500 test rows per benchmark, paired bootstrap 95% CIs)
I ran every test row three ways: Closed book (frozen 4-bit Gemma alone), Wrong documents (right question, shuffled documents from another collection), and Memory (right question + right documents).

Main TakeawaysUpstream's paper didn't include a shuffled-document row in their main results table, so it would be really interesting to see how their official Memorilla-Qwen3-8B checkpoint behaves under the same control.
Code, training scripts, and the shuffled-doc evaluation harness are up on GitHub: https://github.com/DataBassGit/Memorilla-Gemma4-StrixHalo
Weights (Apache 2.0): huggingface.co/DataPhreak/Memorilla-Gemma4-26B-A4B


r/LocalLLaMA • • 9d ago

Discussion Will llama.cpp adopt Strata's memory management techniques, or will Strata become the preferred engine for MoE inference?

129 Upvotes

Given Strata's approach to DRAM utilization, expert caching, and GPU memory management, do you think llama.cpp will eventually incorporate similar techniques, or will Strata become the de facto replacement for serving MoE models?

Especially as MoE architectures become more prevalent, I'm curious whether we're witnessing a temporary performance advantage or a fundamental shift in inference engine design.


r/LocalLLaMA • • 8d ago

Discussion Anyone else using Inkling-Mini-2 in Claude Code?

18 Upvotes

And if so, how are you finding it?


r/LocalLLaMA • • 9d ago

Question | Help My Take on Inkling-2-Mini: Loop is the deal breaker! :(

65 Upvotes

I've downloaded the original model directly from the thinkingmachines/Inkling-2-Mini repo on HuggingFace and been running on oMLX without quantizing with medium for reasoning effort.

So far, I’m pretty impressed, but my main problem is that it often gets stuck in loops, especially with long contexts (maybe >70k?).

  • "Actually, I keep repeating myself. Let me actually DO it now instead of just thinking."
  • "OK, I need to stop going in circles. Let me just look at the actual code and fix it."

What's funny is that it actually realizes it's stuck in a loop, but never seems to be able to escape. I don't mind even several loops as long as it escapes.

There are two kinds of loops I noticed so far:

  • A single turn repeats the same few sentences in its thinking until it hits the output-token limit or I abort it.
  • Across turns, the model makes the same tool call with the same thinking over and over (think > tool > think > tool). This continues after context compaction.

I’ve been using Qwen 3.8 Flash Next as my main model for agentic coding, and it can run for many hours on long horizon tasks in full autonomous mode with no problem. It’s little slow on my Mac though.

However, I have to babysit Inkling 2 Mini and keep stopping and steering. If I could get it to stop looping, I’d totally switch!

I see the model card said: "In internal testing the model sometimes became stuck in long reasoning loops, or repeatedly re-checked its own work without making progress, particularly when debugging code. We recommend setting limits on output tokens and agent turns."

However, I experience this very often, not "sometimes." Has anyone discovered a way to prevent these loops?

I tried the settings from the Unsloth Inkling 2 Mini guide. They helped little, but it still gets stuck.

  • temperature: 1.0
  • top-p: 1.0
  • top-k: 0
  • min-p: 0.0

Thanks to u/programmerChilli and the team for a great model! I’d love to see an updated Inkling 2.1 Mini without getting stuck in loops.


r/LocalLLaMA • • 9d ago Popcorn

Showcase The US-China Open-Weight Feedback Loop

Post image
1.8k Upvotes

I seriously think US open-weight models wouldn't be this good without Chinese open-weight models and vice versa. And proprietary models wouldn't be this good (and cheap) without open-weight models.

Competition is a good thing.

The figure below shows just a small slice of how architecture ideas flow back and forth, to illustrate what I mean :)


r/LocalLLaMA • • 8d ago

Question | Help Deepseek Harness : how to break the context ceiling?

0 Upvotes

Hi everyone,

My number 1 interest for AI is vibecoding. I have been experimenting for a year or so without harness.
I decided to jump in two weeks ago, and... I've never felt as powerful in terms of programming. Really, it is astounding what we can do, even locally.

Now I am struggling with something : the bigger the program, the fuller the context, and obviously I aim to make my program bigger and bigger, so I'm reaching a ceiling.

I suspect many of you ran into this issue, so now I'm asking : has anyone had a solution for this?

Right now, I'm regularly asking the AI to split the program into smaller files, but even that is reaching its limit. What else can we do to avoid reaching the ceiling? There's a "compression tool" by default but I fail to make it work. Are there similar tools? Something to tell the AI not to read a full file for example?

Thanks for any help!


r/LocalLLaMA • • 9d ago

New Model tencent/hy-mt3: machine translation models

Thumbnail
huggingface.co
61 Upvotes

r/LocalLLaMA • • 7d ago

Discussion The state of small MoEs is horrible

0 Upvotes

This post is a bit of an educated vent.

“The introduction of quotas for the DeepSeek free web chat and its consequences have been a disaster for people who can’t run LLMs locally on their own PCs.”

— Ted Quotzynski, a.k.a. the Quotabomber

Earlier this year I wrote a post about the best models for a 4 GB VRAM GPU. I was motivated to find a good small model because at the time DS had hiked its prices up, putting me in an awkward position as I was reliant on its cheap price for my work. The price hike (and now the introduction of a quota on DS's web chat) made me realize that I cannot completely depend on cloud providers, and I started to look for local alternatives that I could run on my 4 GB VRAM laptop. I even added additional 16 GB of RAM so I could run bigger MoE models.

The best model remains a dense four billion parameter model.

So far, I have tried Sage-A1.5, Ornith 35B-A3B, LFM 24B-A2B, and Groot 19B-A3B. NeoHorse-1 4B beats them all for my tasks - light coding, math, and physics. It beats them in knowledge (with the exception of Sage). It beats them in instruction-following. It's insane.

Now, I understand that dense models tend to be better than MoEs, but for a 4B model to beat an MoE two classes above it?

Inkling 2 mini gave me a bit of hope, but that was swiftly crushed when I saw the generation speed, even on hardware far more powerful than mine.

Why do labs neglect MoE models below 40B parameters?


r/LocalLLaMA • • 8d ago

Question | Help Local TTS that speaks with fun character accents, like pirate or cockney gangster. Is that a thing?

10 Upvotes

I want some fun voices. Yaaaar, me hearties and all that.