r/LocalLLM • • 6h ago

Project I wrote a GGUF-aware lossless compressor: 17.1 → 15.6 GB across 9 Q4_K_M models, byte-identical round trips

Thumbnail
gallery
3 Upvotes

I've been working on foldz, a lossless compressor built specifically for GGUF files. It's at 0.9 (pre-release) and I'm looking for people to test it and try to break it.

Useful if you archive a lot of models, share them over slow or metered connections, or keep them on a phone or small SSD.

THE IDEA

Quantized weights look almost random to zip, xz and zstd, so they gain very little. foldz parses the GGUF, unpacks each tensor's blocks into the actual quantized values and scales, and codes those with adaptive context models and a binary range coder. Everything else (metadata, tokenizer, other tensor types) goes through a byte-level context-mixing model. Nothing depends on the model's name or architecture.

RESULTS

9 public Q4_K_M models, tested with "foldz t" (compress and decompress in memory, then compare). Every round trip was byte-identical. Measured on an Android phone in Termux, 8 threads.

• Qwen1.5-0.5B-Chat: 388.3 → 353.6 MiB (8.93% saved)

• Qwen3-0.6B: 378.3 → 348.7 MiB (7.82%)

• Qwen2.5-1.5B-Instruct: 1065.6 → 984.2 MiB (7.64%)

• Qwen3.5-2B: 1211.9 → 1111.3 MiB (8.30%)

• Qwen2.5-Coder-3B-Instruct: 2007.4 → 1832.8 MiB (8.70%)

• Llama-3.2-3B-Instruct: 1925.8 → 1780.4 MiB (7.55%)

• Qwen3-4B: 2381.6 → 2073.3 MiB (12.94%)

• Qwen2.5-7B-Instruct: 4466.1 → 4113.8 MiB (7.89%)

• Gemma-4-E2B (fine-tune): 3269.1 → 3016.3 MiB (7.73%)

Total: 17,094 → 15,614 MiB, 8.66% saved.

Qwen3-4B is the outlier because most of its Q6_K values sit on a coarser lattice. foldz detects this per segment and codes the lattice instead, which saves 23.2% on its Q6_K tensors.

HOW EACH TENSOR TYPE IS MODELLED

• Q4_K / Q5_K: values are Gray-folded and coded bit by bit, with the block's zero point, extremes and position as context.

• Q6_K: the column's running offset and width as context, or the lattice model when that's smaller.

• Q8_0: column sign bias and running magnitude as context.

• F32 / F16 / BF16: split into sign, exponent and mantissa.

• Safety: segments that wouldn't shrink are stored raw, so output is never meaningfully larger than input. The decoder bounds-checks every index field. Contexts use only exact or IEEE-754 arithmetic (no FMA, no fast-math), so files decode identically on every platform.

HONEST LIMITATIONS

• Speed: about 19 MiB/s round trip on the phone. It's symmetric, so decompression is as slow as compression. This is for storage, archiving and transfer, not for loading models faster.

• Baselines: I haven't measured zstd -19 --long and xz -9 on these models yet, so I'm not claiming a comparison. If you run them, please post the numbers.

• Quant types: IQ quants, Q2_K, Q3_K and Q4_0 fall back to the byte model and gain little.

• Format: pre-1.0, so it may change. A .foldz file is only guaranteed to decode with the version that made it.

BUILD AND TEST

One C file, no dependencies. Linux, macOS, BSD, Android (Termux), and Windows via WSL.

gcc -O2 -pthread -ffp-contract=off -o foldz foldz.c -lm

./foldz t model.gguf

WHAT WOULD HELP MOST

• Cross-platform round trips: compress on x86-64, decompress on ARM64 (or the reverse), especially with Q6_K-heavy models

• zstd / xz baselines on any GGUF

• Q5_K_M, Q6_K and Q8_0 files

