apiversion: modelslim_convert

# 权重结构（Qwen3-8B dense bf16  checkpoint）：
#   - 前缀 model.layers.*（36 层 layer 0~35）
#   - 每层 7 个 linear：self_attn.{q,k,v,o}_proj + mlp.{gate,up,down}_proj
#   - 源格式 bf16（FLOAT），仅 .weight，无 weight_scale_inv
#   - q_norm / k_norm / layernorm 不纳入 linears
#   - embed_tokens / lm_head / model.norm 等非 linears 权重自动原样保留并落盘
spec:
  linears:
    - match:
        - "model.layers.*.self_attn.q_proj"
        - "model.layers.*.self_attn.k_proj"
        - "model.layers.*.self_attn.v_proj"
        - "model.layers.*.self_attn.o_proj"
        - "model.layers.*.mlp.gate_proj"
        - "model.layers.*.mlp.up_proj"
        - "model.layers.*.mlp.down_proj"
      target: W8A8_MXFP8
      route: auto

  save:
    - type: ascend_v1
      part_file_size: 4

  parallel:
    workers: 8
