Instructions to use BAAI/AquilaChat2-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/AquilaChat2-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BAAI/AquilaChat2-7B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BAAI/AquilaChat2-7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BAAI/AquilaChat2-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BAAI/AquilaChat2-7B" # 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-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BAAI/AquilaChat2-7B
- SGLang
How to use BAAI/AquilaChat2-7B 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-7B" \ --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-7B", "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-7B" \ --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-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BAAI/AquilaChat2-7B with Docker Model Runner:
docker model run hf.co/BAAI/AquilaChat2-7B
Commit History
-
Update README.md
Verified signaturec420c47
-
Update README.md
Verified signature9905960
-
Update README_zh.md
0d060c4 -
Update README_zh.md
1c0b24c
-
Rename BAAI-Aquila-Model-License -Agreement.pdf to BAAI-Aquila-Model-License-Agreement.pdf
079defd
-
Update generation_config.json
f881b92
-
Delete training_args.bin
f6d267b -
Delete trainer_state.json
64cdcf8
-
Update tokenizer_config.json
c91e1b3
-
Upload predict.py
cf7e4c4
-
Update README.md
34cdce5
-
Upload predict.py
02760f6
-
Upload predict.py
380ba89 -
Update README.md
a3be330 -
Update README.md
870a119 -
Upload predict.py
7286e54
-
Delete chat_metrics_CN.jpeg
a7b317c -
Delete chat_metrics.jpeg
cf26631 -
Update README.md
0847d64
-
Update README_zh.md
0ae353e -
Upload 2 files
5cfa5d9
-
Update README_zh.md
091bd28 -
Update README.md
8ac8b62 -
Update README_zh.md
44b17f4 -
Update README.md
0a9d668 -
Update README_zh.md
9ea5277 -
Update README_zh.md
b945670 -
Update README_zh.md
7649611 -
Update README.md
8efc67c -
Update README.md
63e75ae -
Upload BAAI-Aquila-Model-License -Agreement.pdf
f436dba -
Update README.md
cfbf18b -
Update README.md
3c2c00b -
Upload chat_metrics.jpeg
77028aa -
Update README_zh.md
1df336d -
Create README_zh.md
3713fdc -
Upload log.jpeg
4f8a921 -
Update README.md
9ffef71
-
Update config.json
08a2252 -
Update modeling_aquila.py
a14926c -
Update modeling_aquila.py
3c7eb0e -
Create configuration_aquila.py
24f9b96 -
Create modeling_aquila.py
54c3659
-
Upload pytorch_model-00003-of-00003.bin
8ecc4e9 -
Update config.json
69b035c -
Upload 7 files
4c79fb6 -
Upload pytorch_model-00002-of-00003.bin
8e76e01 -
Upload 5 files
d2990b8 -
initial commit
afebb57