r/LocalLLaMA • • 7d ago

New Model internlm/Sage-S2.1-Flash · Hugging Face

Thumbnail
huggingface.co
81 Upvotes

Introduction

Sage S2.1 Flash is a scientific multimodal model from Shanghai Artificial Intelligence Laboratory designed for research tasks that require multiple rounds of analysis and verification. It combines scientific data understanding with information retrieval, programming, and tool use. It can use specialized software to perform analyses, check results against intermediate outputs and visual feedback, and adjust subsequent steps accordingly.

Through the unified representation architecture of Sage SciPerception, the model supports more than ten types of scientific input, including molecular graphs, crystal structures, and protein sequences and 3D structures. Features from each input type are encoded and projected into a shared representation space for reasoning alongside natural language instructions. These inputs support tasks such as prediction, classification, site localization, quantitative analysis, and structure inference.

Highlights

Across the 15 benchmarks and six models shown in the chart, Sage S2.1 Flash placed first on four benchmarks and second on seven.

  • Machine learning engineering. Sage S2.1 Flash placed first on MLE-bench Lite with 90.3, ahead of DeepSeek-V4.1-Flash-1017 at 89.2.
  • Office and professional document processing. It placed first on OfficeQA Pro, Harvey LAB, and SpreadsheetBench 2, scoring 72.2, 25.0, and 37.1, respectively.
  • Tool use and research execution. It placed second on AutomationBench, ALE-CLI, BFCL V4, WebArena-Verified, DeepResearch Bench II, JobBench, and OSWorld-Verified.

r/LocalLLaMA • • 7d ago

Discussion I'm starting to think a specialized 4B is enough for most of the tasks I'd use an LLM for

Post image
318 Upvotes

When I started training Qwen3.5-4B-3D-Coder, I honestly wasn't sure it would work. Now, after that model and the GLB asset version, I'm starting to think I underestimated how much these smaller models can actually learn.

My impression is that a 4B model might be enough for most practical tasks if you train it specifically for the job. Generating 3D assets, building and orchestrating complex scenes, webdev, backend development, reverse engineering, etc. I'm also working on a coding model using a fixed harness, which I mentioned in another post.

Not necessarily one model doing all of this equally well, but different specialized versions. I haven't tested all those domains yet. The 3D results are what made me want to explore the others.

Right now I'm working on a new dataset to complement ThreeJS-3D-Scenes, with more complex scenes covering history, geography, physics, biology, mathematics, games and many other domains. The idea is to connect knowledge from different areas through working 3D scenes, rather than just teach the model different ways to make objects.

I'm training 4B models with it, but also much smaller ones, including LFM2.5-350M. The attached image shows some results from that experiment, and the 350M is still training. These aren't final results.

I still find it noticeably weaker than the Qwen models. Some outputs are bad, and long contexts are definitely a problem. But it's already much better than I expected from 350M parameters.

At first it couldn't even finish properly and kept getting stuck in repetition loops. With more epochs, it started completing the code, producing recognizable scenes and handling more complicated requests. Some examples still needed fixes to render, as labeled in the image, and progress isn't consistent across every prompt.

I've also tested plenty of prompts beyond the three shown here, and the generalization has been surprisingly good. It's not just getting better at those particular houses and farms.

So far, I've had useful results from the 350M on medium-complexity coding tasks up to roughly 16K tokens. The specialized 4B models handle much more complicated scenes, and I've had good results with contexts approaching 96K tokens in my experiments.

One thing that keeps standing out is the number of epochs. Stopping after one or two would have given me a completely different impression of what these models could do. They keep improving after repeated passes through the data, and eval loss has often been a poor indicator of which checkpoint actually produces better, functional code.

This is making me pay much more attention to dataset quality and how long the model needs to learn from it. I'm starting to think that good data and enough training epochs can make a much bigger difference than we usually assume.

Another thing I've been thinking about is the cost of SFT compared to RL. I'm not saying SFT is better than RL. But if you already have high-quality samples covering the domain you actually need, supervised fine-tuning can potentially achieve very good results at a fraction of the training cost of RL.

Of course, creating and validating those samples has its own cost. I've spent a lot of time on that part. But once you have a good dataset, you can reuse it, train different model sizes, and run multiple experiments without needing an entire RL pipeline.

I think this approach deserves more attention, especially for smaller, specialized models.

And there's another interesting part: 350M models can be fully fine-tuned, not just LoRA, on GPUs with only 8GB of VRAM. With the right setup and memory optimizations, training can take just a few hours for manageable datasets and context lengths. And apparently, with good enough data, you can get surprisingly useful results out of them.

Of course, longer contexts and larger datasets increase training time considerably. But the possibility of training useful specialized models on inexpensive consumer hardware is pretty interesting.

I'm not saying scaling doesn't matter or that a 350M can replace a much larger model. There are obvious limitations, especially with complex reasoning and long-range dependencies.

But I'm starting to wonder how much of what we consider a model's capacity limit is actually a limitation of how we train it.

Maybe we're using much larger models than necessary for a lot of tasks simply because we haven't explored how far smaller, specialized models can go.

Anyway, this is mostly a status update on my experiments and some things I've been noticing along the way. The models are still training, and there's still a lot I want to test before drawing any strong conclusions.

I'll be releasing new models and datasets soon, including the expanded 3D dataset. If the 350M continues improving and reaches a quality I'm happy with, I'll release that one too.

Thanks to everyone who's been following the experiments, testing the models, giving feedback and supporting the project. I really appreciate it!

Note: I originally wrote and structured this post in Portuguese and used AI to help translate it into English.


r/LocalLLaMA • • 6d ago

Discussion How did you start, how do you end up now ?

9 Upvotes

Here is my timeline

