anshuman retweeted
INFERENCE is all you need🔥
working on this detailed blog on KV Cache Engineering for Agentic Inference
starting from basics we are gonna explore in DEPTH the role KV Cache and tradeoffs associated with it in production settings
stay tuned.
anshuman retweeted
I put together a comprehensive resource list for learning model post-training and building useful applications.
now i'll be sharing the resources one by one.
this is my post-training resources series.
save this as your starting point. links in thread 🧵
anshuman retweeted
NVIDIA released a transformer that can decode in auto-regressive and diffusion mode.
That means INSANELY FAST INFERENCE.
I was curious if i post-train a model in auto-regressive mode, do gains carry over to diffusion decoding mode?
turns out it does:
heyyanshuman.com/posts/rl_ar…
anshuman retweeted
This is probably how it will play out for enterprise AI needs
Replying to @ccatalini
The market for intelligence splits three ways.
1. Frontier generalists (closed) take the top of the demand curve.
2. Low-cost generalists (open) run most tokens.
3. Enterprises worried about disintermediation scale frontier specialists: open models plus proprietary context.
anshuman retweeted
docs are the first product a developer touches
so we rebuilt ours
six models, one place to build with them. go make something with voice
ps: increase the volume a bit :)
anshuman retweeted
learn about inference engineering as fast and deep as you can
i am literally giving it on silver platter, a detailed worklog of optimizing GEMM in CUDA.
in this piece:
> start with a naive implementation
> go on to identify and quantify the performance issues. > explore the concept of online softmax
> implement the kernel quantify the gains in terms of memory & FLOPs
> apply the coalesced memory pattern
> again quantify the gains in FLOPs, Comms, and Memory
> write the CUDA code.
read it here:
athleticcoder21.github.io/in…
anshuman retweeted
inference is all you need
wrote a detailed worklog of optimizing Softmax kernel in CUDA.
in this piece:
> start with a naive implementation
> go on to identify and quantify the performance issues. > explore the concept of online softmax
> implement the kernel quantify the gains in terms of memory & FLOPs
> apply the coalesced memory pattern
> again quantify the gains in FLOPs, Comms, and Memory
> write the CUDA code.
read it here:
heyyanshuman.com/posts/makin…
anshuman retweeted
inference is future.
tried going as much in detail as possible for the writing GEMV kernel in CUDA,
hopefully it will be a good read. ciao!
heyyanshuman.com/posts/makin…
anshuman retweeted
I'll just add to it: even before @nanbeige , Bytedance showed that looped transformer work in their ouro paper
ouro-llm.github.io/
an interesting conclusion from their experiment was that a looped model was outperforming models roughly 2.5x their size.
it would be tempting to think that looping compresses ~2-3x more intelligence per parameter, but subsequent ablations and papers found that the knowledge/intelligence per parameter remains same (whatever that parameter budget can encode) but it's looping -- latent thinking that brings out more out of model, just like Reasoning which is an emergent property for a model, and RLVR teaches model to use it's world knowledge better, looped transformer (trained entirely via pre training) not only "learns" but also learns to "think" and how to think in pretraining stage,
A lot of hype around OpenAI's Astra model here on my timeline today. Apparently, this goes back to a new article from The Information, which said Astra is a "recurrent depth or looped transformer".
It's always interesting to read about new or different approaches (including rumors about what the closed labs may be up to), but let's debunk this a bit.
About 2 months ago, I shared the architecture details of Nanbeige, for example, where "Nanbeige4.2-3B is pretrained from scratch on 28T tokens with a Looped Transformer that reuses the layer stack to increase capacity without adding parameters."
Yes, that's it. The looped transformer idea is just reusing layers in the transformer block.
In the case of Nanbeige, the main idea is to reuse the same 22-layer stack (=transformer block) twice instead of once. So, effectively it extends the 22-layer architecture to 44 layers, but without duplicating the weights.
In simple terms, this roughly doubles the size of the model (if we ignore the embedding and output layers for a second). But instead of requiring 2x the storage and RAM to host this model, it stays at the same size since we reuse the components. However, it's almost 2x as expensive in terms of compute, because we run the embedded text through almost 2x as many layers.
Why? In the Nanbeige 4.2 technical report, the researchers found that two passes gave the best trade-off and retained about 75% of the token efficiency of a standard architecture. (More passes gave barely any gains but made the training much slower and much more expensive.)
While, as far as I know, Nanbeige 4.2 is the first notable open-weight model that adopted this approach, the idea goes back to the NeurIPS paper "Mixture-of-recursions: Learning dynamic recursive depths for adaptive token-level computation". Actually, this paper proposes a mechanism that is a bit more sophisticated by adding a learned router that determines whether each token receives one, two, or more passes. So, easy tokens can exit early while harder tokens receive additional computation.
In sum, Astra may be a really good model, but this shouldn't be about this "looped transformer aspect," which is just a tiny architectural tweak.
Also, the statement "the new technique works in a way that obscures some or all of the AI's reasoning, otherwise known as 'chain-of-thought'" is not necessarily true with respect to the looped transformer method. It's possible that The Information journalist refers to some other technique or misunderstood the looped transformer method.
Reusing layers does not by itself suppress visible chain of thought. It adds computation in hidden states before the next token is emitted, just as ordinary transformer layers do.
But based on the information we have, the only plausible interpretation here is that if a model uses more of these recurrent passes, it may need to generate fewer intermediate reasoning tokens. So then more of its computation happens in latent activations that cannot be read as text. But we would get the same effect if we were scaling up the model size, like GPT 5.6 Luna -> GPT 5.6 Sol.
anshuman retweeted
okay, so i was diving into the rollouts generated by qwen3.5 4B, here are some findings
(given model has access to only api_search and api_fetch tool at any given point of time)
> model is looking to gather information it needs to address query but ends up burning tokens and exhausts upper cap of 50 turns in getting a query that actually returns functions that can help model clear ambiguity.
> in the partially succeeded rollout (score this way was 17), where the model did discover the correct tool, it would eventually fail to solve that particular task, eg.
- (sales subset) example id 504: Qwen found and used the correct Salesforce update endpoint. It updated the wrong Marcus Wong.
- (sales subset) example id 503: Qwen found and used the CampaignMember endpoint. It enrolled prohibited people because it skipped the policy.
- (sales subset) example id 1204: even knowing the Facebook photo endpoint does not tell it which image is eligible; it must retrieve Gmail policy + Sheet rows first.
so my takeaway is that entire problem breaks down to two subproblems:
1. tool discovery (has to be token efficient)
2. the core policy i.e.
Prompt
> infer what information is missing
> search for a capability to retrieve it (basically 1st subproblem)
> call that capability
> interpret returned observation
> identify what remains uncertain
> retrieve more evidence
> choose target(s)
> execute minimal writes
> verify end state
> finish
the moment we break the problem, it is clear that it is a variant of computer use problem.
the model needs to learn the ReACT loop. that's it. that's the optimization objective.
> be me
> bullish on small models
> homie tells about automation bench
> mfw fable score 31.8
> mfw how would qwen3.5 do
> burns $10 to eval 4B
> mfw it scores only 1.83
> panikk
> enterprise burining $$$ on fable
> mfw this is Smol Models as Service opportunity
> gets excited
teapaw.org/athletic_coder/status/…
anshuman retweeted
> be me
> bullish on small models
> homie tells about automation bench
> mfw fable score 31.8
> mfw how would qwen3.5 do
> burns $10 to eval 4B
> mfw it scores only 1.83
> panikk
> enterprise burining $$$ on fable
> mfw this is Smol Models as Service opportunity
> gets excited
teapaw.org/athletic_coder/status/…
anshuman retweeted
Can’t stress it enough, Almost all of infra optimisation boils down to overlapping FLOPs with Comms.



























