Explore the research collection
2 entries · Follow this search
- Paper
Reasoning From Scratch: RLVR Round 2 — GRPO Stabilization (Clipped Policy Ratios, KL Loss, Format Rewards)
Sebastian Raschka's ~106-minute "RLVR round 2" video in the Build a Reasoning Model (From Scratch) series (companion to his July 2026 Manning book; code at github.com/rasbt/reasoning-from-scratch). A practical guide to stabilizing GRPO beyond the baseline round-1 implementation: interpreting GRPO training metrics, running longer training jobs with Python scripts, plotting training logs, and diagnosing unstable training. Core stabilizers covered with implementations and results: clipped policy ratios to limit oversized policy updates, a KL loss term against reward hacking (plus the limitations of the simplified KL estimator), and format rewards with <think> tags — including adding special tokens to the tokenizer and rewarding format only for correct answers. Diagnostics: tracking advantage statistics, computing and interpreting policy entropy in PyTorch, and analyzing advantage/entropy metrics together. Also evaluates checkpoints on MATH-500 and closes with further GRPO improvements from the research literature plus distillation as the next step. Key caution from the series: the baseline GRPO run takes Qwen3-0.6B from 15.2% to 47.4% on MATH-500 in 50 steps, but longer training can degrade accuracy; reward alone is an insufficient signal since it can rise via reward hacking while held-out capability falls.
- Post
Language Models for Text Classification: From Bag-of-Words to Jev
Long-form visual guide and essay (2026-09-29) using the hype around Jev -- a proprietary fast,cheap,general-purpose text classifier from TypeSafe AI -- to tell the history of language models for text classification and analyze what Jev likely is. Covers pre-transformer baselines (bag-of-words plus naive Bayes/logistic regression,word embeddings,RNNs/LSTMs/ULMFiT,CNNs),transformers (BERT/ModernBERT,GPT-style decoders with a classification head,T5 text-to-text),a Jev overview (Choice/Noul/Score APIs; 96.47%/96.20% on IMDb test at low cost,comparable to fine-tuned ModernBERT without per-task fine-tuning,with an IMDb-test-contamination caveat; a Tetris real-time demo via the Choice API),how to retrofit a Jev-like API onto any BERT/GPT/T5 model with a single-output scoring head,an educated guess at Jev internals (ModernBERT-scale encoder,100% synthetic data,proprietary "Reinforcement Learning for Calibrated Decisions"),the RLCR public method,calibration techniques (temperature scaling,Brier loss),use cases (email sorting,prompt-injection prescreening,LLM judges,context building),Jev alternatives (GLiNER,Contrastive LMs,Laya),and OpenAI's Jev-like Decision API announced at DevDay 2026. Argues Jev's novelty is not fundamental but raises the bar for justifying fine-tuned specialist classifiers and could make agent harnesses faster and cheaper. Author is not affiliated with Jev; not an endorsement.