apiversion: multimodal_vlm_modelslim_v1
metadata:
  config_id: internvl3_5_w8a8
  score: 90
  verified_model_types:
    - InternVL3_5-38B
  label:
    w_bit: 8
    a_bit: 8
    is_sparse: False
    kv_cache: False

default_w8a8: &default_w8a8
  act:
    scope: "per_tensor"
    dtype: "int8"
    symmetric: False
    method: "minmax"
  weight:
    scope: "per_channel"
    dtype: "int8"
    symmetric: True
    method: "minmax"

spec:
  process:
    - type: "quarot"
      block_size: 32
    - type: "iter_smooth"
      alpha: 0.9       # 浮点数, > 0, 默认 0.9,平衡参数,控制激活和权重的相对重要性。
      scale_min: 1e-5  # 浮点数, > 0, 默认 1e-5,缩放因子的下界,防止数值过小导致数值不稳定。
      symmetric: True  # 使用is_shift=True时,应该将symmetric设置为False
      enable_subgraph_type:
        - 'norm-linear'
        - 'linear-linear'
        - 'ov'
        - 'up-down'
      include:
        - "*"
    - type: "group"
      configs:
        - type: "linear_quant"
          qconfig: *default_w8a8
          include:
            - "*"
          exclude:
            - "vision_model.encoder.layers.*.mlp.fc1"
            - "vision_model.encoder.layers.*.mlp.fc2"
            - "language_model.model.layers.*.mlp.down_proj"

  dataset: calibImages
  default_text: "Describe this image in detail."
  save:
    - type: "ascendv1_saver"
      part_file_size: 4