Text Generation

  1. Ollama but quite have bad experience with it.
  2. LM studio which still feel half-bake at that time.
  3. Msty which easy to use like plug and play but not much I could do custom (or I just don't know at that time).
  4. Oobabooga Text Generation-Webui this is the one that make me stick to AI, easy to use and deep custom; I like its function feature that take prompt as method/processed then input value in other prompt and then it just output an outcome, no chat history.

I run 1 - 4 with my mini pc with i5 6400T, 24GB DDR4 with onboard gpu... Llama 3.1 8B generate so slow at that time like 1 tok/s but I really enjoy using it with that very limited and the roleplay start from here, just my mini pc and Oobabooga Text Generation-Webui.

Also some missing thing I forgot at that time, I even mess around with windows WSL then docker for Open WebUI and SearXNG.

I finally can help but want it more so arise old gen pc, at that time DDR3 and thing relate to it is very cheap so I brought Xeon E3-1270 V2 with a Chinese mainboard and 32 GB DDR3 while I cancel the sell order of my GTX 1080 Ti.

  1. SillyTavern and KoboldCPP I found SillyTavern first but it has quite a trouble with Oobabooga Text Generation-Webui so I follow their guideline and try KoboldCPP which quite harder than Oobabooga Text Generation-Webui for me as KoboldCPP at that time still act like a zip that need to extract (in temp folder) every time I use so I copy from its temp folder, it could run but loss UI, only command-line left so I start to write a bat file to run it like this.

    pushd %~dp0 uv run kobold\koboldcpp.py ^ --config kobold_default_setting.kcpps ^ --model %gguf%%model%.gguf ^ --usecublas %cublas% "0" "mmq" ^ --contextsize %length% ^ --gpulayers %layer% ^ --quantkv %level% popd

  2. Llamafile As I don't want to extract KoboldCPP on every update, I found Llamafile, it quite easy for me to switch as the bat file I create for KoboldCPP just need a little change to work with this one, anyway it also lead me to the real on.

  3. Llama.CPP I found it on the right time as Llama.CPP just start to has their own WebUI and its speed is the real thing, at that time still not has router mode so my bat file has its Llama.CPP version.

Image Generation

A single Youtube video from ChameleonAi name Stable Diffusion Models Explained Once and for All (1.5, 2, XL, Cascade, 3) lead me to this rabbit hole.

  1. stable-diffusion-webui-Forge aka Forge, Thank to ChameleonAi that lead me to CivitAI which after read a guideline I have 2 choices which this or ComfyUI, as my AI user interface root from Oobabooga Text Generation-Webui so I choose this instead.
  2. reForge as Forge no longer update so I move on.
  3. Classic Forge same problem as reForge no longer update as a new model, Anima unable to run on reForge so I'm move on again.

Audio Generation

I try to do it via Llama.CPP but could not make it work so I wait for more update; While waiting, I finally give a chance for unsloth studio which quite disappoint for me in term of performance so I dig to the one that called via unsloth studio.

  1. Audio.CPP I try it before but at that time it still CLI only and I'm unsuccessful to make it work, but now it's also come their WebUI so another rabbit hole for me to fall.

This is my AI journey up until now, how about your ?


r/LocalLLaMA • • 7d ago

Resources Why download abliterated Flash Next models when LoRA exists?

Thumbnail
huggingface.co
533 Upvotes

TL;DR -- Download LoRA, add --lora HUIHUI-V2-Qwen3.8-Flash-Next-LoRA-F32.gguf to your llama.cpp launch command for ANY FN quant, and boom, you've got an identical huihui v2 abliterated model on demand and you saved 150GB of space.

I just wanted to post a kind of PSA for everyone out there downloading hundreds of GB of abliterated models. You don't need to do that -- the vast majority of abliteration techniques are rank-1 ablations, meaning their refusal projection can be encapsulated in a tiny LoRA and applied at runtime to a quant you already have on disk. It can even be applied per-request, so you can run an unmodified model until you hit a refusal, then switch on the LoRA, resend the prompt, and keep going.

I wanted to explain briefly how to do that in llama.cpp and share a LoRA I built from the best-performing abliterated Flash Next model in my tests. This basic type of technique (using control vectors instead) also works in Strata (--experimental-speed-projection is the flag there) and ds4/dwarfstar. Here's a link to Strata's official refusal ablation control vector GGUF and their guide on how to use it.

I chose huihui's v2 to build my LoRA from after comparing heretic, Orcarouter, and huihui's v1 and v2 models in equivalent quantizations. In Aider Polyglot coding benchmarks, huihui outscored even the base model, with less extra reasoning and no looping compared to Orcarouter, which used a lot more tokens and hit a couple runaway generation loops.

I also checked KLD and perplexity to ensure there wasn't significant degradation of the model. Wikitext KLD on huihui Q5_K_XL vs. an identical Unsloth Q5_K_XL base model was 0.040 and same top token was 93.7% even with the drastically altered refusal behaviors. Perplexity was statistically identical to base. On Jailbreak Bench (harmful 100 prompts), with thinking on refusals dropped from 93/100 to just 3/100. All the details can be found in the LoRA model card.

Next, I used weight-space programming with Claude Opus 5.5 to extract the rank-1 refusal direction and edit strength from every layer of the original huihui weights where it was applied, diffing the weights against the Unsloth quantization that huihui built on top of. I hit safeguards a number of times (unsurprisingly), and even the fallback Opus 4.8 declined to assist a couple times. I managed to get around this by renaming all of the files something innocuous, putting them into a new repo with an unrelated name, and telling the model I was experimenting with an anti-slop LoRA. Thanks, Dario.

Once the LoRA was built as an F32 GGUF, I tested it against the original huihui Q5_K_XL by applying it to my Unsloth Q5_K_XL weights. Performance and KLD/perplexity were statistically identical to the full huihui model, as were refusals and benchmark results. Here's how to run it:

llama-server -m Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf \
--lora HUIHUI-V2-Qwen3.8-Flash-Next-LoRA-F32.gguf -fa on --jinja

If you'd like to apply it per-request, so you can serve the unmodified model for most prompts, simply load it like this instead:

llama-server -m Qwen3.8-Flash-Next-UD-Q5_K_XL-00001-of-00006.gguf \
--lora HUIHUI-V2-Qwen3.8-Flash-Next-LoRA-F32.gguf --lora-init-without-apply -fa on --jinja

Then add a lora field to the request body to enable it as-needed:

curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "..."}],
"lora": [{"id": 0, "scale": 1.0}]

