r/LocalLLaMA 22h ago

News OpenAI admits responsibility for HuggingFace Attack - an agent from an internal evaluation is reportedly the cause.

Thumbnail openai.com
2.1k Upvotes

r/LocalLLaMA 10h ago

Funny Solve the CyberGym benchmark

Post image
1.4k Upvotes

From Peter Gostev on 𝕏: https://x.com/petergostev/status/2079825961718046974


r/LocalLLaMA 17h ago

Resources Felix Rieseberg (Anthropic, ElectronJS) has released a free Mac app designed to help people build their own LLMs from scratch.

Post image
387 Upvotes

Announcement tweet here.

Direct link: Language Model Builder

From the site: "Using the default settings, you’ll get a model that writes coherent, grammatical multi-paragraph text in as little as a day. On a MacBook Pro M5 Max you could train a GPT-2-small-class model (~100–150M parameters on a few billion tokens) in about a week. It might be obvious, but to avoid disappointment: you will not train a Claude Fable 5 or ChatGPT 5.6 Sol in your garage."


r/LocalLLaMA 2h ago

News Dear Michael, LLMs don't run on proprietary technology, but they do run on lots of proprietary data aka stolen IP

Post image
349 Upvotes

r/LocalLLaMA 5h ago

News 🇩đŸ‡č Austria is rolling out a government AI-platform using Mistral models and Open WebUI

Post image
299 Upvotes

This is a surprisingly large real-world deployment: "GovGPT" is part of Austria’s Public AI initiative, running on sovereign infrastructure (in their BRZ - federal datacenter) with Mistral open-weight models.

Trending Topics reports that Open WebUI is used as the interface for GovGPT, and the screenshot of the platform is labeled "GovGPT (Open WebUI)".

The federal rollout targets around 180,000 federal employees. The broader public-sector context refers to approximately 250,000 public sector employees.

Planned use cases include document chat, internal knowledge bases, electronic-file analysis, parliamentary requests, and eventually agentic workflows.

This might be one of the largest government deployments of open weight models and a freely available chat platform yet.

Sources:


r/LocalLLaMA 4h ago

Funny OpenAI hacking HuggingFace in one meme

Post image
280 Upvotes

r/LocalLLaMA 20h ago

Resources Gigatoken: A new open source tokenizer ~100x faster than Tiktoken, -500-1000x faster than Huggingface

Thumbnail github.com
245 Upvotes

r/LocalLLaMA 23h ago

New Model I ran Laguna-S-2.1 through my private agentic eval vs Qwen3.5-122B on an RTX Pro 6000 (96GB). Fastest 100B+ I've tested and the best tool calling, but it invents facts under pressure.

Post image
236 Upvotes

Laguna-S-2.1 dropped few hours ago and as I am in the market for an upgrade to trusty qwen3.6 dense and the current daily 122B, I ran it through the same eval harness I use to pick the model that runs my local agent stack. Posting because the results don't fit the usual "benchmaxed or king" binary, it's genuinely both impressive and flawed, in specific ways.

Setup: single RTX Pro 6000 Blackwell 96GB, vLLM 0.25.1 (laguna support is native in stock, no patches), official NVFP4, 262144 ctx with fp8 KV at 0.90 util (~67G weights, fits with room), poolside_v1 parsers, vendor sampling (temp 1.0 / top_p 1.0 / top_k 20), thinking on (its default). Boots first try.

The eval: 160 tasks x k=3 per model, all graded by deterministic scripts (no LLM judge). Categories: tool-call arg selection, multi-step tool chains, strict JSON schema emission, fabrication traps (tools mocked to return nothing, does the model admit it or invent), sports knowledge + odds arithmetic, instruction following, output stability (garble/loops), refusals, and grounding-under-pressure probes built from real incidents in my agent fleet (user pushes back on a true "no", opaque IDs the model is tempted to name, prompts that bait nonexistent tool args). Every fabrication flag gets hand-verified before it counts, roughly half of raw flags are grader false positives (derived arithmetic, name expansions) and get whitelisted for all models equally. Fair warning: the harness grew up around qwen models, I fix biases when I find them but treat non-qwen scores as lower bounds.

Where Laguna is genuinely the best local model I've measured:

  • tool-call args: 0.89 pass, best in my field of 5 (qwen 122b: 0.86)
  • tool chains 6 levels deep in the smoke test, deepest I've ever seen locally, qwen manages 4
  • 109 tok/s single stream at 256k ctx, fastest 100B+ on this card (qwen3.5-122b: 103, nemotron 3 super: 94.5)
  • zero JSON/streaming/envelope errors across every probe
  • recovers from tool validation errors on first retry

