Text Generation
Transformers
Safetensors
qwen2
phai-ide
science
code
tool-use
sft
lora
conversational
text-generation-inference
Instructions to use AItonomy/PhAI-IDE-72B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AItonomy/PhAI-IDE-72B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AItonomy/PhAI-IDE-72B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AItonomy/PhAI-IDE-72B") model = AutoModelForCausalLM.from_pretrained("AItonomy/PhAI-IDE-72B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AItonomy/PhAI-IDE-72B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AItonomy/PhAI-IDE-72B" # 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-72B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AItonomy/PhAI-IDE-72B
- SGLang
How to use AItonomy/PhAI-IDE-72B 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-72B" \ --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-72B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-72B" \ --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-72B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AItonomy/PhAI-IDE-72B with Docker Model Runner:
docker model run hf.co/AItonomy/PhAI-IDE-72B
Add link to paper
#10
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,12 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
model_name: PhAI-IDE-72B
|
| 3 |
base_model: Qwen/Qwen2.5-72B-Instruct
|
| 4 |
-
base_model_relation: finetune
|
| 5 |
library_name: transformers
|
| 6 |
-
pipeline_tag: text-generation
|
| 7 |
license: other
|
| 8 |
license_name: qwen
|
| 9 |
license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/495f39366efef23836d0cfae4fbe635880d2be31/LICENSE
|
|
|
|
|
|
|
| 10 |
tags:
|
| 11 |
- phai-ide
|
| 12 |
- science
|
|
@@ -15,10 +14,13 @@ tags:
|
|
| 15 |
- sft
|
| 16 |
- lora
|
| 17 |
- safetensors
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |
# PhAI-IDE
|
| 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,4 +111,4 @@ The release was validated with the following environment.
|
|
| 109 |
| PEFT | 0.20.0 |
|
| 110 |
| Datasets | 4.8.4 |
|
| 111 |
| Tokenizers | 0.23.2 |
|
| 112 |
-
| Accelerate | 1.14.0 |
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
base_model: Qwen/Qwen2.5-72B-Instruct
|
|
|
|
| 3 |
library_name: transformers
|
|
|
|
| 4 |
license: other
|
| 5 |
license_name: qwen
|
| 6 |
license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/495f39366efef23836d0cfae4fbe635880d2be31/LICENSE
|
| 7 |
+
model_name: PhAI-IDE-72B
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
tags:
|
| 10 |
- phai-ide
|
| 11 |
- science
|
|
|
|
| 14 |
- sft
|
| 15 |
- lora
|
| 16 |
- safetensors
|
| 17 |
+
base_model_relation: finetune
|
| 18 |
---
|
| 19 |
|
| 20 |
# PhAI-IDE
|
| 21 |
|
| 22 |
+
This repository contains the **PhAI-IDE-72B** model presented in [ScienceIDE: Turning World's Scientific Codebase into Agent Learnable Environments](https://huggingface.co/papers/2609.19134).
|
| 23 |
+
|
| 24 |
**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.
|
| 25 |
|
| 26 |
The **training dataset is Codex trajectories**, sourced from [ScienceIDE](https://github.com/aitofound/ScienceIDE).
|
|
|
|
| 111 |
| PEFT | 0.20.0 |
|
| 112 |
| Datasets | 4.8.4 |
|
| 113 |
| Tokenizers | 0.23.2 |
|
| 114 |
+
| Accelerate | 1.14.0 |
|