Downloads · 30 days
291
55% of all-time downloads
Arm/qwen3-0-6b-onnx-genai-int4-kquantlast-emb-int4
qwen3-0-6b-onnx-genai-int4-kquantlast-emb-int4 is a text generation model from Arm. Use it when you need the model to write or continue text. It is set up for onnxruntime-genai. The card lists the license as apache-2.0.
Qwen3-0.6B optimized with GPTQ INT4 weight quantization and packaged in the ONNX Runtime GenAI format for efficient text generation on Arm-based Cloud CPU systems.
Downloads · 30 days
291
55% of all-time downloads
All-time downloads
533
Public
Repo size
495 MB
Likes
0
Public
Click a slice to open those files.
.data483 MB · 98%
From the Hugging Face model README
Qwen3-0.6B optimized with GPTQ INT4 weight quantization and packaged in the ONNX Runtime GenAI format for efficient text generation on Arm-based Cloud CPU systems.
Qwen3-0.6B optimized with GPTQ INT4 weight quantization for the attention and FFN projections, an INT8 k_quant_last LM head, and a natively INT4-packed embedding table, exported to the ONNX Runtime GenAI bundle format for efficient text generation on Arm-based Cloud CPU systems.
This repository contains an Arm-optimized version of Qwen/Qwen3-0.6B for text generation and instruction following. The model is provided in ONNX (ONNX Runtime GenAI) format, targeting Cloud CPU systems.
This version is intended to demonstrate efficient inference on Arm-based platforms while preserving the original model's intended behavior. Arm has evaluated this model on MMLU and measured performance on a representative evaluation target.
Key results
| Area | Result |
|---|---|
| Model format | ONNX, ONNX Runtime GenAI bundle |
| Target device class | Cloud CPU |
| Reference device | AWS Graviton G4 (r8g.xlarge, Neoverse-V2, Ubuntu 24.04) |
| Primary performance result | 70.40 tok/s decode throughput (3.18x faster than the FP32 baseline) |
| Accuracy result | MMLU 5-shot 45.18% |
| Size / memory result | 461.25 MB (6.22x smaller than the FP32 baseline), 838.22 MB peak memory |
| Field | Value |
|---|---|
| Original model | Qwen3-0.6B |
| Original source | Hugging Face |
| Original developer | Alibaba Cloud (Qwen team) |
| Original model card | Qwen/Qwen3-0.6B |
| Original license | Apache-2.0 |
| File | Description |
|---|---|
model.onnx | Arm-optimized model for deployment, ONNX Runtime GenAI graph |
model.onnx.data | External-data side-car holding the INT4 weights |
genai_config.json | ONNX Runtime GenAI decoder and search configuration |
tokenizer.json, tokenizer_config.json | Qwen3 BPE tokenizer, 151,936 vocabulary |
chat_template.jinja | Qwen3 ChatML template, rendered at runtime by the example |
example.py | Minimal inference example |
predictions.json | Example output produced by the optimized model |
pyproject.toml | Pinned runtime dependencies for example.py, resolved with uv |
.python-version | Python release the example was validated with |
uv.lock | Locked dependency resolution for pyproject.toml |
config.yaml, metadata.yaml | Model I/O contract and model identity used by the example |
benchmarks/ | FP32 baseline and Arm-optimized benchmark records |
Performance was measured on the reference configuration below. Results are intended to make the optimization reproducible but do not guarantee identical performance on every Arm-based system.
Reference configuration
| Field | Value |
|---|---|
| Device / platform | AWS Graviton G4, r8g.xlarge |
| CPU / accelerator | Neoverse-V2 (aarch64, 4 threads) |
| OS | Linux, Ubuntu 24.04 |
| Runtime | ONNX Runtime 1.27.0 with ONNX Runtime GenAI 0.14.1 |
| Backend / delegate | CPU execution provider, MLAS with KleidiAI |
| Batch size | 1 |
| Precision | INT4 weights with dynamic per-token INT8 activations; INT8 LM head; INT4 embedding |
| Runs | 2 warmup, 30 measured; 127-token prompt, 60-token continuation |
Performance results
| Metric | Original / baseline | Arm-optimized | Improvement |
|---|---|---|---|
| Decode throughput | 22.17 tok/s | 70.40 tok/s | 3.18x |
| Per-token decode latency | 45.11 ms | 14.20 ms | 3.18x |
| Time to first token | 818.64 ms | 334.11 ms | 2.45x |
| p50 latency | 3527.37 ms | 1197.60 ms | 2.95x |
| p90 latency | 3651.42 ms | 1292.14 ms | 2.83x |
| p99 latency | 3708.18 ms | 1317.93 ms | 2.81x |
| Model load time | 2471.85 ms | 682.80 ms | 3.62x |
| Model size | 2868.61 MB | 461.25 MB | 6.22x smaller |
| Peak memory | 2523.21 MB | 838.22 MB | 3.01x less |
Decode is dispatched almost entirely to MLAS: 98.23% of decode time and 69.90% of operators.
Accuracy was evaluated using the same preprocessing, input resolution, and evaluation protocol described below. Where possible, the optimized model is compared against the original model under the same evaluation conditions.
Evaluation setup
| Field | Value |
|---|---|
| Dataset | MMLU |
| Split | test, all 57 subjects, 5-shot |
| Number of samples | 14042 |
| Metric(s) | Accuracy, macro accuracy |
| Evaluation runtime | ONNX Runtime GenAI |
Accuracy results
| Metric | Original / baseline | Arm-optimized | Change |
|---|---|---|---|
| MMLU accuracy | 47.32% | 45.18% | -2.14 pp |
| MMLU macro accuracy | 49.16% | 46.81% | -2.35 pp |
| 95% confidence interval | [46.50, 48.15] | [44.36, 46.00] | no overlap |
Accuracy was measured using the evaluation setup described above. Users should re-evaluate the model on their own data before production use.
Arm optimized this model for efficient inference on Arm-based platforms using a hardware-aware conversion and validation flow.
For this release, Arm used:
| Optimization area | Applied? | Notes |
|---|---|---|
| Model conversion | Yes | Converted to an ONNX Runtime GenAI bundle with the GenAI model builder, which fuses attention and writes model.onnx, model.onnx.data, genai_config.json and the tokenizer files |
| Quantization | Yes | Attention and FFN projections quantized to INT4 with GPTQ, per-group g=32, calibrated offline on 512 WikiText2 samples, with dynamic per-token INT8 activations inside MatMulNBits. The LM head is kept at INT8 static per-row using the k_quant_last recipe, and the embedding table uses the native INT4 GatherBlockQuantized operator. No module is left at FP32 |
| Runtime/backend selection | Yes | CPU execution provider with MLAS and KleidiAI |
| Graph/runtime compatibility updates | Yes | Performed as part of the ONNX Runtime GenAI export pipeline |
| Accuracy validation | Yes | Compared against the original model or published baseline |
| Performance validation | Yes | Measured on the reference Arm platform |
The goal of this process is to improve deployment characteristics such as latency, memory use, model size, and runtime compatibility while preserving the model's intended behavior. Detailed conversion scripts, calibration configuration, or backend-specific implementation details may be provided separately where appropriate.
Dependencies are declared in pyproject.toml, which ships with this repository. Resolve and install them into a local virtual environment with uv:
uv python install
uv sync --frozen
The lock was resolved on a representative evaluation target, so the frozen sync installs exactly the wheels this model was validated with: ONNX Runtime GenAI 0.14.1 and ONNX Runtime 1.27.0, the versions the results above were measured with, plus tokenizers and jinja2. Both runtimes publish aarch64 manylinux wheels with KleidiAI enabled, so no source build is needed on a system with glibc 2.28 or newer, and no additional operating system packages are required.
The graph loads its weights from model.onnx.data, so download that side-car and the tokenizer files into the same directory.
uv run example.py
The example loads the bundle from its own directory, renders the chat template for a single user turn, and greedy-decodes the reply. Its output reproduces the first entry of predictions.json exactly on a representative evaluation target.
| Property | Value |
|---|---|
| Input shape | [1, T], where T is the runtime sequence length |
| Input type | int64 token ids |
| Input range | Token ids in [0, 151935] |
| Preprocessing | Apply the Qwen3 ChatML template in chat_template.jinja to the user prompt, then tokenize with the bundled BPE tokenizer. Positions are derived internally by the GenAI graph, so there is no position_ids input, and the KV cache is owned by the runtime |
| Property | Value |
|---|---|
| Output shape | One token id per decode step |
| Output type | int64 token ids |
| Postprocessing | Iterate the generator until the end-of-sequence token is emitted or the 512-token budget is reached, then decode the sequence with the same BPE tokenizer |
This model is intended for developers evaluating text generation workloads on Arm-based platforms. It is suitable as a reference implementation for benchmarking, prototyping, and integration exploration.
Thinking mode. Qwen3 supports an optional reasoning block before the final answer. It is disabled in example.py for faster and more predictable output.
Upstream references. ONNX Runtime GenAI provides the model builder and runtime; GPTQ is the quantization algorithm; MMLU is the evaluation benchmark; the Qwen3 Technical Report describes the base model.
Original Model: Qwen3-0.6B by Alibaba Cloud (Qwen team) - Repository
Optimization/conversion: Arm-Optimized version for execution on Arm-based platforms.
Converted/optimized by: Arm
License: The Original Model and the Optimized Model are subject to Apache-2.0.
This repository contains a converted or optimized version of the Original Model (the “Optimized Model”). The Original Model has been converted or optimized as described above for execution on Arm-based platforms.
No retraining or fine-tuning of the Original Model was performed as part of the conversion or optimization. The conversion or optimization was not intended to change the Original Model’s behavior or intended use.
For information about the Original Model, including its development, training data, intended uses, limitations and other relevant information, please refer to the Original Model repository. Information in that repository was provided by the original developer or other third parties and, unless expressly stated otherwise, has not been independently verified by Arm.
Use of the Original Model and the Optimized Model is subject to the applicable licenses, usage restrictions and other terms identified above and in the relevant repositories. Publication of the Optimized Model does not grant any rights beyond those provided under the applicable license terms.
You are responsible for reviewing those terms and ensuring that your use of the Original Model and the Optimized Model is permitted.
The Optimized Model is provided as a reference implementation to demonstrate and evaluate execution and performance on Arm-based systems. It is not a production-ready or supported solution.
Arm’s publication of the Optimized Model does not constitute an endorsement or certification of the Original Model or a representation that the Optimized Model is suitable for production use or any particular purpose.
To the fullest extent permitted by applicable law (i) the Optimized Model is provided “as is.” Arm makes no representations or warranties that the Original Model, the Optimized Model or their outputs are accurate, safe, secure, non-infringing, legally compliant, suitable for production use or fit for any particular purpose; and (ii) Arm will not be liable for any loss or damage arising from or in connection with the Optimized Model, its use or its outputs.
You are responsible for independently evaluating the Optimized Model, its outputs and its suitability for your intended use, including compliance with applicable legal, regulatory, safety and security requirements.
Arm does not commit to provide ongoing support, maintenance or updates for the Optimized Model. Any use of or reliance on the Optimized Model or its outputs is at your own risk.