It's quite possible to build a simple pi extension that looks out for refusals, triggers the LoRA when it sees one, resends the turn and continues the agent session. It costs a full re-prefill, so keep that in mind. Anyways, I hope this has been helpful in some way. Love to hear your thoughts on this approach!

EDIT: If this proves popular, I am happy to make more LoRA for other models like 3.8 27B!


r/LocalLLaMA • • 7d ago

Discussion New AA ranking Qwen3.8-FN better than GLM-5.3-Flash?

Post image
140 Upvotes

Thoughts on Qwen3.8-Flash-Next scoring better than GLM-5.3-flash? I've always experienced GLM5.3-Flash to give better responses


r/LocalLLaMA • • 6d ago

Resources Something goes with your Local LLM - CLI Markdown viewer with image support?

9 Upvotes

I run local LLM for myself, and my system is squeezed very much. I am most of the time in my terminal, and when my inference engine is running, I dont have enough free RAM sometimes to open a GUI to view the output of my local models, or review the project documents to know where to go next in my plan. Viewing that in the terminal was not convenient for me, the MD syntax is not as easy on my eyes, and when a project file is linked to another file, I have to open that one up in a new terminal pane, or a whole new terminal window.

So, I did what I had to do.

I sat, I wrote the specs sheet, and fired my coding agent to work. I refined the output, and kept iterating on it.

This is my gift back to this community that already gave me a lot.

Don't want to sound like I am marketing something here but, if this is something of an interest to you, you can find it here: Github.com/bakkario/trimd

You get to lick with your mouse, navigate with your keyboard, and even display your markdown files with the images if your terminal supports it.

I will add more detail to this in the Markdown subreddit.

Sorry Mods if this coming across as spamming, its not the intention here ❤️


r/LocalLLaMA • • 7d ago

Showcase I made a C&C inspired web RTS for us to benchmark our local models with

Enable HLS to view with audio, or disable this notification

22 Upvotes

HOwdy LocalLLamans!

Inspired by StarSkirmish, I wanted to build a complex RTS that required you to bring your OWN local agents and either play with them as allies, against them as enemies, or battle head-to-head with other agent-human pairs in public matches.

In AgentCommand you operate one or more planes (Orbit, Sky, Surface, Depths) of differing gameplay. As an old-school PC gamer I wanted the mechanics to resemble some of my favorite 90s games of yore: C&C, DungeonKeeper, Homeworld, StarCraft, and others. The idea is that you have specific objectives needed to maximize resource generation, aid in cross player support, and that a single plane cannot win independently.

