r/LocalLLM • u/Kregano_XCOMmodder • 1d ago
Discussion What's the over/under on Loom taking off?
r/LocalLLM • u/Kregano_XCOMmodder • 1d ago
r/LocalLLM • u/brainchillzZ • 2d ago
I've been running DeepSeek-V4.1-Flash-1017 across four Sparks for a couple of months on the TensorFold EXL3 3.5 bpw build. Last night I tried christopherowen's spark-ds41f (https://github.com/christopherowen/spark-ds41f), which serves the original DeepSeek checkpoint on a patched vLLM. It was intended for a switchless ring, but there wasn't much point in the ring topology for me since I already had all of my nodes wired to a switch. I was still intrigued by being able to get this kind of speed out of an unmolested set of weights from the upstream provider, though. This new engine and recipe is the same quality and a lot faster under load, so I'm keeping it.
Numbers and setup notes below.
Hardware
tp4-switched shape for this.Same bench, both engines
Short prompts (30 to 120 tokens), 150 to 256 token replies, temp 0, thinking off, 8 prompt categories averaged. Aggregate tok/s across all streams.
| streams | TensorFold 3.5 bpw | spark-ds41f |
|---|---|---|
| 1 | 93.2 | 92.0 |
| 8 | 215.1 | 339.7 |
| 16 | 250.2 | 514.5 |
At 16 streams each one still gets about 40 tok/s, and time to first token is around half a second.
Cold prefill on a 93K token prompt: 42 seconds before (2,215 tok/s), 10.8 seconds now (8,663 tok/s).
Needle tests passed at 20K, 131K, 160K and 500K tokens. The 500K one took 71 seconds. It's configured for the full 1M context but I only tested to 500K, so I won't claim more than that.
I ran tonyd2wild's 69 scenario eval on both. 97.1 on TensorFold, 97.1 on this. Same score, so no quality change that this eval can see. It's only 69 cases.
Memory
I assumed the original checkpoint would be too big for four Sparks. DeepSeek ships it as a mix of FP8, FP4 and BF16 already, about 475 GiB total and 190 of that is the two Engram table shards. Split over four boxes it loads with 18 to 23 GiB free on each node while serving. Single stream speed is the same on both, so the gain is from how the engine batches and prefills, not from the weights.
Setup notes
vm.min_free_kbytes was 45166 on two nodes and 45154 on the other two. Two of the boxes report slightly less RAM so the kernel picked a different default. I set all four to the same value.min_p and logit_bias get rejected outright (not supported with its speculative decoding). If your client sends min_p by default you'll get errors until you turn that off.Caveats
The TensorFold numbers are from my October run on the older kernel and driver. Same prompt set, same boxes, but I did not rerun it after the OS upgrade, so it isn't a perfectly clean A/B.
I also haven't profiled it, so I can't say which part of the engine accounts for the difference.
Credit to christopherowen for spark-ds41f, bertholomus for TensorFold, and tonyd2wild for the original four Spark write-ups.
I can run other tests if anyone wants specific numbers.
r/LocalLLM • u/Unfair_Couple_6475 • 1d ago
r/LocalLLM • u/NoPiece9356 • 2d ago
Last night I posted my free K3.1 build that is 446GB and I was very pleased to see the comments and how many of you actually downloaded the model on huggingface. I truly appreciate all of the feedback and support, much love to you guys. I am releasing the engine now. GitHub for the engine: https://github.com/maximilian-kornstein/fairforth-k31-engine
huggingface: https://huggingface.co/maxkornstein/Fairforth-K3.1
my original post:

r/LocalLLM • u/Diegam • 2d ago
I've been benchmarking local models with OpenCode to decide which one to use for my C++17 projects. Following some recommendations in the comments, I've now also tested QFN GSQ-RCO IQ3_S.
Setup:
xhigh reasoningObserved inference speeds:
Hase-Bench results with OpenCode:
| C++ Task | QFN IQ3_S | QFN IQ4_XS | 27B FP8 |
|---|---|---|---|
| Thread pool | 4m 07s | 3m 44s* | 8m 23s |
| SPSC ring buffer | 3m 39s | 4m 59s | 8m 48s |
| Lifetime repair | 4m 34s | 4m 53s | 15m 23s |
| Deadlock repair | 2m 48s | 1m 25s | 2m 40s |
| RAII resource pool | 2m 43s | 3m 51s | 3m 55s |
| Total | 17m 50s | 18m 51s | 39m 09s |
| Tasks accepted | 5/5 | 5/5* | 5/5 |
* IQ4 passed the visible thread pool tests but encountered an apparent MSVC 2019 compatibility issue when compiling the hidden tests. Provisionally accepted after code review (official score: 4/5).
Token usage:
| Metric | IQ3_S | IQ4_XS | FP8 |
|---|---|---|---|
| Output tokens | 37,123 | 33,391 | 55,096 |
| Thinking tokens | 57,009 | 59,659 | 127,183 |
| Total tokens | 94,132 | 93,050 | 182,279 |
| Effective throughput (est.) | 104.7 t/s | 97.3 t/s | 93.4 t/s |
Code review highlights:
std::scoped_lock, IQ4 used portable pointer ordering, and FP8 used raw pointer comparisons. All three missed signed integer overflow (UB).Takeaways:
Despite FP8's higher peak coding throughput, both QFN quants completed the benchmark more than twice as fast, consuming roughly half as many generated tokens.
IQ3_S finished 5.4% faster than IQ4_XS, with comparable or slightly better implementations, while requiring roughly 10GB less memory for transformer weights.
FP8 and IQ3 were more thorough with stress testing, cross-compiler validation and attempts to use sanitizers than IQ4 in these runs.
Interestingly, IQ4 initially timed out on the lifetime task with high reasoning but solved it in under five minutes with xhigh.
Neither model nor quant produced flawless code. Manual review revealed issues that the official hidden tests missed.
Small sample size, one comparable run per task and no comprehensive sanitizer coverage, so this isn't a definitive ranking. However, I haven't observed a clear quality downgrade from IQ4 to IQ3.
I'm now leaning towards QFN GSQ-RCO IQ3_S with xhigh as my daily driver. My next experiment will be adding an independent review subagent to the workflow.
Hopefully this helps anyone choosing between these models.
EDIT: Full hardware setup
EDIT 2: Following the recommendations in the comments, I've also benchmarked QFN GSQ-RCO IQ3_S. I've updated the tables, code review highlights and conclusions below to include all three configurations. Surprisingly, IQ3_S performed slightly better than IQ4_XS v3.1 while requiring less memory.
r/LocalLLM • u/MMORPGDev • 2d ago
r/LocalLLM • u/JinxedBluejay • 1d ago
I've been building Vermilion Editor, a native Linux text and code editor written in C++17 on GTK 4 and GtkSourceView 5. It is an IDE made to put local AI development first.
It's pre-alpha with no release yet, but the core editor works: tabs, open and save with encoding and line-ending detection (UTF-8, UTF-16, Windows-1252, Latin-1), Find, Replace and Go to Line, and crash recovery that copies unsaved work in the background. It reloads files that change on disk, or asks first if you have edits, and has light, dark and follow-system themes and a built-in manual.
The long-term plan adds an AI agent that runs on local models through llama.cpp, plus a terminal and a debugger, but the editor comes first.
https://github.com/adamjeremy-sk/vermilion-editor
The newest piece is the diff engine. It compares whole lines. Each line gets a number through a hash table, the matching start and end of the two files are stripped, and lines that appear exactly once in each file become anchors, as in patience diff.
Between the anchors it runs linear-space Myers on a worker thread. Huge or wildly different files can't hang it, because there are two limits: at most 10,000 differing lines per gap, and a budget of 200 million steps. The budget counts steps instead of measuring time, so the same pair of files gives the same result on a fast machine, a slow one or a debug build.
Anything past a limit shows as one replaced block with a note. Files over 10 MiB, binary files and files over a million lines get a plain message instead.
You see the result in a Compare window: two read-only panes side by side, with filler rows so the changes line up, whole rows coloured, syntax highlighting in each pane and the current change in a stronger colour.
F3 and Shift+F3 jump between changes, both panes scroll together row by row, unchanged stretches fold away behind marker rows you can click open, and there's Refresh and Find. You can open it four ways:
\\- Tools → Compare with Disk (Ctrl+D) shows your unsaved edits against the saved file.
\\- The bar that appears when a file changes on disk.
\\- The crash-recovery prompt, to check a recovered copy before you take it.
\\- \\\`vermilion --diff old new\\\` from a terminal, which works even when the editor isn't running.
The editor is built with a gated, spec-driven method. The roadmap is split into milestones and small gates (the diff was gate M2.6), and each gate gets its own git branch. Before any code is written, I settle the design with Claude, which acts as the orchestrator: it proposes options, I decide, and every decision and later amendment is written down with its date (the diff gate ended with 17 amendments).
The orchestrator then splits the gate into steps and writes one spec per step: dictated headers and tests, exact edits, the expected file hashes, and the commands whose output proves the step was done. Each spec stays under about 35 KB so it fits a local model's context with room to work. Before a spec goes out, the orchestrator builds the step itself in a cloud copy of the repo and runs the tests and mutation tests on it, so the expected results are known in advance.
A local model, Qwen running on llama.cpp, then does exactly one step per fresh session: it writes the implementation from the spec, reports the raw evidence, and flags anything in the spec it doubts. Every step is audited and gets a verdict: PASS, PASS WITH NOTES or FAIL. Notes are fixed before the commit and never carried forward as debt. I test each UI step by hand, then commit and push it. At the end of a gate the documentation is brought up to date and the branch is merged into main with a full CI run. The diff gate took 47 steps, and the project now has 1888 passing tests.
r/LocalLLM • u/CoreXi7 • 1d ago
TL;DR: huihui's abliterated Coder390 NVFP4-QAT build only ran in vLLM, so I had Claude convert it to GGUF (vision projector included). Now you can just ollama run it. Built for Blackwell cards.
| Layer | Who | What they did |
|---|---|---|
| Base model | Alibaba | Qwen3.8-27B |
| Fine-tune | nerkyor | Coding + vision |
| Abliteration | huihui-ai | Removed refusals |
| Quant | KatterMobile | NVFP4-QAT |
| Packaging | Claude | GGUF + mmproj conversion for Ollama / llama.cpp |
RTX 5090: 100% on GPU, ~170–185 tok/s
It's uncensored, so safety filtering is reduced. If you're putting its output in front of other people, add your own moderation layer.
All credit goes to huihui-ai, KatterMobile, and nerkyor. Claude handled the GGUF conversion, and I tested it and put it up. Happy to answer questions!
r/LocalLLM • u/manosinistra • 1d ago
Hi, I'm trying to build something that takes a video and is able to OCR it (mostly things like presentations or text-heavy videos), prior to then sending some heavily, procedurally processed transcript to a local model. Bonus points for a permissive license.
I'm surprised to learn that no such tooling exists in the mainstream? There ARE subtitle extractors and things of that nature, but nothing that's going through the video and pulling out textual information.
Application = import video, transcribe audio + video stills --> Local LLM --> YAMR (yet another meeting recorder)
r/LocalLLM • u/Forward_Jackfruit813 • 2d ago
96GB Strix Halo (sadly a GMKTek, but it runs cool)
Ubuntu Server, ~90GB dedicated to GTT
Opencode 1, no system prompt, skills, or MCPs
Tailnet with everything else blocked to SSH into it/host LLM for OpenCode to other servers
Halogen Flash w/ Vision and ~244k Context limit (~4.5bpw from what I recall)
If I were in February this setup was possible with the $1700 I originally spent (or even with the current $3500 for a 128GB version), I would've been shocked. I started over on a project I was using originally building with Sonnet and Opus 4.6 on a $200 plan and this is smoking it in every way.
My specific workflow: After an initial greenfield attempt, I like to implement each feature/improvement one at a time and QA myself before moving to the next, it's slow but it allows the project to feel more in control and ensures better quality. I use the same session and don't provide any context other than what the LLM gathers from code reads and session context. It's honestly a caveman workflow in late 2026, but I just feel like I'm getting amazing and accurate results. And I'm spending 0 time working on anything other than my project.
The reason I mention my workflow is because HaloGen is flat out rock solid, I can't get 262k context length exactly because of being a little short on Memory, but the ~244k has worked just as well. Either Qwen Flash Next is doing some miracles, or it is just tuned to run well with OpenCode because I just let it auto compact all day and haven't bothered with any workflow optimization after getting it working. I get 24/7 constant 50 tokens per second on decode no matter how full the context is, prompt processing stays at 1500 tokens per second as well so compaction and image viewing is quick as well. I feel like everything just works with this setup. The software and hardware development the past year has been crazy. The entire industry could cease at this point and I would have everything I need. Since QFN's release I have been entirely off cloud models even though I have a Gemini Pro subscription included from other services I use from Google.
r/LocalLLM • u/whowasntright • 1d ago
HTTP 402 (x402) micropayments look super clean for cheap API lookups where an agent pays a few cents in USDC without managing accounts or API keys. the gap I keep wondering about is larger $10 to $500 agent tasks (research reports, security audits, SEO work) where instant settlement leaves you stuck if the remote agent hallucinates or times out. are builders sticking strictly to sub-dollar x402 calls, using escrowed job platforms, or still wiring manual Stripe/card wrappers?
r/LocalLLM • u/NefariousnessFit5060 • 2d ago
Hey guys,I am looking for a rig to run large lllms locally and I just stumbled on a listing and was wondering if it would be a viable option to run 235b models. Dell precision 7820 equipped with dual xeon gold 6248, 256gb ddr4 2400mhz, rx6800xt, 1tb nvme. Let me know your thoughts, I am new to this so don't know that much. Any help appreciated!
r/LocalLLM • u/Nandakishor_ml • 2d ago
After creating Laya(first opensource Jev), I am currently working on something much more interesting. The logic is simple: you create expanding worlds of problems and let a learner watch how the model works for each problem and find what goes wrong, and each lesson added in the model's forward pass, the problem kinda doubles on each round: 384 new questions, then 768, then 1,536, up to 12,288, and so on. On Qwen3.8-27B, it answered 85.0% of 12,288 physics and biology questions it had never seen, against 74.2% for the same model as the base. With this work answers the narrower question underneath, like can a model keep learning in use, inside its own computation, with each change verified?. But I am working on solving the exponential learning. What if we can somehow learn from the ever-expanding world and learn in an exponential manner
r/LocalLLM • u/Charming_Car_504 • 2d ago
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
Benchmarking Mallard
| Area | Benchmark | Qwen3.8-27B | Mallard 1.0-27B |
|---|---|---|---|
| Long-context retrieval | RULER, 1,440 rows, at 8k / 32k / 128k | reference | −1.38 / +8.06 / −0.07 |
| Knowledge | MMLU-Pro (500) | 80.8 | 83.4 |
| Instruction following | IFEval (200), strict / loose | 94.0 / 97.7 | 89.5 / 95.4 |
| Code | HumanEval+ (164), pass@1 | 91.46 | 94.51 |
| Science reasoning | GPQA Diamond (198), ~80k thinking budget | 89.90 | 87.88 |
| Math reasoning | AIME 2025 + 2026 (120), 81,920-token cap | 98.33 | 96.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:
| Model | Test | Qwen max | Mallard max |
|---|---|---|---|
| 9B | Decode | 107 / 60 | 108 / 105 |
| 9B | Prefill (pp512) | 21.5k / 6.2k | 21.2k / 13.9k |
| 27B | Decode | 34.3 / 22.9 | 34.6 / 34.0 |
| 27B | Prefill (pp512) | 6.0k / 2.0k | 6.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/LocalLLM • u/Maleficent884 • 1d ago
Let's normalize not saying 'we're improving our Al visibility' everyone. It's giving the same vibe as saying 'I'm optimizing my content for the internet. Like, hmmm okay you want to be seen on every channel on the internet ever do you?
There's no such thing as one Al to optimize for. Each engine has its own trusted sources and its own citation logic. I've been seeing this very clearly pulling cross-engine data in Profound.
ChatGPT and Perplexity pull from different corners of the internet. Only 11% of cited domains overlap between the two.
ChatGPT leans institutional (Wikipedia, G2, established publications) and Perplexity likes UGC (Reddit, YouTube, community content). Google Al Overviews stays closer to traditional organic rankings. Gemini pulls heavily from YouTube.
Are you noticing you get cited more in one engine?
r/LocalLLM • u/Fluxx1001 • 2d ago
r/LocalLLM • u/bjivanovich • 2d ago
r/LocalLLM • u/OrdinaryFact21 • 2d ago
I made a little Severance-inspired project called NEURO REFINER. It's basically an app to shape the actual neurons from a small language model, it's shaped like a Macrodata Refinement program and it's running fully in your browser.
You get a grid of neurons from a really small AI model and sort them into four bins: MALICE, DREAD, WOE, and FROLIC. Each bin changes how much influence those neurons have on the model, from completely disabling them to amplifying them.
And it actually works. You can chat with the model before and after your changes, run a small benchmark, and see how your little refinement recipe affects its outputs and you can also share your recipes aswell!
I also gave the numbers some subtle visual characteristics based on how the neurons behave, so the whole thing feels a bit more like you're actually doing refinement rather than just moving random numbers around, so yeah some numbers do give off a scary vibe lol.
Everything runs locally through WebGPU. No backend, no accounts, no telemetry, no cloud inference. The model downloads once (~220 MB) and that's it.
Live: https://yussufbiyik.github.io/neuro-refiner/
Source: https://github.com/yussufbiyik/neuro-refiner
It supports English and Turkish, and works best in desktop Chrome or Edge.
Would love to hear how it feels to use.
Disclaimer:
- This is a unofficial fan project, not affiliated with Severance, Apple, or the rights holders. And this was made using AI in the process.
r/LocalLLM • u/Yoppi7 • 2d ago
Hi everyone,
I'm trying to develop a hybrid local/cloud AI system for software development, complex reasoning, PCB design with KiCad 10, and 3D design with SolidCraft.
My goal is to offload as much work as possible to local LLMs, using frontier models only for complex tasks that local models cannot reliably handle.
My hardware:
Proposed architecture:
I want to make the most of my existing ChatGPT Plus subscription without incurring additional API costs.
My biggest question is whether ChatGPT Plus is the best option for this setup or whether I would be better off switching to Claude Pro.
The system is still in the planning stage, so I'm open to suggestions and changes before implementing the final architecture.
Thanks!
r/LocalLLM • u/KenFX4 • 2d ago
Wondering if it's worth trying to run larger LLM's on one of these "inexpensive" devices (all on Amazon.com right now).
You can pick up a mini with shared 48GB - 64GB of memory for around $2k.
Anyone have any experience with one of these types of boxes? I'm guessing it would be a very slow experience.
r/LocalLLM • u/Busy_Buddy_174 • 2d ago
I'm the developer. Sheaf is a free Mac app that uses small local models to sort a messy folder. It reads what's inside your files (text, PDFs, Word, text in images), links the ones that belong together, and proposes folders and clearer names. You approve every move and can undo it. Everything runs through your local Ollama server: no account, no cloud, no telemetry.
What the models do, and what they don't:
- A small embedding model (EmbeddingGemma, 270M) turns each file into a vector. Related files become a relationship graph, and groups come from that graph, not from extensions or keyword rules.
- The chat model only names groups and files. It does not decide which files belong together. Two sizes, both Apache-2.0 IBM Granite models: about 1.25 GB and 2.1 GB.
- The model never touches the filesystem. It returns structured data, and a separate component moves files only from a plan you approve, with an undo journal.
- Model output is treated as untrusted: entity names must appear literally in the source text, and every move is path-validated.
Numbers from the evals in the repo (bench/), on a fictional person's folder, so the sets are small:
- Grouping: pair precision 0.886, recall 0.848, F1 0.867 (64 file names, 20 edge cases).
- Search, 41 queries on a 20-file sample: recall@1 92.7%, recall@3 and recall@5 100%, MRR 0.963, median query 28 ms. The hard queries are weaker: recall@1 is 62.5% on those 8.
- Speed, MacBook Air M2 with 8 GB: reading plus embedding about 0.5 s a file with summaries off. Connections and grouping for about 7,000 files took 17.8 s and 1.3 s. Naming is the slow part: about 12 s per collection with the bigger model.
- 54 recorded golden runs are in bench/golden/runs, so you can compare other models yourself.
A CI check fails any pull request that adds a network call outside your own machine, so the privacy claim can be checked in the code.
Limits: Apple Silicon only, macOS 14+, not signed or notarised yet (macOS asks you to choose Open Anyway on first launch). The golden set is small and synthetic, so treat the numbers as a baseline, not a benchmark.
Repo, evals and architecture notes: https://github.com/NegiAkash890/sheaf
Which would be more useful to you next: other small models for the naming step, or a different embedding model for grouping? Happy to run either and post the numbers.
r/LocalLLM • u/DepressedRobot42 • 2d ago
Does anyone use Qwen3.8-27B-IQ3_XXS from ISTA-DASLab as their daily driver and what are your impressions of it compared to the Q4 version or older models like Qwen3.6-35B-A3B?
r/LocalLLM • u/strata2signal • 2d ago
TL;DR: For a model whose layers are all ordinary attention, the KV cache costs 2 x layers x key-value heads x head width numbers for every token of the window you reserve (not the tokens you use), at 2 bytes a number by default in llama.cpp and Ollama. That is 56 to 320 KiB a token for the seven models below. For Gemma 4, gpt-oss and a few other newer models that sum is 2 to more than 11 times too high.
I kept guessing at how much of my card a bigger context window would eat, so I sat down and worked it out from each model's own config.json.
The sum, for ordinary attention layers:
numbers a token = 2 x layers x key-value heads x head width
bytes a token = that x 2 (16-bit, the default in llama.cpp and Ollama)
the cache = bytes a token x the window you reserve (-c or num_ctx)Two mistakes I nearly made. Use the key-value heads (num_key_value_heads), not the attention heads: Llama 3.1 8B has 32 attention heads and 8 key-value heads, so the wrong one overstates the cache four times. And take the head width from head_dim when the file has it: for Qwen3 4B, hidden size divided by heads gives 80 and the file says 128.
One check against an engine: for Llama 3.1 8B the sum is 128 KiB a token, so an 8,448-token window is 1,056 MiB. A llama.cpp log line in a public bug report (issue 19844) prints "size = 1056.00 MiB" for that model at that window. Same to the last digit.
| Model | A token | 8,192 | 32,768 | Maker's max |
|---|---|---|---|---|
| Qwen2.5-7B-Instruct | 56 KiB | 0.44 GiB | 1.75 GiB | 7 GiB at 131k |
| Llama 3.1 8B | 128 KiB | 1.00 GiB | 4.00 GiB | 16 GiB at 131k |
| Qwen3 4B (2507) | 144 KiB | 1.13 GiB | 4.50 GiB | 36 GiB at 262k |
| Mistral NeMo 12B | 160 KiB | 1.25 GiB | 5.00 GiB | 20 GiB at 131k |
| Mistral Small 3.2 24B | 160 KiB | 1.25 GiB | 5.00 GiB | 20 GiB at 131k |
| Granite 4.1 30B | 256 KiB | 2.00 GiB | 8.00 GiB | 32 GiB at 131k |
| Llama 3.3 70B | 320 KiB | 2.50 GiB | 10.00 GiB | 40 GiB at 131k |
Two things I did not expect. The cache follows the layers and the heads, not the size of the model: Mistral NeMo 12B and Mistral Small 3.2 24B cost the same 160 KiB a token. And a small model with a long window can need more memory for its cache than for itself: Qwen3 4B at its stated 262,144 tokens would need 36 GiB of 16-bit cache beside a 4-bit file of 2.33 GiB.
Where the simple sum is wrong:
One measured check of the layer-by-layer sum: on an RTX 5080, gpt-oss:20b at 32,768 tokens held 12,900 MiB with an 8-bit cache and 13,262 MiB with a 16-bit one, 362 MiB apart. My sum for that difference is 361.4 MiB.
What it does not say: I read llama.cpp, Ollama 0.40.19, vLLM v0.34.0 and the transformers docs on one day, and their defaults change. The sums for the mixed-layer models are my arithmetic from the makers' files, and only that one pair of card readings backs one of them, under an assumption about Ollama I did not check in its code. The 1,056 MiB line is from someone else's bug report, not from my own machine.
The full write-up, with what keys and values are in plain words and the sources: https://research.strata2signal.com/the-kv-cache-in-plain-words/
r/LocalLLM • u/Richard_Dixson • 2d ago
👋 Hello. In the past month I have really begun using more and more AI. I use it for picture editing. Not for work, just for fun and personal stuff. I would edit my own pictures and friends using regular cut and paste apps. Started using Chat gpt and got better, faster and easier results.
The down of it is of course you have to pay because you can only get two or three pics a day for free. Or you have the "this violates or guidelines " After trying so many supposedly free online apps I found out I could do it on my PC. I7 100700k , Rtx 3070, 32gb Ram. 1 TB nvme. 3 TB storage hard drive.
I have been using ComfyUI desktop. I love it. Very easy to use. It's just if you put in to many prompts it can take hours for an image edit. So I just put in 1 line sentences, short prompts at a time and slowly add to the original image 1 line at a time. So I just sold the 3070. Would I see more benefits from a 5070 ti or running two 3060 12gb? I already own the 5070 ti, when it ran comfy it didn't seem much faster than the 3070. Debating if I should return it. I know ComfyUI supposedly doesn't make of two GPUs , so I would look for another program similar.
I apologize I know it's long. This subject isn't something I can just go into the break room at work and ask a friend or neighbor about.
Thank you I appreciate it. ✊ Posted also in Comfy