Instructions to use Knowin-29/Anvil-MOPD-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Knowin-29/Anvil-MOPD-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Knowin-29/Anvil-MOPD-9B") 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("Knowin-29/Anvil-MOPD-9B") model = AutoModelForMultimodalLM.from_pretrained("Knowin-29/Anvil-MOPD-9B", 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 Knowin-29/Anvil-MOPD-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Knowin-29/Anvil-MOPD-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Knowin-29/Anvil-MOPD-9B", "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/Knowin-29/Anvil-MOPD-9B
- SGLang
How to use Knowin-29/Anvil-MOPD-9B 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 "Knowin-29/Anvil-MOPD-9B" \ --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": "Knowin-29/Anvil-MOPD-9B", "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 "Knowin-29/Anvil-MOPD-9B" \ --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": "Knowin-29/Anvil-MOPD-9B", "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 Knowin-29/Anvil-MOPD-9B with Docker Model Runner:
docker model run hf.co/Knowin-29/Anvil-MOPD-9B
Anvil-MOPD-9B
Spatial perception, reasoning and action in one 9B model.
11 native spatial forms · 5.22M-record SFT ancestry · specialist-to-generalist MOPD
Anvil connects scene-aligned spatial supervision with specialist knowledge transfer. Built on Qwen3.5-9B, it produces structured outputs for visual grounding, spatial relations and action-oriented tasks. MOPD transfers specialist feedback on the student's own rollouts into a unified model.
Release highlights
- Ready-to-load BF16 weights at the repository root, with the final LoRA adapter in
adapter/. - Visual geometry checkpoint 7168, continuing coordinate MOPD with 458,752 repair-stage sample exposures.
- Five featured training stages, each with adapter weights and complete continuation state.
- Full release evaluation: 580,000 native spatial examples, 7,366 public benchmark examples and 10,105 general-ability examples.
- 72.27% public benchmark mean across the seven benchmark scores below.
Results
| Benchmark | Released model (%) | Paper reference (%) |
|---|---|---|
| CV-Bench | 88.44 | 88.21 |
| EmbSpatial | 81.29 | 82.34 |
| RefSpatial · Location100 | 60.38 | 59.00 |
| Where2Place | 71.47 | 68.00 |
| BLINK · Relative Depth | 82.26 | 91.13 |
| ERQA | 47.74 | 50.52 |
| VABench · Point | 74.33 | 80.67 |
Native geometry and general-ability results · Evaluation report · Evaluation protocol
Get the model
Download the inference package:
from huggingface_hub import snapshot_download
model_path = snapshot_download(
"Knowin-29/Anvil-MOPD-9B",
ignore_patterns=["checkpoints/**", "docs/**"],
)
Load with Transformers Qwen3_5ForConditionalGeneration and AutoProcessor, using BF16 and thinking disabled. Evaluation uses up to 1,536 image tokens. The packaged anvil/anvil_interface.py handles native DoF prompts and pose decoding: call prepare_native_prompt("dof", prompt) before generation and decode_native_response("dof", text, prompt) afterward. The pose representation is rotation128; other native forms use their original prompts and responses.
Featured checkpoints
| Stage | Original stage identifier |
|---|---|
| Initial adaptation | ancestor_repair/checkpoint-2048 |
| Balanced MOPD | balanced_mopd/checkpoint-512 |
| Format-enhanced MOPD | format_mopd/checkpoint-256 |
| Coordinate MOPD | coordinate_mopd/checkpoint-256 |
| Visual geometry adaptation | visual_repair/checkpoint-7168 |
Use the checkpoint guide to download an individual stage. Additional saved stages are organized in checkpoints/archive/.
Repository guide
| Path | Contents |
|---|---|
| Root model files | Final merged BF16 model, processor and tokenizer |
adapter/ |
Selected visual geometry LoRA adapter |
checkpoints/ |
Featured stages and training archive |
anvil/ |
Native output interface |
docs/evaluation/ |
Measured scores and evaluation settings |
docs/provenance/ |
Training lineage and release records |
release_manifest.json |
File checksums and source revision |
Anvil's training design uses 5.22M SFT records and a 580K native evaluation split. Explore the Anvil-Ben data page for downloadable annotations and image reconstruction tools.
- Downloads last month
- 33