Views
No views yet
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.| 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 |
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name="TarunNagaSai007/gemma4-e2b-pokemon",
5 max_seq_length=2048,
6 load_in_4bit=False,
7)
8FastLanguageModel.for_inference(model)
9
10messages = [
11 {"role": "system", "content": [{"type": "text", "text": "You are a Pokédex assistant. Answer questions about Pokémon stats, profiles, and battle outcomes accurately."}]},
12 {"role": "user", "content": [{"type": "text", "text": "If Charizard battles Venusaur, who wins?"}]},
13]
14inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
15out = model.generate(input_ids=inputs, max_new_tokens=512, temperature=0.3)
16print(tokenizer.decode(out[0], skip_special_tokens=True))
