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
Commit History
30 days ago
-
Add link to paper
Verified signatureThis PR adds a link to the paper [ScienceIDE: Turning World's Scientific Codebase into Agent Learnable Environments](https://huggingface.co/papers/2609.19134) in the markdown content section of the model card, ensuring the model is linked to the paper page.c37da15
-
Remove the final Citations section from README (#9)
- Remove the final Citations section from README (e1a0603635db13b7d2bb40562e8485b4e0cb47b7)97e942f -
Link training data to the ScienceIDE GitHub repository (#8)
- Link training data to the ScienceIDE GitHub repository (5cb602804ec43866eee0ae876261b8406aee684b)cc2d966 -
Make the scientific-environment table compact (#7)
- Make the scientific-environment table compact (58011f13bc43ab5e106f45cb369f427b9ad4dbe5)e4e3df0 -
Use one environment table with explicit Qwen and PhAI-IDE model pairs (#6)
- Use one environment table with explicit Qwen and PhAI-IDE model pairs (949377b7c37dbbfd6f08a6b05cf6ef1e0ecbce54)2e8b21d -
Use explicit Qwen baselines in environment comparisons (#5)
- Name Qwen baselines and clarify evaluated environment scope (48570e741941522ac37a86a142f04ec2670a8a28) - Use explicit Qwen baselines in environment comparisons (ec7ab1016714fa73697ba9adf7bbd42bf22d9118)e01fa89 -
Remove additional 4B and 9B training settings from README (#4)
- Remove additional 4B and 9B training settings from README (8f61b8ffb7e52c363fcb245086917316cc46c2cb)e6eeb30 -
Simplify published comparisons to complete benchmark configurations (#3)
- Simplify published comparisons to complete benchmark configurations (3d6a2f949bf02107c7385c35441d639fcdcc28f1)e987ed5 -
Update README with verified ScienceAccelBench results (#1)
- Update README with verified ScienceAccelBench results (fce7ea0fb5f7f1496081b4f69001b10871896373)5a3e7f3 -
Add PhAI-IDE-4B model card
Verified signature345156e
-
Add PhAI-IDE-4B configuration and tokenizer assets
Verified signature19aeae0 -
Add JEPA-Anything-4B model.safetensors.index.json
Verified signature82245fa -
Add JEPA-Anything-4B model.safetensors-00002-of-00002.safetensors
Verified signature99ea259 -
Add JEPA-Anything-4B model.safetensors-00001-of-00002.safetensors
Verified signature162a005 -
initial commit
Verified signaturef40c9cb