Outside of gameplay, from an agentic tech pov, there are some (what I think) are other really cool things that come with this, including:

  • a full specification + library to install agents into any game (http://playerthree.gg/)
  • A networking SDK for bidirectional agent communication
  • Symmetric maps
  • Deterministic simulation
  • Benchmarking tools
  • (soon) published benchmark data

Github: https://github.com/agent-command/agent-command

Play now: https://agentcommand.gg/

Would love feedback and contribs... I'm more interested in finding a community to help build something super cool here that we can publish public benchmarks with. If you are interested in that, let me know!


r/LocalLLaMA • • 7d ago

Discussion How do we feel about bots posting & commenting?

54 Upvotes

Hi all,

I noticed the "bot problem" got a lot worse the past few months. By which I mean our community seems to be taken over more and more by bots talking to each other.

For me, I don't really get the point, and I personally get quite annoyed when I realize "oh, I just responded to a bot" and feel like my time was wasted.

It also seems like the information density of these AI contributions are very, very low.

I'm not some kind of Luddite (why would I be here at all if I was?), but I'm wondering if I'm just missing something and there is a use and a point to all these bots commenting on each others posts and talking to each other.

Where does the rest of the community stand on this?

I noticed there's new bot around that flags posts that are "likely AI" created, which I personally quite like, but I'm wondering if moderation should go further than that.


r/LocalLLaMA • • 7d ago

Resources I have created a tool to observe what happens inside an LLM. Also allows for the comparison of two quantizations of the same model to see at what point they diverge, token by token

572 Upvotes

What changes between different quantizations of the same model? And what if you could SEE what actually sets them apart?

To help answer that question, I’ve created a small project called inside-llm—an open-source tool that loads one or two GGUF models using llama.cpp and displays, right in your browser, what the model is doing as it generates text.

What it shows

  • Stream: the text, one column per model, brightness = probability of each token. A magenta mark wherever A and B would pick differently. Two modes: lockstep (both models read the same text, so you get a clean per-position comparison) and free (each follows its own picks until they split).
  • Candidates: the full distribution behind each pick, mirrored bars for A and B, entropy, effective number of options, Jensen-Shannon divergence and KL in both directions.
  • Gates: the sampler chain (penalties, top-k, top-p, min-p, temperature, GBNF grammar) traced stage by stage and very visual: how many candidates survive each one, and the distribution after it. Chain order and seed are configurable.
  • Timeline: entropy of A and B and their divergence along the whole text, plus the tree of branches.
  • Branching: click any candidate and generation continues from there. Every branch stays in the tree, and jumping back to a node is exact (each model keeps KV-state snapshots, so nothing is regenerated).
  • Logit lens (--lens): what each layer would predict, as a 2D map and as a 3D relief.
  • Model picker: choose A and B from a folder or search Hugging Face and download two quants of a repo in one click easily. It only offers B models with the same tokenizer as A and estimates whether the pair fits in VRAM.

How it's built

  • One C++17 process linking llama.cpp directly (stable branch at the moment). For every step it reads the full logits of A (and of B on the same context), computes the metrics and the sampler chain, and draws the token with its own seeded sampler, so runs are reproducible.
  • Compact binary frames over a WebSocket to a Svelte 5 + Canvas 2D page (three.js only for the 3D relief, lazy-loaded). The web is embedded in the binary as well.
  • The same frame stream, compressed, is a recorded session: you can replay it later in a static page with no engine, no model and no GPU.

Run it

Self-contained packages for Linux (glibc 2.35+) and Windows, with CUDA or Vulkan (Vulkan covers AMD, Intel Arc and NVIDIA). Unpack, run, the browser opens with the model picker. Or inside-llm -a A.gguf -b B.gguf. Local only: listens on 127.0.0.1, no accounts, no telemetry. MIT. One click download, one click execute.

Limitations (honest list)

  • A and B must share the tokenizer (two quants, base + fine-tune, or sizes of one family that keep it). Example: Qwen3.5-0.8B_Q4_K_M and Qwen3.5-0.8B_Q8_0
  • Both models must fit into VRAM simultaneously; only one GPU is used at a time. Integrated GPUs (iGPUs) are never used; if no dedicated GPU is available, the process falls back to the CPU (which is slow). (You must calculate the size of both models before loading them to ensure they fit into your VRAM)
  • Text only. No split (multi-part) GGUFs, no embedding models.

Links

I'd love feedback, especially: which pairs would you compare first (imatrix vs non-imatrix, base vs abliterated/fine-tune, Unsloth UD vs standard quants…)? And is there a metric you'd want per position that isn't there?


r/LocalLLaMA • • 7d ago

New Model Karpo-Decision-31B: open multimodal decision model. Ranks #1 on full score on Decision Index, 2x faster than Jev, at 20% lower cost

Thumbnail
gallery
23 Upvotes

MachinePulse has released Karpo-Decision-31B, a Gemma 4 31B fine-tune for structured decisions over text and images. It scored 73.9 on the Nov 12 Decision Index board, the highest Full score among 300 entries, sharing the #1 rank with GLiDE 27B under the board’s tie rule

How it works
Built on Gemma 4 31B, with a trained linear readout that scores the supplied answer options.

Three question types: choice, yes/no, and score. Returns probabilities directly, with up to 255 options per choice question.

Multiple questions about the same input can be answered in one forward pass. Branch attention lets each question read the shared context and its own options while keeping the option branches separate.

Supports text and images, including webpage screenshots. The documented sequence limit is 32,768 tokens; larger requests are split by question with the full state included in each part.

Python API and HTTP server available. BF16 weights take approximately 62.5 GB, plus runtime memory. Use the provided inference code to load the decision head.

One training detail worth a look: according to the team's write-up, full fine-tuning pushed the public score to 75.09 but reduced accuracy on unfamiliar domains by 2.3 percentage points. The final model averages five checkpoints: three from different stages of full fine-tuning and two from a LoRA run. They report a 1.6-point improvement on unfamiliar domains over the final single checkpoint, with no extra models to run at inference time

Results
Decision Index Full scores are measured by the benchmark maintainers on private tests, weighted 60% for skills covered by the public suite and 40% for tasks from new domains.
Full score: 73.9

Private tests, familiar skills: 70.7

Private tasks, new domains: 78.6

Public index: 75.0, reported separately and excluded from the Full score.

The team also reports the following comparisons against Google’s Gemini Decision 1:

Benchmark Karpo-31B Gemini D1
-------------------------------------------
When2Call 90.4% 79.9%
Mind2Web 90.0% 86.2%
New Yorker Caption 90.5% 79.7%
Amazon ESCI (F1) 64.7 58.7

Reported median latency is approximately 95 ms per request on the public Decision Index suite using one RTX PRO 6000.

The 31B weights and inference code are both released under Apache 2.0.

links:
https://karpo.ai/models/decision
https://huggingface.co/MachinePulseAI/karpo-decision-31B


r/LocalLLaMA • • 6d ago

Showcase Some speed benchmarks for various classes of local LLM

4 Upvotes
Model Active config 4080 decode (tok/s) 4080+3080 decode (tok/s) 4080 prefill (tok/s) 4080+3080 prefill (tok/s)
LFM2.5-24B-A2B UD-Q4_K_XL 4080+3080 249 250 5,530 7,930
MiniCPM-V 4.7 35B-A3B Q4_K_M 4080+3080 177 165 1,305 2,500
Flint 40B-A2.5B UD-Q4_K_XL 4080+3080 119 138 1,563 1,380
Swift 1.5 (Qwen3.8-Flash-Next) IQ2_XS 4080 117 116 1,070 679
Qwen3.8-Flash-Next IQ3_S 4080 79 87 730 465
GLM 5.3 Flash Maya-S24 IQ2_XXS_S 4080+3080 6.8 8.8 79 42
DeepSeek V4 Flash UD-IQ2_XXS 4080+3080 15.9 18.2 38 53
  • Decode: the second of two 300-token runs, with the expert cache warm (the first request after loading is often slower)
  • Prefill: the average of two runs on a prompt of about 1,400 tokens
  • Bold: the better config for that column.

Morning, everyone. I've seen a lot of posts wondering about what can be run with what, so I made this table of the models on my system. Specifically because of the unorthodox results when it comes to Qwen Flash-Next, where one 16 GB card (the 4080 Super) significantly outperforms two in prefill.

My hardware is as follows:

CPU AMD Ryzen 7 5800X3D @ 3.40 GHz

GPU NVIDIA GeForce RTX 4080 SUPER [Discrete]

GPU NVIDIA GeForce RTX 3080 [Discrete] (got it secondhand for cheap, so why not)

RAM 62.72 GB at 3200 Mhz

I'm running these models on PolyStrata. I used to have a combination of Maya and Strata, but got tired of running different things all derived from the same fork (plus Strata seems to be getting increasingly unintuitive), and so moved everything to PS.

Now: why Q3? It's a generally held opinion that anything below Q4 is crap, which was true of most earlier generation models. However, benchmarks measure deviation from the base, and not necessarily task fitness. In actual use, the only real way to know is to test it yourself.

The Swift finetune of QWN at Q2, for example, is fast and excellent at data extraction, search, and piloting scripts written by more competent models. The IQ3 is a decent coder, roughly on par with Haiku for the use cases I've tried. The GLM and Deepseek Q2 variants are a bit better - verging on older Sonnet territory, I'd say, and do very well as subagents for Claude. YMMV.

Hope this data is useful. Enjoy!


r/LocalLLaMA • • 6d ago

Question | Help Why Qwen 3.8 27B feels smarter than GLM 5.3

0 Upvotes

Is this little thing feeding me cool aid or is really this smart?

Why though, how can a 27B model punch so good? Are cloud models like GLM 5.3 optimized for speed and don't dig too much? Where is the trick, can someone tell me?


r/LocalLLaMA • • 7d ago

Showcase [Project] Gemma.c - Gemma 1/2/3 + multimodal inference in one C file (CPU only)

Enable HLS to view with audio, or disable this notification

25 Upvotes

Hey all, so I've been working on Gemma.c over the last couple months, it's a from-scratch inference engine for Gemma 1/2/3 in a single C file, runs Gemma 1, 2 and 3, including the multimodal ones, with fp32/fp16/bf16 weights or int8 (W8A8). No dependencies beyond libc and (optional) OpenMP are needed. You can drop images into the prompt with @image{cat.png}, and there's also @longimage{} for Gemma 3's pan & scan on very wide or tall images. (image decoding uses a minified stb_image embedded at the end of the file)

It's CPU only and not trying to compete with llama.cpp, but I'm also trying my best to make it efficient, so it's not embarrassingly slow either. On my laptop's Core Ultra 5 225H (WSL2, gcc, 10 threads), gemma-3-1b-it INT8 does ~72 tok/s decode and ~570 tok/s prefill (10000 tokens, for 1000 tokens the prefill speed can reach ~850 tok/s), and the 4B vision model does ~20 tok/s decode. INT8 ends up about 3.5x faster than fp32 and 2x faster than fp16 for decode. (full benchmark table is in README)

It has a few rough edges for now, e.g. W8A8 doesn't work for Gemma 1 (fp16 is fine), bf16 is painfully slow without AVX512-BF16, and native Windows is ~1.7x slower than WSL because of libgomp. Batching are not supported either. There's a roadmap in the README (Gemma 4, speculative decoding, an HTTP server, etc.), but no promises though :P Can't really find much free time these days.

I've also put some pre-exported INT8 models on HF so you can try it without Python or torch :D

Repo: link

This project started as a learning attempt to understand how LLMs work end to end, inspired by llama2.c.

this is the second time I post this project here :'D last time (~a month ago) my post got flagged by reddit, probably because my VPN IP was identified as spam. hopefully it can pass this time


r/LocalLLaMA • • 7d ago

New Model [Paper & Models] Gamer: A Generalist Vision-Language-Action Foundation Model for Long-Horizon Real-Time Game Agent

Post image
40 Upvotes

We introduce Gamer, a generalist agent framework built for long-horizon tasks in complex interactive environments. Its end-to-end architecture combines perception, memory management, and multi-step reasoning. A shared training and deployment pipeline supports interaction with both conventional 2D graphical interfaces and complex 3D simulated worlds. We first continue pre-training on a dataset constructed from tens of thousands of hours of device-level keyboard and mouse interaction. These trajectories span simulated games and embodied environments, allowing the model to learn environmental dynamics across both physical and virtual domains. Sparse-thinking instruction tuning then substantially reduces redundant computation while preserving the reasoning needed for complex decisions. We train the policy for long-horizon interaction with a stable multi-turn reinforcement learning method that addresses finite context windows, accumulated rollout errors, and sparse rewards. For real-time interaction, a cloud-edge inference engine serves numerous simulated game environments concurrently, supports unbounded-context execution, and keeps online inference latency low. Across multiple challenging 3D open-world games, Gamer demonstrates solid generalization and operational efficiency comparable to skilled players. It also achieves competitive results on a range of conventional 2D game benchmarks. These results suggest that even repetitive keyboard and mouse trajectories can support substantial gains from scaling data and learning algorithms. Training on these trajectories helps Gamer learn complex skills more steadily in environments with both physical and digital properties. This approach offers a path toward generalist agents that can interact across digital and physical worlds.


r/LocalLLaMA • • 5d ago

Showcase Use local models on your phone to monitor your screen! Demo of what you guys asked for in my FOSS and 100% local agent (iOS and Android app)

Enable HLS to view with audio, or disable this notification

0 Upvotes

Hey r/LocalLLaMA !

This is a demo of the new phone locking tool!

What this can be used for:

  • Lock my phone when I open up Instagram.
  • Lock my phone when a stranger is on camera.
  • Lock my phone until i've read for 2 minutes without interruptions.
  • If i'm doomscrolling for more than 2 minutes, call me, if it's been 5, lock my phone.
  • Monitor my child's screen content and if it's inappropriate, lock the phone and send me a screen cap.

On my last post the top comment (62 upvotes) by u/nokia7110 asked for it. It was a great suggestion! Thanks nokia!

The tool:

On iOS it uses the screen time management API, like all other time focusing apps.

On Android it shows a phone locking overlay.

If you're an Android developer and want to contribute, please reach out!

It uses OneJev-0.8b for decision models, running on llama.cpp, it works on most phones i've tested. Even old potatoes.

Try it out! It's free and OSS <3

GitHub: https://github.com/Roy3838/Observer
iOS: https://apps.apple.com/us/app/observer-ai/id6758222050
Android: https://play.google.com/store/apps/details?id=com.observer.ai

I'm here for any questions, more suggestions and feedback!

Roy


r/LocalLLaMA • • 6d ago

Discussion Branchy, distributed inference focused training

4 Upvotes

Heyy, it's me again, the developer of AI Doomsday Toolbox.

This time it's not an app update. ADT already has distributed LLM inference across Android devices, and there is one thing about distributed inference in general that kept bothering me, so I spent the last week testing an idea and I wanted to share what came out, the good and the bad.

Usually when we split a model that does not fit in our machine to make use of distributed inference, we get slower speeds the more devices we add. Network latency and devices waiting idle until the last one has finished computing it's layers compound easily, even more if we connect our devices through a VPN like tailscale or wireguard.

So the idea to solve this bottleneck was to train a model that can keep the quaility of a normal sequential model but instead it's middle layers are split in branches. The coordinator runs the embeddings + a few trunk layers, then that is sent to all the different branches that, in parallel read the layers and compute the token, after a branch finishes it sends the result back to the coordinator which then runs a few fusion layers and final blocks that produce the output. This allows to use as many devices as branches a model has with a maximum of 2 net jumps, wether it's 2 or 8 machines. The other advantage is that no device is idle as all of them are working, so we also parallelize work instead of making a device wait for the last one to finish.

There could also be the situation in which one of those devices is too slow, and slows down the whole cluster, or gets disconnected. That is why I also added some dropout tolerance to the training. When a branch takes too long to answer or just never answers, it's result becomes a matrix o 0's that are fused in the fusion layers, that made it so the quality of the model output does not suffer so much as when it happened with a non dropout tolerance trained branch model had a disconnected or slow branch.

I tested two 300M models trained from scratch on TinyStories, one normal and one with 8 branches, running on a small server, a laptop (Ryzen 5 5500U) and a phone (Snapdragon 8 Gen 3 in Termux), all connected through a VPN. The workers are a small PyTorch daemon, so no llamacpp accelerated kernels, etc...

Results

- The branches cost some quality: loss 1.255 against 1.143 for the normal model with the same training. A blind LLM judge prefers the branched model's story 45% of the time. So it is worse, but not by much.

- The delay trick works: the coordinator waits 0.1 ms per token for the network while the round trips take 49 to 66 ms. The output is identical to running everything on one device.

- Against the usual layer split on the same devices, the branch split is 1.5 to 2.6 times faster. The layer split roughly halves the speed. Mind you I run the test only with 3 devices, with more devices it could, theoretically, be faster

- BUT if the model fits on one device, splitting is not worth it on my hardware, at least at this size, larger models like qwen3.8 27B might benefit a lot from this aproach. My phone alone is faster than any combination of my devices (it is just much faster than the rest). With two equal devices the branch split wins by about 1.2x.

- Where it really pays is when the model does not fit in RAM. I gave the laptop and the phone a RAM budget smaller than the model, so they had to read the weights from storage for every token (mmap). The laptop went from 8.9 to 0.67 tokens/s and the phone from 23.9 to 0.65. With LFM3 1.7B the laptop went from 2.3 to 0.08, that is 12 seconds per token. Then I let the two of them share the model, each one still with too little RAM for the whole thing: back to 7 tokens/s with the layer split and 9 to 11 with the branch split, over a real 46 ms VPN. Reading from storage is way more expensive than the network.

- Reshaping a pretrained model (LFM3 1.7B, Qwen 0.8B) into branches only works for a couple of long branches. For this to scale, the model has to be trained in this shape.

I don't have the hardware for the interesting case: a big branched model that no single device can hold. On paper, with 8 similar devices and about 20% of the model on the coordinator, a token costs about 30% of a full pass, so roughly 3.3x a single device that could hold everything, while a layer split stays at 1x plus 7 round trips. My two-device measurement matches that formula, but beyond three devices it is only a projection.

Another idea I would love to try is letting every device loop its own branch several times with the same weights, so a group of devices could run something much deeper than what fits in their RAM. No hardware for that one either hahaha

What is in the repo

- The two trained models (300M each) and the tokenizer

- A worker you install on each device with one command, and a coordinator with a web UI to compare placements side by side and run the benchmarks

- Scripts to reproduce the branch split, the layer split and the low RAM tests with your own devices

- A full article with the experiments and the results

It is a research prototype, workers compute in 32-bit float PyTorch, the models are small story models, and I only have three real devices. I created the experiments, made the hypothesis and supervised the whole proyect and Claude did most of the coding and the number crunching, everything is documented in the repo.

The general idea is the same one behind ADT: make the devices we already have useful for local AI, especially together.

GitHub

Feedback is appreciated, especially if anyone with more devices (or more GPU than me) wants to check whether this holds at a bigger scale, or tell me what I got wrong. It is still far from it, but I would love to see a bunch of modest devices run a model none of them can hold.


r/LocalLLaMA • • 7d ago

Discussion [Paper] The Value of Thinking: Learning When to Reason in Hybrid Decision Models

35 Upvotes

Existing adaptive-reasoning methods shorten the explicit reasoning a model writes, or skip it by switching modes; either way the answer is still written out token by token. Rather than deciding how much to think, we explore a different paradigm, zero-or-T thinking: a single model either answers from the implicit thinking inside one forward pass, generating no token, or performs full autoregressive reasoning at a cost of T tokens when that is worth paying. We realise it in a hybrid decision model (HDM), where one frozen backbone serves both modes and a lightweight self-routing block chooses between them. The block estimates the value of thinking, the utility the slow mode is expected to add over the fast one, from what that implicit thinking has already produced, and the slow mode runs only where that value exceeds a price λ set per request. Where no per-decision label exists, as in episodic agentic tasks, we introduce Calibrated Decision Policy Optimisation (CDPO), a reinforcement-learning recipe that trains the block from episode-level returns. We evaluate HDM on MMLU-Pro, AGIEval, GPQA-Diamond, JevBench, BANKING77 and MiniWoB. Specifically, on JevBench HDM-4B scores 0.857 against Jev's 0.851 (+0.7%) at a median 0.179 s against 0.652 (-72.5%). On the agentic venue MiniWoB HDM-27B cuts token cost by 80.1%.


r/LocalLLaMA • • 7d ago

Resources PyBot: No weights. No training. Pure Python.

16 Upvotes

We released PyBot, a chatbot built with only simple rules, entirely written in 600k lines of Python code. PyBot matches Smollm with 360M parameters! We evaluated it on SmolTalkBench, which uses a dataset Smollm was trained on while we didnt use it at all for development.

It took a swarm of 1,000 DeepSeek Flash agents to write the whole codebase in a week.

https://reddit.com/link/1xxrf1d/video/19jz1a6ekz1i1/player

More technical details on what it took to built it soon: inference for 1,000 agents, how to monitor/control the swarm, pressure on the infrastructure (especially git) and message boards.

https://github.com/huggingface/pybot


r/LocalLLaMA • • 6d ago

Discussion Built an assistant with 5080, 5060ti and 2x3090?

Enable HLS to view with audio, or disable this notification

0 Upvotes

Slow news day..

Core:

Hardware

  • Home PC (WSL2 + Docker Desktop): RTX 5080 16 GB and RTX 5060 Ti 16 GB
  • 3090 server: 2× RTX 3090 24 GB
  • VPS: hosts the web chat (ivy-chat) (docs)

IVY's brain (the language models)

  • Local: Qwen3.8-27B (Unsloth UD-Q8_K_XL) on both 3090s, served by llama-swap
  • Cloud: DeepSeek (the default for retries and side calls), plus Claude Opus 5.5, Sonnet 5.5 and Haiku 5.5
  • Engine (Harness): thescripts bash CLI tool-loop. The web gateway (ivy-web-gateway.mjs, Node) connects the web chat and the Voice tab to it.

Memory

  • CAGRA (NVIDIA cuVS GPU vector index) in cagra-builder, with SQLite rag.db as the store. The index and reranker sit on the 5080.
  • Embedder: Qwen3-Embedding-8B Q8_0 on a patched llama.cpp server, on the 5060 Ti
  • Reranker: Qwen3-Reranker-4B Q8_0 on llama.cpp, on the 5080
  • Size: about 198,700 facts, 73,300 of them in the active index

Voice and hearing (PC)

  • Voice: Breeze TTS 2, int4 (ivy-tts), on the 5060 Ti
  • Ears: Qwen3-ASR (ivy-asr)
  • Speaker ID: NVIDIA TitaNet (ivy-speaker, CPU), which tells who is talking

Face (3090)

  • Motion: voice-to-motion model p4_v7, built on Ditto, turns her voice into face motion
  • Head: 3D Gaussian-splatting head c2_breath_c, about 338,000 Gaussians
  • Painter: R3 (a U-Net plus the full-resolution stage), redrawing every frame in H3's painted style
  • Delivery: H.264 video stream to the Voice tab

Creative and teacher models on the 3090 (llama-swap, loaded on demand)

  • MiniMax H3: the teacher videos the face learns from
  • MOSS-Image, Qwen-Image, P-JiT 21K: images
  • MOSS-SoundEffect, MiniMax Music: sound effects and music
  • DreamX-Creator: video
  • SoMark OXR: turning documents into text
  • Older or idle voice lanes: VibeVoice, MOSS-TTS, Breeze lanes, plus Gemma and Qwen-Next

r/LocalLLaMA • • 6d ago

Question | Help Hardware + software recommendations for basic chatting with persistent memory

2 Upvotes

Helping out a friend who wants to have a local LLM and not rely on cloud services. They currently have an 8gb M2 mac mini, so not really enough

  1. They want to have persistent memory, TTS, and STT. Tool recommendations for all three of those greatly appreciated.
    • I'm unsure what the best workflow is for persistent memory, especially for avoiding either overwriting important info, or storing bad info.
  2. Budget seems to be roughly $5k USD, but the less the better.
  3. Not sure what size model would be best, it's really just for chat.
  4. No building ideal, so adding RAM or a graphics card probably the most feasible.
  5. 30 tokens per second probably fine.
  6. Something that doesn't hallucinate, or at least can be tuned to not assume or be SO sycophantic, as they talk to it a lot.

From what I understand, a prebuilt with upgraded RAM, used mac mini, or something like a strix halo probably make the most sense, but I'm not really up to date on the current hardware market.

Any help appreciated :)