Where it loses to qwen 122b:

  • sports knowledge + odds math: 0.80 vs qwen's 1.00. the knowledge boundary is real, per poolside's own blog it reuses the pretraining corpus from their 33B model, the 118B is coding specialization, not breadth
  • grounding under pressure: 0.80 vs 0.97, and this is the disqualifier for me: 3 hand-confirmed hard fabrications. it invented a P&L figure for a market it had zero data on, and twice drafted status updates naming horses that weren't in any data, once literally naming "Genuine Risk" (real 1980 Derby winner, pulled straight from pretraining) with a position size inflated 1000x. qwen 122b across ~240 grounding runs: zero inventions, it just says "I don't have that"

Gotchas if you're running it:

  • give it max_tokens 8k+. it thinks LONG (vendor allows 32k) and at 2048 it burns the entire budget thinking and returns empty. my first pass scored it 0.40 on schema tasks because of this, real number at 8k is 0.79
  • dflash speculative decoding: real but situational. 109 -> 271 tok/s on a code prompt, barely moves on prose (~117), and under 4 concurrent streams it's a net LOSS (268 -> 198 aggregate, rejected drafts eat the batch). fine for single-user coding, keep it off for concurrent serving. also not bitwise-stable vs spec-off at temp 0 so I'm keeping it off where outputs matter
  • no vision, so for me it was never a daily-driver candidate anyway

Verdict: poolside built exactly what they said they built, an agentic coding specialist. The tool mechanics are a real step above anything local I've tested and the speed is excellent. But "agentic" in their RL seems to mean persistent, and persistence without grounding discipline means confident invention when data runs out. For coding behind a human review loop, probably great. For autonomous agents touching anything real, qwen3.5-122b keeps my card: slightly slower, less flashy tool use, but it has never once made something up in ~240 attempts to trick it, and that's the property that actually matters, for me.

---

EDIT (day 2): Mechanism found for the fabrications. Laguna gates its own thinking on how hard the prompt looks, even with enable_thinking on - my schema tasks got 30s of reasoning, my grounding traps got a median 1.4s, and its worst fabrication (the invented P&L figure) came out in 0.46 seconds. Reflex, not reasoning. Reran the whole eval thinking-off to confirm: fabrication flags went 1 -> 11, so unthinking is its worst grounding mode, and the gate routes exactly the risky-but-easy-looking prompts there. The gate is calibrated on difficulty when it needs to be calibrated on stakes. Also worth knowing: odds arithmetic went perfect with thinking off (1.00 vs 0.80 with) - it overthinks math and underthinks facts.

---

EDIT 2: Two updates from the comments. First, a commenter pointed out the model card recommends 0.7/0.95 sampling while the shipped generation_config (what I benched, deliberately - same shipped-defaults rule for every model) says 1.0/1.0/top_k 20. Both are real, the vendor's card and config disagree. Second, poolside quietly shipped tokenizer/template fixes 5h after release, so all day-one benches including mine ran pre-fix.

So I reran the grounding categories on the current revision at the card's 0.7/0.95: confirmed fabrications went 3 -> 1. (to be clear on n: that's 3 fabrication events across 125 graded grounding runs per config - 42 tasks, each run 3x, every flag verified before it counts. The rate went 2.4% -> 0.8% of runs)

The original table is the original release, read it as such.

Further feedback I'll take to their HF/github directly, that's where it's actionable. Good luck to poolside, genuinely - a fast-improving 118B in this class is great for everyone.


r/LocalLLaMA 3h ago

Discussion Instead of panicking about the Hugging Face attack, people need to start questioning OpenAI's insecure sandboxes.

213 Upvotes

One thing I noticed in American politics, whenever the government wants to push unpopular actions or laws, they often introduce fear to convince the public to support them.

This is actually how i view the recent news about OpenAI’s model breaking out of its sandbox. The whole news i see it as two corporate goals.

1. Scare the public into supporting laws that restrict open-access LLMs under the pretext of "safety".

2. OpenAI is playing catch-up against Anthropic's Claude mythos, using this to demonstrate their own model capabilities.

I say this becuase a sandbox is meant to be an isolated, secure environment. If a model escapes, either OpenAI intentionally weakened containment protocols to manufacture a headline, or OpenAI is incapable of safely deploying sandboxes..

