CoolFace
Modelpublic

zhangsq-nju/MobileLLM-350M-EdgeRazor-4bit

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
1likes79downloads
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>MobileLLM-350M-EdgeRazor-4bit</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.QA2EthicsMMLUGSM8KHumanE.Average (↑)
MobileLLM-350M16-16-1664.9435.4952.8758.9670.8456.3540.7940.2037.4453.9823.520.000.0041.18
EdgeRazor4-16-1669.1936.2651.9162.2670.4056.2040.7437.4037.9657.4125.000.530.0041.94
EdgeRazor2.79-16-1665.8732.6845.9861.7168.8256.2740.0235.0038.9756.5324.270.760.0040.53
EdgeRazor1.88-16-1661.2028.7540.7658.2366.5955.0139.5133.0040.9856.2225.030.530.0038.91
EdgeRazor1.58-16-1658.6326.1938.9558.0765.2953.0439.3032.2041.9756.2624.120.530.0038.04
EdgeRazor4-8-869.1135.8451.8262.6070.3556.2040.5837.4037.9057.2124.660.450.0041.86
EdgeRazor2.79-8-865.9932.6845.9962.1168.5556.5140.0735.2039.0556.5124.410.990.0040.62
EdgeRazor1.88-8-861.3629.1840.8658.2366.9255.4939.5633.2040.9556.1324.970.380.0039.02
EdgeRazor1.58-8-858.6726.1938.9258.0465.2353.8339.2532.0042.0356.3324.190.830.0038.12

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
tokenizer = AutoTokenizer.from_pretrained(
    "zhangsq-nju/MobileLLM-ParetoQ-350M-BF16-EdgeRazor-4bit",
    use_fast=False
)
model = AutoModelForCausalLM.from_pretrained(
    "zhangsq-nju/MobileLLM-ParetoQ-350M-BF16-EdgeRazor-4bit", 
    trust_remote_code=True
)

Note that the default tokenizer does not contain special tokens. For example you can use:

bash
tokenizer.add_special_tokens(
    {
        "eos_token": "</s>",
        "bos_token": "<s>",
        "unk_token": "<unk>",
    }
)

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}
}