Instructions to use BAAI/Aquila2-34B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BAAI/Aquila2-34B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BAAI/Aquila2-34B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BAAI/Aquila2-34B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BAAI/Aquila2-34B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BAAI/Aquila2-34B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BAAI/Aquila2-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BAAI/Aquila2-34B
- SGLang
How to use BAAI/Aquila2-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/Aquila2-34B" \ --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": "BAAI/Aquila2-34B", "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 "BAAI/Aquila2-34B" \ --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": "BAAI/Aquila2-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use BAAI/Aquila2-34B with Docker Model Runner:
docker model run hf.co/BAAI/Aquila2-34B
Commit History
-
Update README.md
Verified signatured0ff5a6
-
Update README.md
Verified signature131a9b7
-
Delete model-00016-of-00016.safetensors
Verified signature875f22f -
Delete model-00015-of-00016.safetensors
Verified signature696222b -
Delete model-00014-of-00016.safetensors
Verified signature4902f4d -
Delete model-00013-of-00016.safetensors
Verified signature0126e5f -
Delete model-00012-of-00016.safetensors
Verified signaturec91c280 -
Delete model-00011-of-00016.safetensors
Verified signature94777a1 -
Delete model-00010-of-00016.safetensors
Verified signaturee15559e -
Delete model-00009-of-00016.safetensors
Verified signature8c53e5e -
Delete model-00008-of-00016.safetensors
Verified signaturec8c27ae -
Delete model-00007-of-00016.safetensors
Verified signature730c49e -
Delete model-00006-of-00016.safetensors
Verified signature5ee98cd -
Delete model-00005-of-00016.safetensors
Verified signaturea668e19 -
Delete model-00004-of-00016.safetensors
Verified signature4cfc29f -
Delete model-00003-of-00016.safetensors
Verified signature9c1f261 -
Delete model-00002-of-00016.safetensors
Verified signature5f20409 -
Delete model-00001-of-00016.safetensors
Verified signature72f48e0 -
Upload tokenizer_config.json with huggingface_hub
Verified signaturebd62c9b -
Upload tokenizer.json with huggingface_hub
Verified signature7912f48 -
Upload special_tokens_map.json with huggingface_hub
Verified signatured7ef21b -
Upload modeling_aquila.py with huggingface_hub
Verified signature7658b91 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature4c211c0 -
Upload model-00029-of-00029.safetensors with huggingface_hub
Verified signature089fea0 -
Upload model-00028-of-00029.safetensors with huggingface_hub
Verified signatured82b711 -
Upload model-00027-of-00029.safetensors with huggingface_hub
Verified signatureb2d79af -
Upload model-00026-of-00029.safetensors with huggingface_hub
Verified signaturea90cb85 -
Upload model-00025-of-00029.safetensors with huggingface_hub
Verified signature0d579a5 -
Upload model-00024-of-00029.safetensors with huggingface_hub
Verified signaturee483488 -
Upload generation_config.json with huggingface_hub
Verified signature766b155 -
Upload configuration_aquila.py with huggingface_hub
Verified signature3df47a3 -
Upload config.json with huggingface_hub
Verified signature3951734 -
Upload generation_config.json with huggingface_hub
Verified signature7be108b -
Upload configuration_aquila.py with huggingface_hub
Verified signatureb766b50 -
Upload config.json with huggingface_hub
Verified signatureabf19c0
-
Upload model-00024-of-00029.safetensors with huggingface_hub
Verified signaturef6a6b22 -
Upload model-00023-of-00029.safetensors with huggingface_hub
Verified signaturecf1ddaf -
Upload model-00022-of-00029.safetensors with huggingface_hub
Verified signature4b8754e -
Upload model-00021-of-00029.safetensors with huggingface_hub
Verified signature46af8fd -
Upload model-00020-of-00029.safetensors with huggingface_hub
Verified signature5b3f2f3 -
Upload model-00019-of-00029.safetensors with huggingface_hub
Verified signature15a86f0 -
Upload model-00018-of-00029.safetensors with huggingface_hub
Verified signature37af381 -
Upload model-00017-of-00029.safetensors with huggingface_hub
Verified signature96e378c -
Upload model-00016-of-00029.safetensors with huggingface_hub
Verified signature75baaaa -
Upload model-00015-of-00029.safetensors with huggingface_hub
Verified signature8ff6c46 -
Upload model-00014-of-00029.safetensors with huggingface_hub
Verified signatureda3e0db -
Upload model-00013-of-00029.safetensors with huggingface_hub
Verified signature2d66e9b -
Upload model-00012-of-00029.safetensors with huggingface_hub
Verified signatureb72d2d0 -
Upload model-00011-of-00029.safetensors with huggingface_hub
Verified signature5eb094a -
Upload model-00010-of-00029.safetensors with huggingface_hub
Verified signaturea92b245