Gemma 4 E2B — Pokémon Pokédex (LoRA Adapter)

LoRA adapter fine-tuned on google/gemma-4-e2b-it to answer Pokémon questions across three task types: stat lookups, full Pokédex profiles, and battle-outcome reasoning with chain-of-thought.

Model Details

  • Base model: google/gemma-4-e2b-it
  • Method: LoRA (16-bit), trained with Unsloth
  • Trainable params: ~31M (0.60% of base)
  • LoRA config: r=16, alpha=16, dropout=0, targets q/k/v/o/gate/up/down projections

Tasks

Task Input example Output
Stat "What is the Speed of Duskull?" 25
Profile "Tell me about Miltank." Full Pokédex entry (type, stats, abilities, evolution, dex text)
Battle "If Raichu battles Blastoise, who wins?" <think> reasoning block + verdict

Usage

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="TarunNagaSai007/gemma4-e2b-pokemon",
    max_seq_length=2048,
    load_in_4bit=False,
)
FastLanguageModel.for_inference(model)

messages = [
    {"role": "system", "content": [{"type": "text", "text": "You are a Pokédex assistant. Answer questions about Pokémon stats, profiles, and battle outcomes accurately."}]},
    {"role": "user", "content": [{"type": "text", "text": "If Charizard battles Venusaur, who wins?"}]},
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
out = model.generate(input_ids=inputs, max_new_tokens=512, temperature=0.3)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Training

  • Dataset: ~8,600 instruction examples (stat / profile / battle), 957 validation, 1,200 test
  • Epochs: 3 | Effective batch: 8 | LR: 2e-4 cosine, 100 warmup steps
  • Optimizer: adamw_8bit | Hardware: single T4 (Colab)
  • Final validation loss: 0.164

Data Training Report

pokemon_gemma4e2b_loss_curve Training loss and Validation loss compraistion

reuslt_data Comparesation results between base model and Fine-tuned model

Limitations

Trained on a fixed Pokédex snapshot; stats and profiles reflect that data. Battle reasoning uses a simplified type/offense/speed heuristic, not full damage-calc mechanics. Built for educational/hobby use.

Downloads last month
1
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support