Instructions to use BAAI/AquilaCode-py with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/AquilaCode-py with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BAAI/AquilaCode-py")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BAAI/AquilaCode-py", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BAAI/AquilaCode-py with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BAAI/AquilaCode-py" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/AquilaCode-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BAAI/AquilaCode-py
- SGLang
How to use BAAI/AquilaCode-py 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 "BAAI/AquilaCode-py" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/AquilaCode-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "BAAI/AquilaCode-py" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/AquilaCode-py", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BAAI/AquilaCode-py with Docker Model Runner:
docker model run hf.co/BAAI/AquilaCode-py
Commit History
-
Update README.md
Verified signature3444405
-
Update change_log.log
f8971be -
Update README.md
26a7f71 -
Update README_zh.md
4e8de2b -
Update README.md
7850d23 -
Update README.md
f01765f
-
Update README_zh.md
83dfc94
-
Update README_zh.md
f359e84 -
Update README.md
06213d5 -
Update README.md
94228d3 -
Update README.md
4bddf88 -
Update config.json
9399a8e -
Update change_log.log
11352f4 -
Upload 2 files
777a9ad -
Create change_log.log
b102e0c -
Create README_zh.md
92da270 -
Update README.md
4e4e7b0 -
Update README.md
6b57189 -
Upload BAAI Aquila Model License Agreement.pdf
5f0d252 -
Upload 7 files
be08d4e -
Upload log.jpeg
fca4513 -
Update README.md
6a1db5a -
initial commit
2bde756