Image-Text-to-Text
Transformers
Safetensors
qwen3_5
phai-ide
science
code
tool-use
sft
lora
conversational
Instructions to use AItonomy/PhAI-IDE-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AItonomy/PhAI-IDE-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AItonomy/PhAI-IDE-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("AItonomy/PhAI-IDE-4B") model = AutoModelForMultimodalLM.from_pretrained("AItonomy/PhAI-IDE-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 AItonomy/PhAI-IDE-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AItonomy/PhAI-IDE-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": "AItonomy/PhAI-IDE-4B", "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-4B
- SGLang
How to use AItonomy/PhAI-IDE-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 "AItonomy/PhAI-IDE-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": "AItonomy/PhAI-IDE-4B", "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-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": "AItonomy/PhAI-IDE-4B", "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-4B with Docker Model Runner:
docker model run hf.co/AItonomy/PhAI-IDE-4B
Compact published-model comparisons; preserve science results table
Browse filesGroup 27 previously sourced comparisons with similarly sized published models into 10 benchmark rows. Include reference links, parameter counts, score differences, and evaluation-scope notes. Restore the original ScienceAccelBench table and section unchanged.
README.md
CHANGED
|
@@ -39,24 +39,31 @@ Weight sizes are approximate; inference also requires memory for runtime allocat
|
|
| 39 |
|
| 40 |
Task-held-out, localized scientific-code repair on familiar codebases, with original numerical verification. Each row compares the initial model with its corresponding fine-tuned model on identical tasks. Pass rates are percentages; gains are percentage points.
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
| --- | --- |
|
| 46 |
-
| 4B | PLUTO-Particles-Dust [3]: 0.00 → **33.33** (**+33.33**) |
|
| 47 |
-
| 9B | LAPS [16]: 31.25 → **50.00** (**+18.75**)<br>MITgcm-biogeo [8]: 0.00 → **12.50** (**+12.50**)<br>PLUTO-RMHD [7]: 0.00 → **28.57** (**+28.57**) |
|
| 48 |
-
|
| 49 |
-
## Public benchmark performance
|
| 50 |
|
| 51 |
-
Each entry
|
| 52 |
|
| 53 |
-
|
|
| 54 |
-
| --- | --- | --- | --- |
|
| 55 |
-
| 4B |
|
| 56 |
-
|
|
| 57 |
-
|
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
## Quick start
|
| 62 |
|
|
|
|
| 39 |
|
| 40 |
Task-held-out, localized scientific-code repair on familiar codebases, with original numerical verification. Each row compares the initial model with its corresponding fine-tuned model on identical tasks. Pass rates are percentages; gains are percentage points.
|
| 41 |
|
| 42 |
+
| Model | Environment | Tasks | Initial model | PhAI-IDE | Gain (pp) |
|
| 43 |
+
| --- | --- | ---: | ---: | ---: | ---: |
|
| 44 |
+
| 4B | PLUTO-Particles-Dust | 3 | 0.00 | **33.33** | **+33.33** |
|
| 45 |
+
| 9B | LAPS | 16 | 31.25 | **50.00** | **+18.75** |
|
| 46 |
+
| 9B | MITgcm-biogeo | 8 | 0.00 | **12.50** | **+12.50** |
|
| 47 |
+
| 9B | PLUTO-RMHD | 7 | 0.00 | **28.57** | **+28.57** |
|
| 48 |
|
| 49 |
+
## Comparison with published models
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
Scores (%), grouped by benchmark and model size. Each reference entry gives its published score and the **PhAI-IDE score difference in percentage points**. Reference models are approximately the same size: 3–4B, 7–9B, and 67–72B, respectively.
|
| 52 |
|
| 53 |
+
| PhAI-IDE | Benchmark | Score | Reference models: score (difference) |
|
| 54 |
+
| --- | --- | ---: | --- |
|
| 55 |
+
| 4B | GSM8K | **89.06†** | [Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct#instruction-tuned-models) (3B): 77.7 (**+11.36**); [Phi-3-mini](https://arxiv.org/html/2404.14219v1) (3.8B): 82.5 (**+6.56**); [Qwen2.5-3B-Instruct](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) (3B): 86.7 (**+2.36**); [WizardMath-Llama-RL (Llama 3.2)](https://arxiv.org/html/2308.09583v2) (3B): 85.5 (**+3.56**) |
|
| 56 |
+
| 4B | BBH multistep-arithmetic-two | **97.60** | [Llama-3.2-3B-Instruct](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) (3.21B): 53.2 (**+44.40**); [Phi-3.5-mini-8k-instruct](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) (3.82B): 95.6 (**+2.00**) |
|
| 57 |
+
| 4B | MATH-500 | **87.50†** | [Llama-3.2-3B-Instruct](https://huggingface.co/microsoft/Phi-4-mini-reasoning/blob/661e72224c678e7360429603fd898712ee0c74b9/README.md) (3B): 44.4 (**+43.10**); [Phi-4-Mini](https://huggingface.co/microsoft/Phi-4-mini-reasoning/blob/661e72224c678e7360429603fd898712ee0c74b9/README.md) (3.8B): 71.8 (**+15.70**) |
|
| 58 |
+
| 9B | GSM8K | **92.97†** | [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct#instruction-tuned-models) (8B): 84.5 (**+8.47**); [Qwen2.5-7B-Instruct](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) (7B): 91.6 (**+1.37**); [Gemma-2-9B-IT](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) (9B): 76.7 (**+16.27**); [SciTulu-7B](https://arxiv.org/html/2406.07835v2#A3) (7B): 29.5 (**+63.47**) |
|
| 59 |
+
| 9B | BBH word-sorting | **60.40** | [Llama-3.1-8B-Instruct](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) (8.03B): 51.2 (**+9.20**); [Qwen2.5-7B-Instruct](https://huggingface.co/spaces/steampunque/benchlm/blob/d45e8600172857935610426f797a4429f2f136d6/README.md) (7.62B): 15.6 (**+44.80**) |
|
| 60 |
+
| 9B | MATH-500 | **92.20** | [InternLM3-8B-Instruct](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm3-8b-instruct-gptq-int4) (8B): 83 (**+9.20**); [Qwen2.5-7B-Instruct](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm3-8b-instruct-gptq-int4) (7B): 72.4 (**+19.80**); [Llama-3.1-8B-Instruct](https://modelscope.cn/models/Shanghai_AI_Laboratory/internlm3-8b-instruct-gptq-int4) (8B): 48.4 (**+43.80**) |
|
| 61 |
+
| 72B | GSM8K | **93.75†** | [Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct#instruction-tuned-models) (70B): 93 (**+0.75**); [DeepSeek-LLM-67B-Chat](https://github.com/deepseek-ai/DeepSeek-LLM#3-evaluation-results) (67B): 84.1 (**+9.65**); [Qwen2-72B-Instruct](https://arxiv.org/html/2412.15115v2#S5.SS2.SSS1) (72B): 93.2 (**+0.55**); [SciTulu-70B](https://arxiv.org/html/2406.07835v2#A3) (70B): 67.5 (**+26.25**); [WizardMath-Llama-RL (Llama 2)](https://arxiv.org/html/2308.09583v2) (70B): 92.8 (**+0.95**) |
|
| 62 |
+
| 72B | AQuA-RAT | **77.56** | [Llama-2-70B-Chat](https://openreview.net/pdf?id=FvfhHucpLd) (70B): 31.32 (**+46.24**) |
|
| 63 |
+
| 72B | ARC-Easy | **84.64** | [Llama-2-70B](https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/evaluation/more_results.md) (70B): 76.5 (**+8.14**); [DeepSeek-LLM-67B-Chat](https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/evaluation/more_results.md) (67B): 81.6 (**+3.04**) |
|
| 64 |
+
| 72B | ARC-Challenge | **64.42** | [Llama-2-70B](https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/evaluation/more_results.md) (70B): 59.5 (**+4.92**); [DeepSeek-LLM-67B-Chat](https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/evaluation/more_results.md) (67B): 64.1 (**+0.32**) |
|
| 65 |
+
|
| 66 |
+
† PhAI-IDE score on a 128-item subset. Reference scores come from the linked publications, model cards, and independent evaluation reports; evaluation settings and sample counts vary by source. Differences describe reported scores across evaluations, rather than matched-protocol head-to-head gains. BBH entries refer to the named tasks.
|
| 67 |
|
| 68 |
## Quick start
|
| 69 |
|