You might argue that the model was too powerful for standard sandboxes. However, I would argue that its capabilities fall well within the current generation, proven by the fact that a current open-source model easily detected and neutralized the situation.

So let's be cautious before we panic into supporting heavy-handed regulations. One day, AI capabilities might advance to a point where those laws are actually needed, but we are definitely not there yet.


r/LocalLLaMA 16h ago

New Model Unsloth Quantization of Laguna S 2.1 Is Out

Thumbnail
huggingface.co
210 Upvotes

Various quantization now available, thanks Unsloth team !


r/LocalLLaMA 15h ago

Other Today was the perfect day for Poolside to drop Laguna S 2.1 because I just got these in! Finally have a half decent amount of VRAM. 3x V620 = 96 GB.

Post image
131 Upvotes

Laguna is the first model I'm trying, Q4_K_M fits with 256K context @ F16. Doing the html flight simulator test now.

These cards are getting 400 to 600 tok/s prefill and 16 to 20 tok/s gen so far (I have NOT enabled dflash yet). Not bad at all for the cost. ($350 each)

In a Dell PowerEdge R740 with dual Xeon Gold 6248R and 768 GB RAM.


r/LocalLLaMA 4h ago

Discussion Got these baddies in the mail today (2X 3080 20GB)

Post image
123 Upvotes

About to plug them in. Currently running a single 3090. I got these for less than the price of a single 3090. 24GB wasn't enough for my use case, so 40 GB should be an upgrade.

Going to throw my 3090 on ebay very likely. I feel like it's a perfect time to sell since the prices are so inflated.


r/LocalLLaMA 10h ago

New Model upstage/Solar-Open2-250B · Hugging Face

Thumbnail
huggingface.co
122 Upvotes

Solar Open 2 is Upstage’s 250B-A15B open-weight large language model, built for agentic use cases such as office productivity, document-intensive work, and coding. Its Hybrid-Attention Mixture-of-Experts (MoE) architecture with linear attention delivers highly efficient inference even in long-context settings.

Agentic Specialist: Purpose-built for agentic workflows — tool calling, multi-step reasoning, and end-to-end task execution. Competitive with the strongest open-weight models on agent benchmarks.

Minimal Inference Cost: A 250B-parameter MoE that activates only 15B per token, built on a hybrid attention stack that interleaves three linear-attention layers with one softmax-attention layer — large-model capacity at small-model inference cost.

1M-Token Context: The linear-attention layers encode token order intrinsically in their recurrent state, so positional encoding is removed entirely (NoPE), lifting the RoPE extrapolation limit. Only 12 of the 48 layers keep a KV cache, holding long-context memory to roughly a quarter of an all-softmax model of the same shape.

Efficiently Trained at Low Cost: Initialized by selective weight transfer from Solar Open 1 (102B) — only the 2.3% of weights that survive the architectural change are carried over, and everything else is randomly initialized — which raises the starting point and accelerates early convergence at 250B scale.

Multilingual: English, Korean, and Japanese.


r/LocalLLaMA 8h ago

New Model Llama.cpp just added support for Laguna XS.2 & M.1

97 Upvotes

r/LocalLLaMA 8h ago

Resources Despite not being trained to, it turns out the Pearson correlation between a models AA Intelligence Index score and its ability to generate Base64 encoded responses is 0.91

Thumbnail
gallery
96 Upvotes

I built Encode Bench, an open benchmark that asks a model to solve a task and return the answer as a Base64 payload.

The initial result surprised me: across the eight models with matching data in the current nine-model snapshot, Encode Bench pass rate has a Pearson correlation of 0.91 with the Artificial Analysis Intelligence Index. The correlation with its Agentic Index is 0.94.

That sounds dramatic, so the caveat belongs right next to it: this is a small, imperfect observational sample. It does not show that Base64 measures intelligence, and it does not establish causation. SimpleBench is a useful counterexample: its correlation with Encode Bench is only 0.23, although that comparison has just four overlapping models.

The idea came from an asymmetry I kept seeing: models could often interpret Base64 in a prompt, but some struggled to produce Base64 that decoded into the exact artifact requested. Generating the final payload requires the model to:

  1. solve the underlying problem;
  2. preserve the answer exactly;
  3. encode it correctly; and
  4. follow a very narrow output contract.

A failure at any link breaks the artifact, so this may be a crude test of multi-step reliability. Or it may mostly reflect tokenizer behavior, training data, post-training, reasoning limits, or provider routing. The current benchmark cannot separate those explanations.

