Instructions to use ko120/MLE-World-Qwen3.5-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ko120/MLE-World-Qwen3.5-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ko120/MLE-World-Qwen3.5-4B") 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("ko120/MLE-World-Qwen3.5-4B") model = AutoModelForMultimodalLM.from_pretrained("ko120/MLE-World-Qwen3.5-4B", 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 ko120/MLE-World-Qwen3.5-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ko120/MLE-World-Qwen3.5-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ko120/MLE-World-Qwen3.5-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ko120/MLE-World-Qwen3.5-4B
- SGLang
How to use ko120/MLE-World-Qwen3.5-4B 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 "ko120/MLE-World-Qwen3.5-4B" \ --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": "ko120/MLE-World-Qwen3.5-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ko120/MLE-World-Qwen3.5-4B" \ --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": "ko120/MLE-World-Qwen3.5-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ko120/MLE-World-Qwen3.5-4B with Docker Model Runner:
docker model run hf.co/ko120/MLE-World-Qwen3.5-4B
MLE World — Qwen3.5-4B
The execution world model used in the Qwen3.5-9B stage-policy experiments recorded in stage_policy_qwen35_9b_seven_arm_8h_plan_20261011.md. This is checkpoint 6685, epoch 5.0, from the mle_qwen3_4b_sft_world_9_3_exc_token_h100_adamw_h200 training run. The saved serving audit for the adopted main experiment confirms this exact checkpoint.
The model is a full supervised fine-tune of Qwen/Qwen3.5-4B on MLE World: 497,056 training examples and 1,700 held-out examples across 17 MLE-bench tasks.
Behavior
Given a Python ML program, installed-package environment, data overview, and runtime budget, the model predicts the exception type, terminal output, validation metric, and whether a submission file exists. It uses the env_v1_reorder_excfirst_token prompt format:
<exc_type>EXC_None</exc_type>
<term_out>...</term_out>
<val_metric>...</val_metric>
<submission_exists>true</submission_exists>
Use the system and human messages from the dataset for the exact input format. The matching tokenizer contains 82 ordinary exception tokens; these remain visible when decoding with skip_special_tokens=True.
Predictions estimate program behavior; real execution and grading were used to validate selected programs in the experiments.
Load for text inference
The checkpoint was saved with Transformers 5.9.0. Use a Transformers version supporting Qwen3_5ForConditionalGeneration.
import torch
from datasets import load_dataset
from transformers import AutoTokenizer, Qwen3_5ForConditionalGeneration
repo = "ko120/MLE-World-Qwen3.5-4B"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = Qwen3_5ForConditionalGeneration.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto"
)
example = next(iter(load_dataset(
"ko120/MLE-World", split="validation", streaming=True
)))
messages = [
{"role": "system", "content": example["system"]},
{"role": "user", "content": example["conversations"][0]["value"]},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, do_sample=False, max_new_tokens=8192, use_cache=True)
print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
Experiment inference used temperature 0, top_p=1, top_k=-1, min_p=0, repetition penalty 1, no presence/frequency penalties, seed 0, a 32,768-token serving context, and an 8,192-token output cap.
Training
| Setting | Value |
|---|---|
| Method | Full SFT; vision tower and multimodal projector frozen |
| Training epochs / final step | 5 / 6685 |
| Learning rate | 1e-5 |
| Optimizer | Fused AdamW |
| Scheduler / warmup | Cosine / 5% |
| Packed sequence length | 12,288 tokens |
| Packing | Enabled, with neat packing |
| Effective batch | 128 packed sequences across 8 GPUs |
| Final evaluation loss | 0.0814168155 |
The evaluation loss is the training framework's token loss on the held-out corpus, with its packing and length processing. It is not execution-prediction accuracy.
training_config.original.yaml preserves the original training configuration and its local paths. Replace the model, dataset, and output paths for a new environment. Training logs and results are retained under training/.
Artifact fidelity
The safetensors weights and tokenizer are copied from checkpoint 6685 without numerical conversion. The source stores 426 FP32 tensors and 297 BF16 tensors; its configuration declares BF16 for model loading. provenance.json records SHA-256 hashes, source checkpoint identity, tensor counts, and the experiment reference.
The model is distributed under the base model's Apache 2.0 license, included in LICENSE.
- Downloads last month
- 71