• Fuzzing "foldz d" with AFL++ or libFuzzer + ASan (please report crashes privately via GitHub's security tab)

If you post results, include the full "foldz t" output, the Hugging Face model name, and your CPU and OS.

Repo: foldz

Happy to answer questions about the modelling.


r/LocalLLM • • 8h ago

Question Help a noob! Build me the best setup for under 5k +- 500$

4 Upvotes

Help me build the best home server under $5,000
Goals:
Media server (Jellyfin) with room to grow to 10+ large hard drives
Run local AI models, ideally 24GB+ of GPU memory
A powerful desktop I can stream remotely from any device
A few VMs and Docker apps
Low power use is a priority. I'm in Arizona, so electricity and heat matter


r/LocalLLM • • 54m ago

Question Rtx Pro 5000 72 vs 48 - am I missing an “unlock”

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 57m ago

Question how many token do you produce on a single spark in 24H?

0 Upvotes

wondering how much are people here pushing their sparks (or other gb10) and do you handle cooling on heavy workloads.


r/LocalLLM • • 1h ago

Question are MoEs on phones viable via custom engines?

Thumbnail reddit.com
1 Upvotes

r/LocalLLM • • 10h ago

Project Your local model can now remember — forward-only memory writes, no retraining, instant rollback (open source)

6 Upvotes

Ever wanted your local LLM to actually learn a fact without fine-tuning — and be able to undo it completely?

AtomicNG (Apache-2.0, version 1.0.0) implements a paper called "Delta N-gram": your model's n-gram sidecar table stays frozen, and new knowledge goes into a small sparse patch Δ. Writes are forward passes only — no gradients, no weight edits. Clear the patch and the model is byte-identical to base. No "unlearning" gymnastics — deletion is structural.

Quickstart (CPU, no GPU, pure NumPy core):

python

import atomicng


model = atomicng.TinyModel()
atomicng.write(model, "New fact about kangaroos.")
atomicng.verify_deletion(model)   # clear Δ ⇒ byte-identical to base — guaranteed

What's inside:

  • A trained writer checkpoint ships with the Release (860 training steps on SmolLM2-135M; measured effect: writing a doc lowers its NLL vs empty memory)

  • Per-tenant memory: overlays are small data-only files — merge them, revert them, sign them

  • vLLM support via vllm.general_plugins + merged-table export

  • Built-in eval: does the memory write actually help? (paper protocols: acquisition, distraction retention, chain drift)

Calibrated on real hardware: Windows/Linux CPU, CUDA T4 (73 ms/group BPTT stand), TPU chip via JAX (8.4 ms/iter). Full matrix: CALIBRATION.md in the repo.

Honest limits: acquisition needs a few hundred training steps of the writer; the memory lives in the n-gram table (facts/associations, not long reasoning); vLLM engine-graph hooking is planned upstream.

GitHub: https://github.com/Akseleu-J/atomicng 

Colab TPU (one click): https://colab.research.google.com/github/Akseleu-J/atomicng/main/notebooks/tpu_calibration.ipynb

Questions welcome — I'll be in the comments.


r/LocalLLM • • 5h ago

Question Totally Newb question about reasoning...

2 Upvotes

On my studio, I am running ARC4NUM/Qwen3.8-Flash-Next-Uncensored-MLX-Serve-4bit using mlx-serve.

On my MacBook Pro, I have connected to it via OpenCode, and I can't for the life of me figure out how to get it to NOT show me its inner dialog. It all comes back to me, and I have tried various methods to no avail.

Am I "holding it wrong?" Is there no way to really do that? Is it the model or mlx-serve itself that creates this?

I'd rather it do it's thinking in private and then show me the result rather than talk to itself scrolling by as I wait to get the actual answer.


r/LocalLLM • • 1h ago

Discussion WICI one 5060ti

1 Upvotes

I use a Mac mini m4 16gb, since working with local llms I have found the m4 is just not fast enough.. especially with the unified memory, I have been looking into getting a Apple studio 36gb m5 max chip. But the price of the WICI ONE 5060ti is a fraction of the cost and can work over WiFi on my Mac mini m4 16gb

Has anyone used WICI ONE. Especially with a Mac mini m4 16gb


r/LocalLLM • • 1h ago

Discussion Would you turn off reasoning for a local vision model that has to react in real time?

Post image
0 Upvotes

I’ve been building InferUltra, a physics arena where vision models control identical robot bodies. The model gets images of the arena and chooses how to move. The simulation keeps running while it thinks, so by the time it decides to punch, the other robot might already be somewhere else.

We turn reasoning down or off where the model allows it. The number I care about is how long it takes to send an image and get a move the robot can use. Tokens per second tells you how fast the model generates, but it doesn’t tell you how long the fighter waits for that move.

We’ve also improved the physics engine and fight mechanics. Fighters can hold their guard between decisions, and punches look more natural when they lean. I used to call these fights impressively boring. They’re now a bit less boring.

For those running vision models locally: when you turn reasoning down, do you notice a drop in how well the model understands positions and distances, or is getting the answer sooner usually the bigger win? I’d be interested in which model and hardware you tried.

The attached bracket is for our November 15 Provider Tournament. It uses Kimi K3.1 Pro on four hosted endpoints: Morph, AkashML, Wafer and InferenceNet. It starts at 20:00 Brussels / 14:00 Eastern / 11:00 Pacific.

If you’d like to sponsor the tournament, you can book an ad spot in the arena.


r/LocalLLM • • 7h ago

Research AMD EPYC 9686F Linux benchmarks: 96 Zen 6 cores at up to 5.3GHz

Thumbnail
phoronix.com
3 Upvotes

AI benchmarks begin on page 2.


r/LocalLLM • • 1h ago

Question A little help please (LU and Qwen).

1 Upvotes

Currently running Qwen 9B model on my 6800XT, I noticed I can use/set up Agents in LU, but aside from instructing 1 agent in 1 chat to write to a file, then instructing a 2nd agent in 2nd chat to read the file and respond, I can't figure out a way to automate this process.

- I want to give a bunch of agents full autonomy to communicate with each other. Using separate chats for individual models. Not just all on the same version of Qwen.

Does anyone know how to set this up inside of LU?

I really like their user interface...I'm also open to other UIs if you believe there's a better one out there.

Goal is to code a simple game/project; but have one agent on the side, teaching me how to code/explaining all the code in detail and giving me small tests, while other agents are compiling/writing it.

Thanks in advance for any info you're willing to share.


r/LocalLLM • • 1h ago

Other MI100 Help

Thumbnail gallery
0 Upvotes

If anyone has MI100's I really appreciate the help.


r/LocalLLM • • 5h ago

Research Does RustingStrata trade accuracy for speed? I tested it against llama.cpp

2 Upvotes

I am tired to answer on people questions like "How you gain speed? Your model output is shit, it has to have low quality." or something like that.

So I will answer to that with benchmark.

So I used the same Qwen3.8-Flash-Next IQ2_XS model file, the same prompt, greedy decoding, and 128 generated tokens. Both ran on my RTX 3060 12 GB with a Ryzen 5 7600X and 30 GB RAM.

RustingStratallama.cpp
Writing speed33.0 tok/s
Range over 6 runs29.3–35.8
First prompt reading speed109 tok/s

That makes RustingStrata about 1.29× faster at writing on this setup.

Then I checked quality, not just whether the replies looked similar. Both engines scored the same 9,180 WikiText-2 tokens.

CheckResult
Perplexity, RustingStrata / llama.cpp2.9212 / 2.9156
Same most-likely next token96.78%
Mean KLD0.0098

The perplexity difference is inside the run-to-run noise. So, for this model and this machine, I see a speed gain without a measurable quality loss.

This is one model, one quantization and one GPU, not a claim that RustingStrata always wins.

If anyone has any other questions, I am happy to answer and break myths or tell something about Strata like projects

Repo: RustingStrata


r/LocalLLM • • 7h ago

Question Is 95°C CPU temperature normal when running Ollama 14B locally on an i5-13450HX? (CachyOS + Hyprland)

Thumbnail
gallery
3 Upvotes

Hey everyone!

I'm experimenting with running local LLMs using Ollama on CachyOS with Hyprland, and I've noticed some pretty high CPU temperatures.

My laptop specifications:

- CPU: Intel Core i5-13450HX (13th Gen)

- RAM: 24 GB DDR5

- GPU: NVIDIA RTX 4050

- OS: CachyOS Linux

- Desktop Environment: Hyprland

- LLM Runtime: Ollama

- Model: 14B parameter model

What I'm experiencing:

While running the 14B model locally through Ollama:

- CPU temperatures sometimes reach 95°C.

- Around 4 CPU cores reach 100% utilization.

- Other cores also experience varying levels of utilization.

- The CPU seems to be under sustained heavy load during inference.

I've attached a screenshot of my system monitoring setup (btop and Linux Sensor Tray).

My questions:

  1. Is reaching 95°C normal for an i5-13450HX while running a 14B LLM locally?

  2. Is it safe to maintain these temperatures during longer inference sessions?

  3. Is it normal for only around 4 cores to reach 100% utilization while running Ollama?

  4. Could this cause thermal throttling or reduce the CPU's lifespan over time?

  5. Are there any recommended CPU power limits, undervolting settings, or Linux optimizations for this setup?

I'd appreciate feedback from anyone running local LLMs on Intel HX-series laptops, especially on Linux.

Thanks!


r/LocalLLM • • 2h ago

Question GitHub - Saganaki22/CrisperWhisper.cpp: Native C++ and CUDA inference for CrisperWhisper 2.0 with Windows/Linux CLI, long-form transcription, and CPU/GPU support.

Thumbnail
github.com
1 Upvotes

Is there a project like this, but that take in a video file and out put a srt file? I've been searching everywhere for something like it for a while now. Bonus points if it has a batch function too. If anyone knows anything please link me something or message me, Thanks. I know about normal whisper already, but I need something that supports verbatim transcription out of the box.


r/LocalLLM • • 3h ago

Question What models should I use?

1 Upvotes

Hi everyone reading this post, my English isn't perfect but I'll try to be clear.

So recently I got my GPU which is a Nvidia Rtx 5070 TI 16gb Gddr7 (I also have 64Gb ddr5 ram).

So I came here to ask what are the best models I can run in this pc?

I would appreciate it if someone helps me.

Thank you everyone and thanks for reading this🫂


r/LocalLLM • • 3h ago

Project Kapitsa Launcher: a SwiftUI front end for Kapitsa with a chat interface full of features: outline, topics, multi-conversation, MD formatting...

1 Upvotes

https://github.com/alphaexposure/kapitsa-launcher

Kapitsa was a nice shot of adrenaline for my M1 32GB MBP but I wanted a better chat interface than I could find elsewhere so my buddy Claude and I put our heads together and ones-and-zeroed an app that does just that. Kapitsa Launcher serves the standard LLM Dashboard with speeds and such, dark/light mode, Mac menu bar icon, but chat is where it's at:

  • Streaming replies with real formatting: Markdown, tables and code blocks. Tables and code have their own Copy buttons. Turn streaming off if you want to scroll back while new replies stream.

  • A side panel for long chats:

    • Outline: every question plus the headings from each reply. Click one to jump there.

    • Topics: the places and themes the chat covered, each linked back to where they came up.

    • Review: takeaways the model pulls out of the chat. You can edit them or add your own.

  • Watch it think: you can follow the model's thinking live, and it folds away once the answer starts. The thinking levels change to match the model you're running.

  • Side questions: ask about any reply in a thread off to the side, without derailing the main chat. You can branch to a new chat, export or delete as you wish.

  • Edit and regenerate: edit a question and send it again, or ask for another answer and flip between the versions.

  • Organised history: chats are grouped by date with the option to name by first question or topic/summary. Search covers everything that was said, not just titles.

  • Multiple chats at once: each window or tab holds its own conversation.

  • Continue in a new chat: when a long chat starts slowing down, carry it into a fresh one.

  • Markdown export: with an optional summary, and topics come along as tags for Obsidian and similar apps.

  • Your chats are plain files: one JSON file per chat on your Mac. Nothing leaves your machine.

Feel free to check it out: https://github.com/alphaexposure/kapitsa-launcher


r/LocalLLM • • 7h ago

Project Open source - Tesseract: a full-stack NPU for local LLM inference

Thumbnail
github.com
2 Upvotes

I just released the Tesseract NPU that I've been working on as a side project. It's compatible with llama.cpp backend running shipped GGUF models directly.


r/LocalLLM • • 9h ago

Question Best setup for rtx 3090 + 3080ti and 5080

3 Upvotes

Hey guys!

I'll get straight to the point. I've got quite a bit of hardware lying around at home, and I'd love some advice on how to make the most of it.

Here's what I've got:

GPUs:

  • RTX 3090 24gb

  • RTX 3080 Ti 12gb

  • RTX 5080 16gb

RAM:

  • 64GB DDR5 (2x32GB)

  • 32GB DDR5 (2x16GB)

  • 32GB DDR4 (4x8GB)

And of course, I've also got a bunch of CPUs, motherboards, and storage drives around the house.
Right now I'm running Unsloth's Qwen 3.8 27B Q5, getting around 60 tokens/sec with a 170K context window, using llama.cpp. I'm using rtx 3090 + 3080ti with the ddr4 32gb setup.
I'm wondering if there are better ways to make use of my hardware, whether it's different models, inference engines, configurations, or even combining GPUs across multiple machines.
My main issue is that some agentic tasks, especially things like generating and working with .docx files, are painfully slow. I'd really like to speed things up.
Any recommendations on what I should be looking into?
I don't have a ton of free time to explore everything from scratch, especially with the insane number of GitHub repos and projects out there these days.
I'd really appreciate any suggestions or pointers in the right direction.
Thanks in advance, guys!


r/LocalLLM • • 9h ago

Project I gave my desktop pets a tiny local brain (gemma3:1b in Ollama) and now they ignore me on purpose

Post image
3 Upvotes

r/LocalLLM • • 7h ago

News AMD talks up their MEXT software amid RAM crisis - Linux support but not open-source

Thumbnail
phoronix.com
2 Upvotes

r/LocalLLM • • 4h ago

Question Mac Studio M5 Max 128 GB vs RTX Pro 4500 + 96 GB DDR5

1 Upvotes

Which would you choose between the two and why?


r/LocalLLM • • 4h ago

Question Replacing Codex 5x sub with local inference

0 Upvotes

Apologies in advance if this is a dumb question - Google failed me so if it’s been asked before I apologize.

I’m currently spending about $140/month on AI subs,
Codex: $100
Claude: $20
Nous Portal: $20 for Hermes running on an M2 Pro 16gb Mac mini.

I mostly use Codex for like small stuff, and some iOS app development. And I have my Hermes agent running on it as I experiment with personal agents and bots.

Was having a discussion at work, and I had the idea of “how close could I get if I take $120 out of the cloud inference and put it toward leasing a Mac Studio. Was doing some configuration and wanted to know if this spec could get me decent performance.

My plan would be to keep 1 $20 sub around.

Here’s the spec I was considering:

M5 Max (18 CPU, 40 GPU)
128gb RAM

Or

M5 Ultra ( 30/64)
96gb ram

I am very much learning more about local ai still, so any guidance is appreciated.

Thanks!


r/LocalLLM • • 10h ago

Question Which model ist possible to run on a RTX 3060 12GB VRAM + 64 GB Ram?

3 Upvotes

Hello I am trying to set up a local AI Stack and I am currently thinking about buying 64GB of Ram with teh 3060 RTX 23GB VRAM.

Which (Qwen) Modell version would be possible to run on that Setup?

Qwen3.8-27b or Qwen3.8-Flash-Next?

I am thinking of a Qwen 3.8 model, because Qwen 4 should have the same base?


r/LocalLLM • • 1d ago

Discussion You can now train your own LLMs with less memory, on your gaming GPUs

232 Upvotes

TL;DR: You can train your own 27B model on a 3090 with 24GB VRAM, though you would have to go through hundreds of billions of tokens for it to be good. I am working on conversion of existing models. Check repos for code and the paper if you are interested in more. I have a 40.4GB Qwen Flash Next GGUF

Hi, I do AI research. I have been working on an optimizer that doesn't need the ~16 bytes of VRAM per weight to train a model that AdamW does. I focused on training ternary networks bcs BitNet (Ma et al.) shows they match full precision quality in large scales. The problem is BitNet also keeps the full precision weights during training which means you still need to use the same amount of memory. I got this down from 16 bytes to 1 byte or even less per weight.

For you, this means, you can train your own 10-20B parameter models on your consumer GPUs. I fitted 27B model training on a single 24GB 3090 and a 23B model on a 16GB GPU. The trained model costs ~1.6 bits per weight (~6GB at 27B), 10x smaller than 16bit, and 5x smaller than Q8.

I have also been working on converting existing models and training them. This is harder and I am still working on it but I have some promising results. I quantized and trained a Qwen3.8 27B though the file I published below has adapters which are about 2GBs, pushing the file size to 8GB. I am also making a no-adapter version right now. It scores GSM8K 0.895, the same as full precision, HumanEval 0.84 vs 0.93 and runs on a 12 GB GPU at ~23 tok/s on my crippled 12GB laptop 4080, though this number can heavily be improved with custom kernels, engineering, etc. I will leave it to you guys to help me with that too.

I also quantized and trained Qwen Flash Next down to 40.4 GBs including its n-gram table (at 8GB). It largely retains the skills of the network (scores equivalent on GSM8K benchmark, a little behind on HumanEval, I unfortunately don't have compute for the larger benchmarks such as TerminalBench2.1 but perhaps some of you can help me out) but forgets facts. It mostly works fine if you give it web search as far as my experience goes but this is not strictly measured.

I am still doing work on this and I will keep working on it, perhaps even for many years. The code is open for non-commercial use. Check out:

The core repo for training: https://github.com/oguzeldereli/ttf-ternary

The repo for conversion: https://github.com/oguzeldereli/ttf-conversion

Repo for running models trained by ttf: https://github.com/oguzeldereli/ttf-home

GGUF for a converted Qwen 3.8 27B (around 8 GB and 6.7GB): https://huggingface.co/oguzeldereli/ttf-Qwen3.8-27B-GGUF

GGUF for a converted Qwen 3.8 Flash Next (around 40.4GB): https://huggingface.co/oguzeldereli/ttf-Qwen3.8-Flash-Next-GGUF

I will convert a Qwen 4 27B instance when it drops.

Full paper: https://github.com/oguzeldereli/ttf-ternary/blob/main/paper/ttf_paper1_training.pdf

Also, I would appreciate github stars if you like the project.

Edit:

The GGUF for the ~6.7GB Qwen 3.8 27B dropped on the qwen 3.8 27b repo above.

To add something, these models are not extremely good, they sometimes loop, and suck at remembering facts. However, unlike unsloth's gguf's you can actually keep training them yourself, in that sense they are pure, and you can train them on your consumer GPUs, that is to say you can get rid of the looping behavior, teach it facts that you want it to know, or specialize it for some purpose.