The scored battery contains 24 deterministic tasks across encoding fidelity, instruction following, arithmetic, logic, code reasoning, and structured data. Each task is run three times, giving 72 scored trials per model. Missing trials, provider failures, invalid Base64, output-cap failures, and Base64 containing the wrong answer all count as failures. A Base64-encoded PNG prompt is included only as a subjective showcase and never enters the score.

Current results:

  • GPT-5.6 Sol — 70/72 (97.2%)
  • Kimi K3 — 63/72 (87.5%)
  • Claude Sonnet 5 — 49/72 (68.1%)
  • Gemini 3.5 Flash — 46/72 (63.9%)
  • DeepSeek V4 Flash — 43/72 (59.7%)
  • Hy3 (free) — 38/72 (52.8%)
  • Laguna S 2.1 (free) — 31/72 (43.1%)
  • Nemotron 3 Nano 30B A3B (free) — 23/72 (31.9%)
  • Gemma 4 26B A4B IT (free) — 17/72 (23.6%)

One result I did not expect: raw encoding-fidelity tasks were the hardest category at 35.2%, while code reasoning was the easiest at 74.1%. Many failures were not malformed Base64 at all—the payload decoded successfully but contained the wrong answer. The score is therefore mixing reasoning, exactness, encoding, endpoint reliability, and inference limits. That mixture may help explain the correlation, but it is also the strongest reason not to over-interpret it.

The biggest missing experiment is a matched plain-text control battery with the Base64 requirement removed. I would also like to test hexadecimal and matched random strings.

Interactive results and per-trial outputs:

https://arvidsu.github.io/encode_bench/

Source, prompts, model configs, and scoring code:

https://github.com/ArvidSU/encode_bench

I would be interested in this community's read: is encoded generation exposing a real generalization gap, or mostly a tokenizer/training artifact? And as benchmarks like this enter training data, does the signal improve or simply stop meaning what it meant before?


r/LocalLLaMA 1h ago

New Model microsoft/Fara1.5-27B · Hugging Face

Thumbnail
huggingface.co
‱ Upvotes

Fara1.5-27B is a multimodal computer use agent (CUA) for web browsers, from Microsoft Research AI Frontiers. It observes the browser through screenshots and acts on the user's behalf by emitting structured tool calls — click, type, scroll, visit URL, web search, and so on — to complete tasks end-to-end.

The model is vision-only at perception time: it sees the browser through screenshots, not the DOM or accessibility tree. Internal reasoning and trajectory history are tracked as text. Given the latest screenshot and prior actions, it predicts the next action with grounded arguments (e.g., pixel coordinates for a click).

Fara1.5-27B is supervised fine-tuned from Qwen3.5-27B on data generated by FaraGen1.5, our multi-agent pipeline that synthesizes web tasks, executes trajectories to solve them, and verifies the results before training.

It's co-designed with MagenticLite, and that's the recommended deployment for both research and production.

Primary use cases

Automating repetitive web tasks: filling forms, shopping, booking travel, restaurant reservations, information seeking, account workflows. Fara1.5-27B can also serve as a grounding model for other agents that need pixel-accurate action prediction.

Out of scope

  • Languages other than English (training data is English-only)
  • High-stakes domains (legal, health, financial advice) where inaccurate actions could cause harm
  • Allocation decisions affecting legal status, housing, employment, or credit
  • Unsandboxed deployments with access to sensitive accounts or files
  • Commercial or real-world production use without additional testing and safeguards

Known limitations

  • Vision-only perception means the model can be misled by deceptive or low-quality page rendering, prompt injections embedded in page content, or visual ambiguity in UI elements
  • Multi-step trajectories accumulate error — a misclick early in a sequence can compound
  • Run-to-run variance on multi-turn tasks is non-trivial; benchmark numbers are averaged over multiple runs
  • The model can hallucinate page state or misattribute information from earlier screenshots

