Qwen3-8B: State-of-the-art large language model useful on a variety of language understanding and generation tasks
The Qwen3-8B is a state-of-the-art multilingual base language model with 8 billion parameters, excelling in language understanding, generation, coding, and mathematics.
This is based on the implementation of Qwen3-8B found here. This repository contains scripts for optimized on-device export suitable to run on Qualcomm® devices. More details on model performance across various devices, can be found here.
Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.
Use our lightweight command-line interface to inspect and download Qwen3-8B:
pip install qai_hub_models_cli # (the CLI is also available with the qai-hub-models package)
# Inspect the model and list the available download options
qai-hub-models info Qwen3-8B
# Print performance and accuracy metrics
qai-hub-models perf Qwen3-8B
qai-hub-models numerics Qwen3-8B
# Download a ready-to-deploy asset
qai-hub-models fetch Qwen3-8B --runtime geniex_qairt --precision w4a16See the CLI README for the full list of commands and filters.
Follow the GenieX quickstart to install GenieX and deploy the model on a target device.
See the LLM-on-Genie tutorial to run with the Genie runtime. Note: Genie support will be deprecated soon.
Install the package via pip:
# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
pip install "qai-hub-models[qwen3-8b]"For qwen3_8b, some additional functionality can be faster or is available only with a GPU on the host machine.
- 🟢 Exporting the model for on-device deployment (GPU not required)
- 🟡 Running the demo (GPU recommended for speed, but not required)
- 🟡 Running evaluation (GPU recommended for speed, but not required)
- 🔴 Quantizing the model (GPU required)
If you are quantizing your own variant of qwen3_8b, a dedicated CUDA enabled GPU (40 GB VRAM for 3B models to 80 GB VRAM for 8B models) is recommended. A GPU can also increase the speed of evaluation and demo of your quantized model significantly but it not strictly required.
Install the GPU package via pip:
# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
pip install "qai-hub-models[qwen3-8b]" onnxruntime-gpu==1.23.2 https://github.com/quic/aimet/releases/download/2.26.0/aimet_onnx-2.26.0+cu121-cp310-cp310-manylinux_2_34_x86_64.whl -f https://download.pytorch.org/whl/torch_stable.htmlSign-in to Qualcomm® AI Hub Workbench with your
Qualcomm® ID. Once signed in navigate to Account -> Settings -> API Token.
With this API token, you can configure your client to run models on the cloud hosted devices.
qai-hub configure --api_token API_TOKENNavigate to docs for more information.
Run the following simple CLI demo to verify the model is working end to end:
python -m qai_hub_models.models.qwen3_8b.demoMore details on the CLI tool can be found with the --help option. See
demo.py for sample usage of the model including pre/post processing
scripts. Please refer to our general instructions on using
models for more usage instructions.
To run the model on Qualcomm® devices, you must export the model for use with an edge runtime such as TensorFlow Lite, ONNX Runtime, or Qualcomm AI Engine Direct. Export the pre-quantized model (published on AI Hub) for on-device deployment:
qai-hub-models export qwen3_8b --checkpoint DEFAULT_W4A16 --target-runtime geniex_qairt --device "Samsung Galaxy S25 (Family)"--checkpoint also accepts DEFAULT (the model's default precision).
Optionally, quantize your own variant first and export the resulting checkpoint:
python -m qai_hub_models.models.qwen3_8b.quantize --precision w4a16 --output-dir ./quantized_checkpoint
qai-hub-models export qwen3_8b --checkpoint ./quantized_checkpoint --target-runtime geniex_qairt --device "Samsung Galaxy S25 (Family)"Additional options are documented with the --help option.
- The license for the original implementation of Qwen3-8B can be found here.
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
This model may not be used for or in connection with any of the following applications:
- Accessing essential private and public services and benefits;
- Administration of justice and democratic processes;
- Assessing or recognizing the emotional state of a person;
- Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
- Education and vocational training;
- Employment and workers management;
- Exploitation of the vulnerabilities of persons resulting in harmful behavior;
- General purpose social scoring;
- Law enforcement;
- Management and operation of critical infrastructure;
- Migration, asylum and border control management;
- Predictive policing;
- Real-time remote biometric identification in public spaces;
- Recommender systems of social media platforms;
- Scraping of facial images (from the internet or otherwise); and/or
- Subliminal manipulation