r/LLM • u/Thistleknot • 1h ago
MiniMind v3: 64M LLM from scratch in 2 hours.
Hey everyone,
I've been experimenting with sparse attention for long-context LLMs. My original question was pretty simple: how much attention can we skip before the model starts getting things wrong?
After a lot of failed experiments, I ended up with something I call SculptAttention.
Some of my results on a single H200:
* Inkling-2-Mini (660K): 155s → 37s, up to 4.27x faster prefill.
* Qwen3.8-27B (524K): 144s → 76s.
* Llama-3.1-8B (128K): 1.40x median speedup, reaching 2.74x on individual cases.
No retraining, no weight modifications, no custom attention kernel. All three models use the same configuration.
At 524K, the sparse rows read only 9.1% of the causal keys.
Another result I found interesting was multi-value retrieval on Qwen at 524K:
* Dense attention: 9/10
* BFLA: 3.75/10
* SculptAttention: 9.5/10
This is just one task with 10 fresh cases, not a claim that my method is generally better.
The method isn't lossless. Counting, some multi-hop tasks and exact ID retrieval remain challenging. The full KV cache is retained, and decode remains dense.
I'm doing this independently, and my GPU budget is limited. I'd really like to see what happens on consumer GPUs, large codebases, long agent histories, and models I haven't tested.
If you were trying to break this method, what would you test first?
I'd also love to hear from anyone working on vLLM, SGLang or llama.cpp.
Everything is open source:
Code: https://github.com/fsn007fsn007/sculptattention
Paper: https://doi.org/10.5281/zenodo.24794082 \- https://www.alphaxiv.org/abs/2612.sculptattention
English isn't my first language, so I used AI assistance with the wording.
As the title states. If you had to buy a $100+ to do some building, what model would you go with?
r/LLM • u/No_Secretary1208 • 16h ago
Hello guys, I just wanted to share the old prototype I was building a while back.
While the concept was of my own, most of the execution was done by opus and recently hydrogen.
Here is the preprint:
https://aixiv.science/abs/aixiv.261204.000007
Repo:
https://github.com/SamaelTheKingOfHell/ADA
In case you are wondering, my autistic self named her after Ada Wong.
r/LLM • u/Impossible_Wealth190 • 22h ago
How is it's architecture different from DeepSeek
Also is it open source with tunable parameters on hugging face
r/LLM • u/RobertVanZandt • 1d ago
For those running open models (Qwen, gpt-oss, etc.) with a web search tool: how do you get the model to recognise that its knowledge is too old and it should look something up?
The hard cases are questions that look timeless but aren't:
-> "How do I renew my UK driving licence?" Fees and steps change, but the model answers confidently from memory.
-> "How is Kimi Antonelli doing this season?" It answers with what it knew at training time.
What works for you?
Letting the model decide (tool call), a separate router or classifier, or always searching for certain topics?
System prompt wording that actually changed behaviour?
How do you avoid over-searching in the other direction?
r/LLM • u/Tricky_School_4613 • 1d ago
I usually change the models between the chat randomly out of excitement and the credits consumed has atleast a 10x difference compared with anthropic anyone else have noticed this. The queries are not too much complex they are just simple task.
r/LLM • u/CommissionOdd3082 • 1d ago
Most people think a 30B model needs a 24 GB card. I wanted to check that, so I ran Qwen3-30B-A3B (Q4_K_M, 18.6 GB file) on a cloud L4 with only about 8 GB VRAM left free and RAM capped at 12 GB. So the full model does not fit in VRAM, and not even in RAM.
How it works, in simple words:
llama.cpp also has the expert offload and a MoE cache, so you can do this with llama.cpp too. Left side in the video is llama.cpp server with the same placement and same cache. Right side is Cluaiz (open source engine I contribute to) with default settings, it picks this setup by itself and adds the prefetch.
Numbers (one load, 4 prompts, median of 3):
First token takes around 19 s for the first prompt on both. In the video I made only that waiting part 6x fast (written on screen), rest is real time.
Logs, scripts and full setup in the comments, you can rerun it.
Anyone else running 30B+ MoE on 8 GB cards? What speed you are getting?
Hey everyone!
I'm conducting a small academic research survey to understand how developers, students and researchers currently monitor and debug their Machine Learning and LLM workloads.
I'm particularly interested in the challenges people face when investigating training/inference performance, hardware utilization, memory bottlenecks and model-level behaviour.
The survey takes around 3–5 minutes, and your responses will help inform the design of a developer-focused monitoring and diagnostic dashboard.
Whether you're an ML engineer, researcher, student or someone experimenting with Transformers and LLMs, your experience would be valuable.
Participation is voluntary, and I'm not collecting names or email addresses.
Survey link: https://forms.gle/aRBBX8H3NEZtACXS9
Thanks a lot for helping out! I really appreciate it.
r/LLM • u/Formal-Grass-3173 • 1d ago
r/LLM • u/dinnerforbreakfast1 • 2d ago
Had a go at optimising Inkling on our runtime BaseRT
I got Inkling 2 Mini running 65% faster than it runs on Splash on a Mac Studio M5 Ultra.
These are the stats
| Splash 1.7.4 | Ours | Speedup | |
|---|---|---|---|
| Prefill 4k | 3,255 | 5,368 | 1.65× |
| Prefill 512 | 2,858 | 3,741 | 1.31× |
| Decode, single stream 512 | 129.2 | 139.8 | 1.08× |
To try yourself with Inkling 2 mini
brew install basecompute/tap/basert
basert serve basecompute/Inkling-2-Minir/LLM • u/CoffeePlayful8012 • 2d ago
Queria compartilhar a jornada de um projeto que venho construindo sozinho há um bom tempo — o ATRAKTA — porque acho que falta gente falando sobre o lado real (e feio) de tentar colocar agentes de IA em produção sem depender só de prompt.
Como tudo começou O projeto não nasceu num paper nem num pitch deck. Nasceu dentro de casa, observando a rotina de uma criança autista. Na prática, você aprende rápido que regulação não é contenção bruta: erguer um muro só gera atrito ou bloqueio. O que funciona é oferecer uma âncora previsível e reconduzir o sistema de volta para uma zona segura sem destruir a autonomia.
Quando comecei a colocar agentes de IA para rodar em negócios reais, bati de frente com o mesmo problema. Quase todo guardrail do mercado hoje é um "muro": ou você entope o system prompt de regras, ou coloca outro LLM (probabilístico) para julgar o primeiro. Em conversas curtas parece funcionar. Em produção, com vários turnos e usuários reais, falha em silêncio, custa caro e adiciona latência.
A virada para Teoria de Controle Em vez de tentar policiar uma caixa-preta probabilística com outra caixa-preta, fui atrás de Teoria de Controle e Sistemas Dinâmicos. A ideia passou a ser tratar a conversa como uma trajetória vetorial no tempo:
O choque de realidade em produção (o que ninguém mostra em demo) Construir no laboratório é lindo; colocar no ar na AWS rodando em CPU barata é outra história. Alguns tapas que tomei no caminho:
onnx_int8 em CPU (multilingual-e5-large-instruct + bge-reranker). Só auditando o sistema vivo descobri que constantes fixas herdadas do FP32 deixavam sensores literalmente cegos (0/24) e que um fallback silencioso estava rodando o motor antigo em produção.import torch perdidos só para ajustar threads estavam puxando dezenas de MB de PyTorch ocioso no container de produção.Onde o projeto está hoje Hoje a arquitetura se dividiu em três frentes:
No caminho, o projeto entrou no NVIDIA Inception, foi homologado em incubadora e agora estou conversando com universidades/ICTs para atacar justamente esses problemas abertos de calibração em tráfego real.
Ainda tem muita estrada pela frente e mais perguntas do que respostas — principalmente sobre como medir a "saúde dinâmica" de uma LLM sob perturbação. Se alguém aqui também trabalha com runtime monitoring, sistemas dinâmicos ou sofre com guardrails em produção, adoraria trocar ideia nos comentários.
r/LLM • u/wasl-app • 2d ago
MoSV (Mixture of Steering Vectors) teaches a model new habits without changing its weights. Small experts (one per topic) sit beside 3 layers, and a linear router picks one expert, or none, for every token. The result is one GGUF.
Example habit: when debugging, "say how to confirm each cause".
How it's trained (no RL): the base model answers prompts while told the habit rules. The experts then learn to give those same answers without being told. About 900-1,300 answers per model, 7 topics. On Qwen3-4B each topic adds about 6 MB.
Results on 286 held-out prompts (base vs MoSV, plain prompts, 4 yes/no habit checks + 1 soundness check per answer)
Model Habit checks: better / worse / same Soundness passes, base → MoSV Qwen3-4B (Q8_0, 4.33 GB) 218 / 9 / 59 206 → 227 Gemma 4 12B (QAT Q4_0, 7.05 GB) 186 / 20 / 80 252 → 241


