Skip to content

Qwen3-Next-80B-A3B-Instruct-W8A8 #4

Description

@InSec

安装 modelslim

git clone https://gitcode.com/weixin_74198818/msmodelslim.git -b qwen3-next/qwen3.5
cd msmodelslim
bash install.sh

配置 YAML

# qwen3_next_80b_a3b_w8a8.yaml
apiversion: modelslim_v1
metadata:
  config_id: qwen3_next_80b_a3b_w8a8
  score: 90
  verified_model_types:
    - Qwen3-Next-80B-A3B-Instruct
  label:
    w_bit: 8
    a_bit: 8
    is_sparse: False
    kv_cache: False

default_w8a8_dynamic: &default_w8a8_dynamic
  act:
    scope: "per_token"
    dtype: "int8"
    symmetric: True
    method: "minmax"
  weight:
    scope: "per_channel"
    dtype: "int8"
    symmetric: True
    method: "minmax"

spec:
  process:
    - type: "flex_smooth_quant"
      enable_subgraph_type:
        - 'norm-linear'
        - 'ov'
      include:
        - '*'
    - type: "group"
      configs:
        - type: "linear_quant"
          qconfig: *default_w8a8_dynamic
          include: ["*self_attn*"]
          exclude: ["mtp*", "*self_attn.o_proj*"]
        - type: "linear_quant"
          qconfig: *default_w8a8_dynamic
          include: ["*mlp.experts*"]
          exclude: ["mtp*"]
        - type: "linear_quant"
          qconfig: *default_w8a8_dynamic
          include: ["*linear_attn.in_proj_qkvz*"]

  save:
    - type: "ascendv1_saver"
      part_file_size: 4

量化命令

msmodelslim quant --model_path ${MODEL_PATH} --save_path ${SAVE_PATH} --device npu --model_type Qwen3-Next-80B-A3B-Instruct --config_path qwen3_next_80b_a3b_w8a8.yaml --trust_remote_code True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions