Instructions to use BAAI/AquilaChat2-34B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/AquilaChat2-34B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BAAI/AquilaChat2-34B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BAAI/AquilaChat2-34B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BAAI/AquilaChat2-34B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BAAI/AquilaChat2-34B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/AquilaChat2-34B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BAAI/AquilaChat2-34B
- SGLang
How to use BAAI/AquilaChat2-34B 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/AquilaChat2-34B" \ --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/AquilaChat2-34B", "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/AquilaChat2-34B" \ --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/AquilaChat2-34B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BAAI/AquilaChat2-34B with Docker Model Runner:
docker model run hf.co/BAAI/AquilaChat2-34B
Commit History
-
Update README.md
Verified signaturef63952b
-
Update README.md
Verified signature5c7990b
-
Update README.md
b9cd9c7 -
Update README_zh.md
65b0429 -
Update README_zh.md
ff4a085 -
Update README.md
d2b106c -
Update README.md
7087738
-
Update README_zh.md
4608b75 -
Update README.md
36d9bca -
Update README_zh.md
eb6c4d1 -
Update README.md
3baae1f -
Update README_zh.md
6186a61 -
Update README_zh.md
97f9bb7 -
Update README.md
07f4214 -
Update README.md
571a14f -
Update README.md
bebf30b -
Delete training_args.bin
1cce454 -
Delete trainer_state.json
af9b037 -
Update README.md
65f5303 -
Update README_zh.md
fa0809c
-
Upload pytorch_model-00007-of-00007.bin with huggingface_hub
3784736 -
Upload pytorch_model-00006-of-00007.bin with huggingface_hub
a222f08 -
Upload pytorch_model-00005-of-00007.bin with huggingface_hub
b2f82b8 -
Upload pytorch_model-00004-of-00007.bin with huggingface_hub
4d78fac -
Upload pytorch_model-00003-of-00007.bin with huggingface_hub
3f58da9 -
Upload pytorch_model-00002-of-00007.bin with huggingface_hub
39f8f6e -
Update tokenizer_config.json
f54b431 -
Upload pytorch_model-00001-of-00007.bin with huggingface_hub
8b6b4db
-
Upload predict.py
a3e49d8 -
Update README.md
7b1d55e -
Update README.md
dfdfe42
-
Update README.md
f7073ec -
Update README.md
17734e6
-
Upload predict.py
5220fea
-
Upload predict.py
cde5d63 -
Upload predict.py
eb27b1a -
Update README.md
973ff4c
-
Delete chat_metrics_CN.jpeg
89aaa1a -
Delete chat_metrics.jpeg
dec08d2 -
Update README.md
8648a55
-
Update README_zh.md
dcb2a8a -
Upload 2 files
0dd62cc
-
Upload tokenizer.json
4952f4a -
Delete tokenizer.json
72d5c7a -
Upload pytorch_model-00007-of-00007.bin
b04c9dd -
Delete pytorch_model-00007-of-00007.bin
8288ac5
-
Update README_zh.md
78036fe -
Update README.md
a4e36a2 -
Upload BAAI-Aquila-Model-License -Agreement.pdf
511dd6c -
Create config.json
16d7b52