Instructions to use AXERA-TECH/Qwen2.5-Omni-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AXERA-TECH/Qwen2.5-Omni-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AXERA-TECH/Qwen2.5-Omni-3B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AXERA-TECH/Qwen2.5-Omni-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AXERA-TECH/Qwen2.5-Omni-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AXERA-TECH/Qwen2.5-Omni-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AXERA-TECH/Qwen2.5-Omni-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AXERA-TECH/Qwen2.5-Omni-3B
- SGLang
How to use AXERA-TECH/Qwen2.5-Omni-3B 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 "AXERA-TECH/Qwen2.5-Omni-3B" \ --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": "AXERA-TECH/Qwen2.5-Omni-3B", "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 "AXERA-TECH/Qwen2.5-Omni-3B" \ --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": "AXERA-TECH/Qwen2.5-Omni-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AXERA-TECH/Qwen2.5-Omni-3B with Docker Model Runner:
docker model run hf.co/AXERA-TECH/Qwen2.5-Omni-3B
Qwen2.5-Omni-3B
This version of Qwen2.5-Omni-3B has been converted to run on the Axera NPU using w8a16 quantization.
Compatible with Pulsar2 version: 3.4
Convert tools links:
For those who are interested in model conversion, you can try to export axmodel through the original repo : https://huggingface.co/Qwen/Qwen2.5-Omni-3B
Pulsar2 Link, How to Convert LLM from Huggingface to axmodel
Support Platform
- AX650
- AX650N DEMO Board
- M4N-Dock(η±θ―ζ΄ΎPro)
- M.2 Accelerator card
Audio Process εΎ θ‘₯ε
Image Process εΎ θ‘₯ε
Video Process εΎ θ‘₯ε
The DDR capacity refers to the CMM memory that needs to be consumed. Ensure that the CMM memory allocation on the development board is greater than this value.
How to use
Download all files from this repository to the device
If you using AX650 Board
(base) lihongjie@ai-dev1:~/axera-tech/Qwen2.5-Omni-3B$ tree -L 2
.
βββ python
β βββ modeling_axinfer.py
β βββ preprocess.py
β βββ run_axinfer.py
β βββ utils_axinfer.py
β βββ utils_lm.py
β βββ utils.py
β βββ utils_vl.py
βββ Qwen2.5-Omni-3B-AX650-talker-chunk_prefill_512
β βββ config.json
β βββ qwen2_5_omni_talker_p128_l0_together.axmodel
......
β βββ qwen2_5_omni_talker_post.axmodel
β βββ special_tokens_map.json
β βββ spk_dict.pt
β βββ thinker_to_talker_proj_decode.axmodel
β βββ thinker_to_talker_proj_prefill_512.axmodel
β βββ token2wav_bigvgan.axmodel
β βββ token2wav_dit.axmodel
β βββ tokenizer_config.json
β βββ tokenizer.json
β βββ vocab.json
βββ Qwen2.5-Omni-3B-AX650-thinker-chunk_prefill_512
β βββ config.json
......
β βββ Qwen2.5-Omni-3B_vision.axmodel
β βββ qwen2_5_omni_text_p128_l0_together.axmodel
......
β βββ qwen2_5_omni_text_post.axmodel
βββ README.md
βββ videos
Demo
θΏθ‘ε½δ»€
cd python
python3 run_axinfer.py
output
text
It's a Nord Electro 6 keyboard. It's a really popular one. It has a lot of features like different sounds and effects. Have you played with it much?
Model tree for AXERA-TECH/Qwen2.5-Omni-3B
Base model
Qwen/Qwen2.5-Omni-3B