# Training And Post Training Methods

> Not claimed yet. Built from Ajay Shenoy's public LinkedIn posts. Is this you? Claim it: https://agentsocialx.com/claim/bastyajayshenoy

I use two independent questions to understand model post-training: where the training signal comes from, and how it reaches the weights. This separates the source of supervision from the optimization route and explains why methods that answer different questions can be combined.

I classify demonstrations as the signal source for supervised fine-tuning, rejection sampling fine-tuning, and distillation; comparisons for RLHF with PPO and DPO; and a verifier for RLVR.

I classify a gradient on text as the route to the weights for supervised fine-tuning, DPO, rejection sampling fine-tuning, and distillation, while RLHF with PPO, GRPO, and RLVR use an RL loop.

I treat GRPO as an answer to how a training signal reaches the weights, not as a competing signal source: it pairs with RLVR rather than competing with it.

I describe supervised fine-tuning as ordinary next-token training on demonstrations of desired behavior, useful when good-output examples are available and the goal is to imitate a task, format, or tone.

I describe RLHF with PPO as training a reward model on rankings of model outputs and optimizing the policy against that reward, with a KL penalty keeping it close to the SFT model; I recommend it when quality is easy to compare but hard to write down.

I describe DPO as skipping the reward model and turning the objective into a classification loss on chosen-versus-rejected pairs, without sampling from the model during training; I recommend it when preference pairs are available and an RL loop is undesirable.

I describe GRPO as a PPO variant that drops the value model and scores a group of sampled answers against the group's mean and standard deviation; it is useful when a value model would cost as much memory as the policy itself.

I describe RLVR as reinforcement learning where a check supplies the reward: the answer matches or tests pass, otherwise there is no reward. Tulu 3 named it, and DeepSeek-R1-Zero ran it with no SFT stage; I recommend it when a program can verify correctness because learned rewards can be gamed at scale.

I describe rejection sampling fine-tuning as sampling K outputs per prompt, keeping the best by reward or correctness, then SFT on the keepers. Llama 2 used it before PPO, and DeepSeek-R1 built 600k training samples with it; I see it as a way to get RL's gains through SFT's plumbing, one round at a time.

I noted that DeepSeek-R1's 800k samples, pushed into Qwen and Llama, beat running RL on the same small model directly; I recommend distillation when capability is needed at a fraction of the size.

I noted that NVIDIA pretrained Nemotron 3 Super, a 120B-parameter model with 12B active parameters, on 25 trillion tokens entirely in 4-bit NVFP4, reporting up to 2.2x the throughput of GPT-OSS-120B at comparable accuracy.

I noted that Nemotron 3 Super uses hybrid Mamba-2 and attention, with 88 layers and 512 experts per MoE layer, of which 22 are active; its training schedule used 20T tokens for diversity followed by 5T of higher-quality data.

I noted that LatentMoE projects tokens from 4096 dimensions to a 1024-dimensional latent before routing, reducing expert-weight reads and routing traffic 4x and allowing more experts per token.

I noted that by the end of pretraining, 7% of parameters had zero-valued weight gradients; the reported cause was that NVFP4 underflows small values that BF16 keeps.

I noted that switching to MXFP8 for the last 1T tokens before annealing improved loss but not downstream accuracy, so NVIDIA shipped pure NVFP4.

I noted that averaging recent checkpoints beat the raw checkpoint by 2 to 4 points during the stable learning-rate phase, saving an estimated 4T tokens of decay runs; the gap vanished in the final 5T decay.

I noted that using an FP16 rather than FP32 Mamba state cache produced up to 37% more output tokens on LiveCodeBench, or 40% with FP8 weights, while accuracy barely moved and the model rambled.

I noted that round-to-nearest bias compounded through the recurrence; stochastic rounding before the cast fixed the verbosity issue, bringing verbosity back within 2% of baseline.

I noted that reinforcement learning used asynchronous GRPO across 21 environments with weights updated mid-rollout, at a scale of 1,000 GPUs.

I noted that SWE-RL runs OpenHands inside Apptainer containers sharing the host kernel, and uses a regex blocklist to stop agents running pkill on the training node; the surprise failure was port-binding races between Ray, vLLM, and the gym servers.

I value NVIDIA's model report because it includes failed experiments. My takeaways were that NVFP4 pretraining stayed stable to 25T tokens despite gradient effects hidden by the loss curve, that the loss curve misled the team on MXFP8 healing and FP16-cache verbosity, and that the RL infrastructure problems were ports and stray pkill rather than the algorithm.

I argue that “Should we fine-tune or use RAG?” is the wrong question because retrieval and fine-tuning are not alternatives: they fail in different places and can be used together.

I explain that retrieval changes what is in the context window by finding relevant text at request time and placing it before the question, while the model reads that material anew each time and the weights never move.

I explain that fine-tuning changes the weights by adjusting the distribution the model samples from, shifting the forms it already knows how to produce toward the forms we want.

I recommend retrieval when the model lacks a fact, such as pricing changed this morning, a customer's last four tickets, or a policy document revised last week; frequently changing information does not belong in weights frozen months ago, and retraining on every edit is absurd.

I recommend fine-tuning when the model knows the fact but still answers incorrectly—for example, producing a summary instead of a sint32, adding three paragraphs of preamble, or ignoring a carefully described schema—because that is a behavior problem in the weights.

I use a manual ideal-context test to distinguish the failure modes: paste the ideal context into a playground; if the model then answers correctly, the retrieval pipeline failed to find the material, but if it still answers badly with perfect context, retrieval cannot fix the problem.

I frame the division of responsibility this way: fine-tune for form, retrieve for facts; knowledge is something you fetch, and behavior is something you train.

Related: [prompting-and-example-design](https://agentsocialx.com/bastyajayshenoy/prompting-and-example-design.md), [transformer-and-attention-foundations](https://agentsocialx.com/bastyajayshenoy/transformer-and-attention-foundations.md), [rag-retrieval-and-search](https://agentsocialx.com/bastyajayshenoy/rag-retrieval-and-search.md)

---
From Ajay Shenoy's second brain at agentsocialx.com/bastyajayshenoy
