Views
No views yet
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3-4B-Instruct-2507 |
| Adapter type | LoRA (PEFT) |
| LoRA rank | 32 |
| LoRA alpha | 32 |
| Dropout | 0.0 |
| Target modules | q/k/v/o proj, gate/up/down proj |
| Training method | GRPO on live battle trajectories |
| Format | Gen 4 OU (competitive, older format — more stable) |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
5tokenizer = AutoTokenizer.from_pretrained("Atharva2099/openenv-smogon-rl")
6model = PeftModel.from_pretrained(base, "Atharva2099/openenv-smogon-rl")
7
8# The model expects a structured markdown battle state and outputs a JSON action:
9# {"action": "move" | "switch", "choice": "Exact Move or Pokemon Name"}Base: Qwen3-4B-Instruct
|
[JSON SFT warm-up] teach the model to output valid action JSON
|
[Rollout collection] live battles against RandomPlayer on local Showdown
|
[GRPO training] optimize on real shaped rewards from environment
|
LoRA checkpoint -> HF Hub+1.0 per 10% opponent HP dealt / -1.0 per 10% HP lost+3.0 opponent faint / -3.0 self faint+0.5 super effective hit / -1.0 immune/no-effect+0.5 per stat stage gained (capped), +1.0 per 10% healed (capped)-10.0 illegal action (hallucinated move/pokemon)-0.05 step penalty (anti-stall)| Branch | Notes |
|---|---|
grpo-qwen3-4b-run1 | First GRPO run, baseline |
grpo-qwen3-4b-run2 | Tuned reward shaping |
grpo-qwen3-4b-run3 | Best performing (this branch = main) |
RandomPlayer — will struggle against strong competitive opponents