Gen I Type Analyst — LoRA adapter for Qwen/Qwen2.5-1.5B-Instruct
Adapter for the Type Analyst agent of the multi-agent system in
https://github.com/Rafaefe/AIBattlesInPokemon (Generative AI 580694, Universidad de Concepción,
Deliverable 4). Given one attacking type and one defending type, the agent answers with the
Generation I (Pokémon Red/Blue) phrase: super effective, normal damage, not very effective
or no effect. The other agents of the system keep the base model.
- Data: the 14×14 = 196 type pairs × 10 question templates = 1960 training examples
(392 validation examples with 2 held-out templates). Labels come from the Gen I type chart
(deterministic rule), not from another model. The exact question used at evaluation time is
not among the templates.
- Method: LoRA r=16, alpha=32, dropout=0.05, on q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj; 3 epochs,
lr 0.0002 (warmup 5% + cosine), batch 16, AdamW, fp32, seed 20261128.
Loss only on the answer tokens.
- Hardware / time: Tesla T4, 40.3 min.
- Final losses: train 0.0936, validation 0.0462; validation accuracy 94.6%.
from transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelbase = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct")model = PeftModel.from_pretrained(base, "rafaefe/qwen2.5-1.5b-gen1-type-analyst-lora")
In the repository: python -m d4.evaluate --adapter rafaefe/qwen2.5-1.5b-gen1-type-analyst-lora reproduces the reported results.