You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Failure2Learn SFT -> RL pilot: Gemma 4 E4B LoRA adapters

LoRA adapters (r=32, alpha=64, text-decoder linear layers only) for google/gemma-4-E4B-it, trained as a multi-turn coding agent that fixes planted bugs in TrialSWE clinical-trial data repositories using five actions (read file, search, apply patch, run visible tests, finish). Success means passing every hidden test. Code, prompts and tool format: https://github.com/karthik-chandrasekar/failure2learn

Folder Contents
sft/ Warm start M_0: 100 steps of SFT on 256 scripted-expert demonstrations, lr 3e-5 (chosen from 1e-5 / 3e-5 / 1e-4)
rl-step75/ sft/ + 75 GRPO steps

RL: on-policy multi-turn GRPO, 8 tasks x 4 rollouts per step from a 640-task training pool, reward = 1[solved] + 0.5 x partial credit (0 on integrity failures), group-normalised advantages, no KL term, lr 1e-5 constant after 5 warm-up steps, temperature 1.0 / top-p 0.95 / top-k 64, bf16 trainer + vLLM rollouts. The run was stopped at about step 85; step 75 is the last saved checkpoint.

Results

Greedy decoding, one attempt per task, development splits only (the locked IID/OOD test splits were not opened). Columns: probe (128, also used to pick the SFT learning rate), shadow (128, never used for any choice) and a separately generated OOD set (256 tasks, different seed). Fixed action parser:

| Checkpoint | probe solve | shadow solve | trialswe_dev256:ood_test solve | partial | L1 | L2 | L3 | L4 | finish | fmt err | |---|---|---|---|---|---|---|---|---|---| | base | 0.023 | 0.047 | 0.039 | 0.596 | 0.10 | 0.04 | 0.01 | 0.00 | 0.10 | 0.030 | | sft | 0.461 | 0.391 | 0.281 | 0.746 | 0.50 | 0.55 | 0.23 | 0.12 | 0.43 | 0.000 | | rl75 | 0.594 | 0.547 | 0.461 | 0.823 | 0.69 | 0.70 | 0.41 | 0.26 | 0.60 | 0.082 |

Tool calls per episode

Checkpoint tree search read_file apply_patch run_tests run_validator finish format_error
base 0.00 0.63 2.97 5.17 0.60 0.02 0.10 0.29
sft 0.00 0.00 2.86 2.29 2.92 0.00 0.43 0.00
rl75 0.00 0.00 1.95 2.76 1.39 0.02 0.60 0.60

Strict-parser results and per-episode rows for both evaluations are under results/.

Loading

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("google/gemma-4-E4B-it", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "karthikchandrasekar/failure2learn-gemma4-e4b-pilot", subfolder="rl-step75")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-4-E4B-it")

Caveats

Single seed; development splits only; during RL the policy drifted toward an unrecognised tool-call syntax (the fixed parser accepts the most common variant; later runs add a per-malformed-call penalty). Use of these adapters is subject to the Gemma terms of use.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for karthikchandrasekar/failure2learn-gemma4-e4b-pilot

Adapter
(536)
this model