Views
No views yet
| Game | Genre |
|---|---|
| Fortnite | Battle Royale |
| Rocket League | Vehicular Soccer |
| VALORANT | Tactical FPS |
Minimax-M3 as a teacher model, then quality-filtered using a 0–5 relevance/quality score before training.1from transformers import AutoProcessor, AutoModelForVision2Seq
2from PIL import Image
3import torch
4
5processor = AutoProcessor.from_pretrained("TK17250/game-comment-vlm")
6model = AutoModelForVision2Seq.from_pretrained(
7 "TK17250/game-comment-vlm",
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11
12image = Image.open("your_gameplay_screenshot.jpg").convert("RGB")
13
14system_prompt = (
15 "You are a passionate live game commentator. You watch a screenshot from a "
16 "video game and give a short, natural spoken-style comment on the gameplay "
17 "moment, reacting to how good or bad the play looks."
18)
19user_prompt = "Comment on this gameplay moment."
20
21messages = [
22 {"role": "user", "content": [
23 {"type": "image"},
24 {"type": "text", "text": f"{system_prompt}\n\n{user_prompt}"}
25 ]}
26]
27
28input_text = processor.apply_chat_template(messages, add_generation_prompt=True)
29inputs = processor(image, input_text, add_special_tokens=False, return_tensors="pt").to(model.device)
30
31output = model.generate(**inputs, max_new_tokens=128, temperature=0.7, min_p=0.1)
32print(processor.decode(output[0], skip_special_tokens=True))Note: This model's chat template does not support a separatesystemrole alongside image inputs. Combine the persona/system instruction directly into theusermessage text, as shown above.
1from unsloth import FastVisionModel
2from transformers import TextStreamer
3
4model, tokenizer = FastVisionModel.from_pretrained("TK17250/game-comment-vlm", load_in_4bit=False)
5FastVisionModel.for_inference(model)
6
7# ... build messages/inputs as above using `tokenizer` instead of `processor`
8_ = model.generate(**inputs, streamer=TextStreamer(tokenizer, skip_prompt=True), max_new_tokens=128)