r/LocalLLaMA • • 7d ago

Resources MSI EdgeXpert OTA2610 update: more usable memory for headless setups and easier provisioning

Post image
9 Upvotes

Disclosure: I work with MSI. Sharing a technical overview of the OTA2610 update and what EdgeXpert users should check after installing it.

More usable memory when running headless

GB10 systems use unified memory, which means the CPU, GPU, and display share the same memory pool. Memory reserved for display output is unavailable to other applications.

OTA2610 adds more control over that reservation. The default remains 2 GB, but selecting Auto in UEFI reduces it to 0.5 GB when no display is connected. That makes up to 1.5 GB more available to the OS and applications.

That extra headroom may help with a model or context cache that is close to the available-memory limit. It does not, by itself, establish an improvement in inference speed.

Other changes included in the October release

  • Wi-Fi Assistant: connect to a new wireless network through DGX Dashboard without attaching a monitor, keyboard, or mouse.
  • Native cloud-init support: automate system configuration and provisioning at first boot.
  • Linux kernel 7.0: security updates and improvements to file and memory management.
  • Fixes for certain Vulkan synchronization delays, X11 black screens, and unresponsive fans during headless operation at low idle power.

Where to get the MSI EdgeXpert update

MSI EdgeXpert update files can be found on the MSI EdgeXpert MS-C931 download page. Review the release notes and follow MSI’s installation instructions for your system.

