r/LLM • • 1h ago

MiniMind v3: 64M LLM from scratch in 2 hours.

Thumbnail
github.com
2 Upvotes

r/LLM • • 11h ago

What’s the best coding model as of Dec 5, 2026?

4 Upvotes

As the title states. If you had to buy a $100+ to do some building, what model would you go with?


r/LLM • • 5h ago

How much attention can we actually skip? I got 4.27x faster prefill at 660K Inkling-2-Mini and nearly 2x on Qwen3.8-27B

0 Upvotes

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.


r/LLM • • 16h ago

LLM model Crystallized vs Liquid intelligence

1 Upvotes

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 • • 1d ago

You don't need 24 GB VRAM for a 30B model. Ran it on 8 GB, here is how

48 Upvotes

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:

  • it is a MoE model. 30B total, but for each token only about 3B are used. Rest of the experts are sitting idle
  • so you dont keep all experts on the GPU. Most of them stay on CPU side and get read from RAM or disk when needed
  • a small cache in VRAM (about 4.5 GB here) keeps the experts that come again and again
  • and the next experts are loaded a little before they are needed (prefetch), so the GPU is not waiting

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):

  • chat: 19.5 vs 14.3 tokens/s
  • long answer: 20.0 vs 12.2 tokens/s
  • code: 4.3 vs 3.8 tokens/s (code is slow on both)
  • prompt processing is not better, roughly same or a bit slower

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?


r/LLM • • 22h ago

Regarding Chariot LLM

0 Upvotes

How is it's architecture different from DeepSeek

Also is it open source with tunable parameters on hugging face


r/LLM • • 1d ago

How do you get open models to know when to search instead of answering from memory?

6 Upvotes

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 • • 1d ago

Major difference in credits consumed by different models

1 Upvotes

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 • • 1d ago

Alibaba released Qwen4-35B-A3B, a native 1-million-token context window and support for images and video

Thumbnail
ournews.live
2 Upvotes

r/LLM • • 1d ago

Short Survey (3–5 min): Understanding ML/LLM Monitoring and Debugging Experiences

1 Upvotes

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 • • 2d ago

Got Inkling 2 Mini run 65% faster than it runs on Splash

2 Upvotes

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.4OursSpeedup
Prefill 4k3,2555,3681.65×
Prefill 5122,8583,7411.31×
Decode, single stream 512129.2139.81.08×

To try yourself with Inkling 2 mini

brew install basecompute/tap/basert


basert serve basecompute/Inkling-2-Mini

https://github.com/basecompute/baseRT


r/LLM • • 2d ago

Do .doc files have a future?

2 Upvotes

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 • • 2d ago

De uma observação em casa até construir um gateway de governança para LLMs baseado em Teoria de Controle (a jornada real, incluindo onde o sistema quebrou em produção)

1 Upvotes

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:

  • Usar embeddings locais para medir a geometria da conversa contra âncoras de domínio.
  • Aplicar conceitos de estabilidade de Lyapunov, operadores de Koopman e calibração conformal para detectar quando o agente está saindo da bacia de atração — antes de alucinar ou vazar escopo.
  • Em vez de só bloquear, reconduzir o modelo de volta à âncora e emitir um recibo criptográfico (HMAC) de cada decisão.

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:

  • O abismo entre sintético e real: em benchmarks sintéticos, os sensores batiam AUC ~1.000. Quando rodei holdout real de produção (conversas reais multi-turno, sem vazamento), a AUC caiu para a faixa de 0.74 a 0.84. Foi um banho de água fria necessário — mostrou que o problema real não é engenharia de código, é pesquisa de calibração estatística.
  • Bugs silenciosos de quantização: para o gateway ser viável financeiramente sem GPU dedicada, migrei toda a inferência dos sensores para 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.
  • Higiene de RAM: só nesta semana percebi que dois 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:

  1. ATRAKTA Remoto: gateway multi-tenant rodando em produção na AWS (100% ONNX INT8 em CPU), funcionando como um "biofeedback" externo sobre qualquer LLM.
  2. ATRAKTA Local: pilha white-box validada em GPU (NVIDIA L4) intervindo direto no estado do modelo para ambientes regulados.
  3. Labs: onde estou começando a estudar o comportamento dos modelos depois de serem reconduzidos — se mantêm potência, se degradam, como respondem a diferentes âncoras.

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 • • 2d ago

I added per-topic steering experts to Qwen3-4B and Gemma 4 12B. Results, including where it got worse " moVC"

1 Upvotes

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)

ModelHabit checks: better / worse / sameSoundness passes, base → MoSV
Qwen3-4B (Q8_0, 4.33 GB)218 / 9 / 59206 → 227
Gemma 4 12B (QAT Q4_0, 7.05 GB)186 / 20 / 80252 → 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

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 • • 2d ago

Weight initialization still matters, even with batch norm

1 Upvotes

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 • • 2d ago

What model to use, and what to put in the prompt to make it capable of generating a document *inspired by* the following:

0 Upvotes

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


r/LLM • • 3d ago

What is the best provider for 2027 now that ChatGPT is ruined?

3 Upvotes

I was really enjoying unmetered chat mode, and now that they made the change, I don't know what to do.


r/LLM • • 3d ago

which plan is apt for cybersecurity ?

1 Upvotes

kimi plus or GPT plus ?


r/LLM • • 3d ago

Are LLM providers using the same models

1 Upvotes

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 • • 3d ago

Sonnet 5.5 seems performing better than MAI CODE 2

0 Upvotes

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 • • 4d ago

How reliable is LLM-as-a-judge for evaluating model outputs?

1 Upvotes

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 • • 4d ago

Can an LLM reuse Lean-verified proof steps without retraining?

1 Upvotes

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 • • 4d ago

Voice AI, local models, and always-on AI experiences

0 Upvotes

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 • • 4d ago

Best Open Source Models?

1 Upvotes

Looking for the best open source models to mold into an agent. Any input is appreciated.


r/LLM • • 4d ago

Instructions & Skills for High-Coherence Work

1 Upvotes

I published to transition LLMs from Probabilistic Prediction to Sovereign Projection.

Strip the noise and increase precision. Reduces token usage by about 50%. Models stop breaking code when making edits.

https://github.com/mysteryx93/Coherent-Agent-Architecture

Codex used to fix one thing and break two; not anymore.

Enjoy!