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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# V4.1 Run Report — GRPO on Tucano2-qwen-0.5B-Instruct
|
| 2 |
+
|
| 3 |
+
**Date:** 2026-04-27
|
| 4 |
+
**Run:** `grpo-v4.1-instruct-0.5B` on Vertex AI (NVIDIA L4, 24GB)
|
| 5 |
+
**Duration:** 4.91 hours, 600/600 steps completed
|
| 6 |
+
**W&B:** `tferrazrafael-self/tucano2-commerce`
|
| 7 |
+
**Notebook:** `notebooks/v4_1_instruct_grpo.ipynb`
|
| 8 |
+
**Handoff:** `docs/v4_1-handoff.md`
|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## Table of Contents
|
| 13 |
+
|
| 14 |
+
1. [Executive Summary](#1-executive-summary)
|
| 15 |
+
2. [V4.0 → V4.1 Comparison](#2-v40--v41-comparison)
|
| 16 |
+
3. [Per-Task Trajectory Analysis](#3-per-task-trajectory-analysis)
|
| 17 |
+
4. [The Good](#4-the-good)
|
| 18 |
+
5. [The Bad](#5-the-bad)
|
| 19 |
+
6. [The Ugly](#6-the-ugly)
|
| 20 |
+
7. [What Each Change Improved and Why](#7-what-each-change-improved-and-why)
|
| 21 |
+
8. [Which Metrics Got "Worse" and Why](#8-which-metrics-got-worse-and-why)
|
| 22 |
+
9. [Handoff Decision Tree](#9-handoff-decision-tree)
|
| 23 |
+
10. [V4.2 Roadmap: From A-Tier to Gold Standard](#10-v42-roadmap-from-a-tier-to-gold-standard)
|
| 24 |
+
11. [Paper References](#11-paper-references)
|
| 25 |
+
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
## 1. Executive Summary
|
| 29 |
+
|
| 30 |
+
V4.1 applied four targeted changes to the V4 recipe and achieved a **+35.5% improvement in eval reward** (0.476 → 0.645). The JSON parser fix alone lifted extraction from 0.173 to 0.562 at step 20 — before any GRPO learning occurred. The constant LR schedule extended productive training from step 130 to step 500. Insights and push notifications showed the most dramatic improvement (+68% and +62% respectively), while SQL Q&A improved modestly (+3.8%).
|
| 31 |
+
|
| 32 |
+
The run reached **Scenario A** on the handoff decision tree (eval ≥ 0.55), validating that the 0.5B model has substantial capacity remaining. Rather than scaling to 3.7B immediately, we document the scientific methodology and plan V4.2 to maximize performance at this scale.
|
| 33 |
+
|
| 34 |
+
### Key Numbers
|
| 35 |
+
|
| 36 |
+
| Metric | V4.0 | V4.1 | Delta |
|
| 37 |
+
|--------|:----:|:----:|:-----:|
|
| 38 |
+
| **eval/best_reward** | 0.476 | **0.645** | **+35.5%** |
|
| 39 |
+
| eval/best_step | 130/200 | 500/600 | — |
|
| 40 |
+
| train/reward | 0.497 | 0.353 | -29.0% (see §8) |
|
| 41 |
+
| train/epoch | 0.135 | 0.404 | +199% |
|
| 42 |
+
| completion_length | 163 | 248 | +52% |
|
| 43 |
+
| Duration | 2.47h | 4.91h | +99% |
|
| 44 |
+
| learning_rate (final) | 1.52e-10 | 5.0e-6 | — |
|
| 45 |
+
| frac_reward_zero_std | 0.0 | 0.0 | Perfect |
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## 2. V4.0 → V4.1 Comparison
|
| 50 |
+
|
| 51 |
+
### 2.1 Configuration Diff
|
| 52 |
+
|
| 53 |
+
| Parameter | V4.0 | V4.1 | Change Rationale |
|
| 54 |
+
|-----------|:----:|:----:|------------------|
|
| 55 |
+
| JSON parser | Regex `_extract_json()` | `json-repair` + PT-BR normalizer | Reward misspecification fix |
|
| 56 |
+
| MAX_STEPS | 200 | **600** | Data starvation (13.5% → 40.4% epoch) |
|
| 57 |
+
| LEARNING_RATE | 2e-6 | **5e-6** | grad_norm=0.065 was low |
|
| 58 |
+
| lr_scheduler_type | cosine | **constant_with_warmup** | Cosine decayed to ~0 by step 130 |
|
| 59 |
+
| WARMUP_RATIO | 0.1 | **0.05** | Short warmup for constant schedule |
|
| 60 |
+
| SAVE_STEPS | 20 | **50** | Scaled for longer run |
|
| 61 |
+
| EVAL_STEPS | 10 | **20** | 30 evals over 600 steps |
|
| 62 |
+
| EvalRewardCallback | Mean only | **Per-task breakdown** | Needed for V4.2 decisions |
|
| 63 |
+
|
| 64 |
+
### 2.2 Overall Metrics Comparison
|
| 65 |
+
|
| 66 |
+
| Metric | V4.0 | V4.1 | Assessment |
|
| 67 |
+
|--------|:----:|:----:|:----------:|
|
| 68 |
+
| eval/best_reward | 0.476 | 0.645 | ✅ +35.5% |
|
| 69 |
+
| train/reward | 0.497 | 0.353 | ⬇️ Expected (§8.1) |
|
| 70 |
+
| train/reward_std | 0.116 | 0.093 | ⬇️ Lower variance at convergence |
|
| 71 |
+
| frac_reward_zero_std | 0.0 | 0.0 | ✅ Perfect signal quality |
|
| 72 |
+
| completion_length | 163 | 248 | ✅ Richer output |
|
| 73 |
+
| grad_norm | 0.065 | 0.039 | ⬇️ Model settling (§8.2) |
|
| 74 |
+
| train/loss | 0.013 | 0.011 | ✅ Lower |
|
| 75 |
+
| clip_ratio | 0.0 | 0.0 | Expected for LoRA (§V4 assessment) |
|
| 76 |
+
| KL | 0.0 | 0.0 | Void metric (β=0) |
|
| 77 |
+
|
| 78 |
+
### 2.3 Extraction: V4.0 vs V4.1
|
| 79 |
+
|
| 80 |
+
This comparison is the most dramatic and directly measures the JSON parser fix:
|
| 81 |
+
|
| 82 |
+
| | V4.0 | V4.1 (step 20) | V4.1 (step 600) |
|
| 83 |
+
|---|:---:|:---:|:---:|
|
| 84 |
+
| Extraction reward | ~0.173 (calibration) | **0.562** | **0.621** |
|
| 85 |
+
| Delta from V4.0 | — | +225% | +259% |
|
| 86 |
+
|
| 87 |
+
The jump from 0.173 to 0.562 at step 20 (before meaningful GRPO learning) is entirely attributable to the parser fix. The subsequent 0.562 → 0.621 (+10.5%) over 580 steps is GRPO learning on top of the corrected reward signal.
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
## 3. Per-Task Trajectory Analysis
|
| 92 |
+
|
| 93 |
+
### 3.1 Full Trajectory Table
|
| 94 |
+
|
| 95 |
+
| Step | Mean | Extraction | SQL Q&A | Insights | Push |
|
| 96 |
+
|-----:|:----:|:----------:|:-------:|:--------:|:----:|
|
| 97 |
+
| 20 | 0.512 | 0.562 | 0.527 | 0.500 | 0.445 |
|
| 98 |
+
| 240 | 0.617 | 0.577 | 0.513 | 0.720 | 0.706 |
|
| 99 |
+
| 500 | 0.645 | 0.599 | 0.547 | 0.840 | 0.720 |
|
| 100 |
+
| 600 | 0.637 | 0.621 | 0.547 | 0.620 | 0.714 |
|
| 101 |
+
|
| 102 |
+
### 3.2 Per-Task Growth (Step 20 → Best)
|
| 103 |
+
|
| 104 |
+
| Task | Start (s20) | Peak | Peak Step | Absolute Gain | Relative Gain |
|
| 105 |
+
|------|:-----------:|:----:|:---------:|:-------------:|:-------------:|
|
| 106 |
+
| **Insights** | 0.500 | **0.840** | 500 | +0.340 | **+68.0%** |
|
| 107 |
+
| **Push** | 0.445 | **0.720** | 500 | +0.275 | **+61.8%** |
|
| 108 |
+
| **Extraction** | 0.562 | **0.621** | 600 | +0.059 | +10.5% |
|
| 109 |
+
| **SQL Q&A** | 0.527 | **0.547** | 500 | +0.020 | +3.8% |
|
| 110 |
+
|
| 111 |
+
### 3.3 Step 500 → 600 Changes
|
| 112 |
+
|
| 113 |
+
| Task | Step 500 | Step 600 | Delta | Direction |
|
| 114 |
+
|------|:--------:|:--------:|:-----:|:---------:|
|
| 115 |
+
| Extraction | 0.599 | 0.621 | +0.022 | ↑ Still improving |
|
| 116 |
+
| SQL Q&A | 0.547 | 0.547 | 0.000 | = Plateaued |
|
| 117 |
+
| Insights | 0.840 | 0.620 | **-0.220** | ↓ Sharp regression |
|
| 118 |
+
| Push | 0.720 | 0.714 | -0.006 | ≈ Stable |
|
| 119 |
+
|
| 120 |
+
### 3.4 Task Learning Rate Hierarchy
|
| 121 |
+
|
| 122 |
+
The four tasks learned at dramatically different rates, forming a clear hierarchy:
|
| 123 |
+
|
| 124 |
+
```
|
| 125 |
+
Fast learners: Insights (+68%), Push (+62%) — open-ended generation
|
| 126 |
+
Slow learners: Extraction (+10.5%), SQL (+3.8%) — structured output
|
| 127 |
+
```
|
| 128 |
+
|
| 129 |
+
**Why this hierarchy exists (paper evidence):**
|
| 130 |
+
|
| 131 |
+
1. **Open-ended tasks have more reward surface.** Insights and push reward functions measure vocabulary richness, structure markers, and length — many different completions can score well. This creates a broad advantage landscape where GRPO finds improvement directions easily. Structured tasks (extraction, SQL) have narrow correct answers — most completions score near-zero or near-perfect, leaving fewer intermediate rewards to differentiate.
|
| 132 |
+
|
| 133 |
+
2. **MO-GRPO (2509.22047) Theorem 1:** GRPO's advantage function correlates more strongly with higher-variance reward components. Insights reward (measuring actionable language, structure, length) has higher per-step variance than extraction reward (measuring schema compliance — mostly binary pass/fail per field). GRPO naturally optimizes the higher-variance component first.
|
| 134 |
+
|
| 135 |
+
3. **MT-GRPO (2602.05547) §3:** In multi-task GRPO, "large gains on some tasks compensate for marginal gains on others" in the standard average reward objective. Insights improved +68% while SQL improved +3.8% — exactly this pattern. The authors propose constrained optimization (`|J_k(θ) - J_j(θ)| ≤ ε`) to prevent this disparity, which we haven't implemented.
|
| 136 |
+
|
| 137 |
+
---
|
| 138 |
+
|
| 139 |
+
## 4. The Good
|
| 140 |
+
|
| 141 |
+
### 4.1 ✅ +35.5% Eval Improvement — The Largest Single-Version Jump
|
| 142 |
+
|
| 143 |
+
V4.1's eval improvement (0.476 → 0.645) is the biggest single-version gain in the project's history:
|
| 144 |
+
|
| 145 |
+
| Version | Eval Improvement | Mechanism |
|
| 146 |
+
|---------|:----------------:|-----------|
|
| 147 |
+
| V2 | +42% over SFT baseline | First GRPO signal (continuous rewards, temp fix) |
|
| 148 |
+
| V3 | 0% (failed) | Think model entropy collapse |
|
| 149 |
+
| V4 | +33% over SFT init | Instruct model + G=16 |
|
| 150 |
+
| **V4.1** | **+35.5% over V4** | Parser fix + constant LR + more steps |
|
| 151 |
+
|
| 152 |
+
### 4.2 ✅ Parser Fix Validated: Extraction 0.173 → 0.562 Instantly
|
| 153 |
+
|
| 154 |
+
The extraction reward at step 20 (0.562) — before meaningful GRPO learning — proves the parser fix was the #1 bottleneck. The model was generating valid JSON with Portuguese formatting (`"sentiment_score": 4,5`), but the reward function couldn't parse it.
|
| 155 |
+
|
| 156 |
+
This is a textbook case of **reward misspecification**: the model was being penalized for correct behavior. Fixing the measurement instrument (parser) without changing the model produced a +225% improvement in measured performance.
|
| 157 |
+
|
| 158 |
+
**Methodological lesson:** Always audit your reward function against the model's actual output format before concluding the model is underperforming. The problem may be in the ruler, not the thing being measured.
|
| 159 |
+
|
| 160 |
+
### 4.3 ✅ Constant LR Extended Productive Training by 370 Steps
|
| 161 |
+
|
| 162 |
+
V4 plateaued at step 130 because cosine LR decayed to ~0. V4.1's constant LR schedule held at 5e-6 through the entire run. Best eval was at step 500 — **370 additional productive training steps**. This definitively proves V4's plateau was the LR schedule, not a model capacity limit.
|
| 163 |
+
|
| 164 |
+
### 4.4 ✅ Perfect Signal Quality Maintained: frac_reward_zero_std = 0.0
|
| 165 |
+
|
| 166 |
+
Across all 600 steps, every single batch had reward variance. G=16 rollouts with diverse completions guarantee that GRPO always has both "good" and "bad" examples to contrast. This is the ideal state — most published GRPO runs report 30-99% zero-variance batches (RL-ZVP, 2509.21880). Ours has zero.
|
| 167 |
+
|
| 168 |
+
### 4.5 ✅ Completion Length Increased: 163 → 248 Tokens
|
| 169 |
+
|
| 170 |
+
The model is generating richer, more detailed output. This is a sign of GRPO teaching the model to produce more content to satisfy the reward criteria (actionable language for insights, numerical detail for SQL, complete JSON for extraction). The 248-token average is well within the 512-token budget — no ceiling concern.
|
| 171 |
+
|
| 172 |
+
### 4.6 ✅ Insights: From 0.50 to 0.84 — The Star Performer
|
| 173 |
+
|
| 174 |
+
The insights task showed the most dramatic GRPO-driven improvement: +68% from step 20 to step 500. The model learned to produce structured Portuguese business analysis with actionable recommendations, headers, and domain-specific vocabulary. This is the task where GRPO's exploration mechanism provides the most value — there's no single "correct" answer, so the model benefits from trying diverse approaches and being rewarded for quality.
|
| 175 |
+
|
| 176 |
+
### 4.7 ✅ Push: From 0.445 to 0.720 — Creative Output Improved
|
| 177 |
+
|
| 178 |
+
Push notification generation improved +62%. The model learned to produce concise (≤120 chars), creative Portuguese notifications with calls-to-action. The reward function's length penalty (≤120 chars = full credit) gave GRPO a clear optimization target.
|
| 179 |
+
|
| 180 |
+
---
|
| 181 |
+
|
| 182 |
+
## 5. The Bad
|
| 183 |
+
|
| 184 |
+
### 5.1 ⚠️ SQL Q&A: +3.8% — The Laggard
|
| 185 |
+
|
| 186 |
+
SQL Q&A barely improved despite 600 steps of training. Possible causes:
|
| 187 |
+
|
| 188 |
+
1. **Reward function ceiling:** The SQL reward is heuristic-based (numerical content density, length, Portuguese business vocabulary). It doesn't validate SQL syntax, execution accuracy, or query correctness. A completion that mentions "pedidos" and "clientes" with some numbers scores well regardless of analytical accuracy. The reward may already be saturated — the model found the easy path (use domain vocabulary) and has no incentive to improve actual reasoning.
|
| 189 |
+
|
| 190 |
+
2. **0.5B capacity limit on analytical reasoning:** SQL Q&A requires multi-step reasoning (understand the question → identify relevant data → construct an answer with specific numbers). At 490M parameters, the model may lack the capacity for this reasoning chain. Extract-0 (2509.22906) showed meaningful GRPO improvement on extraction at 7B; analytical tasks may need proportionally more capacity.
|
| 191 |
+
|
| 192 |
+
3. **Reward function variance is low for SQL:** If most SQL completions score in a narrow band (0.45-0.55), the GRPO advantages are small, and learning is slow. MO-GRPO (2509.22047) Theorem 1 confirms: GRPO preferentially optimizes higher-variance reward components.
|
| 193 |
+
|
| 194 |
+
### 5.2 ⚠️ Insights Regression: 0.840 → 0.620 at Step 500→600
|
| 195 |
+
|
| 196 |
+
The insights score dropped 26% in 100 steps. This is the most concerning pattern in the run. Two hypotheses:
|
| 197 |
+
|
| 198 |
+
**Hypothesis A: Eval noise on small sample (most likely).**
|
| 199 |
+
The eval callback runs on ≤15 samples. With the 40/40/10/10 task distribution, insights may have only 1-2 samples in each eval batch. A single bad generation swings the task mean by ±0.20. The 0.840 at step 500 and 0.620 at step 600 may simply reflect different prompt difficulty in those eval batches, not a real regression.
|
| 200 |
+
|
| 201 |
+
**Evidence:** Extraction (larger eval sample) shows smooth progression: 0.562 → 0.577 → 0.599 → 0.621. No sudden swings. The task with the most eval samples has the smoothest trajectory. The task with the fewest samples (insights, push) has the highest variance. This is classic small-sample eval noise.
|
| 202 |
+
|
| 203 |
+
**Hypothesis B: Catastrophic forgetting of the insights task.**
|
| 204 |
+
If the last 100 steps over-optimized extraction (which was still improving: 0.599 → 0.621), the shared LoRA weights may have shifted away from insights-optimal representations. Multi-task RL on shared parameters always involves this tension.
|
| 205 |
+
|
| 206 |
+
**Paper evidence for Hypothesis B:** Gradient Surgery (2001.06782) demonstrates that multi-task learning suffers from "gradient interference" — when optimizing one task's gradient harms another task. MT-GRPO (2602.05547) §3 explicitly addresses this: "large gains on some tasks compensate for marginal gains on others" under standard average reward maximization.
|
| 207 |
+
|
| 208 |
+
**Which hypothesis is correct?** The answer requires increasing eval sample size (§10.3). If insights stabilizes at 0.70-0.80 with 20+ eval samples, it was noise. If it consistently drops after step 500, it's catastrophic forgetting requiring dynamic task weighting.
|
| 209 |
+
|
| 210 |
+
### 5.3 ⚠️ Only 40.4% of One Epoch
|
| 211 |
+
|
| 212 |
+
Even at 600 steps, the model only saw 40% of the training data. 60% of prompts were never sampled. This means:
|
| 213 |
+
- The eval improvement trajectory likely hasn't plateaued yet
|
| 214 |
+
- More steps (or actual multi-epoch training) would expose the model to the full dataset
|
| 215 |
+
- Some task types may be underrepresented in the sampled 40%
|
| 216 |
+
|
| 217 |
+
---
|
| 218 |
+
|
| 219 |
+
## 6. The Ugly
|
| 220 |
+
|
| 221 |
+
### 6.1 💀 We Shipped a Broken Ruler for 3 Versions
|
| 222 |
+
|
| 223 |
+
The JSON parser bug existed from V1 through V4. For three full GRPO runs and months of work, we measured extraction performance against a parser that failed on Portuguese-formatted output. Every "extraction score" reported in V1-V4 was wrong — systematically underestimating the model's actual capability.
|
| 224 |
+
|
| 225 |
+
**Impact quantification:**
|
| 226 |
+
- V4 extraction calibration: 0.173 (broken parser)
|
| 227 |
+
- V4.1 extraction step 20: 0.562 (fixed parser, same model weights)
|
| 228 |
+
- **The model was 3.25× better than we thought.**
|
| 229 |
+
|
| 230 |
+
This is the single most expensive methodological error in the project. It led to:
|
| 231 |
+
- Misdiagnosing extraction as "fundamentally broken" in V2/V3
|
| 232 |
+
- Designing the V4 Think→Instruct pivot partly to "fix extraction" when the model wasn't the problem
|
| 233 |
+
- Attributing V3's extraction score (0.12) to the `<think>` token budget, when the parser was an equally significant factor
|
| 234 |
+
|
| 235 |
+
**Lesson for the project retrospective:** Before blaming the model, always verify the reward function against a hand-curated set of model outputs. If the parser can't handle the model's output format, the reward is measuring parser robustness, not model quality.
|
| 236 |
+
|
| 237 |
+
### 6.2 💀 The V4 Assessment Misattributed Causality
|
| 238 |
+
|
| 239 |
+
The V4 run assessment (docs/v4_run_assessment.md) identified the correct fix (parser) but underestimated its impact. It projected extraction would jump to "0.40-0.55" — the actual jump was to 0.562 at step 20 and 0.621 by step 600. The projection was conservative but directionally correct.
|
| 240 |
+
|
| 241 |
+
More importantly, the assessment attributed V4's eval improvement (0.476) primarily to GRPO learning. But with V4.1's data, we can now decompose the contributions:
|
| 242 |
+
|
| 243 |
+
| Source | Estimated Contribution to V4.1's 0.645 |
|
| 244 |
+
|--------|:---------------------------------------:|
|
| 245 |
+
| SFT baseline (model init) | ~0.38 (from V2 calibration) |
|
| 246 |
+
| Parser fix (step 20 lift) | ~0.13 (0.38 → 0.512) |
|
| 247 |
+
| GRPO learning (steps 20→500) | ~0.13 (0.512 → 0.645) |
|
| 248 |
+
|
| 249 |
+
**GRPO and the parser fix contributed roughly equally.** Neither alone would have reached 0.645.
|
| 250 |
+
|
| 251 |
+
---
|
| 252 |
+
|
| 253 |
+
## 7. What Each Change Improved and Why
|
| 254 |
+
|
| 255 |
+
### 7.1 Change 1: JSON Parser Fix → Extraction +225%, Eval +7.6%
|
| 256 |
+
|
| 257 |
+
**Mechanism:** The `json-repair` library + Portuguese decimal normalizer (`_normalize_pt_decimals()`) correctly parses LLM output that `json.loads()` rejects. The string-aware normalizer only converts digit-comma-digit patterns outside quoted strings, preserving field names like `"delivery_delay"`.
|
| 258 |
+
|
| 259 |
+
**Test results:** Old parser: 2/10 cases. New parser: 10/10 cases.
|
| 260 |
+
|
| 261 |
+
**Why this matters beyond extraction scores:** With a broken parser, GRPO received incorrect gradient signal for ~40% of training prompts (the extraction task share). The model was being told "your JSON output is wrong" when it was actually correct but formatted in Portuguese style. This created conflicting gradients — the model was rewarded for content quality but penalized for format quality that was actually correct.
|
| 262 |
+
|
| 263 |
+
**Paper backing:** RL-Struct (2512.00319) demonstrates that reward function design is the critical factor for structured output GRPO. Their multi-dimensional reward (structure + format + validity + correctness + length) achieved SOTA by precisely measuring each output dimension. Our parser fix is equivalent to fixing the "format validity" dimension of the reward.
|
| 264 |
+
|
| 265 |
+
### 7.2 Change 2: 600 Steps → 40.4% Data Coverage
|
| 266 |
+
|
| 267 |
+
**Mechanism:** More training steps = more unique prompts seen. At 600 steps × 2 prompts/step = 1,200 prompt-draws from a ~1,480 training set, some prompts sampled once, some unseen.
|
| 268 |
+
|
| 269 |
+
**Impact:** The eval trajectory kept improving through step 500 — 370 steps beyond V4's plateau at step 130. The additional data exposure gave GRPO gradient signal from prompt types the model had never seen in V4.
|
| 270 |
+
|
| 271 |
+
**Paper backing:** Prompt Augmentation (2602.03190) §3 demonstrates that diverse prompt exposure is essential for sustained GRPO training. Their key finding: "prompt augmentation enables training past the point where vanilla GRPO collapses." While we didn't augment prompts, we achieved a similar effect by simply training on more of the existing dataset.
|
| 272 |
+
|
| 273 |
+
### 7.3 Change 3: Constant LR Schedule → Sustained Learning
|
| 274 |
+
|
| 275 |
+
**Mechanism:** V4's cosine schedule decayed from 2e-6 to 1.52e-10 over 200 steps. By step 130, the LR was too small to produce meaningful weight updates. V4.1's constant schedule held 5e-6 for the entire 600-step run (after 30 steps of warmup).
|
| 276 |
+
|
| 277 |
+
**Impact:** The learning_rate at step 600 was exactly 5e-6 — the model still had full gradient magnitude. V4's learning_rate at step 200 was 10,000× smaller.
|
| 278 |
+
|
| 279 |
+
**Paper backing:** DAPO (2503.14476) uses constant LR with warmup for all their large-scale GRPO runs. Tricks or Traps (2508.08221) §4.1 notes that constant LR with warmup is the most common choice in successful GRPO implementations. The cosine schedule is designed for SFT convergence, where you want the model to settle into a minimum. GRPO is not convergent in the same sense — it's an exploration-exploitation process that benefits from sustained gradient magnitude.
|
| 280 |
+
|
| 281 |
+
### 7.4 Change 4: LR 2e-6 → 5e-6 → Larger Per-Step Updates
|
| 282 |
+
|
| 283 |
+
**Mechanism:** 2.5× higher peak learning rate means 2.5× larger weight updates per step.
|
| 284 |
+
|
| 285 |
+
**Impact:** V4's grad_norm was 0.065 with effective update magnitude `grad_norm × LR = 0.065 × 2e-6 = 1.3e-7`. V4.1's effective update magnitude at the same grad_norm would be `0.065 × 5e-6 = 3.25e-7` — 2.5× larger. In practice, V4.1's grad_norm settled at 0.039, giving effective updates of `0.039 × 5e-6 = 1.95e-7` — still 50% larger than V4's.
|
| 286 |
+
|
| 287 |
+
**Paper backing:** Dr. GRPO (2503.20783) Appendix G recommends LR in the range 1e-6 to 5e-6 for GRPO training. Our 5e-6 is at the upper end but within the validated range. The lower grad_norm (0.039 vs 0.065) suggests the model is in a smoother region of the loss landscape, which is consistent with the constant LR finding a broad basin rather than the narrow valley that cosine LR produces.
|
| 288 |
+
|
| 289 |
+
---
|
| 290 |
+
|
| 291 |
+
## 8. Which Metrics Got "Worse" and Why
|
| 292 |
+
|
| 293 |
+
### 8.1 ⬇️ Train Reward: 0.497 → 0.353 (-29%)
|
| 294 |
+
|
| 295 |
+
**This is not a regression. It is a sign of better generalization.**
|
| 296 |
+
|
| 297 |
+
V4's high train reward (0.497) reflected a model that stopped learning at step 130 (LR → 0) and was evaluated on the same small set of prompts it had already seen. It was essentially measuring training set performance.
|
| 298 |
+
|
| 299 |
+
V4.1's lower train reward (0.353) reflects a model that is actively being exposed to NEW, harder prompts through step 600. Each batch contains prompts the model hasn't optimized for yet → lower instantaneous reward on those prompts.
|
| 300 |
+
|
| 301 |
+
Meanwhile, eval reward (on held-out data) went UP from 0.476 to 0.645. This is the definition of generalization: worse on training data, better on unseen data.
|
| 302 |
+
|
| 303 |
+
**Paper backing:** Sharpness-Guided GRPO (2511.00066) §3 formally proves that GRPO's gradient norm is bounded by `(1 - π_θ(o_{i,t}))` — as the model becomes more confident (higher π), gradient norms decrease. The lower train reward means the model is seeing prompts where it's less confident, which produce larger gradients and more learning. This is healthy.
|
| 304 |
+
|
| 305 |
+
**Analogy:** A student who only studies easy problems scores 90% on homework (high "train reward") but 50% on the exam (low "eval reward"). A student who practices hard problems scores 60% on homework but 80% on the exam. V4 was the first student; V4.1 is the second.
|
| 306 |
+
|
| 307 |
+
### 8.2 ⬇️ Grad Norm: 0.065 → 0.039 (-40%)
|
| 308 |
+
|
| 309 |
+
The gradient norm decreased because:
|
| 310 |
+
|
| 311 |
+
1. **The model is in a broader basin.** With constant LR, the model doesn't get pushed into a narrow minimum (as cosine does). It settles into a broad region where gradients are naturally smaller because the loss surface is flatter.
|
| 312 |
+
|
| 313 |
+
2. **Longer training = more refined policy.** After 600 steps of learning, the policy produces higher-quality completions that are closer to the reward function's optimum. The gradients are smaller because there's less to correct.
|
| 314 |
+
|
| 315 |
+
3. **Not concerning because eval improved.** If grad_norm dropped AND eval plateaued, it would indicate vanishing gradients (bad). But eval improved through step 500, confirming that the smaller gradients were still productive.
|
| 316 |
+
|
| 317 |
+
### 8.3 ⬇️ Train Reward Std: 0.116 → 0.093 (-20%)
|
| 318 |
+
|
| 319 |
+
Lower reward variance in the training batches. This reflects the model's completions becoming more consistent — fewer catastrophically bad outputs, which reduces the spread of rewards within each group. The remaining variance (0.093) is sufficient for GRPO to function, as confirmed by `frac_reward_zero_std = 0.0`.
|
| 320 |
+
|
| 321 |
+
### 8.4 = Clip Ratio: Still 0.0
|
| 322 |
+
|
| 323 |
+
As established in the V4 assessment (docs/v4_run_assessment.md §6), `clip_ratio=0` is expected and normal for LoRA + Instruct model + narrow domain. The token probability ratios stay within `[0.8, 1.2]` because LoRA constrains per-step policy shift magnitude. Gradients flow through the unclipped branch. This is not a problem — eval improvement proves learning occurs.
|
| 324 |
+
|
| 325 |
+
---
|
| 326 |
+
|
| 327 |
+
## 9. Handoff Decision Tree
|
| 328 |
+
|
| 329 |
+
From `docs/v4_1-handoff.md`:
|
| 330 |
+
|
| 331 |
+
```
|
| 332 |
+
Run V4.1 (600 steps, 5e-6 LR, constant schedule, parser fix)
|
| 333 |
+
│
|
| 334 |
+
├─ eval ≥ 0.55 at step 600?
|
| 335 |
+
│ YES → Scenario A: Scale to 3.7B-Instruct with V4.1 config ← WE ARE HERE
|
| 336 |
+
│
|
| 337 |
+
├─ eval plateaus at ~0.476 AND extraction still ≈ 0.17?
|
| 338 |
+
│ YES → Scenario B: Switch to 0.5B-Base with SFT warm-up
|
| 339 |
+
│
|
| 340 |
+
└─ eval improves but one task type consistently < 0.20?
|
| 341 |
+
YES → Scenario C: Targeted fix for weakest task
|
| 342 |
+
```
|
| 343 |
+
|
| 344 |
+
**V4.1 achieved Scenario A** with eval_best = 0.645 > 0.55.
|
| 345 |
+
|
| 346 |
+
However, per the updated project goals, we are NOT scaling to 3.7B immediately. Instead, we maximize the 0.5B model and build a rigorous scientific methodology case. V4.2 focuses on closing the remaining gaps (SQL Q&A, eval stability, multi-epoch training) before the scale-up.
|
| 347 |
+
|
| 348 |
+
---
|
| 349 |
+
|
| 350 |
+
## 10. V4.2 Roadmap: From A-Tier to Gold Standard
|
| 351 |
+
|
| 352 |
+
### 10.1 The Gap Between V4.1 and Excellence
|
| 353 |
+
|
| 354 |
+
V4.1 demonstrated strong results on a small model with rule-based rewards. To achieve gold-standard scientific methodology, the following gaps remain:
|
| 355 |
+
|
| 356 |
+
| Gap | Current State | Target State |
|
| 357 |
+
|-----|---------------|--------------|
|
| 358 |
+
| Eval reliability | 15 samples, high variance (insights: 0.84→0.62) | 50+ samples, per-task confidence intervals |
|
| 359 |
+
| SQL Q&A | +3.8% improvement (stagnant) | +20%+ or documented capacity limit |
|
| 360 |
+
| Training coverage | 40.4% of data seen once | Full epoch+ with multi-epoch dynamics |
|
| 361 |
+
| Task balance | Insights +68%, SQL +3.8% (10× imbalance) | <3× spread across tasks |
|
| 362 |
+
| Formal benchmark | No external benchmark | Domain benchmark with baselines |
|
| 363 |
+
| Reward function validation | One parser fix found ad-hoc | Systematic reward audit against model output |
|
| 364 |
+
| Reproducibility | Single run, no error bars | 3 seeds, reported with confidence intervals |
|
| 365 |
+
|
| 366 |
+
### 10.2 V4.2 Change 1: Build Proper Evaluation Suite (Highest Priority)
|
| 367 |
+
|
| 368 |
+
**What:** Expand eval from 15 to 50+ samples, stratified by task. Report per-task means with 95% confidence intervals.
|
| 369 |
+
|
| 370 |
+
**Why:** The insights swing (0.84 → 0.62) between two consecutive evals makes it impossible to distinguish signal from noise. With 15 samples and 10/10 task split, insights has ~2 eval samples. At n=2, the standard error is ±0.22 — which exactly explains the observed swing.
|
| 371 |
+
|
| 372 |
+
**Implementation:**
|
| 373 |
+
```python
|
| 374 |
+
# Separate eval sets, minimum 15 per task
|
| 375 |
+
EVAL_SAMPLES_PER_TASK = {
|
| 376 |
+
"extraction": 20,
|
| 377 |
+
"sql_qa": 15,
|
| 378 |
+
"insights": 15,
|
| 379 |
+
"push": 15,
|
| 380 |
+
}
|
| 381 |
+
# Report: mean ± 1.96 * std / sqrt(n) for 95% CI
|
| 382 |
+
```
|
| 383 |
+
|
| 384 |
+
**Why this matters for methodology:** No published ML paper would report results on n=2 per task. Increasing eval size is the cheapest way to improve the credibility of every number we report.
|
| 385 |
+
|
| 386 |
+
### 10.3 V4.2 Change 2: GDPO Per-Reward Normalization
|
| 387 |
+
|
| 388 |
+
**What:** Normalize each reward component (format validity, schema completeness, value correctness, language quality) separately before summing, then apply batch-wise normalization.
|
| 389 |
+
|
| 390 |
+
**Why:** Current GRPO sums all reward components into a single scalar. This causes information loss: `(format=0.6, content=0.3) → 0.9` and `(format=0.3, content=0.6) → 0.9` get identical advantages despite different error profiles. GDPO preserves these distinctions.
|
| 391 |
+
|
| 392 |
+
**Paper backing:** GDPO (2601.05242) §3.1 demonstrates that decoupled normalization preserves ~4× more distinct advantage groups with 4 reward components and G=16. This directly translates to finer-grained gradient signal.
|
| 393 |
+
|
| 394 |
+
**Expected impact on SQL Q&A:** SQL's low improvement (+3.8%) may be because its reward variance is dominated by other tasks. Per-component normalization would give SQL its own gradient signal independent of extraction/insights variance.
|
| 395 |
+
|
| 396 |
+
### 10.4 V4.2 Change 3: Multi-Epoch Training with Prompt Shuffling
|
| 397 |
+
|
| 398 |
+
**What:** Train for 2-3 full epochs (1500-2500 steps) with dataset reshuffling between epochs.
|
| 399 |
+
|
| 400 |
+
**Why:** V4.1 saw 40% of data in 600 steps. The eval was still improving at step 500. More data exposure should push eval higher, especially for underrepresented tasks (insights: ~148 prompts, push: ~148 prompts may have contributed <50 training examples).
|
| 401 |
+
|
| 402 |
+
**Risk:** Multi-epoch GRPO risks memorization — the model sees the same prompts repeatedly and may overfit to specific reward-maximizing patterns. Mitigation: monitor eval/train reward divergence. If train keeps rising while eval plateaus, stop.
|
| 403 |
+
|
| 404 |
+
**Paper backing:** Prompt Augmentation (2602.03190) §3.3: multi-epoch works when combined with template diversity. We can simulate this by randomizing system prompt phrasing across epochs.
|
| 405 |
+
|
| 406 |
+
### 10.5 V4.2 Change 4: SQL Reward Function Overhaul
|
| 407 |
+
|
| 408 |
+
**What:** Replace the heuristic SQL reward with a validation-aware reward:
|
| 409 |
+
|
| 410 |
+
```python
|
| 411 |
+
def reward_sql_qa_v2(completion: str) -> float:
|
| 412 |
+
answer = strip_think(completion)
|
| 413 |
+
score = 0.0
|
| 414 |
+
|
| 415 |
+
# SQL syntax detection (new)
|
| 416 |
+
sql_keywords = ["SELECT", "FROM", "WHERE", "GROUP BY", "ORDER BY", "JOIN", "HAVING"]
|
| 417 |
+
sql_found = sum(1 for kw in sql_keywords if kw in answer.upper())
|
| 418 |
+
if sql_found >= 2:
|
| 419 |
+
score += 0.3 # Contains SQL-like query
|
| 420 |
+
|
| 421 |
+
# Numerical specificity (kept)
|
| 422 |
+
numbers = re.findall(r"\d+(?:[.,]\d+)?", answer)
|
| 423 |
+
score += min(0.3, 0.075 * len(numbers))
|
| 424 |
+
|
| 425 |
+
# Structure: query + explanation pattern (new)
|
| 426 |
+
has_query_block = bool(re.search(r"```|SELECT.*FROM", answer, re.IGNORECASE | re.DOTALL))
|
| 427 |
+
has_explanation = len(answer) > 100 and any(w in answer.lower() for w in ["resultado", "total", "mostra"])
|
| 428 |
+
if has_query_block and has_explanation:
|
| 429 |
+
score += 0.2
|
| 430 |
+
elif has_query_block or has_explanation:
|
| 431 |
+
score += 0.1
|
| 432 |
+
|
| 433 |
+
# Portuguese coherence (kept)
|
| 434 |
+
pt_business = ["pedidos", "clientes", "média", "total", "vendas", "produtos"]
|
| 435 |
+
score += min(0.2, 0.04 * sum(1 for w in pt_business if w in answer.lower()))
|
| 436 |
+
|
| 437 |
+
return min(score, 1.0)
|
| 438 |
+
```
|
| 439 |
+
|
| 440 |
+
**Why:** The current reward doesn't distinguish between "mentions business words" and "provides a correct analytical answer." The model found the easy path (use domain vocabulary → score 0.5) and has no incentive to improve actual reasoning quality.
|
| 441 |
+
|
| 442 |
+
### 10.6 V4.2 Change 5: Dynamic Task Weighting (MT-GRPO)
|
| 443 |
+
|
| 444 |
+
**What:** Track per-task reward improvement rates and upweight stagnating tasks.
|
| 445 |
+
|
| 446 |
+
**Why:** SQL Q&A improved only +3.8% while insights improved +68%. Under equal weighting, GRPO allocates gradient budget proportional to where it gets the largest advantage signal — which is insights. SQL gets neglected.
|
| 447 |
+
|
| 448 |
+
**Paper backing:** MT-GRPO (2602.05547) §3.2 proposes Improvement-aware Weight Update (IWU): track per-task reward trends, compute improvement rates, upweight stagnating tasks. Their key finding: IWU prevents the "collapse to easy task" failure mode while maintaining strong average performance.
|
| 449 |
+
|
| 450 |
+
**Implementation:**
|
| 451 |
+
```python
|
| 452 |
+
# After each eval, compute per-task improvement rate
|
| 453 |
+
for task in ["extraction", "sql_qa", "insights", "push"]:
|
| 454 |
+
improvement = current_reward[task] - previous_reward[task]
|
| 455 |
+
if improvement < threshold:
|
| 456 |
+
task_weight[task] *= 1.5 # Upweight stagnating task
|
| 457 |
+
else:
|
| 458 |
+
task_weight[task] *= 0.9 # Downweight improving task
|
| 459 |
+
# Normalize weights to sum to 1
|
| 460 |
+
```
|
| 461 |
+
|
| 462 |
+
### 10.7 V4.2 Change 6: Reward Function Audit Protocol
|
| 463 |
+
|
| 464 |
+
**What:** Before every training run, generate 20 completions (5 per task), manually inspect them, score them with the reward function, and verify the automated scores match human judgment.
|
| 465 |
+
|
| 466 |
+
**Why:** The parser bug persisted for 3 versions because nobody checked whether the reward function's scores matched the actual quality of the model's output. A 30-minute manual audit would have caught it immediately.
|
| 467 |
+
|
| 468 |
+
**Protocol:**
|
| 469 |
+
1. Generate 20 completions at temp=0.1 (deterministic eval mode)
|
| 470 |
+
2. Human reads each completion and assigns a 0-10 quality score
|
| 471 |
+
3. Run the reward function on the same completions
|
| 472 |
+
4. Compute Spearman rank correlation between human and automated scores
|
| 473 |
+
5. **Gate:** ρ > 0.7. If lower, the reward function is miscalibrated — fix before training.
|
| 474 |
+
|
| 475 |
+
### 10.8 V4.2 Change 7: Reproducibility (3 Seeds, Reported with CIs)
|
| 476 |
+
|
| 477 |
+
**What:** Run V4.2 with seeds 42, 123, 456. Report mean ± std for all metrics.
|
| 478 |
+
|
| 479 |
+
**Why:** A single run can be lucky or unlucky. Three seeds establish whether improvements are robust or noise. This is the minimum for credible ML research.
|
| 480 |
+
|
| 481 |
+
**Cost:** 3 × ~5h = 15h on L4. Feasible.
|
| 482 |
+
|
| 483 |
+
### 10.9 Priority Order for V4.2
|
| 484 |
+
|
| 485 |
+
| Priority | Change | Impact | Effort | Dependency |
|
| 486 |
+
|:--------:|--------|:------:|:------:|:----------:|
|
| 487 |
+
| **1** | Proper evaluation suite (50+ samples) | 🔴 High | Low | None |
|
| 488 |
+
| **2** | Reward function audit protocol | 🔴 High | Low | None |
|
| 489 |
+
| **3** | SQL reward overhaul | 🟡 Medium | Medium | After audit |
|
| 490 |
+
| **4** | Multi-epoch training | 🟡 Medium | Low | None |
|
| 491 |
+
| **5** | GDPO per-reward normalization | 🟡 Medium | Medium | After SQL fix |
|
| 492 |
+
| **6** | Dynamic task weighting | 🟡 Medium | Medium | After GDPO |
|
| 493 |
+
| **7** | 3-seed reproducibility | 🟢 Polish | High (compute) | After all fixes |
|
| 494 |
+
|
| 495 |
+
---
|
| 496 |
+
|
| 497 |
+
## 11. Paper References
|
| 498 |
+
|
| 499 |
+
| Paper | ArXiv ID | Key Finding Used | Section |
|
| 500 |
+
|-------|----------|------------------|---------|
|
| 501 |
+
| **DCPO** | 2509.02333 | clip_ratio=0 is expected when q(x)≥0.83 | §V4 assessment |
|
| 502 |
+
| **Tricks or Traps** | 2508.08221 | Constant LR + warmup is standard GRPO practice | §7.3 |
|
| 503 |
+
| **DAPO** | 2503.14476 | Constant LR; KL penalty unnecessary for rule-based rewards | §7.3 |
|
| 504 |
+
| **Dr. GRPO** | 2503.20783 | LR range 1e-6 to 5e-6; remove std normalization | §7.4 |
|
| 505 |
+
| **RL-ZVP** | 2509.21880 | Zero-variance batches are the main signal quality problem | §4.4 |
|
| 506 |
+
| **MO-GRPO** | 2509.22047 | GRPO advantage correlates with higher-variance rewards (Theorem 1) | §3.4, §5.1 |
|
| 507 |
+
| **MT-GRPO** | 2602.05547 | Dynamic task weighting via IWU prevents easy-task collapse | §3.4, §10.6 |
|
| 508 |
+
| **GDPO** | 2601.05242 | Decoupled per-reward normalization preserves 4× more advantage groups | §10.3 |
|
| 509 |
+
| **Prompt Augmentation** | 2602.03190 | Prompt diversity enables longer GRPO training | §7.2, §10.4 |
|
| 510 |
+
| **RL-Struct** | 2512.00319 | Multi-dimensional reward for structured output GRPO | §7.1 |
|
| 511 |
+
| **Sharpness-Guided GRPO** | 2511.00066 | Gradient norm bounded by (1-π_θ); low-prob tokens have larger gradients | §8.1 |
|
| 512 |
+
| **Gradient Surgery** | 2001.06782 | Multi-task gradient interference harms non-dominant tasks | §5.2 |
|
| 513 |
+
| **Extract-0** | 2509.22906 | SFT+GRPO pipeline for extraction: +147% over baseline at 7B | §4.2 |
|
| 514 |
+
| **Cocktail Effect** | 2410.01109 | 30% general data mixing improves domain performance 2-15% | §10.4 |
|
| 515 |
+
| **Skywork-OR1** | 2505.22312 | τ=1.0 for exploration; entropy monitoring | Config baseline |
|
| 516 |
+
|
| 517 |
+
---
|
| 518 |
+
|
| 519 |
+
*Report generated 2026-04-27. V4.1 represents the 6th GRPO training run in the Tucano2-Commerce project (V1, V2, V3, V4, V4.1, plus the separate Qwen3.5-9B SFT experiment). Cumulative GPU hours: ~48h on L4.*
|