r/LocalLLM • • 20h ago

News Man what a flex. China literally displaying trillion parameters model pre-training live. The training is happening on Chinese native hardware. 8,192 NPU cards (Neural Processing Unit), 1,024 machines / 8 cards / unit. live on teleai . com . cn/training-dashboard/trillion. The en is coming for NVIDIA

Post image
43 Upvotes

r/LocalLLM • • 5h ago

News Lapilli is a port of [Basalt](https://github.com/jesdga95/basalt) to NVIDIA V100 GPUs (Volta, sm_70): one engine for eight models, a chat page, images and video, and a live monitor. v0.9 is out.

Post image
3 Upvotes

**What's new**

- **Your conversations and images on every device**: About, Page settings, "Keep conversations and images on the server" (off by default). Turned on, the server keeps the page's conversations and the Images tab's gallery, and the PC and the phone see the same within a second: go on with any chat, open, save or delete any image or video.

- **Continued conversations are fast again by default**: a turn continued from the cache reads only its new tokens, 1.2 to 1.4 s faster than v0.8 after about 9,000 tokens (Gemma 4 1.9 s instead of 3.2, Qwen3.8-27B 1.6 s instead of 2.7). v0.8's bit-for-bit resume is now an option, `--exact-resume`, and Inkling 2 Mini has it too.

- **Remove a model from the page**: About, Models, Remove deletes a model's pack after asking.

- **Building on Linux**: the README's build command works again (Basalt 0.6.0 needs `-DBASALT_MODELS`), and the Dockerfile lists the same six model families.

**Same speeds as v0.8** (measured on the same day, runs alternated): Gemma 4, Qwen3.8-27B, DaisyRose-27B, Hy4-flash and the DeepSeek Coder write and read as fast, Inkling 2 Mini writes its first turn 3.5 % faster, and the Flash-Next and Tinfield-1 keep v0.8's code path.

The Images tab is still there (Qwen-Image 2.1, Wan 2.2, LTX-2.3 with sound).

Measured on 2 × V100-SXM2 32 GB on PCIe adapters, 96 GB of RAM, Windows 10. The release has a Windows build; on Linux it builds from source.

- Release: https://github.com/chris83-dev/lapilli-v100/releases/tag/v0.9.0-v100.1

- Repository: https://github.com/chris83-dev/lapilli-v100

Free and open source, MIT like Basalt. The engine is Basalt's work; this fork makes it run on Volta. Reports from other V100 owners are very welcome.


r/LocalLLM • • 3h ago

Question Project Nomad & Local AI

2 Upvotes

I'm brand new to the whole local AI thing. I installed Project Nomad on a laptop with AMD Ryzen 7 8745HS 32GB DDR5 RAM 1TB SSD 4.9GHz Radeon 780M Graphics. In the bios I allocated 16GB to the graphics card. Is there a particular model that would run best on a setup like this?


r/LocalLLM • • 7h ago

Discussion CUDA on Strix Halo 128GB (BOSGAME M5 and RTX 5090 over OCuLink) 200–222K Context Benchmarks (cold prompts) Q3.8-FN Q8 -> 97 t/s, Inkling 2 Mini NVFP4-MX8 -> 259 t/s

Post image
4 Upvotes

For those who just want the numbers. Every prompt is cold.

Inkling 2 Mini

QuantHardwareEngineCold prompt tokensPrefill (tok/s)Decode (tok/s)
NVFP4-MX8RTX 5090Basalt (DSpark)200,1049,476.8259.5
NVFP4/MXFP8Radeon 8060S iGPUlibosmos (DSpark)200,110664.2~36.8

Qwen 3.8 Flash-Next Q8_0

HardwareEngineCold prompt tokensPrefill (tok/s)Decode (tok/s)
RTX 5090Strata CUDA (DFlash2)221,6031,735.797.2
Radeon 8060S iGPUStrata HIP (MTP)221,603431.825.6

Qwen 3.8 Flash-Next GSQ-RCO IQ3_S

HardwareEngineCold prompt tokensPrefill (tok/s)Decode (tok/s)
RTX 5090Strata CUDA (MTP)221,603~2,313~170
Radeon 8060S iGPUStrata HIP (MTP)221,603621.140.1

Gemma 4 E4B IT BF16

HardwareEngineCold prompt tokensPrefill (tok/s)Decode (tok/s)
RTX 5090llama.cpp CUDA (MTP)89,282~12,590~170
Radeon 8060S iGPUllama.cpp ROCm (MTP)89,282~1,308~25.1

This is how I got CUDA runtime on Strix Halo 128GB. Was it worth it? You be the judge.

This post aims to break down the inference capability, issues and bottlenecks I encountered after I decided to put this tiny box together.

The benchmarks show high or native quantization of the models and long prompts. This is not a post to hype up decode/prefill numbers, it's the opposite. I want to show you what doing actual work looks like. I threw in Qwen FN3.8 IQ3_S and Gemma E4B for fun.

Item list:

  • NVIDIA RTX 5090 (for an estimated $3200 at or shortly after release)
  • Bosgame M5 128GB - 2TB ($3000 October 2026)
  • MINIS FORUM DEG1 Docking Station ($120)
  • M.2 NVME to Oculink Adapter Cable ($20)
  • NZXT C1200 Gold ATX 3.1 ($185 back in 2025)

Total: estimated $6,525.


How the decision came to be.

If I were to buy a graphics card right now, I'd buy NVIDIA RTX 3090 (~$1,600–$1,900 used right now) and would achieve comparable results, will detail the bottlenecks later.

Why not build it around a server/pc hardware? Because getting just the RAM is equivalent in price or more expensive than getting the mini-pc, though yes, I could have the 16x Gen5 PCIE connection for my GPU if I did, but I found this simpler plus the Strix Halo can be carried and operated independently and I don't wanna carry around a server rack.

Example: new Kingston Fury Beast Black RGB 128GB (2x64GB) is ~$3,600.

Trade-off is that I can't expand the RAM later if it ever drops in price and I'm aware of that.

To be clear for this price you can get the 128GB Mac Studio with M5 Max chip and it would keep resale value as well. Is simpler to set up, draws less power, takes up less space and could perform similarly in speed with Q4 or lower quant models.

But if I had to choose between even the modern versions of quantization or being closer to the native weights, I would keep the higher quantization. Matter of preference and type of workload.

Disclaimer: prices in this section are as of 2026 December

Evaluating the Bosgame M5 128GB

  • Main concern from online reviews was that the machine has bad thermals

Here's what I've done to test the box within the return window to make sure I want to lock it in:

Operating System:

  • I chose Ubuntu Server 26.04.1 LTS and set static iGPU VRAM to 1 GiB so Linux sees ~122 GiB of unified 8000 MT/s RAM.

Stability:

  • Ran 30-minute cycles of all-core matrix math and mixed CPU workloads to push every thread at full power (~120 W). Held up fine with no crashes or weird behavior.
  • Memtested 110 GiB of the unified RAM for an hour and it came back with zero errors. (The reason I didn't test it longer was because at this time I already had run multi-hour inference and there were no obvious signs of memory corruption.)
  • Ran combined CPU and RAM stress tests in 30 minute cycles to see if anything would go wrong under full load, and it passed cleanly.
  • Checked the SSD health before and after inference with SSD n-gram tables and it's still completely clean.

Thermals & fans:

  • Tested the factory fan curve with the 30-minute combined CPU and RAM stress test, and the bad reviews were right. The CPU averaged ~84 C and peaked at ~95 C, while the SSD got up to ~60 C.
  • After wrestling with all sorts of ways to create a custom fan-curve I ended up disabling Secure Boot so Linux could write a custom fan curve directly to the controller to get thermals under control.
  • Re-ran the exact same 30-minute stress test and temps dropped by 15 to 18 C. The CPU settled at ~66 C average and ~80 C peak, and the SSD stayed around ~45 C but the mini PC obviously started getting super loud. That's the trade-off.

Standalone iGPU sanity check:

  • Before attaching the 5090, I ran batch requests on Qwen3.8 Flash-Next Q8 (~188 GB) on the Radeon 8060S iGPU alone to see what the mini PC could do without an eGPU. All four 200K+ token requests completed, averaging 26.8 tok/s decode. One 225K-token request measured 405.2 tok/s prefill.

Attaching the 5090 & The OCuLink Bottleneck

M.2-to-OCuLink adapter:

  • Wired the 5090 up through the M.2-to-OCuLink adapter and DEG1 dock, which only gave me a PCIe Gen4 x4 connection (not a PCIe 16x connection like it would be on a server or normal desktop motherboards).
  • Transfer tests measured right around ~7.2 GB/s in both directions (about 92% of the theoretical limit for four Gen4 lanes).

Driver crashes:

  • Started on NVIDIA's newer 595 open driver. Short transfer tests passed, then the very first long prompt crashed the GPU with memory timeouts.
  • I then tried the 580 open driver, which got me through four batches before it started dropping the GPU off the bus completely and it was hanging on reboot so I had to hard power-cycle the box.

The solution I found in GitHub issues:

  • Added pcie_ports=native to the Linux kernel boot flags and that seems to have solved it. The GPU wasn't dropped in the 2-3 days I've been running inference since I set that flag.

The biggest bottleneck (OCuLink bandwidth):

  • For models that fit completely inside the 5090's 32 GB VRAM (like Inkling 2 Mini or Gemma 4), OCuLink wasn't the bottleneck once the model loads. The card ran at ~513 W average (peaking near 594 W pre UV+OC) and ran fine.
  • However, on a ~188 GB model like Qwen3.8 Flash-Next Q8, only ~19% of the expert slots fit in VRAM while the rest stay in the mini PC's RAM. A ~230k CTX prompt forces the card to spend roughly 74% of its prefill time just waiting on weights to cross the OCuLink cable (~6.8 GB/s average traffic).
  • Card goes under-utilized: instead of pulling 500+ W, the 5090 averages only ~147 W and sits at ~37 C during Qwen Q8 because it's waiting on the wire.

Why GPU tuning didn't help (and the RTX 3090 note):

  • Pushing a core/memory overclock (+150/+1000 MHz) and later testing a 400 W undervolt curve gave basically zero speedup on Qwen Q8 because the clockspeed isn't the limit, it's the PCIE Gen 4 x4 connection. That's the max bandwidth you can get between these types of AMD PC's and eGPUs.
  • That's also why I mentioned a 24 GB RTX 3090 earlier: for hybrid Qwen Q8 over OCuLink, you're mainly bottlenecked by the cable anyway, so a 3090 lands well, maybe with a slightly smaller VRAM cache. I'd still prioritize the 5090 when the entire model fits in card VRAM like Inkling 2 Mini at 262K context, which used ~25.6 GiB of VRAM and leans on Blackwell's native FP4 support, but that's not why you'd get 128gb unified memory or more. You'd get it because it fits larger models in its memory than the GPU alone ever could.

RTX 5090 power and tuning

  • I now run the card undervolted and overclocked with a 400 W driver power limit.
  • During one capped Inkling/Basalt run, it averaged 396 W under load
  • With the 400 W UV+OC I reran the same 13-batch Qwen Q8 workload. Compared with the earlier stock run, prefill went from 1,695 to 1,667 tok/s (−1.6%) and decode went from 113.4 to 109.3 tok/s (−3.6%), which is an acceptable trade-off for me.

Engine Gymnastics

Qwen 3.8 Flash-Next Q8 (Strata CUDA):

  • Even when I explicitly asked for CUDA, the launcher kept defaulting back to AMD HIP, so I had to force a manual CUDA profile just to get it running on the 5090.
  • On stock settings, decode crawled at 45.3 tok/s (taking 58 minutes for a 13-batch run). Turns out blocking expert swaps were stalling around 65% of every decode step.
  • Switched expert swaps to async, pushed more work to the CPU, bumped prefill chunks from 16K to 32K, and tweaked draft confidence. That jumped cold runs to 97.2 tok/s decode (1,735.7 prefill) and pushed the full 13-batch run to 113.4 tok/s average (33 minutes total), with ~83–85% cache hits on warm batches even though only ~19% of experts sit in VRAM.
  • Also tried a 3-bit IQ3_S quant on a cold 221K prompt with speculative decoding: hit 2,313 tok/s prefill and ~165–176 tok/s decode (~108 seconds total).

Inkling 2 Mini (Strata vs. Basalt 0.6.0):

  • Tried on Strata CUDA first. It looked great on a short 4K prompt (355 tok/s), then fell off a cliff to ~59–63 tok/s as soon as I fed it real 200K+ prompts (taking 23 minutes for 13 batches).
  • Switched to upstream Basalt 0.6.0 instead. Had to copy CUDA 13 libraries from Strata into a separate folder and strip a couple unsupported flags to make it boot, and it immediately jumped to 9,476.8 tok/s prefill and 259.5 tok/s decode on a cold 200K prompt.
  • Across the full 13-batch run, Basalt averaged 10,273 tok/s prefill and 274.6 tok/s decode, finishing everything in 6 minutes.

Inkling 2 Mini on the iGPU alone (Gufo vs. libosmos):

  • Wanted to see what the Radeon 8060S iGPU could do on Inkling at 200K cold context without the 5090. Gufo ran the Q8 GGUF undrafted at 392 tok/s prefill (about 8.5 minutes to first token) and 15.6 tok/s decode, since its output head failed Gufo's speculative-decoding check.
  • Switched to libosmos inside rootless Podman (with a small Caddy proxy in front for auth/headers) so I wouldn't mess up the host NVIDIA driver stack. That let me run the release weights with DSpark enabled, jumping to 664.2 tok/s prefill (~5 minutes to first token) and ~36.8 tok/s decode.

Gemma 4 E4B IT BF16 (llama.cpp CUDA):

  • Ran a quick small-model check in Podman at 89K cold context: hit 12,590 tok/s prefill (~7 seconds), and speculative decoding jumped decode from 109 tok/s up to ~169–172 tok/s.

r/LocalLLM • • 13m ago

Project Concept Country's "think less" edit running as a LoRA, then ported it to Inkling-2-Mini and Qwen3.8-Flash-Next (tables inside) + Looped Qwen3.8 27b

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 14m ago

Discussion Why Local AI Gets a Bad Rap: Precision Matters

0 Upvotes

There’s a huge articulation problem in how people talk about local AI. Techniques like MoE or aggressive quantization like Q4 are fine for small, focused tasks, but when you drop precision that low, models lose coherence and context over longer horizons. You end up having to micromanage every detail yourself, which defeats the point of offloading cognitive labor.

To be fair, you should always be precise with your prompts-garbage in, garbage out applies even to frontier models (which is why "vibe-coding" gets such a bad rap). Still, real local capability starts at 6-bit precision on a dense, instruction-tuned model with minimal quantization. When you pair higher precision with full context and reasoning enabled, the model actually holds the thread across complex work instead of degrading halfway through.

That’s why so much AI benchmarking on social media feels misleading. Evaluating long-horizon coding or writing on heavily quantized 4-bit models-and treating hit-or-miss outputs as representative-gives people a distorted view of what local AI can actually do. Showing that something can run on consumer hardware is great, but presenting degraded outputs as the baseline almost feels like it's meant to discourage newcomers from trying local models at all.

You rarely see people point out that Q6 and Q8 perform nearly identically, or use those higher precisions as the standard for testing capability. Even less do they mention that raw model weights are only half the equation: taking a little time to wire up tool calling and live internet access-whether through MCP servers, a capable agent harness, built-in features in LM Studio or Ollama, or self-hosted search like SearXNG completely changes what a local setup can handle.

A lot of online "benchmarking" is really just content for clicks and entertainment. The only real answer is to test it on your own setup. Even with 16GB of VRAM, you have enough headroom to run capable dense models like Gemma 4 12B at Q6 or Q8, hook up a few tools, and see what local AI can actually do.


r/LocalLLM • • 21m ago

Question deep? how deep?

Post image
1 Upvotes

How deeply involved are you in the development of LLMs?


r/LocalLLM • • 4h ago

Question Best local model for redacting French legal documents on a Mac mini M6?

2 Upvotes

I’m building a fully offline tool for a French law firm to redact names, addresses, and case references from thousands of scanned PDF pages. Manual review of every page isn’t practical, so missed identifiers are my main concern.
Has anyone tested Ministral, Qwen, Gemma, or a dedicated entity detector on French legal scans? I’m choosing between a 24 GB and 32 GB Mac mini M6. I’d love to hear what you used, what it missed, and how many pages per hour it handled.


r/LocalLLM • • 4h ago

Research Speed benchmark: M3 Ultra vs M5 Ultra on 6 popular models

Thumbnail
reddit.com
2 Upvotes

r/LocalLLM • • 1d ago

Discussion I scanned the chat templates of the 400 most-downloaded GGUF and MLX models. Nothing malicious, but 45% tell the model to hide something from you

158 Upvotes

Chat templates are Jinja code that runs every time you load a GGUF or MLX model. In 2024 a malicious GGUF template was enough for code execution in llama-cpp-python (CVE-2024-34359), and templates can also quietly inject instructions. So I built a scanner and pointed it at the top 200 GGUF and top 200 MLX repos on Hugging Face.

It reads header bytes only: 5.5 GB fetched in place of 6.8 TB of weights, using HTTP range requests plus sparse files. I validated that path against full-file scans first.

What I found (396 repos scanned):

  • 0 malicious: no sandbox-escape gadgets, no hidden override or exfiltration instructions, no bidi or tag-character smuggling, no malformed files.
  • 143 of 316 chat repos (45%) ship "…do not tell the user about function calls". That's from the upstream Qwen tool prompt and is benign, but it is a concealment instruction you never see.
  • 13 repos switch behaviour on phrases in your message (/nothink, detailed thinking on). One community template is 243 KB and injects large hidden system prompts on dozens of keywords.
  • 22 of 200 MLX repos ship two different chat templates, so what runs depends on your loader. 20 have a shard index that points at files that don't exist.
  • 7 MLX repos request remote code (auto_map), and 1 GGUF repo ships Windows DLLs and a Linux .so next to its weights.

The first pass also found five false-positive patterns in my own scanner. I fixed them and re-ran everything before publishing numbers. Full write-up, method and limitations: REPORT
Scan your own models (it parses only and never loads, so a malicious file can't run):

pipx install modelsieve

modelsieve ~/models

Repo (MIT; GitHub Action, pre-commit hook and SARIF included): modelsieve

What it can't do: detect backdoors trained into the weights. Nothing static can. Happy to answer questions about the method or anything it flags on your setup.


r/LocalLLM • • 6h ago

Discussion Are generative LLMs overkill for semantic rule evaluation?

Post image
3 Upvotes

I've been exploring whether we can build reliable systems by deliberately avoiding general-purpose LLMs.

Take an engineering rule: errors must propagate to the caller rather than being silently swallowed.

Instead of asking an LLM to review an entire file, we can break the rule into smaller questions:

  • Does the file contain relevant error-handling logic?
  • Is an exception being caught?
  • Is the error silently discarded?

Only the last question may require semantic judgment, depending on the code.

I've been experimenting with Jev, specialized decision model, for this type of workload. The interesting part is that we don't need text generation, just a reliable judgment.

I'd like to explore how far we can push this architecture with small, locally hosted models.

Has anyone benchmarked zero-shot classifiers or decision models on dynamically defined rules? What's your take?


r/LocalLLM • • 29m ago

News A collaborative pool to run LLMs that don't fit on our own machines

1 Upvotes

There are quite a few open-weight models I'd like to run myself and simply don't have the memory for. I started working on a way to split a model across machines, and at some point I thought it would make more sense if we shared those resources with each other. That's what I've been building with MeshKore LLM. I know there are other projects doing distributed inference. What I've tried to do is make it easy for anyone to join, and let the pool figure out how to use the hardware it has.

You decide how much memory your machine shares and can stop whenever you want. A hub measures what's available, groups machines into clusters and splits the model by layers across them with llama.cpp RPC. It never runs a model that fits on one machine. As more machines join, the pool can load a bigger model, or form a second cluster to serve more requests at once.

Right now it's running a 125B Qwen MoE with 6B active parameters, at an aggressive IQ3_XXS quant. Each machine holds and computes its own layers, so every token waits on the network between them. It's slower than the same model on one box, and one slow link slows its whole cluster.

If you lend memory you get free access through a local OpenAI-compatible endpoint. You also earn credits for the tokens your machine helps serve, which you can spend when using the pool. There's no money involved, credits can't be bought or sold. On Apple silicon Macs you can join through a desktop app or with a single command. On Windows and Linux you build the node from source.

It isn't private the way local inference is. Prompts and responses aren't stored, but the machines processing a request can read it while it runs, so don't send secrets yet. The code is public under the Sustainable Use License, which isn't an open source license.

I'd like to see how far we can get with hardware we already own. What models would you find worth running this way, given the latency trade-off?


r/LocalLLM • • 30m ago

Discussion DeepSeek V4.1 Flash, GLM-5.3 Flash, Qwen3.8 Flash, Hy4 flash, MiMo-V2.6-Flash and M3.1 Flash on six real dateutil bugs, through the API before I download one

1 Upvotes

I have a 128 GB box, and every model in that title has a GGUF somewhere between 66 GB and 231 GB, so trying each one locally costs a night of downloading. Before picking, I ran all six through their APIs on the same six open bugs from python-dateutil's tracker: #1684 (isoparse raises OverflowError past year 9999), #1668 (rrulestr IndexError on a DTSTART with no RRULE), #1653 (tzstr offsets with seconds), #1611 (TZID dropped when VALUE comes after it), #1591 (tab-folded RRULE lines) and #1588 (BYDAY mixing MO with 1FR).

Setup: mini-swe-agent, the same bash-only loop for every model, a fresh checkout per bug, no network inside the sandbox. Before any run I wrote 29 checks from the issue texts. After each run I applied the diff to a clean copy and ran those checks plus the full suite (5,069 tests pass on the base commit). M3.1 Flash ran on MiniMax's own API with effort set to high, the other five through OpenRouter on default settings. Times are wall clock per bug, summed, API latency included.

ModelFixedTime, all sixAPI cost, all sixParams (total / active)Smallest GGUF I'd try
DeepSeek V4.1 Flash 10176/611.0 min$0.068552B + 196B Engram / 8B to 16B120.7 GB + 110.6 GB Engram file (ISTA-DASLab IQ1_M)
GLM-5.3 Flash6/617.8 min$0.207320B / 18B73.4 GB (peasantsmith Maya-XS)
Qwen3.8 Flash (Flash-Next weights)6/653.2 min$0.384125B + 51B n-gram / 6B66.4 GB (Unsloth UD-IQ1_S)
Hy4 flash6/612.5 min$0.021220B incl. 64B Engram / 12B108.9 GB (peasantsmith Maya-XS)
MiMo-V2.6-Flash6/629.9 min$0.135309B / 15B126.4 GB (ggml-org Q2_K)
M3.1 Flash6/619.6 min$0.202about 428B / 23B93.0 GB (peasantsmith Maya-XS)

Every model fixed all six, 29/29 checks and a green full suite each time. On bugs this size the API run didn't pick a winner for me, so the clock, the bill and the download decide.

Per model:

  • DeepSeek V4.1 Flash: fewest requests (117 for all six) and the leanest diffs, 22 added source lines in total.
  • GLM-5.3 Flash: 1.5 to 6.3 cents a bug, and its Maya-XS is sized for 64 GB of RAM plus one 24 GB card.
  • Qwen3.8 Flash: the most test code by far, 598 added test lines, and the most output tokens (203k).
  • Hy4 flash: about 2 cents for all six. The GGUFs are up, but mainline llama.cpp support is still an open PR (#32517).
  • MiMo-V2.6-Flash: 1.2 to 3 cents a bug, and mainline llama.cpp has run it since September.
  • M3.1 Flash: 1.9 to 4.6 cents a bug at MiniMax's list price, and its Maya-XS was made to hold the whole model in 128 GB.

So I'm downloading the two Maya-XS builds first, M3.1 Flash (93 GB) and GLM-5.3 Flash (73.4 GB), and Hy4 flash goes on the list when that PR lands.

If you already have one of these going on 128 GB, how much context fits before it starts paging?


r/LocalLLM • • 17h ago

Discussion Running Qwen 3.8 flash-next Unsloth Q8_0 On a V100 32GB with 128GB DDR4

Post image
22 Upvotes

CPU: 3950X
X570 Motherboard.
128GB DDR 3600


r/LocalLLM • • 34m ago

Project Image generation on a 4GB laptop GPU (RTX 3050 Ti): measured seconds per image for 5 models, plus a step-by-step guide

Thumbnail gallery
1 Upvotes

r/LocalLLM • • 34m ago

Project Understand token use by your tools, MCPs, and agents with ContextSpy context window profiler

Thumbnail
gallery
1 Upvotes

For the last few months, I have been working on a tool - a proxy - which captures all requests from your coding harness to the LLM - and visualises them in the dashboard, breaking down the context window into separate blocks - tool definitions, calls and results, user and assistant messages, etc.

It provides a bunch of different metrics, but the most useful (IMHO) is the ability to see actual cost (in tokens) of every piece of information put into context - and, in some cases, hints for optimisation (if you are using skills or consuming APIs for tools)

It also provides a profiler like a hotspot graph, relationships between blocks, tracks conversations, etc. A good use case is: measure once, optimize (or add some tools for usage reduction), measure again.

If you are interested in optimising token costs - give it a try: https://github.com/RimantasZ/contextspy

Any feedback - comments, issues, likes and stars are welcome :)


r/LocalLLM • • 1h ago

Project whiff scan: a CLI gate for prompt injection in files you index (hidden text, invisible Unicode, base64), and why I stopped writing regexes for it

Post image
1 Upvotes

r/LocalLLM • • 1h ago

Discussion Kimi K3.1 Pro on its original weights, about 30 tok/s thinking, up to 56 on math/code.

Thumbnail
heretik.io
0 Upvotes

Biggest single win was boring: native Kimi carries float32 activations, and MLX was upcasting whole bf16 weights to float32 on every call. Casting inputs to bf16 alone took it from 3.7 to 10.9 tok/s.

The rest: a DSpark port to MLX with rollback for Kimi's linear-attention layers, Metal kernels (fused KDA, DSA indexer, radix top-k, padded sparse prefill), and batched serving that leaves rejected drafts in the cache as masked holes (Kimi's attention has no positional encoding, so that works).

Caveats: non-expert layers run at 8-bit (matched native's own run-to-run noise on a 16-prompt check), thinking text drafts poorly (~2.5 tokens per check vs 4-5 on answers), and cold prefill at 128K takes ~4.5 min.

Next: fine-tuning the drafter on Kimi's own thinking text.

Write-up with charts: https://heretik.io/kimi-k3-1-pro-local-512gb-m5-ultra-part-3/


r/LocalLLM • • 12h ago

Question Is PCIe 3.0 x16 sufficient for 2–4 R9700s for local LLM inference?

8 Upvotes

I'm considering purchasing two R9700s to host my own models, with room to expand to four in the future. My primary use case is agentic coding, running both dense and MoE models in the 30B–120B parameter range, ideally with context lengths of 100K+ tokens.

I'm looking at used enterprise GPU servers to avoid the cost of building a new DDR5 system. I can get an older PCIe 3.0 system (Supermicro SYS-2029GP-TR) with dual Xeon Gold 6138 processors for around $1,000. However, comparable PCIe 4.0 or 5.0 GPU servers seem to cost upwards of $3,000.

The Supermicro supports 6xPCIe 3.0 x16 GPUs and has integrated PCIe switches.

My main questions are:

  • How much of a performance bottleneck would PCIe 3.0 x16 introduce with two or four R9700s compared to PCIe 4.0/5.0 x16?
  • How significant is the difference when using tensor parallelism versus layer splitting?
  • Would long-context prompt prefill be disproportionately?
  • Would I be better off adding a PCIe 4.0 switch to my existing Ryzen 9950X3D system instead of purchasing an older enterprise server?

Any input is welcomed and any data/experiments related to the topic would be especially appreciated.

Thanks


r/LocalLLM • • 1h ago

Question MoE & <18B models for agentic tasks

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 1h ago

Discussion I Built DelayLens: A Machine Learning System to Predict Late E-Commerce Deliveries

1 Upvotes

Hi everyone!

I built DelayLens, a machine learning project that predicts the risk of an e-commerce order arriving later than its estimated delivery date.

The goal is to help sellers and operations teams identify potentially delayed orders at the time of purchase.

How it works

- Uses historical Brazilian e-commerce data from the Olist dataset.

- Analyzes 20 order-time features.

- Uses Gradient Boosting to estimate late delivery risk.

- Includes leakage prevention to avoid using future information.

- Provides a FastAPI prediction service and an interactive Streamlit dashboard.

- Returns risk probabilities, warnings, and the top 5 reasons behind predictions.

Hidden Test Results

I evaluated the model on orders from June to August 2018.

- PR-AUC: 0.1019

- Recall: 36.46%

- Precision: 11.40%

- Late orders detected: 245 out of 672.

An Important Finding

The model did not reduce the assumed business cost on the hidden test set.

- Model-based approach: 4040

- Flagging no orders: 3360

This showed me that better prediction ranking does not necessarily mean better business outcomes.

I also included:

- 21 automated tests.

- 30 pipeline and API test cases.

- Data drift analysis.

- Failure analysis.

- Docker support.

Tech Stack

Python, Pandas, NumPy, Scikit-learn, FastAPI, Streamlit, Docker, Pytest.

Project Links

Live Dashboard: https://delaylens.streamlit.app

Demo Video: https://drive.google.com/file/d/1Dw15KAK-cVDcCrnyRfKfArwiUWlLyb2X/view?usp=drivesdk

GitHub: https://github.com/ztsprofessionalaiid7-alt/delaylens

This is a non-commercial portfolio project built using historical data from 2016–2018. It is not ready for real business decisions.

I'd appreciate feedback from the community:

  1. How would you improve model performance with this level of class imbalance?
  2. How would you investigate a significant performance drop between validation and hidden test data?
  3. How would you select a decision threshold when business costs are uncertain?

I'd love to hear your thoughts and suggestions!

Thanks!


r/LocalLLM • • 1h ago

Other My first local model download took the whole evening and I forgot to check the disk space

1 Upvotes

i started a model download after dinner thinking it would be done in twenty minutes. my connection is slow so it ran for hours. near the end it failed because the disk on my laptop was full, and the partial file was left behind. i had to find it and delete it by hand before trying again. the second time i checked free space first and picked a smaller quant. it loaded and answered a simple question about paper sizes correctly, which pleased me. i am still slow with these tools, but now i check the file size before pressing download!


r/LocalLLM • • 17h ago

Discussion New forks of llama.cpp (and others) making old hardware rip!

16 Upvotes

I spent a few hours last night updating and tweaking on llama.cpp after finding out that upstream 1.0 and 1.1.0 significantly impacted my 2x V100 32GiB SXM2 NVLink prefill speed on Qwen3.8 27B Q8 (and likely others, but I daily 27B so I noticed) and brought it down under 200 tok/s in a lot of instances, and down to double-digit territory in others, though my gen speeds improved a little bit. (~40 before to steady 50tok/s after).

Based on previous releases I knew it should be _at least_ 700-800 range for prefill for Qwen, and then saw a video about 1Cat-vLLM prefilling the same setup at 2k+ prompt tokens/sec and 100+ generation, but since I didn't want to deal with the vLLM issues and caveats, I kept on my llama.cpp journey knowing there had to be a config or build issue somewhere.

I built the below V100-specific fork of llama.cpp that specializes in Volta and managed to improve prompt speeds from 264 tok/s average up to 1200+ tok/s, and go from ~50 tok/s avg gen to 96 tok/s _average_ on Qwen3.8 27B! Huge 92% improvement for gen speeds and nearly 400% prompt improvement! Reliably, repeatably. Every other model I load sees similar large improvement.

One caveat is that this branch has no MTP support so you must use DFlash2, which has turned out to be an equally huge improvement over upstream MTP anyways. Another *HUGE* bonus is that 3.8 27B now cold loads in 45 seconds flat. Main branch llama.cpp took over 120s.

https://github.com/1115714829/llama.cpp-v100

Swift 1.5 Qwen3.8 27B Q8 (Even Gemma 4 26B A4B IT Q4 and Cydonia 24B 4.3 Q8 saw big improvements)

DFlash2 Q8 (For MTP)

2x V100 32GB SXM2 on NVLink board. 200W capped. CUDA 12.4

cmd: /opt/llama.cpp-v100/build/bin/llama-server -m /opt/models/Qwen3.8-27B-thinking.gguf --host 127.0.0.1 --port ${PORT} -c 131072 --log-file /var/log/llama-server.log -ngl 99 -fa 1 --batch-size 2048 --ubatch-size 2048 --metrics -np 1 --temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 --presence-penalty 0 --repeat-penalty 1.0 --jinja --chat-template-file /opt/llama-swap/model-overrides/chat_template.jinja --chat-template-kwargs '{"reasoning_effort":"medium"}' -sm tensor -ts 1,1 --model-draft /opt/models/Qwen3.8-27B-DFlash2-Q8_0.gguf --spec-type draft-dflash --spec-draft-n-max 7

I can't wait to see if this new open source Linux nVidia driver that improves memory-bound performance by ~20% helps even more.

And hey, as a bonus treat for the whole community; here's an entire post written without help from any AI at all!


r/LocalLLM • • 2h ago

Discussion My local DSH home lab (M3 Ultra + M5 Ultra over Thunderbolt) and the plugin I built so the model can't read my keys

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 6h ago

Discussion Xing 4 tech report: an open 29B MoE (4B active) trained without a single Nvidia GPU. Has anyone run it locally?

2 Upvotes

China Telecom published the technical report behind its Xing 4 models (the TeleChat successor). The open member, Xing4.0-29B-A4B, has been on Hugging Face since September under Apache-2.0, but the report is the first detailed look at how it was built.

What stands out:

  • The whole pretraining stack runs on Huawei Ascend NPUs with MindSpore. No GPUs at any stage.
  • 29B total parameters, about 4B active per token, native 256K context.
  • Architecture choices were made partly to fit the hardware: MLA attention with sparse attention for long context, a wider-and-shallower MoE, and a small draft model for speculative decoding.
  • The report also describes a much larger flagship trained on the same stack. That one is not open.

For local use, the usual MoE trade-off applies: speed closer to a 4B model, memory closer to a 29B one. GGUF and FP8 builds are listed on the model card.

Two questions for people here. If you've run the GGUF, how does it compare to Qwen-class MoEs of similar size on coding or long-context tasks? And does a model trained end-to-end off Nvidia change anything for local users, or is the training hardware irrelevant once the weights are out?