What went wrong: Gemma shows the habits more often but passes the soundness check less often. The experts copy the told answers, including their faults. On the test prompts, Gemma passed 252 plain, 238 when told the rules, 241 after training. The pipeline now tests the rules first and skips topics that fail. The published models were trained before that check. One drop (Gemma, performance topic) is still unexplained.
Read the numbers with care
The judge is one LLM (Claude Haiku), one verdict per answer. No human reading. Checks measure the taught habits, not factual accuracy. Some habits were barely learned. Test prompts come from the same sources as training, and had been used on earlier runs. Answers got much shorter on most topics. Not compared against LoRA. English only. Built on 2x RX 9070 XT (Windows, ROCm + Vulkan). Tested only with a llama.cpp fork build; stock llama.cpp, NVIDIA and Linux are untested. Links
Code, paper, all numbers: https://github.com/mhndayesh/MoSV-Mixture-of-Steering-Vectors Qwen3-4B GGUF: https://huggingface.co/mhndayesh/MoSV-Qwen3-4B Gemma 4 12B GGUF: https://huggingface.co/mhndayesh/MoSV-Gemma-4-12B The idea is adapted from "RL Post-Training in Diffusion Transformers Is Activation Steering" (https://arxiv.org/abs/2611.26627).
Research project, not a product. If you try the GGUFs on another llama.cpp build, I'd like to hear whether they load.
MoSV (Mixture of Steering Vectors) teaches a model new habits without changing its weights. Small experts (one per topic) sit beside 3 layers, and a linear router picks one expert, or none, for every token. The result is one GGUF.
Example habit: when debugging, "say how to confirm each cause".