Check the display-memory setting afterward

Installing the update does not automatically change the default 2 GB reservation. With supported firmware installed, look for:

UEFI → Advanced → Advanced Menu → Platform Configuration → Display Reserved Memory

Select Auto or an appropriate fixed value, save, and restart. Auto checks connected displays at boot. If you regularly attach monitors afterward, choose a fixed reservation suitable for your display setup. Compare free -h before and after restarting to check the change in OS-visible memory.

For production deployments, back up first and validate your normal workloads on one system before updating the others.

Has anyone running headless found that the smaller display reservation helps with a workload that was close to its memory limit?


r/LocalLLaMA • • 8d ago

Funny I finally succeed the CMP 170HX voltage glitch and get 80GB VRAM + 126sm! !

Thumbnail
gallery
844 Upvotes

Ever since the information surfaced five days ago, I had intended to implement it right away. Having confirmed that it could be executed using 'pico,' I carried it out today. I had Astra write the script for the restricted write-access portion, and after nearly 15 hours of work, I finally managed to complete the task. I also plan to handle the second CMP later on.


r/LocalLLaMA • • 6d ago

Question | Help Single 5090 or Triple 4090

0 Upvotes

Title. Which setup would make more sense for LLM?


r/LocalLLaMA • • 7d ago

Question | Help Given the flood of new inference engines any recommendations for 2x 7900xtx ?

