Downloads · 30 days
7
1% of all-time downloads
GGOSinon/babyai-world-model-7B-sft
babyai-world-model-7B-sft is a text generation model from GGOSinon. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A world model for the BabyAI grid-world environment, fine-tuned from Qwen2.5-7B-Instruct using LoRA. This model predicts the next observation and available actions given the current state and the agent's action.
Downloads · 30 days
7
1% of all-time downloads
All-time downloads
865
Public
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
A world model for the BabyAI grid-world environment, fine-tuned from Qwen2.5-7B-Instruct using LoRA. This model predicts the next observation and available actions given the current state and the agent's action.
| 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% |
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("GGOSinon/babyai-world-model-7B-sft", torch_dtype="bfloat16").to("cuda")
tokenizer = AutoTokenizer.from_pretrained("GGOSinon/babyai-world-model-7B-sft")
messages = [
{"role": "system", "content": "You are a simulator for a grid-world environment called BabyAI..."},
{"role": "user", "content": "Goal: pick up the red box\n\nObservation:\n...\nAvailable actions: [...]\nAgent's action: pickup red box 1"}
]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).to("cuda")
output = model.generate(inputs, max_new_tokens=300, do_sample=False)
print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True))
The model outputs in this format:
<observation>next observation text</observation>
<available_actions>["action1", "action2", ...]</available_actions>
Task completion is indicated by "The task is completed." appended to the observation text.