Views
No views yet
| Model | Accuracy | Precision | Recall | FPR |
|---|---|---|---|---|
| Qwen2.5-7B zero-shot | 76.5% | 91.7% | 32.4% | 1.5% |
| Qwen2.5-7B SFT (this model) | 97.1% | 100% | 91.2% | 0.0% |
| Gemini 2.5 Flash zero-shot | 97.1% | 100% | 91.2% | 0.0% |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("GGOSinon/babyai-world-model-7B-sft", torch_dtype="bfloat16").to("cuda")
4tokenizer = AutoTokenizer.from_pretrained("GGOSinon/babyai-world-model-7B-sft")
5
6messages = [
7 {"role": "system", "content": "You are a simulator for a grid-world environment called BabyAI..."},
8 {"role": "user", "content": "Goal: pick up the red box\n\nObservation:\n...\nAvailable actions: [...]\nAgent's action: pickup red box 1"}
9]
10
11inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).to("cuda")
12output = model.generate(inputs, max_new_tokens=300, do_sample=False)
13print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True))<observation>next observation text</observation>
<available_actions>["action1", "action2", ...]</available_actions>