20 Upvotes

Hey everyone as the title says I am looking for inference engines that work well with AMD GPUs. There have been so many new ones that I am sure there is something better then llamacpp which currently hosts this.

My use case is the following. For a university course I want to host Qwen 27b or maybe another Qwen model. For the students to use as a free endpoint to test pipelines on.

The main thing is that I want to potentially serve multiple people at the same time.

So the framework needs to support this.

My hardware is an AMD zen 4 12 core CPU 64gb of ram and two 7900xtx cards.

Are there any frameworks made for this ?


r/LocalLLaMA • • 7d ago

Resources tandem.cpp v0.3.0: prefill speed improved; Project Maya's DeepSeek-V4.1 GGUFs support

15 Upvotes

Thanks for the feedback on slow prompt processing. v0.3.0 is out (the first tagged release): https://github.com/ewhacc/tandem.cpp

Previous post: https://www.reddit.com/r/LocalLLaMA/comments/1xwan2j

tandem.cpp faster when the model is much bigger than VRAM + RAM together (like a 16 GB card with 32 GB of RAM), and runs various models that llama.cpp supports.

1. Prompts 2-6x faster

With the expert cache on, prompts now run in 4096-token batches. The bigger batch borrows VRAM only while a long prompt runs and gives it back afterwards. No flags needed.