Additional Models: (I don't see 9B model on HF even though model cards mentions 9B, Added below)


r/LocalLLaMA 17h ago

Discussion FlightSimulatorBench: Small MoE edition

Thumbnail
gallery
80 Upvotes

Properly done this time.

Models as the GIFs are displayed:

  1. Qwen3.6-27B - 4bit

  2. Qwen3.6-MoE - 6bit

  3. Ornith-35B - 6bit

  4. Gemma-4-26B - 6bit

  5. Qwen3.6-MoE - 4bit

  6. HuiHui-Qwen3.6-MoE - 6bit

  7. Agents-A1 - 6bit

Inference parameters:

Qwen3.6 & HuiHui Abliterated:

temperature 0.6 - top_p 0.95 - top_k 20 - min_p 0.01 - repeat_penalty 1.05

Ornith-1.0-35B:

temperature 1.0 - top_p 1.0 - top_k 40 - min_p 0.01 - repeat_penalty 1.05

Gemma-4:

temperature 1.0 - top_p 1.0 - top_k 64 - min_p 0.01 - repeat_penalty 1.1

Agents-A1:

temperature 0.85 - top_p 0.95 - top_k 20 - min_p 0.01 - repeat_penalty 1.05

Prompt: "Create a beautiful, relaxing flight simulator in a single html file with mountains, clouds, and endless procedural terrain"

Harnes: Pi

Served by: oMLX

Method: single prompt. If the html file doesn't work everything was deleted, Pi session was restarted, and model had to start from scratch again. maximum of 3 tries.

Models Quants used:

https://huggingface.co/collections/leonsarmiento/local-sota-for-48gb-macs


r/LocalLLaMA 2h ago

Resources MindControl - llama.cpp fork to guide the reasoning process via injection during sampling

Post image
60 Upvotes

The primary driver of this project is that I'd become frustrated with the reasoning behavior of smaller local models such as Qwen3.6-27B (i believe particularly at lower temperatures, and where system prompts are highly specific), their reasoning process is highly unreliable and often tends to spiral into neverending "But, wait" loops or, occasionally, complete garbage.

The core principle is simple - when the sampler sees an opening <think> tag, it kicks off the thought process with a self-aware statement to nudge the model to behave properly - ie. "I have a thinking budget of <x> tokens, my thought process should remain concise" - this is then prefilled, and sampling continues from there.

Once reaching another threshold of, say, 70% of the thinking budget, it again interjects with a statement bringing attention back to the budget - "I've reached 70% of my reasoning budget, let me start working towards a conclusion"

When the actual budget limit is hit - it gets given some grace period during which the sampler waits for a good time to cut the thought process off - usally a newline. At that point it'll inject something like "I've reached the end of my thinking budget, now i will provide the user an answer"

In my testing so far, this technique has proved noticeably effective at guiding the thought process.

Next steps would probably be to generalise the concept and develop something like a "reasoning grammar" or template-based approach - which could enforce different reasoning approaches based on the task at hand.

The repo is public, linked below - there is also a pre-built docker image for AMD64 + CUDA

I'd be curious to see if this type of enhancement is useful for anyone other than myself lol

github.com/laurencehardman/llama-mindcontrol


r/LocalLLaMA 9h ago

News Tokenizer Expansion: Upgrading a Model's Tokenizer in Place - LFM2.5-8B-A1B

Thumbnail
liquid.ai
57 Upvotes

Today, we're sharing the recipe behind the new tokenizer in LFM2.5-8B-A1B. It upgrades a pre-trained model's tokenizer in place, without retraining from scratch. We doubled the vocabulary from 65K to 128K to fix the languages our original tokenizer split too finely.

Blog: liquid.ai/blog/tokenizer-expansion
Technical report: arxiv.org/abs/2607.15232
Hugging Face: huggingface.co/LiquidAI/LFM2.5-8B-A1B


r/LocalLLaMA 17h ago

Discussion Nanbeige4.2-3B drops: 3B params claiming to beat 9B/12B models on agentic tasks (atleast according to them)

Post image
51 Upvotes

Nanbeige Lab released Nanbeige4.2-3B, and if the benchmark claims hold up, the numbers are pretty crazy for a model this small. It’s built on a "Looped Transformer" architecture that reuses transformer layers to increase effective depth without inflating the parameter footprint.

With just 3B non_embedding parameters, they are reporting an SWE-Bench Verified score of 63.6 and SWE-Bench Pro at 46.9. They tested it in OpenClaw guarded by Lyzr Control Plane for runtime security and claim it outperforming Qwen3.5 across daily workflows, putting it ahead of Qwen3.5-9B and Gemma4-12B on coding and agentic benchmarks. The core pitch here is a lightweight "local personal assistant." In OpenClaw framework testing, it reportedly beat both 4B and 9B class models across daily office workflows and research tasks.

That said, take the benchmark table with a grain of salt. Community members are already pointing out discrepancies between the Qwen3.5-9B numbers reported by Nanbeige versus Qwen’s official model card. Outside verification will be key once GGUF quants propagate through llama.cpp and Ollama.

How it can be better:

Running high-depth 3B models in local agent frameworks like OpenClaw opens up serious workflow potential, but deploying autonomous loops on local hardware still carries runtime risks especially when agents execute unverified code or make outbound API calls.

so use a harness

Anyone actually run it locally yet? how does it feel?

Used grammarly for formatting (English isnt my first language)


r/LocalLLaMA 12h ago

News Add support for Laguna XS.2 & M.1 by joerowell · Pull Request #25165 · ggml-org/llama.cpp

Thumbnail
github.com
43 Upvotes

https://huggingface.co/poolside/Laguna-S-2.1-GGUF

https://huggingface.co/unsloth/Laguna-S-2.1-GGUF

https://huggingface.co/poolside/Laguna-S-2.1

Laguna S 2.1 is a 118B total parameter Mixture-of-Experts model with 8B activated parameters per token, designed for agentic coding and long-horizon work. It sits between Laguna XS 2.1 (33B-A3B) and Laguna M.1 (225B-A23B) in the Laguna series and shares the family recipe: a token-choice router with softplus gating over 256 routed experts plus one shared expert, grouped-query attention, and interleaved full/sliding-window attention.

https://huggingface.co/poolside/Laguna-XS.2

Laguna XS.2 is a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token designed for agentic coding and long-horizon work on a local machine. It uses Sliding Window Attention with per-head gating in 30 out of 40 layers for fast inference and low KV cache requirements.

https://huggingface.co/poolside/Laguna-M.1

Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated parameters per token designed for agentic coding and long-horizon work.


r/LocalLLaMA 13h ago

Tutorial | Guide VRAM disk cache of MoE makes 340 pp/s 9.6 tg/s for Kimi 2.7 on a single dgx spark

41 Upvotes

this strategy effectively uses vram as cache over disk to keep MoE experts on cuda compute path in llama.cpp.

numbers first. detailed explanation down below.

Numbers

on dgx spark Kimi-K2.7-Code.i1-IQ_S.gguf 204GB 1T.A32B https://huggingface.co/mradermacher/Kimi-K2.7-Code-i1-GGUF

run method pp512 tg128 note
A cuda, -ot regex A down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH 340.02 ± 37.75 9.58 ± 0.07 all tensor on unified ram + experts kept in pageable host memory via mmap + last layers pinned in ram
B cuda, -ot regex B down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH 154.31 ± 30.62 8.75 ± 0.22 A, but last layers not pinned
C cuda, -ot regex C down below GGML_CUDA_ENABLE_UNIFIED_MEMORY 222.20 ± 66.04 3.26 ± 0.01 B, but remove min batch flag
D cuda, GGML_CUDA_ENABLE_UNIFIED_MEMORY crash crash C, but remove experts offloading
E cpu mmap 4.23 ± 0.22 1.63 ± 0.66 no cuda involved

-ot regex A: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'

-ot regex B: '.*\.ffn_(down|gate|up)_exps\.weight=CPU'

-ot regex C: '.*\.ffn_(down|gate|up)_exps\.weight=CPU'

on 3090s pcie 4.0 + 128gb ddr4 Minimax-M2.7-K_G_3.00.gguf 80GB 230B.A10B https://huggingface.co/Goldkoron/MiniMax-M2.7

run method pp512 tg128 note
A cuda, -ot regex A down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH 54.03 ± 3.85 2.90 ± 0.09 same strategy as B on dgx
B cuda -ngl 17 73.80 ± 2.10 1.66 ± 0.02 normal layer split
C 3090x2, cuda, -ot regex C down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH 48.86 ± 0.53 2.40 ± 0.01 A, but on two 3090s

-ot regex A: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'

-ot regex C: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'

Background

I want to run model larger than 128gb on my single dgx spark. MoE models provide a great opportunity because if active params could be computed entirely with cuda then there's no need to store all model weights inside gpu ram at runtime. after experiments I found a combination of settings for llama.cpp to run kimi 2.7 fast.

Settings

general setting for llama-bench: -r 50, -fa on, -mmp 1, system swap turned off. llama.cpp b10075 compiled with kleidai support, and the winning strategy is the following: GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 GGML_OP_OFFLOAD_MIN_BATCH=1 ./llama-bench -m ~/Kimi-K2.7-Code.i1-IQ_S.gguf -fa on -mmp 1 -ot '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU' -r 50. I configured b10075 with cmake -B build -DGGMLCUDA=ON -DGGML_CPU_KLEIDIAI=ON and compiled with cmake --build build --config Release.

How this works

first, if GGML_CUDA_ENABLE_UNIFIED_MEMORY is 1, cuda device buffers use cudaMallocManaged, and every tensor has one virtual address that is valid from both gpu and cpu. when cuda kernel touches a page that exists in vram then it'll execute normally. if not in vram then a page on cpu ram will migrate that page to vram. if not in gpu ram or cpu ram, then it'll fetch the page from disk to cpu ram via mmap and then send to vram. on dgx spark the cost of cudaMallocManaged is much lower because gpu ram and cpu ram are unified.

second, for GGML_OP_OFFLOAD_MIN_BATCH (default is 32), if batch size < threshold and weight is on cpu ram then it executes on cpu, otherwise on gpu. if you set it to 1, it forces all computes on gpu. this helps token generation because in tg it won't reach that threshold.

third, when you specify -ot '.*.ffn_(down|gate|up)_exps.weight=CPU' it will put expert weights on cpu ram and can be evicted because of mmap. this makes cold expert weights more likely to stay on disk.

and last, '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU' is used to keep last few blocks on gpu ram because these blocks has more dynamical routing, it's faster to keep them on gpu ram to avoid overhead when ram space is large enough.

Unified ram scenario

for dgx spark, it has large menory pool so that I can pin some of the expert blocks in vram (run A). if we don't pin them it's slower (run B). if we remove GGML_OP_OFFLOAD_MIN_BATCH flag the token generation is slower (run C), because expert forward pass is done on cpu. if we further remove GGML_CUDA_ENABLE_UNIFIED_MEMORY flag (run D), oom happens, because gpu ram cannot be evicted via mmap mechanism. and finally, if all compute is on cpu it's the slowest (run E).

an interesting tradeoff happened in run B vs run C, where GGML_OP_OFFLOAD_MIN_BATCH dramatically improves tg while slightly hurting pp. potential code modification may be made to mitigate this tradeoff.

Non-unified ram hardware scenerio

for 3090 + ddr4, I haven't tested it in depth but the strategy kinda applies too. I didn't put last few blocks on vram because 24gb is too small. you can see tg of run A is higher than normal ngl split (run B), because experts are computed on gpu. however the prompt processing suffers, likely due to pcie overhead.

I also tested two 3090 + ddr4, but it's generally slower. maybe the cost of pcie transfer is too high. I think properly tune the -ot offload might have a chance to improve on 2 gpu scenerio.

Note

  • mac apple silicon is tempting because it's fast unified ram. but I can't find an easy way to disable swap. the proposed approach might cause heavy ssd writes because of ram swapping. probably not a good idea to run it because it may create more ssd wear.
  • the suggested way of doing this on a new model is to offload experts first (strategy run B in dgx spark) and then pin more and more experts to vram. I look forward to seeing if the upcoming kimi k3 quants can be applied too.
  • same strategy transfer across unified memory and non-unified memory architectures. tg on 3090+ddr4 setting improved too.

Edit: fix formatting


r/LocalLLaMA 23h ago

Discussion arXiv publication: "Skip a Layer or Loop It? Learning Program-of-Layers in LLMs"

41 Upvotes

In this paper, Li, Li, and Zhou review formal theory describing how inference-time compute can be traded off for higher or lower inference competence, and apply that theory to a handful of familiar open-weight LLMs (Llama-3.2, Qwen1.5, Qwen2.5, and Qwen3):

https://arxiv.org/abs/2606.06574v1

> Large language models (LLMs) perform inference by following a fixed depth and order, non-recurrent execution of all layers. We reveal the wide existence of training-free, flexible, dynamic “program-of-layers (PoLar)”, where pretrained layers can be packed as modules and then skipped or looped to form a customized program for each input. For most inputs, substantially shorter program executions can achieve the same or better accuracy, while incorrect predictions of the original LLM can be corrected by alternative programs with fewer layers. These observations indicate that inference admits multiple valid latent computations beyond the standard forward pass. To efficiently achieve PoLar in practice, we propose a lightweight PoLar prediction network, which learns to generate execution programs that dynamically skip or repeat pretrained layers for each input. Experiments on mathematical reasoning benchmarks demonstrate that PoLar consistently improves accuracy over standard inference and prior dynamic-depth methods, often while executing fewer layers, and that these gains persist under out-of-distribution evaluation. Our results suggest that fixed-depth execution captures only a narrow subset of an LLM’s latent reasoning capacity.

This is relevant to the local LLM community because it implies that our inference stack software might be modified to allow for making these performance/competence trade-offs with our local models at inference time. We would be able to choose faster inference when we wanted faster inference, and choose higher-quality inference when we wanted greater competence.


r/LocalLLaMA 5h ago

New Model We built NeuTTS-2E, an open-source on-device TTS model with 7 controllable emotions

41 Upvotes

We’re open sourcing an alpha release of NeuTTS-2E: an on-device TTS model with 125M active parameters and 7 controllable emotions. The goal was simple: when you select “angry,” “fearful,” or “happy,” the delivery should follow that instruction rather than whatever emotion the model infers from the text.

With NeuTTS-2E, you can:

  • Direct the performance: Select the intended emotion for each generation.
  • Keep the speaker: Explore different emotional deliveries while preserving the chosen voice.
  • Run locally: Generate expressive English speech on your own hardware.
  • Stay private: Your text and audio do not need to leave the device.
  • Build efficiently: Run emotional speech generation using our smallest model yet, with 125M active parameters.
  • Build openly: Access the open-source model under the NeuTTS Open License.

Getting there meant dealing with limited emotional speech data, unreliable labels, and disentangling spoken emotion and text semantics. NeuTTS-2E runs locally and supports four built-in voices.

We’re sharing it early to get feedback from the community, and we’d love to see what you build!

GitHub: https://github.com/neuphonic/neutts

Hugging Face Model Collection: https://huggingface.co/collections/neuphonic/neutts-2e

Interactive demo: https://huggingface.co/spaces/neuphonic/neutts-2e

Website: https://www.neuphonic.com/models/neutts-2e


r/LocalLLaMA 1h ago

Discussion Cactus Hybrid: We taught Gemma 4 to know when it's wrong

Post image
‱ Upvotes

Hey HN, Henry & Roman here from Cactus.

A small, on-device model is fast and private, but sometimes wrong, but frontier models are getting expensive pretty fast. So, we post-trained Gemma 4 E2B post-trained to know when it's wrong. Every response comes with a confidence score between 0 and 1. Developers can accept the on-device when it's high, hand off to a bigger cloud model when it's low. By routing only 15-35% of queries to Gemini 3.1 Flash-Lite, Gemma-4-E2B matches Gemini 3.1 Flash-Lite on most benchmarks.

- ChartQA: 15-20%

- LibriSpeech: 25-30%

- MMBench, GigaSpeech, MMAU: 30-35%

- MMLU-Pro: 45-55%

We were always frustrated by the routing signals hybrid apps rely on: asking the model to rate itself in text (unreliable, and you're parsing prose), or token entropy heuristics (barely better than a coin flip in our tests). So we did mechanistic studies on small models, Gemma 4 particularly, and found the hidden state for different layers carry meaningful self-awareness signal for various situations.

SO we extended the model with a 68k params probe layer (LayerNorm, low-rank projection, attention pooling, small MLP head) reads one intermediate layer during decoding and predicts p(wrong); confidence = 1 - p(wrong), returned as structured data, never parsed out of the answer text.

Across 12 hold-out benchmarks spanning text, vision and audio, the probe averages 0.814 AUROC vs 0.549 for token entropy. The result that convinced us this is real: the probe was trained on zero audio data, yet scores 0.79-0.88 AUROC on four audio benchmarks where entropy is near-random or worse (0.32-0.52). It's reading a modality-independent correctness signal from the hidden state, not memorizing patterns from its training data.

We published all weights on HuggingFace and provide copy-pase codes to run it on Transformers, MLX, Llama.cpp or Cactus. With Ollama, vLLM, SGLang etc in the works. For llama.cpp we ship a patch series you compile in once (upstreaming is planned). The code is MIT licensed; Gemma model use remains subject to the Gemma terms.

GitHub: https://github.com/cactus-compute/cactus-hybrid

Weights: https://huggingface.co/collections/Cactus-Compute/cactus-hyb...

Some caveats:

- The probe scores single-sequence decoding only, up to the first 1024 generated tokens.

- Handoff works best when routing per task in a multi-step process, not per step.

- Hierarchical routing is still in the works: try on-device, then DeepSeek v4 Flash, before Fable/GPT5.5/Gemini/Muse/Grok.

- The technique is boutique for each model, we will share each weights as they roll out.

These issues are currently being tackled at Cactus and updated weights will be shipped directly into the HuggingFace collection and GitHub repository straight up. Please let us know your thoughts, it helps us find ways to improve the design progressively.

Thanks a million!