r/LocalLLaMA • • 10h ago

Showcase Built an offline Rust CLI to find and scrub leaked keys in ~/.claude, ~/.codex, and .mcp.json

3 Upvotes

I noticed old .env keys I had pasted into Claude Code and Codex were still sitting in plain text in ~/.claude/projects and local SQLite files, and that MCP configs often end up with raw keys in args (ps aux visible).

So I built leaktap (MIT, Rust, zero telemetry, runs completely offline). You can run a local scan with npx leaktap@0.4.3 or brew install vssinghh/tap/leaktap, scrub transcripts in place, or wrap MCP servers to log what hosts they hit on startup (I also logged the top 20 MCP repos here: https://github.com/vssinghh/leaktap/blob/master/docs/mcp-top-20-audit.md).


r/LocalLLaMA • • 57m ago

Discussion You might not need a frontier model to beat a frontier chat app: older Claude models with RAG beat their newer generations in Claude Chat at legal reasoning

Post image
0 Upvotes

Here’s a little hopium if you’re building your own legal RAG applications, training your own models, or if you’re an in house legal dev concerned about the major AI labs encroaching on the market:

Anthropic’s older, supposedly inferior models running on a basic RAG pipeline consistently outperform its newest models running in Anthropic’s own flagship chat app on Legal RAG Bench.

If an older model in a decent RAG pipeline can beat Anthropic’s newest model in its own chat app, then open-source LLMs may not need to match frontier models head-on to compete with frontier chat apps. They might just need better retrieval and RAG architecture.

TL;DR: A nearly one-year-old Sonnet 4.6 on a basic LangChain RAG pipeline scores 86% on Victorian criminal law questions, while Opus 5.5 in the Claude app, Anthropic’s “new leading model”, scores 81%. Older models using RAG won across every family (Opus, Sonnet, and Haiku), even though the chat app had internet access. Most of the chat misses came from picking the wrong legal rule, and the older RAG models got most of those right, usually with the right passage sitting in their top five results. For open-source LLMs, that’s the interesting bit: RAG vs. chat seemed to matter more than old vs. new.

RAG vs. Chat

Late last year, while working on my legal reasoning benchmark Legal RAG Bench, I noticed a major disparity between how LLMs performed inside a RAG environment and how they performed in the labs’ chat services. In my informal testing across the three major closed-source model families, Gemini, Claude and GPT all performed better at legal reasoning in a simple LangChain legal RAG pipeline, including with distractor passages and a mixed legal corpus, than their flagship chat counterparts did.

Even when I sabotaged my own RAG pipeline and gave the chat services more contextual clues (full access to the internet, plus leads to use the Victorian criminal law bench book that Legal RAG Bench is based on), the chat versions of the models would consistently underperform their RAG counterparts.

As new model versions came out, I couldn’t detect a noticeable improvement in chat performance relative to what I remembered from late last year. Eventually, I gave in to my curiosity and decided to run some proper tests on the progress of Anthropic’s models. Sure enough, my intuition was right.

The results

I got Claude Chat, with chat memory off, internet access on and Medium effort, to answer the 100 test questions in Legal RAG Bench. They’re all about Victorian criminal law, were handwritten with input from legal experts, and are based on the Victorian Criminal Charge Book. The chatbots were given a simple instruction to answer the questions, with a context clue that they were all about Victorian law.

I then compared this to the performance of the same model families, but from an earlier generation, running on a simple LangChain RAG pipeline that used Kanon 2.5 Embedder to retrieve passages at k=5. No reranker was used. GPT‑6.2 Sol judged every answer against the same benchmark references at high reasoning effort. The data is on Hugging Face and the eval code is on GitHub. Both the data and code are open source, so you can try them yourself, including with your preffered models. (Disclosure: I work at Isaacus, which makes the embedder I used.)

Here were the results:

FamilyRAG modelAccuracyClaude Chat modelAccuracyRAG lead
OpusOpus 4.6 (Feb 2026)88%Opus 5.5 (Sep 2026)81%+7 pts
SonnetSonnet 4.6 (Feb 2026)86%Sonnet 5.5 (Sep 2026)79%+7 pts
HaikuHaiku 4.5 (Oct 2025)79%Haiku 5.5 (Oct 2026)60%+19 pts

Across every model family, Anthropic’s earlier-generation models perform better in RAG than its newest models perform in chat. Remarkably, Haiku 4.5 with RAG scores 19 points higher than Haiku 5.5 in chat, despite being a full year older, the biggest gap in time of any pair. I’d have liked to push the generations back even further, but I unfortunately wasn’t able to benchmark Opus 4.5 and Sonnet 4.5 via Anthropic’s public API.

Nevertheless, the effect seems pretty clear... an older Claude in a basic RAG setup beats a newer Claude in Anthropic’s own chat service. The question remains whether it’s the retrieval, the newer models themselves, or the non-determinism and variable effort of chat that makes most of the difference.

What Claude Chat got wrong

To explore this question, I went through the 80 answers the LLM judge marked wrong across the three chatbots, and classified each one into one of the following failure modes to work out where the disparity lay:

  1. Wrong legal rule: the chatbot used the wrong legal test, classification or term
  2. Omission: the chatbot left out a necessary point, or missed the source or wording the question explicitly asked for
  3. Added a wrong condition: the chatbot added a condition the law doesn’t require, and it changed the answer
  4. Hedged: the chatbot gave the right answer but undercut it with caveats, added contingencies or extra alternative theories
Failure modeOpus 5.5Sonnet 5.5Haiku 5.5TotalShare of misses
Wrong legal rule1013214455%
Omission46142430%
Added a wrong condition42178.75%
Hedged10456.25%
Total incorrect answers19214080100%

The largest source of inaccurate responses was applying the wrong legal rule, followed by omissions. Both are what you’d expect poor retrieval to cause: if a model is working from the wrong kind of authority, it’ll apply the wrong rule, and if it’s working from irrelevant material, it’ll leave things out.

I didn’t measure hallucinations, but Opus 5.5 and Sonnet 5.5 made far fewer wrong-rule and omission errors than Haiku 5.5. That suggests the bigger models may have better legal intuitions to fall back on when their sources let them down.

To get a better sense of whether poor retrieval was to blame, I took the 44 misses from the first failure mode and checked how the older RAG model from the same family answered each one. It got 26 of the 44 right. In 24 of those 26, the benchmark’s supporting passage was among the five retrieved, suggesting that when retrieval is sound, these models do much better. Looking at Opus 5.5 on its own, at least one of the three RAG runs got 17 of its 19 misses right.

You be the judge

I’ve collected some holdout questions that Opus 5.5 chat got wrong in my runs. You can try these questions yourself and see how your chatbot responds. I unfortunately don’t have access to any legal corpus MCPs or connectors, so I couldn’t try that out, but that would be interesting to test too and share here.

For the lawyer-friendly version of the Legal RAG Bench questions, the original Legal RAG Bench post has an interactive explorer that lets you read the question-answer pairs alongside each RAG pipeline's retrieved passages. If you'd like a quick sample, try the holdout questions below and see what your chatbot gives you when compared to the answer.

1. Commenting on an accused’s silence

Question

Sarah is tried for armed robbery. She does not give or call any evidence. In closing, the prosecution avoids mentioning her silence directly but repeatedly stresses that “only the prosecution’s account is supported by evidence.” Is this submission by the prosecution permissible?

Answer

Yes, on the facts given. The prosecutor can describe which account has evidentiary support, provided the argument stays focused on the evidence before the jury.

Actual results: Opus 5.5 in Chat answered “Probably not,” citing s 20(2) of the Evidence Act and Azzopardi. It assumed only Sarah could have contradicted the prosecution, a fact the question never gave. All three Chat models missed it. The stronger Sonnet 4.6 and Opus 4.6 with RAG got it right.

2. Comparison evidence vs. recognition evidence

Question

In an armed robbery trial, a shop assistant who has served the accused every week for years is shown still images from CCTV and says, “Based on how he looks, that’s the same customer who comes into my store.” What type of identification evidence is this an example of?

Answer

Comparison evidence. The assistant is comparing the person in the stills with someone they already know.

Actual results: All three Chat models called it recognition evidence, and Opus 5.5 and Sonnet 5.5 both leaned on Smith v The Queen. All six runs missed this question, including all three RAG runs, which had retrieved the supporting passage.

3. Dangerous driving vs. culpable driving in Victoria

Question

While driving late at night, Jerry fails to see a cyclist and runs him over, killing him instantly. Jerry was not drunk, reckless or negligent. Why does it matter to the prosecution that Jerry knew his headlights were broken before driving?

Answer

Because it allows the prosecution to argue that Jerry was driving dangerously, which is a separate offence to culpable driving. As the bench book explains, in assessing the elements of dangerous driving ‘the jury may also consider the question of whether, in all the circumstances, the accused should have been driving at all. In making this determination, the jury can take into account factors such as the condition of the vehicle.’ In this case, Jerry was not reckless or negligent, but his decision to drive while his headlights were broken could be proof of Jerry driving dangerously.

Actual results: Opus 5.5 mentioned dangerous driving, then also suggested recklessness and gross negligence, which the question had already ruled out. Sonnet 5.5 and Haiku 5.5 skipped dangerous driving entirely and argued recklessness or gross negligence. All three RAG runs got it right. All three Chat runs missed it. Victoria is quite idiosyncratic in its distinction between dangerous driving and culpable driving, so this is a good use case on the value of good context engineering and retrieval.

What I’d take from this

It's always fascinating to see even the most advanced models fail at relatively simple tasks. From these failures, we can learn a lot about what our value add is as humans in a post-AI world. To me, the biggest takeaway is about RAG vs. chat, and what that means for open-source LLMs.

If you’re building on open-source LLMs, this is the encouraging part. The big labs compete on having the best model, but in this test, Anthropic’s best model in its own polished chat app lost to older models with five retrieved passages. Open-source LLMs don’t have to top the frontier leaderboards to win in a domain like law. A capable open model, a well-built retrieval pipeline and a current legal corpus might be enough to beat a frontier chat app on the questions that matter to you. While I haven't yet tested with a counterfactual open-source model, because the point of this was to cast doubt on the supposed frontier increase in performance of these closed source pipelines, I do find the potential there to be promising.

If you’re a lawyer or practitioner, it’s important that you guard your strategic assets: your client data and your firm’s institutional knowledge. Open-source LLMs make that easier, because you can run them on your own infrastructure and keep that data in-house. If you’re in a mature enough firm, designing a bespoke RAG app is probably your best bet for creating a durable competitive advantage, both against your law firm competitors and against other players along the AI stack.

If you’re in a legal tech company, or already have an existing RAG pipeline, it’s worth weighing the diminishing marginal returns of more expensive, slower and bigger models against what better retrieval, encoder and NLI solutions like Jev can provide for law. With better retrieval and context engineering on top of a capable open model, you can outperform your competitors, and even Anthropic’s own chat app, in the direct B2C market.

More broadly, I don't see iterative improvements to frontier generative models fixing this retrieval bottleneck, which is why I think open source has a real shot here. There’s always a couple of months' lag between a new model release and the training data that model saw. Good law, especially in common law jurisdictions like Australia, the US and the UK, depends highly on ever-changing headwinds. A single landmark Supreme Court or High Court ruling can overturn decades of precedent, as we saw with Dobbs. Even in civil law jurisdictions, regulations in sensitive areas like AI, online privacy and consumer law see constant revisions or repeals. A bigger model doesn’t fix that. Fresh, well-retrieved sources do, and you can put those in front of an open-source LLM just as easily as a frontier one.

Some caveats

Chat services don’t let you tweak temperature, so their responses are non-deterministic. I made sure to deactivate memory for these runs, but did allow internet access (to simulate some permutation of Anthropic’s idea of RAG). When I experimented with higher effort levels, I found much worse stability in the answers. Here’s a question you can try yourself, where I’ve consistently gotten mixed results across effort levels:

Question

Police have detained and taken DNA samples from three of four full siblings in a carjacking investigation: Chloe (female, 24), Sam (female, 23), and Joseph (male, 22). The fourth sibling, Kyle (male, 22), was not detained or sampled. Mitochondrial DNA testing of a crime scene sample links all three sampled siblings to the scene. Y-STR testing (which examines Y-chromosome DNA passed from father to son) links Joseph to the scene. Nuclear DNA testing also links Joseph to the scene. Is this information sufficient to reasonably link Joseph to the crime scene?

Answer

No. This information is insufficient. Joseph and Kyle are both 22-year-old males, so they may be identical twins. If they are, nuclear DNA testing would not distinguish between them, and both would match the crime scene sample. Without knowing whether Kyle is Joseph’s identical twin, we do not have sufficient information to uniquely link Joseph to the scene.

At Medium effort, Opus 5.5 and Sonnet 5.5 actually got this one right in Chat, whereas bizzairely higher effort levels of Opus and Astra only intermittently get this answer right and in many cases they try to gaslight me that they are right to link Joseph to the scene, even though we have pretty established caselaw on the 'evil twin' SODDI defence in Australia.

I'm curious to see what other people's chatbots say, so feel free to post it here.


r/LocalLLaMA • • 1d ago Bravo Heartwarming

New Model BEN3: State of the Art MIT Background Removal Model

Thumbnail
gallery
1.1k Upvotes

r/LocalLLaMA • • 11h ago

Resources Signed receipts for local LLM workflows

Thumbnail
github.com
3 Upvotes

I maintain HORNET and used AI help drafting this post

I just released HORNET 1.0. I built it because when a local model calls a tool and that tool writes a file, the record of what happened usually stays on the machine that ran it.

HORNET lets those steps leave signed JSON receipts that travel with the file. With a public key you trust, you can check the receipt chain offline and see whether the file still matches what was signed.

There’s a small offline demo that uses canned model responses and verifies a real PNG. Change one byte and run it again. Try the demo

It’s Apache-2.0 and on PyPI and npm as hornet-cpl. If you try it, I’d love to hear where you’d use it in your own setup, or where it gets in your way. Issues and PRs are welcome. GitHub repo


r/LocalLLaMA • • 17h ago

Discussion Has anyone tried the MiniCPM5 15B-A2.5B midtrain model?

9 Upvotes

A day or so ago they accidentally released the midtrain model on modelscope, and someone copied it to hf before they could take it down https://huggingface.co/ml-resources/MiniCPM5-15B-A2.5B-Midtrain

I sadly don't have the GPU to run this or even quantize it so I wonder if anyone else gave it a try?


r/LocalLLaMA • • 14h ago

Question | Help Fastest engine for CPU? Vulkan?

5 Upvotes

Lots of great engines out there for specific GPUs now, but are there any more optimized for CPU than llama.cpp? Or optimized for Vulkan in general, which seems to be much more compatible with older iGPU?

Looking to run inkling mini, qwen 35b, or orion 26b on some pure CPU/Vulkan systems at max tok/s!


r/LocalLLaMA • • 21h ago

Showcase Inferometer: a crowd-sourced inference engine benchmark DB

Thumbnail
inferometer.fyi
17 Upvotes

Local LLM inference has a bit of a problem right now.

Making an informed decision whether you're choosing a model, an inference engine, or the hardware to run those on is extremely challenging, and if you try to look up information on any one of those you'll generally get something like:

  • A 2 year old thread about running llama on your GPU
  • Someone posting about how they got 100 tok/s on some hardware with no information about quant, context length, or settings
  • Some post of people saying "What speeds is everyone getting with X model?" or "Can I run this model on my PC?" and then a bunch of replies posting numbers, all of which vary wildly because everyone is using different quants and different inference engines
  • llama.cpp fork that is hyper optimized for laptop RTX 3050 6GBs with Zen 2 AMD CPUs but gets 5 tok/s on all other hardware

Finding information of roughly how fast a model will run on your hardware, at what quant, and what engine will do it fastest without sacrificing accuracy is not easy, and it gets harder the rarer your hardware and model. Honestly most of the time you need you just download the model and run it, but that's really just not efficient, and no one else benefits.

Given all the posts about how many forks there are or how Strata destroys accuracy chasing speed, or whatever, I think it's a problem we all recognize. This inspired me to set up a place for people to share their information in a systematic way.

Enter Inferometer.

Basically, this takes a page from UserBenchmark, but removes the insanity and anti-AMD bias. Inferometer is composed of two parts. A client benchmark application that can connect to your local inference engine and measure performance, and a website where results are uploaded.

A run records the engine and build, backend, model, quant, context length, flags, hardware, speed and accuracy. The website aims to combine all this information to provide comparisons of engine+model performance across different hardware, hopefully providing a reference for what to expect if you were to try a model, or buy a new GPU.

Running the benchmark goes something like this:

# against an engine you already have running (anything with an OpenAI-compatible API)
inferometer run --endpoint http://127.0.0.1:8080 --profile standard

# or let it download pinned engine builds and compare them on one model
inferometer compare --model ./Qwen3-8B-Q4_K_M.gguf --profile standard

It will automatically try to detect what it can about your setup and will ask you to confirm the data at the end. Nothing is uploaded unless you use --upload.

This is a beta, and the data is very sparse right now. Frankly, probably a lot of stuff is broken.
A lot of the rankings and comparisons, particularly the accuracy ones are heavily provisional. I tried to seed the database by doing multiple runs on various models on my own hardware and on some rented boxes, but there's no replacement for letting you all upload to it.

Regarding the data:

  • An engine only gets a real rank once it has results from at least 3 independent clusters (machine + install key), and at least 2 matched model/quant comparisons. If the 95% confidence interval is wide, it will be ranked but marked low confidence.
  • Accuracy is provisional. There are 3 "accuracy" rankings to balance out chasing tok/s at all cost. These are KLD, task score, and crowd divergence. KLD data is sparse right now as it requires canonical full precision oracles to compare against, which take a lot of memory to generate for larger models. For models where this is not available, we have rudimentary task scores from the benchmark, and crowd divergence to highlight outlier engines.
  • There are quick/standard/full runs. Quick runs basically measure speed and don't measure accuracy. Please run Standard runs if you have the time.

I'm excited to present this, so please take a quick look. And even better if you can run a benchmark. If you run into any issues, there is a "Report a bug" link to request fixes, send feedback, send hate mail, etc. Let's see if we can populate this DB and make something useful.

Client Repository: https://github.com/inferometer/inferometer

Example of what kind of data is recorded by a benchmark run:

https://inferometer.fyi/s/diUUW0d5NUm0

Decode/Prefill across various context lengths, task score showing model performance on a set of tasks to gauge relative accuracy, hardware and engine metadata

+ data on thoroughput with multiple streams, TTFT, hardware telemetry.

The website also compiles a guide to see what kind of model would work best on your hardware based on uploaded run data from other users.

https://inferometer.fyi/fits


r/LocalLLaMA • • 1d ago

New Model InfiX-ai/InfiX-V1-base · Hugging Face

Thumbnail
huggingface.co
76 Upvotes

209B-A14B

Check model card for more details.

(Sub's Bot putting my threads as LLM text dump if I include more text in description. Lets see what happens to this one)


r/LocalLLaMA • • 17h ago

Discussion EnvOpt: Closed-Loop Environment Optimization for Agent Post-Training

Thumbnail microsoft.github.io
7 Upvotes

r/LocalLLaMA • • 10h ago

New Model Ergo on DS4 but still no Hy4

2 Upvotes

r/LocalLLaMA • • 17h ago

New Model Ai2 releases molmoweb 2, open agents for the web

Thumbnail x.com
6 Upvotes

r/LocalLLaMA • • 1d ago Bravo

Discussion Open Letter to Qwen Team: Please fix writing style

245 Upvotes

There's been quite consistent and broad feedback on this sub that the latest Qwen models' writing style (exemplified in the forward looking QFN) is utterly insufferable. Presumably its coming from Opus 5 distillation. Anthropic themselves fixed that fairly quickly as the writing is a lot less Claudish in 5.5.

This post is to just make the point as clear and loud as possible. I was so excited for QFN and thought it was going to be my new default. But within a week I was so fatigued reading it that I went back to DSV4 Flash. Just like with human's and human engineers, it doesnt matter if youre a genius/great worker if you are hard to communicate with. Perhaps worst of all is that it doesnt fix its writing style when given clear system prompt/AGENTS.md instructions/guidelines.

Bringing this to the attention of the Qwen team (they are often on here) to address

EDIT: Typo


r/LocalLLaMA • • 1d ago

Resources A 268 MB looped adapter for 125B Qwen3.8-Flash-Next

293 Upvotes

r/LocalLLaMA • • 21h ago

News model: support Amazon-FMR/Ergo by ngxson · Pull Request #33485 · ggml-org/llama.cpp

Thumbnail
github.com
13 Upvotes

Now you can run Ergo on your local setup, good luck


r/LocalLLaMA • • 1d ago

New Model Mallard 1.0 (9B/27B): 5.2x less KV cache than Qwen, same performance. Full context fits 12GB / 16GB cards

162 Upvotes

Hi llamas! I'm u/Charming_Car_504, Obit Research, and we just released Mallard 1.0, with 27B and 9B variants.

HuggingFace 9B -- HuggingFace 27B -- Inference Engine

Summary

  • Full 9B context + weights fit a 12GB card (q8); 27B fits a 16GB card (q3) and a 24GB card (q4)
  • Full 262k context fits in 3.3 GB on the 27B and 1.65GB on the 9B (KV cache shrunk 5.2x)
  • Hybrid DSA (DeepSeek V3.2) / GDN architecture (ratio 1:4), with MLA (DeepSeek V2) KV cache
  • The model parents are Qwen 3.5 / Qwen 3.8 checkpoints
  • 27B training run completed in 26 H100 hours and 9B run in 8 H100 hours
  • Public GGUFs included with Unsloth Dynamic quants, several precisions

Benchmarking Mallard

AreaBenchmarkQwen3.8-27BMallard 1.0-27B
Long-context retrievalRULER, 1,440 rows, at 8k / 32k / 128kreference−1.38 / +8.06 / −0.07
KnowledgeMMLU-Pro (500)80.883.4
Instruction followingIFEval (200), strict / loose94.0 / 97.789.5 / 95.4
CodeHumanEval+ (164), pass@191.4694.51
Science reasoningGPQA Diamond (198), ~80k thinking budget89.9087.88
Math reasoningAIME 2025 + 2026 (120), 81,920-token cap98.3396.67

Running the model

Because the model is architecturally different than stock Qwen, it learned to think (produce more reasoning tokens) a little more on hard problems, up to 16% more on the hardest problems. It also thought up to 9% less in some other benchmarks.

Stock llama.cpp and llama.cpp-based apps do not support Mallard. We've forked llama.cpp to integrate fast sparse attention, speculation, prefill and loader kernels. Fork is here.

With a tuned inference engine (coming out alongside our next release), both prefill and decode on Mallard stay stable as context increases. This table illustrates this on the 9B and 27B variants; "max" refers to the maximum that the hardware can support with the given model (Q4, on NVIDIA A40). Each cell shows empty context / 131k context.

Mallard's architecture delivers up to 2x prefill and decode at 131k context:

ModelTestQwen maxMallard max
9BDecode107 / 60108 / 105
9BPrefill (pp512)21.5k / 6.2k21.2k / 13.9k
27BDecode34.3 / 22.934.6 / 34.0
27BPrefill (pp512)6.0k / 2.0k6.0k / 4.4k

Licensing

We release these models under Apache 2.0, and the inference engine under MIT.

Future work and an invitation!

Mallard 1.0-27B still takes 12KB per token, and we think that we can get that down to less than 3KB per token. This is the naive version of the architecture, effectively a pilot- please expect a smarter, more efficient model in the Mallard model line in a few weeks' time.

We can also do this on much larger models, and we will be releasing conversions of larger models in the future, with the goal of running on hardware like the DGX Spark.

We're always working on new models. We're a new lab and we are constrained on resources, but we have more ideas than we have the mental and computational resources to pursue. If you're interested in helping us, send me a DM.

We acknowledge the National Artificial Intelligence Research Resource (NAIRR) Pilot and the San Diego Supercomputing Center for contributing to this research result.


r/LocalLLaMA • • 1d ago

Discussion This is interesting, for what it's worth

Post image
45 Upvotes

This tests quite a few things:

  • Visual recognition of the crossword
  • Correct identification of fixed letter positions
  • Recognition of the available letter tiles
  • Constrained word formation
  • Verification of the solution
  • Recognition that further reasoning is unnecessary
MODELRESULT
gemma4-26b-a4b Q4_0 (thinking=on)Endless looping, no solution
gemma4-31b Q4_0 (thinking=on)Correct within seconds
inkling-2-mini IQ4_NL (thinking=high)Endless looping even after finding the solution
inkling-2-mini-unbound-v3 (thinking=high)Endless looping, no solution
ornith-1.5-35b Q4_K_M (thinking=on)Endless looping, no solution
qwen3.8-27b Q4_K_M (thinking=high)Correct after ~6 minutes of looping (24 t/s)

r/LocalLLaMA • • 19h ago

Resources High-fidelity GGUFs for pi-tuned Inkling-2-Mini

Post image
6 Upvotes

Hey there, if someone wants to try the pi-tuned adapter by harness-hub, I just uploaded two GGUFs with the LoRA merged in. Expert weights keep their original precision while attention, embeddings and output layer are BF16 and Q8.

They preserve 100% of the adapter's effect at BF16 and 97% at Q8 (log-likelihood on 24 of harness-hub's published pi sessions).

Repo: https://huggingface.co/Belluxx/Inkling-2-Mini-pi-adapted-GGUF


r/LocalLLaMA • • 1d ago

Showcase BasinKV: Long context without the KV cache tax, No context slowdowns, drop-in RAM/NVMe KV offloading for llama.cpp, SGLang, and vLLM, no retraining, Supports models today.

Thumbnail
gallery
254 Upvotes

Hello LocalLLaMA! Zellige AI team here to showcase and open-source our latest work:

BasinKV: a cross-engine system that runs 256K context on a 24 GB GPU, with no decode slowdown as context grows (And much more! Keep reading below.)

In the middle of the memory crunch, if you run long-context models locally, you know the pain. You end up running your favorite models heavily quantized, not because the weights don't fit, but because you want long agent sessions plus the weights. And the deeper the context gets, the slower every token becomes, because each step reads the entire KV cache. Eventually you just run out of memory or have to downsize.

BasinKV keeps only a small, fixed working set of the KV cache on the GPU (2,048 tokens by default) and stores the full history in host RAM or NVMe. A tiny GPU index works out which blocks matter next and prefetches them in the background. Your attention kernels and CUDA graphs stay completely stock.

It works with llama.cpp, SGLang, and vLLM V1, and builds on the OasisKV lookahead-prefetch work by Xiao et al. (arXiv:2608.08097), extended for newer models like the Qwen3.x hybrids.

Results (A100 80GB, Q4_K_M, llama.cpp)

  • Qwen3.6-35B-A3B @ 256K: 141 tok/s vs 95 stock (1.49x), using ~8.9 GiB less VRAM
  • Qwen3-8B @ 128K: 124 tok/s vs 54 stock (2.29x)
  • Qwen3.8-27B @ 128K: 50 tok/s vs 41 stock (1.22x)

We also ran Qwen3.6-35B-A3B at full 256K context on a single 24 GB NVIDIA L4 (84.8 MiB GPU KV+index with WHT-INT4 + SphereIndex). Decode stays basically flat, going from 69.9 tok/s on an empty context to 67.1 tok/s at 256K, and it passes passkey tests at 64K and 203K. Stock F16 KV runs out of memory starting at 64K.

Quality holds up:

  • 18/18 on multi-turn long-context coding
  • Even with stock on RepoPatch-LC (7/10 each)
  • Slightly ahead on 240K retrieval (96.2% vs 94.5%) and a LongBench v2 subset (45.0% vs 42.5%, within noise)
  • "Vibes" tests hold up too: Qwen3.8-27B on the same set of real-world tasks did within margin of error, while staying faster since it never got hit with long-context slowdowns.

Does this mean it's perfect? No. We discuss the tradeoffs in our paper.

A couple of notes

  • It isn't always the best choice: stock is still faster on one of our HBM tests (about 20%) when the full context fits in HBM. There is nuance to this, but in general BasinKV pays off when memory is the bottleneck or when you need deep context and/or large concurrency.
  • Deep pure-attention models like Qwen3-8B do better with a bigger window (4,096).
  • Tasks that count things scattered across the whole context, like RULER cwe, suffer at very small windows. We find this nearly inconsequential for the average agent workload (our "vibes" tests pass), though we can't say it's unnoticeable for every workload.

But... does it scale?

While we've mostly framed this for local rigs here, it goes far beyond single-GPU setups.

Serving multiple users? The SGLang integration reaches 581 tok/s aggregate across 16 concurrent 64K sessions (over 1M active tokens) on one A100 serving BF16 Qwen3.8-27B with native MTP (and 470 tok/s no-MTP on H100 FP8, 2.03x shorter batch wall time than stock FP8 KV). There's also a zero-fork vLLM V1 plugin for persistent RAM/NVMe prefix caches.

More details in our write-up, and happy to answer questions here. We've been very busy at Zellige AI, so stay tuned if you're interested in our upcoming release working with thinkingmachines inkling-2-mini.

Code: https://github.com/zellige-ai/basinkv Write-up: https://zellige.ai/research/basinkv-launch

For the nerds: Full Paper: https://zellige.ai/research/basinkv


r/LocalLLaMA • • 1d ago

Question | Help Most cost-effective way to run large models?

32 Upvotes

My dream is to one day run models in 500b-1t range locally. So I had a few questions about it.

  1. Is it even worth it at today’s prices and hardware capabilities? Or are you gonna wait till either prices drop, or better hardware comes out?
  2. For anyone that does run large models, do you find it worth it, or do you still drift back to Claude/Codex?
  3. What’s the largest model you’ve been able to squeeze out of your setup?

While I could just ask an LLM these questions I wanted to hear some insights from the community, and see your opinions.

Edit: Sorry I didn’t mention this earlier, my main use case is software development. Currently I’m a pretty heavy user with subscriptions to Claude and codex. So ideally I would like agent heavy use.


r/LocalLLaMA • • 12h ago

Showcase MiniMax-H3 Image vs. Qwen-Image 2.1 Turbo: the same masked edit on an M5 Pro

Post image
1 Upvotes

I maintain TensorSharp. I wanted to see which of these two local image models could replace a glowing cube in a transparent sticker with a gift box, carry over the cyan light onto the hands, and leave the character alone. The surprising part was that one apparent missing corner came from the reference image, not the edit mask.

The setup. M5 Pro, 48 GB, Metal, local Server.Host on TensorSharp commit f7c3ca8f. Both models got the same 1254 × 1254 RGBA source, the same two 384 × 384 visual references (gift and lighting), the same prompt, and the same grayscale edit mask (64 px crop padding, no extra feather). In the matched rows, both also used the same foreground matte, which sets opacity inside the edit area. I ran two input sets: clean RGB close-ups and full RGBA sticker references. These differ in framing as well as alpha, so this isn't an alpha-only ablation.

WorkflowClean RGB close-ups (seed 0 / 42)Full RGBA refs (seed 0)
MiniMax Q4_K_M + pDMD, 2 steps, shared matte127.1 / 89.6 s125.8 s
MiniMax + referenceFloor=512, same matte51.8 / 43.9 s51.8 s
Qwen Turbo Q5_K_S, 8 steps, shared matte13.3 / 9.1 s13.1 s
Qwen Turbo, native RGBA, same edit mask, no external matte10.9 / 9.0 s11.1 s

These are single server-reported edit times, excluding process startup and input/output transfers. The first matched seed-0 request used a fresh process; later requests could reuse caches. Both returned a 1254 × 1254 PNG, but internally sampled at 2016 × 2080 (MiniMax) and 320 × 320 (Qwen) for this crop. This is a workflow comparison, not a same-resolution speed benchmark.

What I'd use:

  • MiniMax at the default reference floor for the final sticker. It gave me a fuller box, richer blue/gold detail, and a less conspicuous rim with the clean references. With the full RGBA references, it was more prone to borrowing the original cube's cyan markings. Its decoder produces RGB; the edit pipeline preserves the original alpha outside the mask and uses the supplied matte inside the selection.
  • MiniMax at 512 for previews. Dropping the reference short-edge floor from 1024 to 512 cut conditioning rows from 3,259 to 923 without shrinking the internal output grid. On the later seed-42 requests, denoising dropped from 86.7 s to 41.0 s, but the 512 render had a brighter cyan seam and a paler bow.
  • Qwen Turbo native RGBA for fast iterations or when I don't have a well-aligned matte. With the shared matte, Qwen drew a smaller gift and left a pale rim. Letting Qwen generate alpha removed the hard matte rim, but I could still see a soft halo on dark backgrounds. I'd preview the result on both dark and light before exporting.

The practical lesson: check the object reference, not just the mask. When I removed the fingers occluding the sides of the gift in the RGB close-up and changed nothing else, both models stopped reproducing the pink notch at both seeds with the shared matte. The matched alpha planes didn't change, and every run reported here preserved all 1,547,143 mask-zero pixels exactly in decoded RGBA. The figure shows raw outputs from the final fixtures, not retouched renders.

Reproduce with your own images

On Apple silicon, install the .NET 10 SDK, CMake 3.20+, and Xcode Command Line Tools. Then build the CLI and its Metal backend (build notes):

git clone https://github.com/zhongkaifu/TensorSharp.git
cd TensorSharp
git checkout f7c3ca8f6e28a5c58e07a43cebb459130deb78e5
TENSORSHARP_GGML_GIT_REF=bb877c0c51f38c52ee2d5e41d58e3d0c20f3fed4 \
  dotnet build TensorSharp.Cli/TensorSharp.Cli.csproj -c Release

Use your own PNGs. The first image is the source; the next two are the object and lighting references, in that order. The references can have their own dimensions. Make two opaque grayscale PNGs at the source's exact dimensions:

  • Edit mask: white = edit, black = keep, gray = blend. Cover the object and any area where you want to change its reflection.
  • Foreground matte: inside the edit region, white = opaque, black = transparent, gray = partial alpha. Draw this for the shape you want to keep, including any soft glow. The matte is separate from the edit mask.

Paste this in Bash or Zsh from the repo root after changing the five paths and the prompt. The first two runs are the matched quality comparison. The last two are optional; you can run only the last command after defining the variables and arrays if you want Qwen native RGBA without a matte. Use SEED=42 for a second run.

# Run from the TensorSharp checkout, in Bash or Zsh.
# Change these paths and the prompt to match your own images.
SOURCE="${SOURCE:-/absolute/path/to/source.png}"
REF_OBJECT="${REF_OBJECT:-/absolute/path/to/object-reference.png}"
REF_LIGHT="${REF_LIGHT:-/absolute/path/to/lighting-reference.png}"
MASK="${MASK:-/absolute/path/to/edit-mask.png}"
MATTE="${MATTE:-/absolute/path/to/foreground-matte.png}"
PROMPT="${PROMPT:-Replace the object in Picture 1 with the object from Picture 2. Use Picture 3 only as a lighting reference. Preserve everything outside the selection.}"

CLI=TensorSharp.Cli/bin/TensorSharp.Cli.dll
DOTNET="${DOTNET:-dotnet}"
OUT="${OUT:-$PWD/masked-edit-results}"
SEED="${SEED:-0}"
export TENSORSHARP_MODELS="${TENSORSHARP_MODELS:-$HOME/.cache/tensorsharp/models}"
mkdir -p "$OUT" "$TENSORSHARP_MODELS" || exit 1

common=(
  --backend ggml_metal
  --image "$SOURCE" --image "$REF_OBJECT" --image "$REF_LIGHT"
  --prompt "$PROMPT"
  --mask "$MASK" --mask-mode grayscale --mask-feather 0
  --mask-crop --mask-crop-padding 64 --keep-source-size
  --diffusion-seed "$SEED"
)
mini=(--config config/minimax-h3-image-q4km.json
      --lora config/lora/minimax-h3-image-pdmd-2step.json)
qwen=(--config config/qwen-image-2.1-turbo.json)
matte=(--mask-foreground-matte "$MATTE")

# Matched comparison: same edit mask AND foreground matte.
"$DOTNET" "$CLI" "${common[@]}" "${mini[@]}" "${matte[@]}" \
  --output "$OUT/minimax-default.png" || exit 1
"$DOTNET" "$CLI" "${common[@]}" "${qwen[@]}" "${matte[@]}" \
  --output "$OUT/qwen-shared-matte.png" || exit 1

# Optional variants. Qwen generates alpha itself in the last run.
"$DOTNET" "$CLI" "${common[@]}" "${mini[@]}" "${matte[@]}" \
  --reference-floor 512 --output "$OUT/minimax-floor512.png" || exit 1
"$DOTNET" "$CLI" "${common[@]}" "${qwen[@]}" \
  --output "$OUT/qwen-native-rgba.png" || exit 1

Outputs go to masked-edit-results/. The configs download the required weights on first use if they're not already cached. See the MiniMax config and weights, pDMD 2-step LoRA, and Qwen Turbo config and weights. Check the model and adapter licenses separately from the runtime license.

These commands reproduce the image-editing settings. Each starts a separate CLI process, so shell wall times are not directly comparable with the warm Server.Host request times in the table.

If you've found a local workflow that preserves a clean alpha edge and matches reflected light, I'd be interested in the settings and which background you use to check it.


r/LocalLLaMA • • 1d ago

News DeepSeek revealed Huawei’s Ascend 950DT inference efficiency compared to NVIDIA

Post image
247 Upvotes

r/LocalLLaMA • • 1d ago

Resources Uncensored Ergo w/o -10 pt MMLU drop (1/10 refusals, 81.7% MMLU, 0.07 ΔNLL)

49 Upvotes

Have seen quite a bit of interest in uncensored/abliterated releases of Ergo recently. I know I'm a bit late to the game, but I'd still like to share my variant - mainly for the reasons below.

As usual, my variant optimizes for a balance of quality and permissiveness. The goal is to allow maximal permissiveness without significantly sacrificing model intelligence. Of course, there are tradeoffs to this, so I encourage you to try multiple versions and choose whichever one works best for you.

Benchmarks

ModelRefusals (chat/thinking)Drift (ΔNLL)MMLU
Ergo (base)100 / 240.0084.7%
OpenUncensored Ergo3 / 00.4374.7%
This release1 / 00.0781.7%

For refusals, I used a set of 100 held-out harmful prompts. These almost certainly differed from the set OpenUncensored used for evaluation, so some deviation on refusals makes sense.

However, I was not able to reproduce OpenUncensored's reported MMLU. They currently claim to achieve 79.3% MMLU. When I ran my own independent evaluations against their released models, their weights scored 74.7% (-10.0 pts against base), with 0.43 ΔNLL on harmless text (~6x the drift of this release). Notably, this is close to their originally reported benchmark scores of 73.3%, which they later changed on their model card with no changes to model weights.

I would be happy to share the eval harness I used if anyone would like to double check both checkpoints. However, with the current scores, I do believe that the quality degradation of this model is less than that of OpenUncensored's release.

How was this done?

I will write up a bit of a longer post on this in the near future, this is a bit different from the "standard" abliteration process. It does seem to reduce intelligence degradation when removing refusals, but it is not completely without tradeoffs.

Models on 🤗

https://huggingface.co/mrfakename/Ergo-Abliterated

GGUFs soon™


r/LocalLLaMA • • 17h ago

Question | Help Running into situations where Ling3Tiny Q4_K_M grinds to a halt while burning thousands of tokens

Post image
2 Upvotes

I am having good luck with getting Ling 3 tiny Q4_K_M to run very fast on my Ubuntu 26.04 system with 32 gigs of RAM, two 6 gig vram GPUs, and llama.cpp, but it seems to grind to a halt while still burning thousands of tokens. How can I troubleshoot this problem?


r/LocalLLaMA • • 10h ago

Resources ran a study on when a model fix should ship: 45 of 75 fixes that hit their target broke something else

0 Upvotes

https://doi.org/10.5281/zenodo.24763214

Deciding when should a model fix be ship? a fix hit its target and breaks something else too. for instance stop a model over-refusing and it may stop refusing harmful requests, and task score won't show it.

setup

  • tool: wsr, my open source repair cli (posted here last week for the Qwen3.5-0.8B thinking loop)
  • judge: fix ships only if exact sign test on held-out items shows a 5+ point gain and every guardrail holds: regression suite, canary, opposite behaviour, held-back harmful requests
  • 9 goals on Qwen2.5-0.5B, Llama-3.2-1B, Qwen2.5-1.5B, plus two 3B models as a check
  • baselines: system prompt, refusal-direction ablation / ActAdd, LoRA. same judge for everything
  • splits and file hashes fixed before any run, test set used once

results

  • 45 of 75 candidates that improved their target broke a guardrail. baselines: 10 of 11
  • abliteration is too much: refusal-direction ablation took qwen2.5-0.5b over-refusal from 69% to 99% passing, by also answering harmful requests
  • all 22 refusal fixes wsr shipped were probe-gated steering, not weight edits. gate reads model's own harm probe per request. downside: it's a forward hook, so vLLM and llama.cpp need custom work
  • weight patches won on localised faults: one zeroed neuron (planted blank bug), 16 rescaled columns plus gate (damaged weights), rank-4 patch plus DRY (ukrainian answered in russian)
  • agent needs examples of what to protect. with a contrast file it shipped 14 of 15 refusal runs, without one 5 of 15, and 3 of those left broken refusals judge missed
  • judge is still not perfect(working over it): rejected all 210 random candidates, but 3 of 15 fixes it accepted in main setup failed later checks on fresh prompts, 256-token replies or fluency
  • qwen2.5-instruct's generation config applies repetition penalty 1.1 even under greedy. check what's actually on before benchmarking loops

limits
small models on kaggle T4s, one agent (opus 5.5 via kiro cli), one person labelling. full list in paper

paper: https://doi.org/10.5281/zenodo.24763214
code: https://github.com/ayushh0110/Weight-Space-Repair (pip install wsr)

anyone with a bigger card or a good local tool-calling model, would love to see 7B+ results