Image-Text-to-Text
Transformers
Safetensors
qwen3_5
phai-ide
science
code
tool-use
sft
lora
conversational
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)# 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=40) 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
Add link to paper
#9
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
---
|
| 2 |
-
model_name: PhAI-IDE-9B
|
| 3 |
base_model: Qwen/Qwen3.5-9B
|
| 4 |
-
base_model_relation: finetune
|
| 5 |
library_name: transformers
|
| 6 |
-
pipeline_tag: image-text-to-text
|
| 7 |
license: apache-2.0
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
- phai-ide
|
| 10 |
- science
|
|
@@ -13,10 +12,13 @@ tags:
|
|
| 13 |
- sft
|
| 14 |
- lora
|
| 15 |
- safetensors
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# PhAI-IDE
|
| 19 |
|
|
|
|
|
|
|
| 20 |
**PhAI-IDE** is a family of models for scientific coding and interaction with tools, available in **4B, 9B, and 72B** sizes. Each model is supervised fine-tuned with [ms-swift](https://github.com/modelscope/ms-swift) and released as full BF16 weights with the final LoRA adapter merged, together with its configuration and tokenizer.
|
| 21 |
|
| 22 |
The **training dataset is Codex trajectories**, sourced from [ScienceIDE](https://github.com/aitofound/ScienceIDE).
|
|
@@ -107,4 +109,4 @@ The release was validated with the following environment.
|
|
| 107 |
| PEFT | 0.20.0 |
|
| 108 |
| Datasets | 4.8.4 |
|
| 109 |
| Tokenizers | 0.23.2 |
|
| 110 |
-
| Accelerate | 1.14.0 |
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: Qwen/Qwen3.5-9B
|
|
|
|
| 3 |
library_name: transformers
|
|
|
|
| 4 |
license: apache-2.0
|
| 5 |
+
model_name: PhAI-IDE-9B
|
| 6 |
+
pipeline_tag: image-text-to-text
|
| 7 |
tags:
|
| 8 |
- phai-ide
|
| 9 |
- science
|
|
|
|
| 12 |
- sft
|
| 13 |
- lora
|
| 14 |
- safetensors
|
| 15 |
+
base_model_relation: finetune
|
| 16 |
---
|
| 17 |
|
| 18 |
# PhAI-IDE
|
| 19 |
|
| 20 |
+
This repository contains the **PhAI-IDE-9B** model introduced in [ScienceIDE: Turning World's Scientific Codebase into Agent Learnable Environments](https://huggingface.co/papers/2609.19134).
|
| 21 |
+
|
| 22 |
**PhAI-IDE** is a family of models for scientific coding and interaction with tools, available in **4B, 9B, and 72B** sizes. Each model is supervised fine-tuned with [ms-swift](https://github.com/modelscope/ms-swift) and released as full BF16 weights with the final LoRA adapter merged, together with its configuration and tokenizer.
|
| 23 |
|
| 24 |
The **training dataset is Codex trajectories**, sourced from [ScienceIDE](https://github.com/aitofound/ScienceIDE).
|
|
|
|
| 109 |
| PEFT | 0.20.0 |
|
| 110 |
| Datasets | 4.8.4 |
|
| 111 |
| Tokenizers | 0.23.2 |
|
| 112 |
+
| Accelerate | 1.14.0 |
|