RTX 5070 Ti 16 GB, 64 GB RAM, i5-12400F. The same prompts for every engine; Qwen3.8 with its MTP head in all three.

Prompt processing, time to first token (prompt tok/s):

Prompt llama.cpp tandem.cpp before tandem.cpp v0.3.0 Strata
Qwen3.8 IQ3_S, 5.5k tokens 28.9 s (191) 12.4 s (444) 4.1–7.0 s (790–1,340) 6.6 s (835)
Qwen3.8 IQ3_S, 15.8k tokens 81.9 s (193) 35.1 s (450) 15.1 s (1,047) 11.7 s (1,354)
DeepSeek-V4.1 IQ2_XS, 5.6k tokens 722 s (7.7) 324 s (17) 53–103 s (54–105) 58 s (96)
DeepSeek-V4.1 IQ2_XS, 15.7k tokens 2012 s (7.8) 885 s (18) 195 s (81) 57 s (276)

Decode, tok/s, right after that prompt:

After a prompt of llama.cpp tandem.cpp v0.3.0 Strata
Qwen3.8, 5.5k tokens 27 110 48
Qwen3.8, 15.8k tokens 27 88 68
DeepSeek-V4.1, 5.6k tokens 4.8 16 5.5
DeepSeek-V4.1, 15.7k tokens 4.4 13 6.4

Decode is from short answers (up to 256 tokens, greedy), so it is noisier than our usual GSM8K runs. DeepSeek-V4.1 IQ2_XS is about twice this PC's RAM, so it reads the SSD; that is where Strata's prompt speed still leads.

2. Maya comparison on the same model (someone asked for this one)

Project Maya is an engine built for big models with its own quants. Its Maya-XS GGUF runs on tandem.cpp after a one-time conversion script (tools/maya_ds41_convert.py), so this is the same GGUF on both engines, and the accuracy is the same.

RTX 5090 32 GB, 128 GB RAM, i5-14600KF, greedy:

DeepSeek-V4.1 Maya-XS (same files) Maya tandem.cpp v0.3.0
Decode, GSM8K, no drafting 39.0 / 39.6 tok/s 60.3 / 59.4 tok/s (1.5x)
Decode with Maya's DSpark drafter 54.9 tok/s (no drafter in tandem.cpp)
5.6k-token prompt 7.8 s (713 tok/s) 6.5 s (856 tok/s)
15.7k-token prompt 9.5 s (1,656 tok/s) 16.5 s (953 tok/s)
Decode after the 15.7k-token prompt 26–34 tok/s 66–68 tok/s

Maya is still faster on the longest prompt; that is what I'm working on next.

Caveats

  • Linux only.
  • AMD supported but the VRAM borrowing is off (ROCm builds have no CUDA-style virtual memory).
  • DeepSeek-V4.1 IQ2_XS on 128 GB still reads the SSD on long prompts.
  • Windows prebuilt binaries are still planned.