How it's trained (no RL): the base model answers prompts while told the habit rules. The experts then learn to give those same answers without being told. About 900-1,300 answers per model, 7 topics. On Qwen3-4B each topic adds about 6 MB.
Results on 286 held-out prompts (base vs MoSV, plain prompts, 4 yes/no habit checks + 1 soundness check per answer)
| Model | Habit checks: better / worse / same | Soundness passes, base → MoSV |
|---|---|---|
| Qwen3-4B (Q8_0, 4.33 GB) | 218 / 9 / 59 | 206 → 227 |
| Gemma 4 12B (QAT Q4_0, 7.05 GB) | 186 / 20 / 80 | 252 → 241 |


What went wrong: Gemma shows the habits more often but passes the soundness check less often. The experts copy the told answers, including their faults. On the test prompts, Gemma passed 252 plain, 238 when told the rules, 241 after training. The pipeline now tests the rules first and skips topics that fail. The published models were trained before that check. One drop (Gemma, performance topic) is still unexplained.
Read the numbers with care
Links
The idea is adapted from "RL Post-Training in Diffusion Transformers Is Activation Steering" (https://arxiv.org/abs/2611.26627).
Research project, not a product. If you try the GGUFs on another llama.cpp build, I'd like to hear whether they load.MoSV (Mixture of Steering Vectors) teaches a model new habits without changing its weights. Small experts (one per topic) sit beside 3 layers, and a linear router picks one expert, or none, for every token. The result is one GGUF.
Example habit: when debugging, "say how to confirm each cause".
[IMAGE 1: 1_architecture.png]
How it's trained (no RL): the base model answers prompts while told the habit rules. The experts then learn to give those same answers without being told. About 900-1,300 answers per model, 7 topics. On Qwen3-4B each topic adds about 6 MB.
Results on 286 held-out prompts (base vs MoSV, plain prompts, 4 yes/no habit checks + 1 soundness check per answer)
Model Habit checks: better / worse / same Soundness passes, base → MoSV
Qwen3-4B (Q8_0, 4.33 GB) 218 / 9 / 59 206 → 227
Gemma 4 12B (QAT Q4_0, 7.05 GB) 186 / 20 / 80 252 → 241
[IMAGE 2: 2_habits.png]
[IMAGE 3: 3_guard.png]
What went wrong: Gemma shows the habits more often but passes the soundness check less often. The experts copy the told answers, including their faults. On the test prompts, Gemma passed 252 plain, 238 when told the rules, 241 after training. The pipeline now tests the rules first and skips topics that fail. The published models were trained before that check. One drop (Gemma, performance topic) is still unexplained.
Read the numbers with care
The judge is one LLM (Claude Haiku), one verdict per answer. No human reading.
Checks measure the taught habits, not factual accuracy. Some habits were barely learned.
Test prompts come from the same sources as training, and had been used on earlier runs.
Answers got much shorter on most topics.
Not compared against LoRA. English only.
Built on 2x RX 9070 XT (Windows, ROCm + Vulkan). Tested only with a llama.cpp fork build; stock llama.cpp, NVIDIA and Linux are untested.
Links
Code, paper, all numbers: https://github.com/mhndayesh/MoSV-Mixture-of-Steering-Vectors
Qwen3-4B GGUF: https://huggingface.co/mhndayesh/MoSV-Qwen3-4B
Gemma 4 12B GGUF: https://huggingface.co/mhndayesh/MoSV-Gemma-4-12B
The idea is adapted from "RL Post-Training in Diffusion Transformers Is Activation Steering" (https://arxiv.org/abs/2611.26627).
Research project, not a product. If you try the GGUFs on another llama.cpp build, I'd like to hear whether they load.
r/LLM • u/retepFang • 2d ago
In the era of AI, we can access all kinds of closed source files via mcp. But wouldnt it be much more direct to have everything as HTML or XML files instead, enabling better accessibility for AI while keeping formatting.
Is there any reason to still use word documents over HTML?
r/LLM • u/ClickOk5811 • 2d ago
When you stack many layers, the signal can vanish or explode before it reaches the end — or the gradients can do the same on the way back. Batch normalization helps, but it does not remove the need for a sensible starting point. If you initialize every layer with the same variance, activations either shrink to zero or grow without bound as depth increases.
Xavier/Glorot initialization addresses this by scaling the initial weights so that the variance of activations stays roughly constant across layers. For a layer with n inputs and m outputs, weights are drawn from a uniform distribution:
U(-sqrt(6 / (n + m)), sqrt(6 / (n + m)))Or from a normal distribution with variance 2 / (n + m). The intuition is simple: keep the forward pass stable so the backward pass has something to work with.
He initialization is the ReLU-specific variant, doubling the variance because half the units are zeroed out:
N(0, 2 / n)I have not run a controlled comparison myself on modern architectures, so I can not claim exact numbers for transformers or convnets today. But the principle has not changed: if you initialize poorly, no optimizer fixes it in the first few steps, and batch norm only masks the symptom after the first forward pass.
Question: Do you still tune initialization manually in your training runs, or do you rely entirely on framework defaults and batch norm to absorb any problems?
r/LLM • u/Adventurous_Land5003 • 2d ago
Long story short, i need to find something that can make me a convincing enough looking document that looks similar to the document containing the results a drug test lab sends you when you go in to drug test for a job or whatever. I have a real one to include with the prompt, but all the major ones so far seem unwilling to even entertain what I'm asking.
Look i know it's kinda fucked up, but this isn't for a job or legal reasons or anything. I want to be able to show my family and my wife a clean drug test before Christmas, but unfortunately, full disclosure, I'm an addict and I'm struggling to stay straight for any significant amount of time.
Tl;dr: need an LLM that can make documents that look convincing enough to make somebody with no experience reading the actual documents happy and convinced. I know, I'm a scumbag, but at the end of the day, i just want my family to have a stress free Christmas.
Any further questions please let me know
Thanks
I was really enjoying unmetered chat mode, and now that they made the change, I don't know what to do.
r/LLM • u/iam_tyler_durden__ • 3d ago
kimi plus or GPT plus ?
r/LLM • u/dotdev_software • 3d ago
Are companies such as OpenAI and Anthropic using the same models as their customers when they claim they solved equations or made discoveries?
r/LLM • u/Tricky_School_4613 • 3d ago
For me on several Sonnet 5.5 perform much better compared to MAI CODE 2. It claims to have performance matching in terms to OPUS 5.5 but pretty much far from reality. Opinion of others on this?
r/LLM • u/Creative_Software782 • 4d ago
I'm learning about evaluation methods and trying to understand how much LLM-as-a-judge scores can be trusted.
From what I've seen, the judge tends to favour whichever answer comes first in a side-by-side comparison, and it often rates longer answers higher even when they aren't better. There's also some evidence that models prefer outputs from their own model family. And without a reference answer, the judge can't really check facts.
The usual advice seems to be: use simple pass/fail rubrics instead of 1–10 scores, swap the order of the answers and run it twice, and compare the judge against a small set of human-labelled examples.
Is that enough in practice, or do people still rely mostly on human review for anything important?
r/LLM • u/riemann_rein • 4d ago
I’m building an open-source test harness for a question: can an LLM solve more new theorem-proving tasks under the same compute budget if it can reuse proof steps that Lean verified on earlier tasks?
So far, 34 reference proofs compile in Lean CI. The policy comparisons still run in simulation, and the current held-out cases never allow a reusable step to fire. That means the results don’t tell us whether proof steps transfer. The next experiment will test that directly, with the same frozen model and budget in both arms and Lean checking all final proofs.
If you’ve built proof-search or inference benchmarks, what would you use as the strongest baseline for this comparison?
Repo: https://github.com/riemann-rain/rsi-cuda
Lean CI: https://github.com/riemann-rain/rsi-cuda/actions/runs/46438266844
r/LLM • u/Krissi_Stewart • 4d ago
Any developers or builders interested in voice AI, local models, and always-on AI experiences. If you're active in these communities, let's connect.
r/LLM • u/RubbishAsh • 4d ago
As I mentioned before, they are way too small. But that's not all-they are wasteful, worthless, and definitely out of business. In other words, they're literally a piece of shit.
I have a question for them: why are they doing nothing?
r/LLM • u/TLeeLucky • 4d ago
Looking for the best open source models to mold into an agent. Any input is appreciated.