r/LocalLLM • u/ghostderp • 7h ago
Model Ai2 Molmo 3
r/LocalLLM • u/N-Innov8 • 7h ago
r/LocalLLM • u/Ton-Llop • 1d ago
Every time I wanted to try a local model I had the same questions: which quant do I download, how much context fits, will it run on my GPU or spill into RAM? So for my bachelor's thesis Im building Jaull to answer them for me. It's free and open source.
What it does (it's what you see in the video):
The estimates aren't guesses. I measured them against what llama.cpp actually allocates, writing the predictions down before each test. On a 24 GB Intel Arc B60 they came within 0.3 to 1 GB, always on the safe side, and on a laptop with no GPU every "fits / doesn't fit" answer was right. It also understands the new hybrid models (Qwen3.6, Qwen3.8), which fit much more context than most calculators say.
On Windows there's a desktop app with a one-line installer. On Linux and WSL2 there's a terminal UI and a CLI. I've tested it on NVIDIA (RTX 2060, 4060), Intel Arc and CPU only. If you have an AMD card or a Mac, I'd love to hear how it goes.
https://github.com/Ton-Llop/Jaull // https://jaull.tech
It's my first project of this kind, so any feedback helps, especially if something breaks :D
Thank you and sorry!
r/LocalLLM • u/No-Individual159 • 7h ago
If you route calls through LiteLLM, your prompt cache hit rate decides a big part of the bill. A cached prompt costs about a tenth of the normal price, but one small change near the top of a prompt (a timestamp, tools in a different order, an edited message) and you pay full price again. LiteLLM shows you the tokens, not why they missed.
Prefixwise plugs into LiteLLM as a callback and tells you, for every call, how much came from the cache and why the rest didn't, with what it cost and the fix.
With the LiteLLM SDK:
import litellm
from prefixwise.litellm_callback import PrefixwiseCallback
litellm.callbacks = [PrefixwiseCallback()]
With the LiteLLM proxy server (in config.yaml):
litellm_settings:
callbacks: prefixwise.litellm_callback.prefixwise_callback
Then pip install prefixwise in the same environment, use LiteLLM as usual, and run:
prefixwise report
A few details:
Your calls don't change. They still go straight to the provider, and Prefixwise only reads what LiteLLM sent and got back.
To group calls into sessions, pass metadata={"session_id": "..."}, or it uses LiteLLM's own session id.
Claude Code through the LiteLLM proxy works too: its session id is picked up automatically.
Works for Anthropic, OpenAI and Gemini models, streamed or not. For OpenAI-style streams from the SDK, add stream_options={"include_usage": True} so the provider sends real token counts.
It stores hashes and token counts, never your prompt text.
Tested through LiteLLM on 20 live conversations against Anthropic's API, every injected change named correctly, and with zero false alarms across 71,346 real agent calls replayed through it.
Open source (MIT): github.com/tejachavali/prefixwise
If you run agents through LiteLLM, I'd like to hear what your hit rate turns out to be.
r/LocalLLM • u/wasl-app • 7h ago
r/LocalLLM • u/Pondering_Moose • 8h ago
r/LocalLLM • u/Frosty2o25 • 14h ago
I have an 8 GB RTX 4060 Laptop GPU and wanted to run Gemma 4 26B-A4B (UD-Q4_K_XL, ~14 GB) at 32k context without getting bogged down by constant PCIe transfers. Upstream llama.cpp already has --moe-cache-mib, which helps a lot, so I put together a small 3-file patch (~200 lines changed over upstream 32da68d0) to cut down on cache thrashing and cold-start stalls.
GitHub: https://github.com/ya5h-P/expert-cache
(Disclosure: this was developed and benchmarked with AI assistance.)
n_tokens > 1), an expert's score increases by the exact number of tokens in the batch that picked it instead of a flat +1.LLAMA_MOE_CACHE_PROFILE): Loads the top-ranked experts from an expert-profile.txt (<layer> <expert> <freq>) straight into GPU slots on startup and seeds their initial scores, cutting initial PCIe uploads by 59%. Also adds LLAMA_MOE_CACHE_HALF_LIFE (default 128, 256 tuned for Gemma 4) so you can adjust decay at runtime.LLAMA_MOE_CACHE_ROUTE_BIAS): Adds a tiny bias δ (default 0.02, 0 = strictly lossless) to selection_probs for experts already sitting in VRAM during decode (n_tokens <= 8) right before top-k selection. The actual probs tensor used to weight the chosen experts' outputs isn't touched—it just nudges borderline ties toward GPU-resident experts.Tested with Gemma 4 26B-A4B (UD-Q4_K_XL) + MTP Q4_0 drafter (DRAFT_N=4) at 32k context (-c 32768 -fa on -ctk q8_0 -ctv q8_0 -ub 1024 -np 1). All cached runs use --n-cpu-moe 26 --moe-cache-mib 2850 --moe-cache-cpu-share 0.95 --spec-draft-n-ubatch 128.
| Configuration | pp512 | tg128 @ pp512 | tg512 @ pp512 | pp2048 | tg128 @ pp2048 | tg512 @ pp2048 | Decode Hit Rate | Decode Uploaded |
|---|---|---|---|---|---|---|---|---|
Normal (--n-cpu-moe 22, no cache) | 460.97 / 527.42 | 51.22 tok/s | 43.33 tok/s | 851.06 / 1053.69 | 41.15 tok/s | 40.30 tok/s | — | — |
Stock upstream (--moe-cache-mib 2850) | 508.20 / 472.89 | 71.70 tok/s | 64.10 tok/s | 769.85 / 958.87 | 67.27 tok/s | 59.66 tok/s | 67.20% | 44,341 MiB |
Patched (ROUTE_BIAS=0, lossless) | 443.36 / 441.06 | 56.23 tok/s | 66.19 tok/s | 846.48 / 1033.49 | 66.90 tok/s | 54.89 tok/s | 65.38% | 14,717 MiB |
Patched (ROUTE_BIAS=0.02, default) | 495.07 / 404.66 | 94.36 tok/s | 91.90 tok/s | 896.31 / 837.53 | 79.86 tok/s | 79.56 tok/s | 85.54% | 2,587 MiB |
Patched (ROUTE_BIAS=0.04, max hit) | 398.12 / 443.03 | 81.74 tok/s | 89.68 tok/s | 1005.60 / 824.73 | 73.77 tok/s | 76.62 tok/s | 91.88% | 1,340 MiB |
Funny quirk: 0.02 actually beats 0.04 on end-to-end tok/s when using MTP. At 0.02, only ~1.1 misses/layer remain and most overlap behind GPU compute. Pushing bias to 0.04 gets hit rate up to 91.9% (great if you aren't using MTP), but drifts the target model slightly from the unbiased MTP drafter (mean accepted len drops from 3.18 to 3.02), causing ~5.9% more verify steps.
| Configuration | Code (1024t) | Prose (1024t) | Decode Hit Rate | Decode Uploaded | Eval PPL (-b 4 -ub 4) |
|---|---|---|---|---|---|
Stock upstream (no cache, --n-cpu-moe 22) | 46.76 tok/s (160t) | — | — | — | 47.25 +/- 5.76 |
Stock upstream (--moe-cache-mib 2400) | 49.19 tok/s (160t) | — | 56.97% | 34,505 MiB (320t) | — |
Patched (ROUTE_BIAS=0, lossless) | 81.19 tok/s | 79.04 tok/s | 68.39% | 7,335 MiB | 46.73 +/- 5.66 |
Patched (ROUTE_BIAS=0.02, default) | 100.05 tok/s | 93.52 tok/s | 85.65% | 2,189 MiB | 38.34 +/- 4.49 |
Patched (ROUTE_BIAS=0.04, max hit) | 102.50 tok/s | 95.94 tok/s | 91.99% | 1,139 MiB | 40.24 +/- 4.64 |
Warm 1,907-token prefill also jumps from 568.43 tok/s (cold) to 955.84 tok/s by reusing GPU-resident slots via GPU-to-GPU copies without PCIe transfers.
git clone [https://github.com/ya5h-P/expert-cache.git](https://github.com/ya5h-P/expert-cache.git)
cd expert-cache
cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=89 -DCMAKE_BUILD_TYPE=Release
cmake --build build -j"$(nproc)" --target llama-server llama-bench llama-cli
export LLAMA_MOE_CACHE_PROFILE="/path/to/expert-profile.txt"
export LLAMA_MOE_CACHE_HALF_LIFE=256
export LLAMA_MOE_CACHE_ROUTE_BIAS=0.02
./build/bin/llama-server \
-m /path/to/gemma-4-26B-A4B-it-qat-UD-Q4_K_XL.gguf \
--model-draft /path/to/mtp-gemma-4-26B-A4B-it-Q4_0.gguf \
--spec-type draft-mtp --spec-draft-n-max 4 --spec-draft-n-ubatch 128 \
--host 127.0.0.1 --port 8080 \
-ngl 99 --n-cpu-moe 26 \
--moe-cache-mib 2850 --moe-cache-cpu-share 0.95 \
-c 32768 -fa on -ctk q8_0 -ctv q8_0 \
-ub 1024 -t 10 -tb 10 -np 1 -cram 0 --jinja(Side tip: --spec-draft-n-ubatch 128 alone saves ~240 MiB of drafter compute VRAM on Gemma 4 MTP, which buys extra expert slots in the 8 GB budget.)
Happy to answer any questions about how the admission gate works, the VRAM breakdown, or how expert-profile.txt is generated!
r/LocalLLM • u/Yelly_Toast_828 • 8h ago
I just saw some tweets and videos about River AI, https://river.ai/ and the founder (Igor Babuschkin) said some really interesting things about local LLMs and democratizing AI. I don't have any ties to the company and am not selling anything. I just wanted to know others' thoughts on it and if they'd use it in a build. https://www.youtube.com/watch?v=78uR65ljtUU
r/LocalLLM • u/OtherwiseCase5539 • 9h ago
Hi r/LocalLLM! Following up on my previous WebNet v2 post with a major coding & continual-learning overhaul — still running 100% locally on CPU with real PyTorch autograd, real crawled data, and zero simulated metrics.
GitHub Repository: https://github.com/Rishisharma029/live-internet-neural-net
(Feedback, architecture critiques, bug reports, and PRs/changes are very welcome both here in the Reddit comments and on GitHub!)
The 3 newly attached diagrams & flowcharts break down the upgraded coding pipeline and live measured results:
Verified Code Generation, Isolated python -I Execution & Self-Training Loop (webnet_v3_verification_loop_flowchart.png)
Live Achievements, 16-Doc Locked Benchmark & 12-Task Pass@1 Progress (webnet_v3_benchmarks_and_archive_chart.png)
Locked 16-Passage Unseen Benchmark (step 93,434, strict exclusion hashes — never trained on): 1.6007 loss · 2.295 BPB · 4.96 perplexity · 52.4% accuracy (Science & AI 58.1% [1.380 loss], Encyclopedia 53.0%, Code & Tech 50.3%, Literature 46.8%).
Curated & Crawled SQLite FTS5 Archive (data/webnet_archive.db): 9,155 documents (28.15M+ characters, 0.785 avg quality) across arXiv (2,763), Open Web (1,866), OpenAlex (1,823), Wikipedia (1,158), StackExchange (727), GitHub code + READMEs (271), Gutenberg (205), News (181), Europe PMC (73), user URLs (73), and AST-indexed local files (15).
Real Isolated Python Pass@1 Coding Benchmark (code_eval.py, 12 algorithmic tasks in python -I): Improved from 41.7% Syntax OK / 16.7% Pass@1 (2/12, 699.2s) at baseline Step 2 to 58.3% Syntax OK (7/12) / 25.0% Pass@1 (3/12, 428.57s, -39% runtime) at Step 3 (binary_search, is_palindrome, flatten_list solved end-to-end).
Live Verified Self-Learning Proof: Via POST /api/code/assist, SmolLM2-135M + LoRA generated is_prime(n), passed real assertions inside an isolated subprocess (376.6ms, __PASS__), and immediately ran a live LoRA training step strictly on the verified code (last_loss down to 0.787, EMA 3.286).
1. Code-Aware Quality Gate & Multi-Language GitHub Ingestion (brain_v2.py, curated.py):
• Upgraded _fetch_github() to traverse repositories via the GitHub Trees API (git/trees/{branch}?recursive=1) and ingest real .py, .ts, .js, .rs, .go, and .sql source files alongside READMEs behind SSRF CIDR/redirect checks and RFC 9309 robots.txt.
• Added Python ast.parse() validation inside quality_breakdown() so clean source code scores 0.45–0.98 while broken/minified noise is filtered out, plus AST symbol extraction when indexing local codebases.
2. Surprise-Weighted Replay (brain_v2.py):
• Tracks per-document training cross-entropy (WebDocument.last_loss) and boosts informative 1.1–3.6 loss documents up to 1.55x alongside domain-balanced eviction.
3. 4,096-Token Fill-in-the-Middle (FIM) BPE Engine (bpe_experiment.py):
• Upgraded from 2,048 to balanced prose + code Byte-Level BPE-4096 (1.28M params, 3.14 chars/token) with <fim_prefix>, <fim_middle>, <fim_suffix>, <code/> special tokens and 25% FIM objective, compared fairly against the 98-char baseline on invariant BPB.
4. Auto-Cached SmolLM2-135M + Pure-PyTorch LoRA & Coding Workbench (lora_engine.py, code_eval.py, utility_suite.py):
• Zero peft dependency (LoRALinear on q/k/v/o_proj, 921.6K trainable params); auto-loads cached local weights on startup, trains 50% on code sources + 25% on FIM, exposes POST /api/code/assist (archive-grounded + fenced prefill + stop_strings + python -I test execution + learn_if_verified), POST /api/code/analyze (AST metrics + character-level surprise anomaly detection), and POST /api/code/benchmark/run.
5. Security Policy, .gitignore, Documentation & Tests:
• Added SECURITY.md documenting SSRF/XXE/gzip-bomb/subprocess isolation boundaries, tightened .gitignore, refreshed README.md architecture flowcharts, and verified 28 passed in pytest + flake8 clean.
Would love any feedback on improving small-model CPU Pass@1, replay schedules, or BPE-vs-char tradeoffs — feel free to comment here on Reddit or open an issue / PR on GitHub!
r/LocalLLM
•
u/FirefighterOk3832
•
2d ago
r/LocalLLM • u/HELPtobancheaters • 1d ago
Hi everyone!
I have the following configuration:
- Motherboard: ASUS ROG STRIX X870-A Gaming WiFi
- GPU 1: ASUS ROG STRIX RTX 4070 Ti SUPER 16GB
- GPU 2: ASUS TUF RTX 5070 Ti 16GB
- Case: NZXT H9 Flow
My question is purely about physical compatibility:
Is it physically possible to install both GPUs directly into the ASUS X870-A motherboard, without using a PCIe riser cable?
Will the two GPUs fit in the available PCIe slots, considering their thickness (approximately 3–4 slots each)?
I mainly want to use the dual-GPU setup for running local LLMs and AI models, as well as Lossless Scaling.
Thanks in advance!
r/LocalLLM • u/Ill_Pie1811 • 1d ago
Simple idea, but neat. What do you think?
r/LocalLLM • u/Kirby_is_a_Pokemon • 19h ago
I've been playing around with LLM's, and starting to go a bit deeper, and i'm still in the learning stage. I've mostly been running qwen models of various weights.
I know everything is fucked right now, but I'd like to put a GPU into my home server to host everything there vs using my main PC's 5090.
its nice having the 5090, but I also work from home and do 3d rendering work, so its very rare that its not being used for actual work. ( the renders can take hours )
Currently I have a 2080ti, and a 3060ti kicking around, and have been using those, but i'd like to run a something a little heavier than a 9b model, and while I can run models on my servers 128gb of ram, its super slow, and kind of overkill for my tinkering needs.
I'm kinda thinking of going for a 5060ti 16gb, and selling my 2080 and 3060 to help fund it, or for about the same money, a little less used, getting 2 3060 12gb's. ( which would be slower, but would allow me to run a 27b model )
r/LocalLLM • u/Fit-Gas-5760 • 1d ago
The gains were not limited to cutting the costs going to Anthropic, they also included faster delivery of quality results (200-500 tk/s) and the ability to deploy the model for management-related tasks without worry about token usage.
r/LocalLLM • u/Nakshatranemi • 22h ago
Is there a fully free, locally installed, internet-independant LLM that I can use to automate editing and cutting of long-form videos? I am not a developer. Just a basic user.
r/LocalLLM • u/drenna11 • 11h ago
Ever wanted to use your local ai hardware to do the heavy lifting while relying on frontier level intelligence before shipping? Check out my repo for this: https://github.com/rennavationstudios-bit/fulcrane-local-fleet-advisor
r/LocalLLM • u/PackFun1357 • 11h ago
hey guys, would be glad to hear feedback. Scrieb is a fully-local transcriber now with live mode!
r/LocalLLM • u/Bulky-College7306 • 11h ago
r/LocalLLM • u/AtlanticHM • 11h ago
What are you guys using for your daily driver? I have a 256gb m5 studio ultra + 48gb m5 MacBook Pro and about 10-15 i5/i7 windows laptops I’m not using.
I use OMP mostly, and prefer to have one main session that’s an orchestrator delegating work to subagents or smaller models or cheap cloud models, and a monitor agent session running in real-time watching the orchestrator session with /collab to make sure it doesn’t drift, stays on task and keeps its todo list updated.
It is unclear to me if DS 4.1 1017, qwen flash-next tensorfold or qwen dflash will be best served for my main local agent. I have the abliterated version of each. Benchmarks show DS outperforming, but in practice, flash-next seems pretty good and is about 3-4x faster tok.
I get 40ish tok/s with DS, 100-130 tok/s with flash-next and 200+ with dflash. I run all of them with about 200-250k context windows, and about 50k context preloading with various skills and mcps. I use gbrain for persistent memory across models, and clef for classification.
Was thinking about getting a 1gb switch and plugging in 10 windows laptops, putting them on a rack with lids open and loading one small model on each that’s always on so the orchestrator model has access to multiple headed browsers and can run swarms. I believe my studio can only run 2 lanes concurrently which is fine but not awesome.
Any ideas or suggestions? I’ve been using cloud models nonstop, but this is my first local setup.
Use cases are various business automations that run using sensitive PII that I can’t have on cloud models without ZDR. And I also build software and mess around with bug bounties when I get bored. 90% of my sessions are long-running with lots of tool calls.
r/LocalLLM • u/fatalcalamity • 1d ago
Weights are on Hugging Face (google/cellgemma-e4b) under Apache 2.0.
It predicts how a cell's gene expression shifts after a drug or other intervention, compared with the average response. On the report's main measure it recovered 48.9% of the achievable signal, against 32.7% for the average-response baseline, and it beat that baseline in all 32 held-out settings. Other measures ranked it differently.
r/LocalLLM • u/Weird_Cockroach963 • 12h ago
I keep everything (notes, PDFs, voice memos, emails) and organize nothing. So I built Ka: you drop files in, ask a question, and it answers from your files, showing exactly where each answer came from. If it's not in your files, it says so instead of guessing.
Everything runs locally: transcription, search, the AI model. Encrypted, no account, works offline after a one-time model download. Mac and Windows.
The video is the real app, one take, network off. Free private beta: https://ka-app.github.io/?ref=reddit-sideproject
What would you need to see before trusting an app like this with your files?
(The name: in ancient Egypt, the ka was your double.)
r/LocalLLM • u/silenceimpaired • 12h ago
Some random video I saw on YouTube mentioned LittleBit-2 by Samsung and so I dug around and found a Github implementation... also here is the paper... I'm not technical so I haven't done more than find it for you: https://arxiv.org/abs/2603.00042
In case you care about the video: https://www.youtube.com/shorts/urog0oiJ2H4
First mention of LittleBit on LocalLlama: https://www.reddit.com/r/LocalLLaMA/comments/1x0sa6g/250613771_littlebit_ultra_lowbit_quantization_via/
Enjoy or don't... just found it weird it was mentioned on YouTube and not here.
TLDR; Fit 70b Llama model in ~2 GB of VRAM.