OnQ-Qwen3-1.7B-W2
OnQ is a low-bit recovery pipeline combining on-policy distillation and candidate-wise Dynamic KL. This repository contains the Qwen3-1.7B, W2, group size 128 inference checkpoint, used in the OnQ main experiments.
Model details
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen3-1.7B |
| Weight quantization | 2-bit, uniform asymmetric, group size 128 |
| Activations | BF16 |
| Training | Block-wise calibration followed by on-policy distillation with candidate-wise Dynamic KL |
| Released weights | Materialized fake-quant values stored in BF16 safetensors |
| License | Apache 2.0 |
The low-bit quantization is already applied to the linear-layer weights. These are ordinary BF16 tensors that load with the standard Qwen3 implementation. W2 describes the quantization grid; this release does not provide packed 2-bit storage or low-bit inference kernels. Disk size and inference memory therefore follow the BF16 representation. No additional quantizer or custom model code is required. Optimizer states and latent training weights are not included.
Load and generate
pip install 'transformers==4.57.6' accelerate torch safetensors
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Ryannnnnnz/OnQ-Qwen3-1.7B-W2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
messages = [{"role": "user", "content": "Solve 2x + 3 = 11."}]
text = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs, max_new_tokens=4096, do_sample=True,
temperature=0.6, top_p=0.95, top_k=20,
pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
This is an inference example. Reproducing benchmark scores also requires the corresponding prompts, generation limits, seeds, and benchmark scorers.
Release integrity
Weight-file SHA-256 values were checked against the formal evaluation checkpoint manifest before release. SHA256SUMS records the released payload. Configuration metadata containing internal service addresses and machine paths was removed; weight tensors are unchanged.
Intended use and limitations
This checkpoint supports research on low-bit language-model reasoning. Quantization can reduce accuracy, and generated reasoning can be incorrect or repetitive. The model may inherit biases and harmful-output risks from its base model and training data; outputs should be checked for the intended application.