SnehShah/house-md-grpo-optimized-gemma3-4b-v3
๐ฉบ House M.D. โ GRPO (Gemma 3 4B-IT, optimized v3)
A LoRA adapter trained with GRPO (Group-Relative Policy Optimization) on top of the SFT warm-start `SnehShah/house-md-sft-gemma3-4b`, using episode rollouts against the live OpenEnv Space `SnehShah/house-md-env`.
This is the production submission for the Apr '26 Meta OpenEnv Hackathon โ the model whose reward curve is published on W&B and whose eval JSON is included in the repo.
GitHub repo (training pipeline, notebooks, eval, blog): <https://github.com/sneh2909/Overfitters> Live env: <https://huggingface.co/spaces/SnehShah/house-md-env> W&B run (full reward, gradients, mid-eval): <https://wandb.ai/sneh2909-christ-university/house-md?nw=nwusersneh2909> Frozen comparison evals: `SnehShah/house-md-results`
How it was trained
Training script: `scripts/train_grpo_optimized.py`. Reproduction notebook: `notebooks/03_grpo.ipynb`.
Reward design
Default composite weights: {r1: 2.0, r2: 0.5, r6: 0.3, r7: 1.0, r8: 0.5}.
Use
from unsloth import FastLanguageModel
model, tok = FastLanguageModel.from_pretrained(
model_name = "unsloth/gemma-3-4b-it-unsloth-bnb-4bit",
max_seq_length = 4096,
load_in_4bit = True,
)
model.load_adapter("SnehShah/house-md-grpo-optimized-gemma3-4b-v3")
FastLanguageModel.for_inference(model)
from house_md_env import HouseMDEnv, HouseMDAction
with HouseMDEnv(base_url="https://snehshah-house-md-env.hf.space") as env:
res = env.reset(seed=0)
# ... build prompt from res.observation, generate, parse JSON action,
# env.step(...) until res.observation.terminalThe exact eval harness is `scripts/eval_hf.py`; the comparison plot lives in `notebooks/04_eval_compare.ipynb`.
License
Apache 2.0. The base model carries the Gemma terms of use; this adapter is bound by them too.
