Research log Small Model Experimentation
GitHub

Qwen3.5-4B Pass@k Coverage RL

Cranking up randomness beat retraining for coverage

The one idea you need

To cover more coding problems, let the model take several tries at each and count a win if any one passes — like buying several lottery tickets. More variety across tries covers more. You can retrain it to diversify, or just turn up its randomness dial.

The question

If you want a model to solve more coding problems across a handful of tries, is it worth retraining it to diversify, or just cranking up randomness?

What we found

No. Retraining the model to spread its tries across different problems actually lowered coverage: it solved about 44% of unseen coding problems within four tries, versus about 69% from simply raising the randomness dial at the same number of tries. It even trailed the plain, untouched model at 50%, and its first-try success sank too. The training collected its reward but never converted it into wider coverage.

Why it matters

Before paying for reinforcement-style fine-tuning to broaden what a small model can solve, exhaust the free knob first: raise sampling randomness. Here a simple randomness bump beat a full training run outright, at zero extra training cost.

Problems covered: retrained model vs. randomness dial44% vs 69%share of unseen coding problems solved within four tries
Retrained model vs. plain untouched model50% → 44%coverage — the training made it worse, not better
First-try success of the retrained modelabout 31%quality dropped alongside coverage
Training rounds that gave any usable signal6 of 16most rounds were all-fail or all-pass, teaching nothing
On this page
  1. Results at a glance
  2. Overview
  3. Report
    1. Question
    2. Results
    3. Readout
    4. Training Diagnostics
    5. Interpretation
    6. Gate Decision
  4. Experiment log
  5. Figures
  6. Data files
  7. Reproduce
  8. Related

Results at a glance 3

Share of unseen problems solved by at least one of several tries

How to read

Four bars, one per way of drafting; bar height is the share of unseen problems where at least one try passes, so taller is better. The retrained model is the third bar; the other three are the untouched model at different randomness levels or try counts.

0%20%40%60%80%base t=0.9, K=4base t=0.9, K=450%base hot (t=1.0/1.2), K=4base hot (t=1.0/1.2), K=468.8%Pass@K RL adapter, K=4Pass@K RL adapter, K=443.8%base t=0.9, K=8 (sample more)base t=0.9, K=8 (sample more)62.5%

Takeaway → The retrained bar is shortest — below even the plain untouched model — while the untouched model at highest randomness stands tallest.

Data table
sampling arm (test split)coverage@K
base t=0.9, K=450%
base hot (t=1.0/1.2), K=468.8%
Pass@K RL adapter, K=443.8%
base t=0.9, K=8 (sample more)62.5%

Numbers from experiments/qwen35_4b_passk_coverage_rl/reports/report_summary.json

Technical framing

Held-out MBPP coverage@K: Pass@K RL adapter loses to tuned inference-only sampling — The RL adapter (43.8%) undercuts even its own base temperature (50%); tuned-hot sampling at the same K wins outright (68.8%).

First-try accuracy and how different the tries are

How to read

For each drafting method, one bar shows how often the first try is correct and another shows how varied the tries are from each other; higher is better on both. The retrained model is the third group of bars.

0%20%40%60%base t=0.9, K=4base t=0.9, K=437.5%46.9%base hot (t=1.0/1.2), K=4base hot (t=1.0/1.2), K=443.8%48.4%Pass@K RL adapter, K=4Pass@K RL adapter, K=431.2%40.6%base t=0.9, K=8 (sample more)base t=0.9, K=8 (sample more)37.5%27.3%

Takeaway → The retrained model has the lowest first-try quality of any bar, and it made its tries more alike than its own base — the opposite of the goal (only the sample-more arm ends up less varied still).

Data table
sampling arm (test split)pass@1 proxyfunctional diversity
base t=0.9, K=437.5%46.9%
base hot (t=1.0/1.2), K=443.8%48.4%
Pass@K RL adapter, K=431.2%40.6%
base t=0.9, K=8 (sample more)37.5%27.3%

Numbers from experiments/qwen35_4b_passk_coverage_rl/reports/report_summary.json

Technical framing

Guardrail metrics: adapter also degrades first-sample quality and diversity — The adapter is worst on both guardrails at K=4; K=8 sampling keeps pass@1 but collapses functional diversity.

Useful learning signal across the training rounds

How to read

Each point is one training round; the line shows how many of eight tries passed. Rounds sitting at zero (all failed) or at eight (all passed) teach nothing; only in-between rounds give a usable signal.

02.557.51051015positive rollouts per grouppositive rollouts…

Takeaway → Most points sit flat at zero or eight, so only a handful of rounds gave any teaching signal — explaining why the training stalled.

Data table
rollout group (training attempt)positive rollouts per group
10
20
30
47
58
68
76
80
90
103
117
120
136
148
150
167

Numbers from experiments/qwen35_4b_passk_coverage_rl/reports/pilot_unsat_passk_rl_training.json

Technical framing

