Instructions to use divagr1925/qwen3.5-9b-factorio-build-sft-800 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use divagr1925/qwen3.5-9b-factorio-build-sft-800 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="divagr1925/qwen3.5-9b-factorio-build-sft-800") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("divagr1925/qwen3.5-9b-factorio-build-sft-800") model = AutoModelForMultimodalLM.from_pretrained("divagr1925/qwen3.5-9b-factorio-build-sft-800", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use divagr1925/qwen3.5-9b-factorio-build-sft-800 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "divagr1925/qwen3.5-9b-factorio-build-sft-800" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "divagr1925/qwen3.5-9b-factorio-build-sft-800", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/divagr1925/qwen3.5-9b-factorio-build-sft-800
- SGLang
How to use divagr1925/qwen3.5-9b-factorio-build-sft-800 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "divagr1925/qwen3.5-9b-factorio-build-sft-800" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "divagr1925/qwen3.5-9b-factorio-build-sft-800", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "divagr1925/qwen3.5-9b-factorio-build-sft-800" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "divagr1925/qwen3.5-9b-factorio-build-sft-800", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use divagr1925/qwen3.5-9b-factorio-build-sft-800 with Docker Model Runner:
docker model run hf.co/divagr1925/qwen3.5-9b-factorio-build-sft-800
Superseded (2026-09-25). This checkpoint was trained from an SFT warm start on another model's bare programs, and it lost general planning: PlanBench Blocksworld plan generation fell from 53.2% (base Qwen3.5-9B) to about 3%, with replies shrinking from ~2,000 tokens to ~60. Use divagr1925/qwen3.5-9b-factorio-build-er-r1 instead: 71.9% on the factorio-build holdout with plan generation at 46.4%.
Qwen3.5-9B ยท factorio-build SFT (800 programs)
Qwen3.5-9B fine-tuned to write def build(world): programs that build a working
iron smelting line in factory-sim, scored by
the factorio-build
environment on unseen scenes.
Same recipe as qwen3.5-9b-factorio-build-sft with ~9ร the data: this is the "more imitation data" arm of a comparison against GRPO.
Results
Success rate (8 scenes per row, 16 rows ร 4 samples, temperature 0.6, thinking off):
| Model | Validation | Holdout |
|---|---|---|
| Qwen3.5-9B | 2.1% | 1.6% |
| SFT, 93 programs | 18.0% | 18.0% |
| SFT, 93 programs + 20 GRPO steps | 93.8% | 79.5% |
| SFT, 800 programs (this model) | 67.0% | 57.4% |
Training
- Data: 800 distinct programs from 20 runs of LLM-guided program search (
evolve), deduplicated by normalised AST, spread over 72 (run, island) lineages; every program scoring 0.5-0.9 on training scenes plus a round-robin fill of โฅ 0.9 programs. Paired with factorio-build training prompts. No validation or holdout score was used for selection. - Method: LoRA (rank 32, alpha 64) on all attention, Gated DeltaNet and MLP projections,
merged. Completion-only loss; Qwen3.5 chat template with
enable_thinking=False. - Schedule: 2 epochs, 200 optimizer steps (batch 8), AdamW, lr 1e-4, warm-up + cosine, bf16, one H100 80GB, ~30 minutes.
Recipe: recipes/grpo-factorio-build.
Limitations
One task (construct_smelting_line), one API, sandboxed; not a general coding model.
64 samples per split, so expect a few points of noise.
- Downloads last month
- 24