Image-Text-to-Text
Transformers
Safetensors
qwen3_5
phai-ide
science
code
tool-use
sft
lora
conversational
Run this model with HF Jobs
Run AItonomy/PhAI-IDE-9B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/AItonomy/PhAI-IDE-9B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/AItonomy/PhAI-IDE-9B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/AItonomy/PhAI-IDE-9B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/AItonomy/PhAI-IDE-9B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use AItonomy/PhAI-IDE-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AItonomy/PhAI-IDE-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AItonomy/PhAI-IDE-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("AItonomy/PhAI-IDE-9B") model = AutoModelForMultimodalLM.from_pretrained("AItonomy/PhAI-IDE-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 AItonomy/PhAI-IDE-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AItonomy/PhAI-IDE-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": "AItonomy/PhAI-IDE-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/AItonomy/PhAI-IDE-9B
- SGLang
How to use AItonomy/PhAI-IDE-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 "AItonomy/PhAI-IDE-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": "AItonomy/PhAI-IDE-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 "AItonomy/PhAI-IDE-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": "AItonomy/PhAI-IDE-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 AItonomy/PhAI-IDE-9B with Docker Model Runner:
docker model run hf.co/AItonomy/PhAI-IDE-9B
Commit ·
8521ab9
1
Parent(s): 18b17d6
Update README with verified ScienceAccelBench results (#2)
Browse files- Update README with verified ScienceAccelBench results (9981657632d6fae195a661ce4f2aef4a782539cd)
24 unmodified lines2526272829303132333435363738395 unmodified lines454647484950515253545556575859606162636465666768697071727374757624 unmodified lines## Quick startUse Transformers 5.16.1, PyTorch and Accelerate. The example loads the model, configuration and tokenizer directly from this repository. Sign in with `hf auth login` to access this private repository.```pythonfrom transformers import AutoTokenizer, AutoModelForImageTextToTextmodel_id = "AItonomy/PhAI-IDE-9B"tokenizer = AutoTokenizer.from_pretrained(model_id, token=True)model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="bfloat16", device_map="auto", token=True,)inputs = tokenizer.apply_chat_template([{"role": "user", "content": "Explain how to verify a numerical simulation."}],5 unmodified linesBF16 weights occupy approximately 18.82 GB, plus runtime memory and KV cache.## Benchmark performance### Score improvementsScores (%); gains in percentage points.| Benchmark | Qwen/Qwen3.5-9B | PhAI-IDE-9B | Gain (pp) || --- | ---: | ---: | ---: || BBH word-sorting | 25.60 | **60.40** | **+34.80** || AQuA-RAT | 86.61 | **88.98** | **+2.36** || MATH-500 | 91.40 | **92.20** | **+0.80** || OpenBookQA (128-sample subset) | 33.59 | **35.16** | **+1.56** || GSM8K (128-sample subset) | 89.84 | **92.97** | **+3.12** |### Comparison with published modelsScores (%); evaluation settings vary by source.| Benchmark | Reference model | Parameters | Published score | PhAI-IDE-9B result | Source || --- | --- | ---: | ---: | ---: | --- || GSM8K | Llama-3.1-8B-Instruct | 8B | 84.5 | **92.97** | [Meta model card](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct#instruction-tuned-models) || GSM8K | Qwen2.5-7B-Instruct | 7B | 91.6 | **92.97** | [Qwen2.5 report, Table 8](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) || GSM8K | Gemma-2-9B-IT | 9B | 76.7 | **92.97** | [Qwen2.5 report, Table 8](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) || GSM8K | SciTulu-7B | 7B | 29.5 | **92.97** | [SciRIFF report, Table 7](https://arxiv.org/html/2406.07835v2#A3) || BBH word-sorting | Llama-3.1-8B-Instruct | 8.03B | 51.2 | **60.40** | [BenchLM independent results](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) || BBH word-sorting | Qwen2.5-7B-Instruct | 7.62B | 15.6 | **60.40** | [BenchLM independent results](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) |## Training procedure24 unmodified lines2526272829303132333435363738395 unmodified lines454647484950515253545556575859606124 unmodified lines## Quick startUse Transformers 5.16.1, PyTorch and Accelerate. The example loads the model, configuration and tokenizer directly from this repository.```pythonfrom transformers import AutoTokenizer, AutoModelForImageTextToTextmodel_id = "AItonomy/PhAI-IDE-9B"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="bfloat16", device_map="auto",)inputs = tokenizer.apply_chat_template([{"role": "user", "content": "Explain how to verify a numerical simulation."}],5 unmodified linesBF16 weights occupy approximately 18.82 GB, plus runtime memory and KV cache.## ScienceAccelBench performanceAcross all 27 ScienceAccelBench environments, the task-pooled pass rate increases from **17.09% to 20.89% (+3.80 percentage points)** on **158 valid paired tasks**.Task-held-out, localized scientific-code repair on familiar codebases, with original numerical verification. Pass rates (%); gains in percentage points.| Environment | Tasks | Qwen3.5-9B | PhAI-IDE-9B | Gain (pp) || --- | ---: | ---: | ---: | ---: || laps | 16 | 31.25 | **50.00** | **+18.75** || mitgcm-biogeo | 8 | 0.00 | **12.50** | **+12.50** || pluto-rmhd-resrmhd | 7 | 0.00 | **28.57** | **+28.57** |## Training procedure
README.md+11-26