Why training stalled: most rollout groups were all-fail or all-pass — 7 of 16 groups had zero passes and 3 were fully saturated, so only 6 groups gave a usable gradient signal for online Pass@K RL.

In the author’s words from the Overview · “Summary”

Can a small online QLoRA update aimed at set-level coverage make cheap K-sample generation cover more held-out MBPP tasks than tuned inference-only sampling?

Overview

This top-level README was generated during repository normalization because the imported experiment did not include one.

How To Read

Start with the primary report, then inspect data/, reports/, analysis/, src/, and scripts/ as available. This folder remains self-contained; do not move its run data into shared directories.

Summary

Can a small online QLoRA update aimed at set-level coverage make cheap K-sample generation cover more held-out MBPP tasks than tuned inference-only sampling?

Report

Rendered from reports/final_report.md

Question

Can a small online QLoRA update aimed at set-level coverage make cheap K-sample generation cover more held-out MBPP tasks than tuned inference-only sampling?

Results

armsplitKcoverage@Kpass@1 proxyvisible coveragefunctional diversityforward tokens
base_t09_k4test450.0%37.5%75.0%46.9%14193
base_hot_k4test468.8%43.8%75.0%48.4%14959
passk_rl_unsat_k4test443.8%31.2%68.8%40.6%13650
base_t09_k8_sample_moretest862.5%37.5%87.5%27.3%28487

coverage and pass1

diversity

training signals

Readout

Best observed held-out coverage arm: base_hot_k4.

  • Adapter vs tuned-hot K=4: 43.8% vs 68.8%, delta -25.0%.
  • Adapter vs same-temperature base K=4: 43.8% vs 50.0%, delta -6.2%.
  • Sample-more reference K=8: 62.5% at 28487 forward tokens.
  • Adapter guardrails: pass@1 proxy 31.2%, functional diversity 40.6%.

Training Diagnostics

Training attempted 16 rollout groups and took 6 updates. It skipped 7 zero-positive groups and 3 saturated-positive groups. Among update groups, positive rollouts ranged from 3 to 7; mean Pass@K utility was 0.988.

Interpretation

The decisive pilot comparison is the Pass@K adapter versus tuned-hot base sampling at matched K. A positive result requires the adapter to improve coverage without collapsing first-sample quality or functional diversity. In this pilot, the adapter did not pass that gate if tuned-hot K=4 is available and higher. The useful finding is diagnostic: online Pass@K reward can be obtained, but sparse or saturated rollout groups dominate, and the small adapter did not convert that reward into held-out coverage.

Gate Decision

The pilot gate failed, so the experiment stops here rather than scaling a larger training run. Scaling this exact online RL variant would spend compute on a configuration that is already dominated by inference-only hot sampling at matched K in the pilot.

Experiment log 3

Show the running log (3 entries)

Purpose

This standalone experiment tests a posttraining objective aimed at coverage rather than single-sample imitation. The adapter is trained with online sampled groups, execution rewards, and a Pass@K-style set utility. The primary readout is whether a small adapter improves held-out coverage at matched K against tuned inference-only sampling.

Protocol

  1. Build MBPP train and held-out records with one public test and hidden tests.
  2. Run base default and base hot sampling on a small held-out smoke split.
  3. Run a tiny online Pass@K RL smoke.
  4. If smoke works, run a pilot with more train and held-out tasks.
  5. Compare coverage@K, diversity, pass@1 proxy, and token usage.
  6. Write a report with figures.

Running Notes

  • 2026-06-26: Created fresh standalone experiment and large-artifact directories.
  • 2026-06-26: Smoke baseline on 4 held-out test tasks: base default K=4 covered 4/4; base hot K=4 covered 3/4.
  • 2026-06-26: First online Pass@K RL smoke found zero full-pass rollouts across 4 train groups and hurt held-out smoke coverage (2/4). This exposed sparse reward starvation.
  • 2026-06-26: Added positive-gated training that skips zero-positive groups. Smoke v2 took 4 updates after 6 attempts and tied matched-temperature held-out smoke coverage (3/4), but functional diversity dropped.
  • 2026-06-26: Added unsaturated-positive gating to skip both zero-positive and all-positive groups. Pilot training took 6 updates after 16 attempts, skipping 7 zero-positive groups and 3 saturated-positive groups.
  • 2026-06-26: Pilot held-out comparison on 16 test tasks: base t=0.9 K=4 covered 8/16, tuned-hot K=4 covered 11/16, Pass@K RL adapter K=4 covered 7/16, and base t=0.9 K=8 covered 10/16. The adapter failed the matched-K gate and reduced pass@1 proxy and functional diversity.

Figures 3

coverage pass1
coverage pass1 · reports/figures/
diversity
diversity · reports/figures/
training signals
training signals · reports/figures/

Data files 10

Result tables and metrics copied from the experiment folder — preview inline or open the raw file.

Reproduce

Run steps are documented inside the experiment folder (README and scripts).

Browse the experiment folder on GitHub ↗