mb-original-v1 prompt (Champions Regulation M-B)A LoRA adapter for Fast-dLLM v2 1.5B, a block-diffusion
language model adapted from Qwen2.5-1.5B-Instruct. Given a team with blanks (items, abilities, natures, moves or whole
Pokémon), it fills them for gen9championsvgc2026regmb (Champions VGC 2026, Regulation Set M-B). Its prompt copies the
mb-original-v1 prompt version the Battle Factory of Porygon-Pi project
sent to an LLM (inclusionai/ling-3.0-flash-vl) in its masked-completion baseline. Sibling adapters: the short-prompt text
writer Rami/fast-dllm-v2-1.5b-vgc-regmb-lora and one writer per
LLM prompt version (Rami/fast-dllm-v2-1.5b-vgc-mask-fill-ling-<version>-prompt-lora).
System message: system.txt in this repo, the LLM's mb-original-v1 text with only the answer-format sentence changed.
User message: the LLM's request with each meta team as one line of its six species (meta_teams.txt holds the 49 lines)
and a target_win_rate (two decimals or unknown). One training row, its meta list shortened:
{"format": "gen9championsvgc2026regmb", "opponents": ["Aerodactyl, Charizard, Farigiraf, Garchomp, Incineroar, Sylveon", "Charizard, Floette-Eternal, Garchomp, Gholdengo, Incineroar, Sinistcha", "…"], "masked_team": [{"species": "Basculegion", "item": null, "ability": "Adaptability", "nature": "Timid", "moves": ["Aqua Jet", "Last Respects", "Protect", "Wave Crash"]}, {"species": "Charizard", "item": "Charizardite Y", "ability": "Blaze", "nature": "Adamant", "moves": ["Heat Wave", "Protect", "Sunny Day", "Weather Ball"]}, {"species": "Floette-Eternal", "item": "Sitrus Berry", "ability": "Flower Veil", "nature": "Modest", "moves": ["Dazzling Gleam", "Protect", "Solar Beam", "Sunny Day"]}, {"species": "Garchomp", "item": "Life Orb", "ability": "Rough Skin", "nature": "Adamant", "moves": ["Earth Power", "Protect", "Rock Slide", "Sunny Day"]}, {"species": "Kingambit", "item": "Focus Sash", "ability": "Defiant", "nature": "Jolly", "moves": ["Iron Head", "Kowtow Cleave", "Protect", "Sucker Punch"]}, {"species": "Whimsicott", "item": "Occa Berry", "ability": "Prankster", "nature": "Modest", "moves": ["Encore", "Moonblast", "Protect", "Tailwind"]}], "requested_paths": [[0, "item"]], "target_win_rate": "0.50"}
Answer: a JSON list of fills, one per requested path, in the form shown:
{"fills": [{"path": [0, "item"], "value": "Mystic Water"}]}
Add Stat Points yourself and validate the team with Showdown before use.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base, rev = "Efficient-Large-Model/Fast_dLLM_v2_1.5B", "25093b6f63300adfd57f72145083c8a528fe4f16"
tok = AutoTokenizer.from_pretrained(base, revision=rev, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(base, revision=rev, trust_remote_code=True, dtype=torch.bfloat16)
model = PeftModel.from_pretrained(model, "Rami/fast-dllm-v2-1.5b-vgc-mask-fill-ling-mb-original-v1-prompt-lora").merge_and_unload().eval()
msgs = [{"role": "system", "content": open("system.txt").read()}, {"role": "user", "content": user_message}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=1024, threshold=0.9, block_size=32, small_block_size=8, temperature=1.0, top_p=1.0)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
The project fills with classifier-free guidance 2 (the request with "0.50" and with "unknown" in one batch, logits
combined as 2·cond − 1·uncond at every step); plain generate is guidance 1.
8,000 rows from the project's Regulation M-B teams, none of them a team ranked 51 to 100 (its held-out set): 4,000 list all 49 distinct top-50 meta teams with the team's win rate against them, 4,000 come from teams with a recorded battle against every top-50 team and list a random 8 to 49 of them with the win rate against those. Each row blanks one cell of the project's Mask Lab grid (items, abilities, natures or whole Pokémon k = 1 to 6; moves k = 1 to 24). LoRA rank 32, alpha 64, every attention and MLP projection; 2,000 steps of 4 examples; learning rate 2e-4, 3% warm-up, linear decay; bf16; Fast-dLLM v2's block-diffusion loss; full gradient checkpointing; one Apple M4 Pro, 10.4 hours. Validation loss at steps 500, 1000, 1500, 2000: 0.368, 0.274, 0.239, 0.207 (on the whole answer).
Win rate is wins against the 49 distinct top-50 meta teams, one battle each, with a behaviour-cloning battle policy on both sides. The Mask Lab grid blanks 270 cells across five starting teams; a fill is legal if Showdown accepts the team and no unmasked field changed. Percentage points, paired on the blank, 95% bootstrap over the five starting teams.
| starting teams | legal fills | fill − original | vs the short-prompt writer, both legal | vs the LLM on this prompt, both legal |
|---|---|---|---|---|
| five held-out real teams, ranks 51–100 (originals win 0.48) | 112/270 | -1.9 [-5.9, +3.0] | +0.3 [-0.8, +1.1] | not run |
| five random legal teams (originals win 0.03) | 77/270 | +0.2 [-1.9, +2.4] | -1.0 [-1.3, -0.5] | not run |
The short-prompt writer had 173 and 149 legal fills on the same blanks. A real top-50 team wins 0.531 against the other 49.
Regulation M-B only. No learnset or clause constraints at decoding, so many fills are illegal and need the validator. One training seed, five starting teams per grid, one battle per opponent, one battle policy. The training rows differ from the short-prompt writer's, so a comparison between them measures prompt and data together.