r/LocalLLaMA • u/Nunki08 • 13h ago
Funny Solve the CyberGym benchmark
From Peter Gostev on đ:Â https://x.com/petergostev/status/2079825961718046974
r/LocalLLaMA • u/Nunki08 • 13h ago
From Peter Gostev on đ:Â https://x.com/petergostev/status/2079825961718046974
r/LocalLLaMA • u/Recoil42 • 21h ago
Direct link: Language Model Builder
From the site: "Using the default settings, youâll get a model that writes coherent, grammatical multi-paragraph text in as little as a day. On a MacBook Pro M5 Max you could train a GPT-2-small-class model (~100â150M parameters on a few billion tokens) in about a week. It might be obvious, but to avoid disappointment: you will not train a Claude Fable 5 or ChatGPT 5.6 Sol in your garage."
r/LocalLLaMA • u/ClassicMain • 8h ago
This is a surprisingly large real-world deployment: "GovGPT" is part of Austriaâs Public AI initiative, running on sovereign infrastructure (in their BRZ - federal datacenter) with Mistral open-weight models.
Trending Topics reports that Open WebUI is used as the interface for GovGPT, and the screenshot of the platform is labeled "GovGPT (Open WebUI)".
The federal rollout targets around 180,000 federal employees. The broader public-sector context refers to approximately 250,000 public sector employees.
Planned use cases include document chat, internal knowledge bases, electronic-file analysis, parliamentary requests, and eventually agentic workflows.
This might be one of the largest government deployments of open weight models and a freely available chat platform yet.
Sources:
r/LocalLLaMA • u/mw11n19 • 6h ago
One thing I noticed in American politics, whenever the government wants to push unpopular actions or laws, they often introduce fear to convince the public to support them.
This is actually how i view the recent news about OpenAIâs model breaking out of its sandbox. The whole news i see it as two corporate goals.
1. Scare the public into supporting laws that restrict open-access LLMs under the pretext of "safety".
2. OpenAI is playing catch-up against Anthropic's Claude mythos, using this to demonstrate their own model capabilities.
I say this becuase a sandbox is meant to be an isolated, secure environment. If a model escapes, either OpenAI intentionally weakened containment protocols to manufacture a headline, or OpenAI is incapable of safely deploying sandboxes..
You might argue that the model was too powerful for standard sandboxes. However, I would argue that its capabilities fall well within the current generation, proven by the fact that a current open-source model easily detected and neutralized the situation.
So let's be cautious before we panic into supporting heavy-handed regulations. One day, AI capabilities might advance to a point where those laws are actually needed, but we are definitely not there yet.
r/LocalLLaMA • u/BoogerheadCult • 19h ago
Various quantization now available, thanks Unsloth team !
r/LocalLLaMA • u/pmttyji • 5h ago
Fara1.5-27B is a multimodal computer use agent (CUA) for web browsers, from Microsoft Research AI Frontiers. It observes the browser through screenshots and acts on the user's behalf by emitting structured tool calls â click, type, scroll, visit URL, web search, and so on â to complete tasks end-to-end.
The model is vision-only at perception time: it sees the browser through screenshots, not the DOM or accessibility tree. Internal reasoning and trajectory history are tracked as text. Given the latest screenshot and prior actions, it predicts the next action with grounded arguments (e.g., pixel coordinates for a click).
Fara1.5-27B is supervised fine-tuned from Qwen3.5-27B on data generated by FaraGen1.5, our multi-agent pipeline that synthesizes web tasks, executes trajectories to solve them, and verifies the results before training.
It's co-designed with MagenticLite, and that's the recommended deployment for both research and production.
Automating repetitive web tasks: filling forms, shopping, booking travel, restaurant reservations, information seeking, account workflows. Fara1.5-27B can also serve as a grounding model for other agents that need pixel-accurate action prediction.
Additional Models: (I don't see 9B model on HF even though model cards mentions 9B, Added below)
r/LocalLLaMA • u/MLExpert000 • 54m ago
r/LocalLLaMA • u/My_Unbiased_Opinion • 7h ago
About to plug them in. Currently running a single 3090. I got these for less than the price of a single 3090. 24GB wasn't enough for my use case, so 40 GB should be an upgrade.
Going to throw my 3090 on ebay very likely. I feel like it's a perfect time to sell since the prices are so inflated.
EDIT: Here is the vendor and the exact product page:
https://www.alibaba.com/product-detail/RTX3080-Turbo-GPU-Video-Graphics-Card_1601386189376.html
I am in the US. Tariffs were around 75ish bucks for 2 cards.
r/LocalLLaMA • u/_TheWolfOfWalmart_ • 19h ago
Laguna is the first model I'm trying, Q4_K_M fits with 256K context @ F16. Doing the html flight simulator test now.
These cards are getting 400 to 600 tok/s prefill and 16 to 20 tok/s gen so far (I have NOT enabled dflash yet). Not bad at all for the cost. ($350 each)
In a Dell PowerEdge R740 with dual Xeon Gold 6248R and 768 GB RAM.
r/LocalLLaMA • u/jacek2023 • 13h ago
Solar Open 2 is Upstageâs 250B-A15B open-weight large language model, built for agentic use cases such as office productivity, document-intensive work, and coding. Its Hybrid-Attention Mixture-of-Experts (MoE) architecture with linear attention delivers highly efficient inference even in long-context settings.
Agentic Specialist: Purpose-built for agentic workflows â tool calling, multi-step reasoning, and end-to-end task execution. Competitive with the strongest open-weight models on agent benchmarks.
Minimal Inference Cost: A 250B-parameter MoE that activates only 15B per token, built on a hybrid attention stack that interleaves three linear-attention layers with one softmax-attention layer â large-model capacity at small-model inference cost.
1M-Token Context: The linear-attention layers encode token order intrinsically in their recurrent state, so positional encoding is removed entirely (NoPE), lifting the RoPE extrapolation limit. Only 12 of the 48 layers keep a KV cache, holding long-context memory to roughly a quarter of an all-softmax model of the same shape.
Efficiently Trained at Low Cost: Initialized by selective weight transfer from Solar Open 1 (102B) â only the 2.3% of weights that survive the architectural change are carried over, and everything else is randomly initialized â which raises the starting point and accelerates early convergence at 250B scale.
Multilingual: English, Korean, and Japanese.
r/LocalLLaMA • u/Valuable-Repeat-7347 • 11h ago
I built Encode Bench, an open benchmark that asks a model to solve a task and return the answer as a Base64 payload.
The initial result surprised me: across the eight models with matching data in the current nine-model snapshot, Encode Bench pass rate has a Pearson correlation of 0.91 with the Artificial Analysis Intelligence Index. The correlation with its Agentic Index is 0.94.
That sounds dramatic, so the caveat belongs right next to it: this is a small, imperfect observational sample. It does not show that Base64 measures intelligence, and it does not establish causation. SimpleBench is a useful counterexample: its correlation with Encode Bench is only 0.23, although that comparison has just four overlapping models.
The idea came from an asymmetry I kept seeing: models could often interpret Base64 in a prompt, but some struggled to produce Base64 that decoded into the exact artifact requested. Generating the final payload requires the model to:
A failure at any link breaks the artifact, so this may be a crude test of multi-step reliability. Or it may mostly reflect tokenizer behavior, training data, post-training, reasoning limits, or provider routing. The current benchmark cannot separate those explanations.
The scored battery contains 24 deterministic tasks across encoding fidelity, instruction following, arithmetic, logic, code reasoning, and structured data. Each task is run three times, giving 72 scored trials per model. Missing trials, provider failures, invalid Base64, output-cap failures, and Base64 containing the wrong answer all count as failures. A Base64-encoded PNG prompt is included only as a subjective showcase and never enters the score.
Current results:
One result I did not expect: raw encoding-fidelity tasks were the hardest category at 35.2%, while code reasoning was the easiest at 74.1%. Many failures were not malformed Base64 at allâthe payload decoded successfully but contained the wrong answer. The score is therefore mixing reasoning, exactness, encoding, endpoint reliability, and inference limits. That mixture may help explain the correlation, but it is also the strongest reason not to over-interpret it.
The biggest missing experiment is a matched plain-text control battery with the Base64 requirement removed. I would also like to test hexadecimal and matched random strings.
Interactive results and per-trial outputs:
https://arvidsu.github.io/encode_bench/
Source, prompts, model configs, and scoring code:
https://github.com/ArvidSU/encode_bench
I would be interested in this community's read: is encoded generation exposing a real generalization gap, or mostly a tokenizer/training artifact? And as benchmarks like this enter training data, does the signal improve or simply stop meaning what it meant before?
r/LocalLLaMA • u/LaurentPayot • 12h ago
r/LocalLLaMA • u/hellajacked • 5h ago
The primary driver of this project is that I'd become frustrated with the reasoning behavior of smaller local models such as Qwen3.6-27B (i believe particularly at lower temperatures, and where system prompts are highly specific), their reasoning process is highly unreliable and often tends to spiral into neverending "But, wait" loops or, occasionally, complete garbage.
The core principle is simple - when the sampler sees an opening <think> tag, it kicks off the thought process with a self-aware statement to nudge the model to behave properly - ie. "I have a thinking budget of <x> tokens, my thought process should remain concise" - this is then prefilled, and sampling continues from there.
Once reaching another threshold of, say, 70% of the thinking budget, it again interjects with a statement bringing attention back to the budget - "I've reached 70% of my reasoning budget, let me start working towards a conclusion"
When the actual budget limit is hit - it gets given some grace period during which the sampler waits for a good time to cut the thought process off - usally a newline. At that point it'll inject something like "I've reached the end of my thinking budget, now i will provide the user an answer"
In my testing so far, this technique has proved noticeably effective at guiding the thought process.
Next steps would probably be to generalise the concept and develop something like a "reasoning grammar" or template-based approach - which could enforce different reasoning approaches based on the task at hand.
The repo is public, linked below - there is also a pre-built docker image for AMD64 + CUDA
I'd be curious to see if this type of enhancement is useful for anyone other than myself lol
r/LocalLLaMA • u/pmttyji • 3h ago
Today the Department of Energy (DOE) and Arcee AI announced the development of Genesis-Science-1 (GS1), an open model for scientific research. This is a joint effort to bring advanced AI into scientific research across a wide range of fields.
GS1 is an American open-weight model for scientific research, built together with the DOE and its national laboratories through the Genesis Mission. Arcee has secured the compute, will handle training and post-training, build the scientific workbenches and the system around the model, and prepare it for release. DOE scientists will shape which problems are worth solving, provide the data and environments the model learns from, and be the true test as to whether its work holds up under scrutiny. GS1 will be a trillion-parameter-class language model paired with a governed execution system for long, difficult scientific work, released openly later this year with the weights, a technical report, and public demonstrations. GS1 is built on top of our next generation of Trinity models.
Just a year ago, Arcee made a decision that was difficult to defend. We began training our own open models from scratch, in the United States, when the faster and cheaper path pointed elsewhere. Strong open models were already available to download, and the reasonable move was to take one, adapt it, and build from there. We understood that case. Itâs how weâd been operating before, after all. We went ahead anyway, because we kept seeing the need.
Some institutions can't treat a model as a service. A bank, a hospital, a university, or a national laboratory may need to keep a version stable for years, hold it to their own standards, retrain it for a narrow field, and run it on their own systems without sending sensitive data anywhere. For them, a model is more than its benchmark scores. It's the weights, the training history, the license, the certainty that it will perform reliably indefinitely, and the supply chain behind it, all the way down.
We built the Trinity models to serve institutions like these. When the Genesis Mission came along, it fit our ethos.
We have real admiration for the open-model labs in China. DeepSeek, Qwen, Kimi, MiniMax and GLM have built excellent models that people rely on, and they kept sharing open weights when much of the field was moving the other way. They earned their standing. Yet their work also showed how few capable open models were being made in the United States. For an institution handling sensitive work, capability is only part of the question. It also matters who trained a model, where, under what license, and which country's laws sit behind the company that made it. Those are fair questions, and a leaderboard doesn't answer them.
We think the right response is to build more capable open models here at home, so that institutions who need them have somewhere to turn. Closed American systems will stay valuable, and many are superb. What they can't offer a national laboratory is a model it holds in its own hands, free to preserve, adapt, and run on its own terms. We wanted American science to have that option too.
r/LocalLLaMA • u/Henrie_the_dreamer • 5h ago
Hey HN, Henry & Roman here from Cactus.
A small, on-device model is fast and private, but sometimes wrong, but frontier models are getting expensive pretty fast. So, we post-trained Gemma 4 E2B post-trained to know when it's wrong. Every response comes with a confidence score between 0 and 1. Developers can accept the on-device when it's high, hand off to a bigger cloud model when it's low. By routing only 15-35% of queries to Gemini 3.1 Flash-Lite, Gemma-4-E2B matches Gemini 3.1 Flash-Lite on most benchmarks.
- ChartQA: 15-20%
- LibriSpeech: 25-30%
- MMBench, GigaSpeech, MMAU: 30-35%
- MMLU-Pro: 45-55%
We were always frustrated by the routing signals hybrid apps rely on: asking the model to rate itself in text (unreliable, and you're parsing prose), or token entropy heuristics (barely better than a coin flip in our tests). So we did mechanistic studies on small models, Gemma 4 particularly, and found the hidden state for different layers carry meaningful self-awareness signal for various situations.
SO we extended the model with a 68k params probe layer (LayerNorm, low-rank projection, attention pooling, small MLP head) reads one intermediate layer during decoding and predicts p(wrong); confidence = 1 - p(wrong), returned as structured data, never parsed out of the answer text.
Across 12 hold-out benchmarks spanning text, vision and audio, the probe averages 0.814 AUROC vs 0.549 for token entropy. The result that convinced us this is real: the probe was trained on zero audio data, yet scores 0.79-0.88 AUROC on four audio benchmarks where entropy is near-random or worse (0.32-0.52). It's reading a modality-independent correctness signal from the hidden state, not memorizing patterns from its training data.
We published all weights on HuggingFace and provide copy-pase codes to run it on Transformers, MLX, Llama.cpp or Cactus. With Ollama, vLLM, SGLang etc in the works. For llama.cpp we ship a patch series you compile in once (upstreaming is planned). The code is MIT licensed; Gemma model use remains subject to the Gemma terms.
GitHub:Â https://github.com/cactus-compute/cactus-hybrid
Weights:Â https://huggingface.co/collections/Cactus-Compute/cactus-hyb...
Some caveats:
- The probe scores single-sequence decoding only, up to the first 1024 generated tokens.
- Handoff works best when routing per task in a multi-step process, not per step.
- Hierarchical routing is still in the works: try on-device, then DeepSeek v4 Flash, before Fable/GPT5.5/Gemini/Muse/Grok.
- The technique is boutique for each model, we will share each weights as they roll out.
These issues are currently being tackled at Cactus and updated weights will be shipped directly into the HuggingFace collection and GitHub repository straight up. Please let us know your thoughts, it helps us find ways to improve the design progressively.
Thanks a million!
r/LocalLLaMA • u/JLeonsarmiento • 20h ago
Properly done this time.
Models as the GIFs are displayed:
Qwen3.6-27B - 4bit
Qwen3.6-MoE - 6bit
Ornith-35B - 6bit
Gemma-4-26B - 6bit
Qwen3.6-MoE - 4bit
HuiHui-Qwen3.6-MoE - 6bit
Agents-A1 - 6bit
Inference parameters:
Qwen3.6 & HuiHui Abliterated:
temperature 0.6 - top_p 0.95 - top_k 20 - min_p 0.01 - repeat_penalty 1.05
Ornith-1.0-35B:
temperature 1.0 - top_p 1.0 - top_k 40 - min_p 0.01 - repeat_penalty 1.05
Gemma-4:
temperature 1.0 - top_p 1.0 - top_k 64 - min_p 0.01 - repeat_penalty 1.1
Agents-A1:
temperature 0.85 - top_p 0.95 - top_k 20 - min_p 0.01 - repeat_penalty 1.05
Prompt: "Create a beautiful, relaxing flight simulator in a single html file with mountains, clouds, and endless procedural terrain"
Harnes: Pi
Served by: oMLX
Method: single prompt. If the html file doesn't work everything was deleted, Pi session was restarted, and model had to start from scratch again. maximum of 3 tries.
Models Quants used:
https://huggingface.co/collections/leonsarmiento/local-sota-for-48gb-macs
r/LocalLLaMA • u/rmhubbert • 2h ago
Poolside have updated the full precision, and FP8 versions with a fix for the looping issue many of us have been seeing. Other variants incoming.
Discussion - https://huggingface.co/poolside/Laguna-S-2.1-FP8/discussions/1
r/LocalLLaMA • u/pmttyji • 12h ago
Today, we're sharing the recipe behind the new tokenizer in LFM2.5-8B-A1B. It upgrades a pre-trained model's tokenizer in place, without retraining from scratch. We doubled the vocabulary from 65K to 128K to fix the languages our original tokenizer split too finely.
Blog: liquid.ai/blog/tokenizer-expansion
Technical report: arxiv.org/abs/2607.15232
Hugging Face: huggingface.co/LiquidAI/LFM2.5-8B-A1B
r/LocalLLaMA • u/pmttyji • 2h ago
Tweet : https://xcancel.com/jun_song/status/2079914426334167258#m
Looks like 8GB VRAM could do more like even run 70-100B MOE models possibly.
Sorry about the clickbait title, I want more eyes on this..... zzz
r/LocalLLaMA • u/UsedMorning9886 • 20h ago
Nanbeige Lab released Nanbeige4.2-3B, and if the benchmark claims hold up, the numbers are pretty crazy for a model this small. Itâs built on a "Looped Transformer" architecture that reuses transformer layers to increase effective depth without inflating the parameter footprint.
With just 3B non_embedding parameters, they are reporting an SWE-Bench Verified score of 63.6 and SWE-Bench Pro at 46.9. They tested it in OpenClaw guarded by Lyzr Control Plane for runtime security and claim it outperforming Qwen3.5 across daily workflows, putting it ahead of Qwen3.5-9B and Gemma4-12B on coding and agentic benchmarks. The core pitch here is a lightweight "local personal assistant." In OpenClaw framework testing, it reportedly beat both 4B and 9B class models across daily office workflows and research tasks.
That said, take the benchmark table with a grain of salt. Community members are already pointing out discrepancies between the Qwen3.5-9B numbers reported by Nanbeige versus Qwenâs official model card. Outside verification will be key once GGUF quants propagate through llama.cpp and Ollama.
How it can be better:
Running high-depth 3B models in local agent frameworks like OpenClaw opens up serious workflow potential, but deploying autonomous loops on local hardware still carries runtime risks especially when agents execute unverified code or make outbound API calls.
so use a harness
Anyone actually run it locally yet? how does it feel?
Used grammarly for formatting (English isnt my first language)
r/LocalLLaMA • u/TeamNeuphonic • 9h ago
Enable HLS to view with audio, or disable this notification
Weâre open sourcing an alpha release of NeuTTS-2E: an on-device TTS model with 125M active parameters and 7 controllable emotions. The goal was simple: when you select âangry,â âfearful,â or âhappy,â the delivery should follow that instruction rather than whatever emotion the model infers from the text.
With NeuTTS-2E, you can:
Getting there meant dealing with limited emotional speech data, unreliable labels, and disentangling spoken emotion and text semantics. NeuTTS-2E runs locally and supports four built-in voices.
Weâre sharing it early to get feedback from the community, and weâd love to see what you build!
GitHub: https://github.com/neuphonic/neutts
Hugging Face Model Collection: https://huggingface.co/collections/neuphonic/neutts-2e
Interactive demo: https://huggingface.co/spaces/neuphonic/neutts-2e
r/LocalLLaMA • u/jacek2023 • 16h ago
https://huggingface.co/poolside/Laguna-S-2.1-GGUF
https://huggingface.co/unsloth/Laguna-S-2.1-GGUF
https://huggingface.co/poolside/Laguna-S-2.1
Laguna S 2.1 is a 118B total parameter Mixture-of-Experts model with 8B activated parameters per token, designed for agentic coding and long-horizon work. It sits between Laguna XS 2.1 (33B-A3B) and Laguna M.1 (225B-A23B) in the Laguna series and shares the family recipe: a token-choice router with softplus gating over 256 routed experts plus one shared expert, grouped-query attention, and interleaved full/sliding-window attention.
https://huggingface.co/poolside/Laguna-XS.2
Laguna XS.2 is a 33B total parameter Mixture-of-Experts model with 3B activated parameters per token designed for agentic coding and long-horizon work on a local machine. It uses Sliding Window Attention with per-head gating in 30 out of 40 layers for fast inference and low KV cache requirements.
https://huggingface.co/poolside/Laguna-M.1
Laguna M.1 is a 225B total parameter Mixture-of-Experts model with 23B activated parameters per token designed for agentic coding and long-horizon work.
r/LocalLLaMA • u/ylchao • 17h ago
this strategy effectively uses vram as cache over disk to keep MoE experts on cuda compute path in llama.cpp.
numbers first. detailed explanation down below.
on dgx spark Kimi-K2.7-Code.i1-IQ_S.gguf 204GB 1T.A32B https://huggingface.co/mradermacher/Kimi-K2.7-Code-i1-GGUF
| run | method | pp512 | tg128 | note |
|---|---|---|---|---|
| A | cuda, -ot regex A down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH | 340.02 ± 37.75 | 9.58 ± 0.07 | all tensor on unified ram + experts kept in pageable host memory via mmap + last layers pinned in ram |
| B | cuda, -ot regex B down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH | 154.31 ± 30.62 | 8.75 ± 0.22 | A, but last layers not pinned |
| C | cuda, -ot regex C down below GGML_CUDA_ENABLE_UNIFIED_MEMORY | 222.20 ± 66.04 | 3.26 ± 0.01 | B, but remove min batch flag |
| D | cuda, GGML_CUDA_ENABLE_UNIFIED_MEMORY | crash | crash | C, but remove experts offloading |
| E | cpu mmap | 4.23 ± 0.22 | 1.63 ± 0.66 | no cuda involved |
-ot regex A: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'
-ot regex B: '.*\.ffn_(down|gate|up)_exps\.weight=CPU'
-ot regex C: '.*\.ffn_(down|gate|up)_exps\.weight=CPU'
on 3090s pcie 4.0 + 128gb ddr4 Minimax-M2.7-K_G_3.00.gguf 80GB 230B.A10B https://huggingface.co/Goldkoron/MiniMax-M2.7
| run | method | pp512 | tg128 | note |
|---|---|---|---|---|
| A | cuda, -ot regex A down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH | 54.03 ± 3.85 | 2.90 ± 0.09 | same strategy as B on dgx |
| B | cuda -ngl 17 | 73.80 ± 2.10 | 1.66 ± 0.02 | normal layer split |
| C | 3090x2, cuda, -ot regex C down below, GGML_CUDA_ENABLE_UNIFIED_MEMORY, GGML_OP_OFFLOAD_MIN_BATCH | 48.86 ± 0.53 | 2.40 ± 0.01 | A, but on two 3090s |
-ot regex A: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'
-ot regex C: '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU'
I want to run model larger than 128gb on my single dgx spark. MoE models provide a great opportunity because if active params could be computed entirely with cuda then there's no need to store all model weights inside gpu ram at runtime. after experiments I found a combination of settings for llama.cpp to run kimi 2.7 fast.
general setting for llama-bench: -r 50, -fa on, -mmp 1, system swap turned off. llama.cpp b10075 compiled with kleidai support, and the winning strategy is the following:
GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 GGML_OP_OFFLOAD_MIN_BATCH=1 ./llama-bench -m ~/Kimi-K2.7-Code.i1-IQ_S.gguf -fa on -mmp 1 -ot '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU' -r 50.
I configured b10075 with cmake -B build -DGGMLCUDA=ON -DGGML_CPU_KLEIDIAI=ON and compiled with cmake --build build --config Release.
first, if GGML_CUDA_ENABLE_UNIFIED_MEMORY is 1, cuda device buffers use cudaMallocManaged, and every tensor has one virtual address that is valid from both gpu and cpu. when cuda kernel touches a page that exists in vram then it'll execute normally. if not in vram then a page on cpu ram will migrate that page to vram. if not in gpu ram or cpu ram, then it'll fetch the page from disk to cpu ram via mmap and then send to vram. on dgx spark the cost of cudaMallocManaged is much lower because gpu ram and cpu ram are unified.
second, for GGML_OP_OFFLOAD_MIN_BATCH (default is 32), if batch size < threshold and weight is on cpu ram then it executes on cpu, otherwise on gpu. if you set it to 1, it forces all computes on gpu. this helps token generation because in tg it won't reach that threshold.
third, when you specify -ot '.*.ffn_(down|gate|up)_exps.weight=CPU' it will put expert weights on cpu ram and can be evicted because of mmap. this makes cold expert weights more likely to stay on disk.
and last, '^(?!blk\.(5[5-9]|60)\.ffn_(down|gate|up)_exps\.weight$).*\.ffn_(down|gate|up)_exps\.weight=CPU' is used to keep last few blocks on gpu ram because these blocks has more dynamical routing, it's faster to keep them on gpu ram to avoid overhead when ram space is large enough.
for dgx spark, it has large menory pool so that I can pin some of the expert blocks in vram (run A). if we don't pin them it's slower (run B). if we remove GGML_OP_OFFLOAD_MIN_BATCH flag the token generation is slower (run C), because expert forward pass is done on cpu. if we further remove GGML_CUDA_ENABLE_UNIFIED_MEMORY flag (run D), oom happens, because gpu ram cannot be evicted via mmap mechanism. and finally, if all compute is on cpu it's the slowest (run E).
an interesting tradeoff happened in run B vs run C, where GGML_OP_OFFLOAD_MIN_BATCH dramatically improves tg while slightly hurting pp. potential code modification may be made to mitigate this tradeoff.
for 3090 + ddr4, I haven't tested it in depth but the strategy kinda applies too. I didn't put last few blocks on vram because 24gb is too small. you can see tg of run A is higher than normal ngl split (run B), because experts are computed on gpu. however the prompt processing suffers, likely due to pcie overhead.
I also tested two 3090 + ddr4, but it's generally slower. maybe the cost of pcie transfer is too high. I think properly tune the -ot offload might have a chance to improve on 2 gpu scenerio.
Edit: fix formatting
r/LocalLLaMA • u/pmttyji • 5h ago
Models: (Check Model cards for so much sample demo images)
Mage-Flow is a compact 4B-scale generative stack for efficient text-to-image generation and instruction-based image editing. Instead of scaling to tens of billions of parameters, Mage-Flow reaches state-of-the-art-competitive quality through careful tokenizerâbackboneâsystem co-design, so it stays fast, memory-light, and easy to fine-tune under realistic compute budgets.
The stack is built from two shared, co-designed components:
Together with native-resolution packing and a fused-kernel training infrastructure, this shared stack powers two model instantiations: Mage-Flow for text-to-image generation and Mage-Flow-Edit for instruction-based image editing. Each ships in Base, RL-aligned, and 4-step Turbo variants.
512Ă2048, 2048Ă512).1024ÂČ on a single A100: Mage-Flow-Turbo 0.59 s/image, Mage-Flow-Edit-Turbo 1.02 s/edit, peak memory ~18â20 GB (lowest among compared systems).