Gemma 4 E2B — Pokémon Pokédex (Merged 16-bit)

Standalone merged model: google/gemma-4-e2b-it fine-tuned on Pokémon data with the LoRA adapter folded into the base weights. No separate adapter needed — load and run directly. For the lightweight adapter version, see TarunNagaSai007/gemma4-e2b-pokemon.

Model Details

  • Base model: google/gemma-4-e2b-it
  • Method: LoRA fine-tune merged to 16-bit, via Unsloth
  • Format: Full safetensors (~9.5GB), fp16

Tasks

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

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "TarunNagaSai007/gemma4-e2b-pokemon-merged",
    torch_dtype=torch.float16, device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("TarunNagaSai007/gemma4-e2b-pokemon-merged")

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": "What is the Speed of Pikachu?"}]},
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(**{"input_ids": inputs}, max_new_tokens=256)
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
  • Optimizer: adamw_8bit | Hardware: single T4 (Colab)
  • Final validation loss: 0.164

Conversion to GGUF

This merged model can be converted to GGUF for Ollama / llama.cpp. Use the Gemma 4 chat template when running.

Limitations

Trained on a fixed Pokédex snapshot. Battle reasoning uses a simplified type/offense/speed heuristic, not full damage mechanics. Educational/hobby use.

Downloads last month
18
Safetensors
Model size
5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support