Instructions to use guilindev/pacman-decision-qwen3-0.6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use guilindev/pacman-decision-qwen3-0.6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="guilindev/pacman-decision-qwen3-0.6b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("guilindev/pacman-decision-qwen3-0.6b") model = AutoModelForCausalLM.from_pretrained("guilindev/pacman-decision-qwen3-0.6b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use guilindev/pacman-decision-qwen3-0.6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "guilindev/pacman-decision-qwen3-0.6b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "guilindev/pacman-decision-qwen3-0.6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/guilindev/pacman-decision-qwen3-0.6b
- SGLang
How to use guilindev/pacman-decision-qwen3-0.6b 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 "guilindev/pacman-decision-qwen3-0.6b" \ --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": "guilindev/pacman-decision-qwen3-0.6b", "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 "guilindev/pacman-decision-qwen3-0.6b" \ --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": "guilindev/pacman-decision-qwen3-0.6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use guilindev/pacman-decision-qwen3-0.6b with Docker Model Runner:
docker model run hf.co/guilindev/pacman-decision-qwen3-0.6b
Pac-Man Decision Qwen3-0.6B ยท v0.1
A real, newly fine-tuned decision checkpoint with downloadable merged weights. Given current Pac-Man state features and 2โ4 legal directions, it scores the first answer token for each option in one forward pass. It does not generate a chain of thought or call the search teacher at inference.
Interactive before/after explorer ยท Training dataset
Pilot finding: the LoRA model remains near chance
This short run is a diagnostic checkpoint, not a successful general game agent. Uniform random legal selection has expected validation agreement 31.67%; always taking the first listed option achieves 38.87%. The LoRA model reaches 32.23%, and selected the second option in all 32 additional inspected states.
A separately trained 17,601-parameter structured baseline reaches 50.20% on the same validation set. Its weights and architecture are released at guilindev/pacman-decision-tiny. This comparison shows why lower training loss alone is insufficient evidence of a useful decision policy. Wider and repeated experiments are still needed.
The first measured result
| Metric on 512 validation states | Original Qwen3 | Fine-tuned adapter |
|---|---|---|
| Top-choice agreement with search teacher | 25.39% | 32.23% |
| Agreement where teacher target > 0.9 (258 states) | 28.29% | 33.33% |
| Soft-target cross-entropy (lower is better) | 3.5232 | 1.1520 |
| Squared distance to teacher distribution (lower is better) | 1.0496 | 0.4256 |
These are recorded measurements from our own run, not results quoted from another
project. Validation means agreement with the simulation teacher; it is not a win
rate. metrics.json contains the exact counts. This first release was shortened
for a live demonstration and uses one training epoch. It is a pilot checkpoint.
Independent gameplay tests use held-out seeds 100โ102, realtime clock, speed 1,
and a 180-second simulated-time limit. Results are in gameplay_results.json (all individual seeds included).
| Policy | Mean pellets/game | Mean per-game request p50, rounded ms |
|---|---|---|
| base | 0 | 21 |
| greedy | 173.3 | 0 |
| random | 33 | 0 |
| structured | 304.3 | 1 |
| trained | 49 | 21 |
base and trained are the original and LoRA Qwen models. structured is the
separate tiny policy. Tiny runs on CPU; Qwen runs on GPU, all on the same host.
Zero ms means below the integer-ms reporting resolution, not zero computation.
The comparison has only three games on one fixed maze.
Model and training
- Base: Qwen/Qwen3-0.6B, revision
c1899de289a04d12100db370d81485cdf75e47ca, Apache-2.0. - Actual merged parameter count: 596,049,920 (about 596M).
- Trainable LoRA parameters: 10,092,544.
- LoRA rank 16, alpha 32, no dropout; attention and MLP projections.
- 4,096 training rows, 512 validation rows, separate seeds and zero exact prompt overlap.
- One epoch / 256 optimizer steps, batch 16, AdamW 1e-4, 3% warmup, cosine decay.
- BF16 forward passes on NVIDIA GB10; PyTorch 2.13.0+cu130, Transformers 5.19.0, PEFT 0.21.2. Epoch training plus final validation: 9.1 minutes. Model loading, data generation and initial baseline validation are excluded.
- Python / PyTorch seed 42. GPU kernels may introduce small numerical differences across runtimes; raw configurations and hashes accompany this release.
The loss is cross-entropy against a soft distribution over legal answer letters. It reuses the language model's output-embedding rows for A/B/C/D. No new dedicated classification head is added. LoRA changes the hidden representation that feeds those option scores. This is related to fixed-choice decision scoring, not a reproduction of Jev's proprietary training method.
Data and teacher
We generated new states using grapeot/decision-pacman,
commit 593ed1f59f4f97ad0bda7287ff304e9667360089 (MIT).
An engine search teacher tries each move and rolls forward five seconds with
greedy continuation. Its value scores become a softmax target at temperature 50.
Collector policies include oracle, greedy and random play.
Only current-state features appear in student inputs. Future rollouts and target values are excluded. This is simulation/search-teacher distillation; no 27B teacher, Jev API, private customer data or upstream trained student weights were used. The dataset card explains collection, deduplication, selection and seed ranges.
Run locally
Download or clone this repository, install a PyTorch build appropriate for your device, then install the remaining requirements. The merged BF16 weight file is about 1.19 GB, plus tokenizer and code. GPU inference uses BF16; the sample script also supports CPU with FP32 weights.
pip install -r requirements.txt
python predict.py --request example.json
# After downloading the full model repository:
python predict.py --model . --request example.json --device cpu
The script prints a legal move and its candidate distribution. Model loading is
excluded from its printed forward-pass time. It uses the same prompt builder as
training, with enable_thinking=False.
To repeat training from the pinned original base:
python download_data.py
python train.py --limit 4096 --val-limit 512 --batch 16 --epochs 1 --out runs/pilot-v1
training-source.zip includes collection and export scripts, the frozen pilot
protocol, and full-run protocol. export_checks.json records adapter merge and
save/reload checks. The release uses safe tensor weights, not Python pickle.
Scope
This checkpoint consumes text state features, not game screenshots. It has not been trained as a multimodal model. A visual encoder or multimodal base and paired image/action training data would be a separate experiment.
One fixed maze, synthetic observations, one task. General decision ability and transfer to other games have not been evaluated. Candidate scores are relative to the choices provided; they are not calibrated probabilities of winning or safety. No matched Jev benchmark was run, so this release makes no claim of outperforming Jev.
Attribution and license
Qwen3 supplies the base model under Apache-2.0. The game, search oracle, feature
encoder and prompt formatter come from grapeot's MIT-licensed decision-pacman;
see LICENSE.upstream. This project contributes a new data collection, deduplication,
standard Transformers/PEFT training run, export checks and reproducible artifacts.
Merged weights are released under Apache-2.0. This is a personal research project.
- Downloads last month
- 23