CoolFace
Modelpublic

zhangsq-nju/Qwen3-0.6B-EdgeRazor-1.88bit

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
1likes37downloads
Model Card

<div align="center"> <br/> <img src="./asset/Logo-HF.png" alt="EdgeRazor Logo" width="60%"> <h3> EdgeRazor for Lightweight LLMs </h3>

<p> <a href="https://arxiv.org/abs/2605.04062" target="blank"> <img src="https://img.shields.io/badge/arXiv-EdgeRazor-b31b1b?style=flat&logo=arxiv" alt="arXiv EdgeRazor"> </a> <a href="https://github.com/zhangsq-nju/EdgeRazor" target="blank"> <img src="https://img.shields.io/badge/GitHub-EdgeRazor-blue?style=flat&logo=github" alt="GitHub EdgeRazor"> </a> <a href="https://pypi.org/project/edgerazor/" target="blank"> <img src="https://img.shields.io/pypi/v/edgerazor?style=flat&logo=pypi" alt="PyPI EdgeRazor"> </a> </p>

</div>

<h1>Qwen3-0.6B-EdgeRazor-1.88bit</h1>

Contents

Model Overview

Model Bit-Widths

Mixed-Precision RecipeBit-WidthThis Repo
100% 4-bit + 0% 1.58-bit4
50% 4-bit + 50% 1.58-bit2.79
12.5% 4-bit + 87.5% 1.58-bit1.88✔️
0% 4-bit + 100% 1.58-bit1.58

Model Performance

ModelsW-A-KVARC-eARC-cHellaS.BoolQPIQAWinoG.SIQAOBQATr.QA2EthicsMMLUIFEvalGSM8KHumanE.Average (↑)
Qwen3-0.6B16-16-1656.0234.0447.2364.0467.3656.0439.2031.2042.8447.7040.1258.4141.5437.2047.35
EdgeRazor4-16-1658.5433.4545.0468.0168.3455.7240.0733.4043.6954.3639.3753.4242.0034.1547.83
EdgeRazor2.79-16-1651.7728.3337.4770.7063.7154.0640.3328.2042.7255.0836.8551.3926.6931.1044.17
EdgeRazor1.88-16-1651.2227.7334.2166.9163.6653.3538.4327.6043.8055.9228.7842.5125.0923.1741.60
EdgeRazor1.58-16-1645.7525.7733.8966.6460.7252.3338.2329.8044.4051.7032.8537.3414.2523.1739.77
EdgeRazor4-8-857.7933.7045.0067.4967.8555.8840.1733.8043.5354.0939.7353.4242.0034.7647.80
EdgeRazor2.79-8-852.1028.5037.3670.5863.9253.1240.1228.6042.8254.9736.4449.5426.9932.3244.10
EdgeRazor1.88-8-851.4727.9934.2266.8563.4953.0438.0227.4043.8855.9229.5644.5525.0923.1741.76
EdgeRazor1.58-8-844.8726.1133.8866.7360.5551.3038.2831.0044.7250.7633.0938.4515.0122.5639.81

Quickstart

It is recommended to ensure that EdgeRazor is installed in advance for weight-activation quantization. The provided weights are already quantized (quantizedweights*scalingbf16); to enable activation and KV cache quantization, set trust_remote_code=True in the model configuration.

python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "zhangsq-nju/Qwen3-0.6B-EdgeRazor-1.88bit"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True,
)

# prepare the model input
prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False # For EdgeRazor-nbit, we only train the instruct mode.
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 

# parsing thinking content
try:
    # rindex finding 151668 (</think>)
    index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
    index = 0

thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")

print("thinking content:", thinking_content)
print("content:", content)

Citation

If you find our project useful in your research, please consider kindly citing our papers ✏️:

@article{zhangsh-edgerazor,
  title={{EdgeRazor}: A Lightweight Framework for Large Language Models via Mixed-Precision Quantization-Aware Distillation},
  author={Shu-Hao Zhang and Le-Tong Huang and Xiang-Sheng Deng and Xin-Yi Zou and Chen Wu and Nan Li and Shao-Qun Zhang},
  year={2026},
  journal={arXiv preprint arXiv:2605.04062}
}