Views
No views yet
smolagents.CodeAgent-compatible assistant for writing Pygame games through an iterative Thought/Code/Observation loop. Trained via Hugging Face AutoTrain on real agentic trajectories (see theoracle/gameagent-pygame-trajectories) covering simple 2D games (Snake, Catcher, Pong, platformers, etc.).transformers and no peft dependency.lora_r: 16, lora_alpha: 32, lora_dropout: 0.05, target_modules: all-linear, quantization: int4 at training time, block_size: 1024, model_max_length: 8192, 3 epochs.smolagents.CodeAgent framework (code_block_tags="markdown"), given a task that describes the sandbox's constraints (no global/nonlocal, don't invoke the real game loop mid-step, avoid double-escaping the final newline join, etc.) — the model was trained specifically on that agentic format, not general chat.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4tokenizer = AutoTokenizer.from_pretrained("theoracle/gameagent-qwen2.5-coder-14b-merged")
5model = AutoModelForCausalLM.from_pretrained(
6 "theoracle/gameagent-qwen2.5-coder-14b-merged",
7 torch_dtype=torch.bfloat16,
8 device_map="auto",
9)'\\n'.join(lines) instead of '\n'.join(lines), which produces a syntactically broken (but usually logically correct) file. Worth adding an automatic un-escape check downstream of final_answer().peft + base model): theoracle/autotrain-3tx0q-8ouy5