小工具知识网

当前位置: 首页 > 行业知识 > LLM int4算法autoround v0.1即将发布,欢迎试用

行业知识

LLM int4算法autoround v0.1即将发布,欢迎试用

2026-11-02 04:42:48 来源:互联网转载

���述

()

AutoRound(https://github.com/intel/auto-round)实现了出色的量化性能,在W4G128上多数场景中接近无损压缩,适用于包括gemma-7B、Mistral-7b、Mixtral-8x7B-v0.1、Mixtral-8x7B-Instruct-v0.1、Phi2、LLAMA2等一系列流行模型。在尽量公正的评估中,AutoRound在W4G128、W4G-1、W3G128、W2G128的大多数场景中优于GPTQ,AWQ等方法

主要特性

()
  • 广泛的模型支持:AutoRound可以量化多种模型族,涵盖了gemma、Mistral-7b、Mixtral-8x7B-v0.1、LLAMA1、LLAMAv2、GPT、QWEN1、OPT、Bloom、Falcon、GPT-LEO、StableLM-Base-Alpha、Dolly-v2、MPT、GPT-J-6b、ChatGLM2等。
  • 导出灵活性:无缝导出量化模型到ITREX [1]格式,用于部署在Intel CPU上,以及导出到AutoGPTQ [2]格式,用于在Nvidia-GPU上运行。
  • Tuning设备兼容性:支持tuning设备扩展到Intel CPU、Intel Guadi2和Nvidia-GPU。
  • 数据集兼容性:AutoRound支持与Pile10k和MBPP数据集的校准,可轻松扩展以纳入其他所需的数据集。

    示例

    • 语言建模模型量化示例。
    • 代码生成模型量化示例。

      其他

      • 已量化模型:已在Hugging Face发布几个预先量化的模型,由于公司内部审核,有些模型待发布
      • 大量得准确性数据。

        精度数据示例

        gemma-7b

        Install lm-eval-harness from source, and the git id 96d185fa6232a5ab685ba7c43e45d1dbb3bb906d, Install the latest AutoGPTQ from source first

        lm_eval --model hf --model_args pretrained="Intel/gemma-7b-int4-inc",autogptq=True,gptq_use_triton=True --device cuda:0 --tasks lambada_openai,hellaswag,piqa,winogrande,truthfulqa_mc1,openbookqa,boolq,rte,arc_easy,arc_challenge,mmlu --batch_size 32
        MetricFP16int4
        Avg.0.62390.6307
        mmlu0.61620.6147
        lambada_openai0.67510.7204
        hellaswag0.60470.5903
        winogrande0.73240.7514
        piqa0.79430.7949
        truthfulqa_mc10.30970.3011
        openbookqa0.33200.3400
        boolq0.82780.8269
        rte0.65340.7076
        arc_easy0.81780.7959
        arc_challenge0.49910.4940

        Mixtral-8x7B-Instruct

        MetricFP16INT4
        Avg.0.70000.6977
        mmlu0.68850.6824
        lambada_openai0.77180.7790
        hellaswag0.67670.6745
        winogrande0.76870.7719
        piqa0.83510.8335
        truthfulqa_mc10.49690.4884
        openbookqa0.36800.3720
        boolq0.88500.8783
        rte0.71840.7004
        arc_easy0.86990.8712
        arc_challenge0.62200.6229

        phi-2

        Since we encountered an issue evaluating this model with lm-eval, we opted to evaluate the qdq model instead. In our assessment, we found that its accuracy closely matches that of the real quantized model in most cases except for some small models like opt-125m.

        MetricFP16INT4 qdq
        Avg.0.61550.6163
        mmlu0.54480.5417
        lambada_openai0.62680.6225
        hellaswag0.55850.5498
        winogrande0.75300.7545
        piqa0.78670.7824
        truthfulqa_mc10.31330.3060
        openbookqa0.40000.4100
        boolq0.83390.8327
        rte0.62450.6643
        arc_easy0.79970.7955
        arc_challenge0.52900.5196

        参考:

        [1] Intel Extension for Transformers

        [2] AutoGPTQ

上一篇:揭秘长方体棱长总和计算秘籍,轻松掌握核心技巧!

下一篇:揭秘TikTok下载秘籍,绕过法律风险,轻松获取应用!