配置参数说明(模型侧)
模型侧atb-models安装目录下的配置文件获取路径为:${ATB_SPEED_HOME_PATH}/atb_llm/conf/config.json
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | { "llm": { "ccl": { "backend": "lccl", "enable_mc2": "true" }, "stream_options": { "micro_batch": "false" }, "engine": { "graph": "cpp" }, "plugins": { "plugin_type": "", "num_speculative_tokens": 1 }, "parallel_options": { "o_proj_local_tp": -1, "lm_head_local_tp": -1, "hccl_buffer": 128, "hccl_moe_ep_buffer": 512, "hccl_moe_tp_buffer": 64 }, "kv_cache_options": { "enable_nz": false }, "enable_reasoning": "false" }, "models": { "deepseekv2": { "eplb": { "level": 1, "expert_map_file": "", "num_redundant_experts": 0, "aggregate_threshold": 2048, "buffer_expert_layer_num": 1, "num_expert_update_ready_countdown": 50 }, "h3p": { "enable_qkvdown_dp": "true", "enable_gating_dp": "true", "enable_shared_expert_dp": "false", "enable_shared_expert_overlap": "false" }, "ep_level": 1, "enable_init_routing_cutoff": false, "topk_scaling_factor": 1.0, "enable_mlapo_prefetch": false, "enable_oproj_prefetch": false, "num_dangling_shared_experts": 0, "alltoall_ep_buffer_scale_factors": [[1048576, 1.32], [524288, 1.4], [262144, 1.53], [131072, 1.8], [32768, 3.0], [8192, 5.2], [0, 8.0]] } } } |
llm参数
配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
enable_reasoning |
bool |
|
是否开启模型输出解析,将输出分别解析为“reasoning content”和“content”两个字段。
必填,默认值:false。 仅Qwen3-32B、Qwen3-30B-A3B和DeepSeek-R1-671B模型支持开启该功能。 |
ccl |
|||
backend |
string |
|
通信后端类型。 默认值:lccl |
enable_mc2 |
bool |
|
是否开启通信计算融合算子特性。
|
stream_options |
|||
micro_batch |
bool |
|
开启通信计算双流掩盖特性。
|
engine |
|||
graph |
string |
|
开启cpp组图或python组图。
|
plugins |
|||
plugin_type |
string |
|
设置特性插件类型。
|
num_speculative_tokens |
int |
1 |
token预测个数。 默认值:1 |
parallel_options |
|||
o_proj_local_tp |
int |
[1,worldSize / 节点数] |
表示Attention O矩阵切分数。
|
lm_head_local_tp |
int |
[1,worldSize / 节点数] |
表示LmHead张量并行切分数。
|
hccl_buffer |
int |
≥1 |
表示除MoE通信域外,其余通信域共享数据的缓存区大小。
|
hccl_moe_ep_buffer |
int |
≥512 |
表示MoE专家并行相关通信域共享数据的缓存区大小。
|
hccl_moe_tp_buffer |
int |
≥64 |
表示MoE张量并行相关通信域共享数据的缓存d区大小。
|
kv_cache_options |
|||
enable_nz |
bool |
|
是否开启KV Cache NZ格式。
|
models参数
配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
deepseekv2 |
map |
- |
deepseekv2相关配置。详情请参见deepseekv2参数。 适用于DeepSeek V2/V3/R1模型。 |
deepseekv2参数
配置项 |
取值类型 |
取值范围 |
配置说明 |
---|---|---|---|
ep_level |
int |
[1,2] |
专家并行的实现形式。 1:表示基于AllGather通信的EP并行 2:表示基于AllToAll和通算融合的EP并行 |
topk_scaling_factor |
float |
(0,1] |
topk截断参数。
|
enable_init_routing_cutoff |
bool |
|
是否允许topk截断。
|
alltoall_ep_buffer_scale_factors |
list[list[int, float]] |
列表每个成员包含两个数:第一个数为非负整数,第二个数为大于0的浮点数。 排列顺序按照第一个数的大小降序排列。 |
AllToAll通信buffer大小,第二层list包含两个元素,第一个数为序列长度、第二个数为buffer系数。序列长度为buffer系数的选择判断条件。示例: [[1048576, 1.32], [524288, 1.4], [262144, 1.53], [131072, 1.8], [32768, 3.0], [8192, 5.2], [0, 8.0]]
|
num_dangling_shared_experts |
int |
正整数 |
共享专家外置的数量。 当前只支持Atlas 800I A3 超节点 144卡且不开负载均衡的场景。建议配置成32。 默认值:0(关闭) |
enable_mlapo_prefetch |
bool |
|
控制是否开启mlapo预取。
默认值:false |
enable_oproj_prefetch |
bool |
|
控制是否开启oproj预取。 Atlas 800I A2 推理服务器不建议开启。Atlas 800I A3 超节点建议与OprojTp同时开启,推荐OprojTp设置为2。
默认值:false |
eplb |
|||
level |
int |
[0, 3] |
默认值:0 |
expert_map_file |
string |
该文件路径存在 |
静态冗余负载专家部署表路径。 默认值:"" |
num_redundant_experts |
int |
[0, n_routed_experts] |
当前版本暂不支持该参数。 冗余专家的个数。 默认值:0 |
aggregate_threshold |
int |
≥1 |
当前版本暂不支持该参数。 表示动态EPLB算法触发的频率,单位是decode次数。 例如:50表示50次decode,触发一次动态EPLB算法,若算法认为热度超过一定阈值时,则调整路由表来降低算法热度。 |
buffer_expert_layer_num |
int |
[1, num_moe_layers] |
当前版本暂不支持该参数。 表示动态EPLB每次搬运的layer个数。 由于权重搬运为异步搬运,在不影响原decode情况下,需要一个额外的buffer内存来存放被搬运中的新权重,配置为1层时,则为一次只搬运一层,然后刷新掉一层layer的权重和路由表。 影响的内存公式为:buffer_expert_layer_num*local_experts_num*44M (44M为一个int8的专家大小) |
num_expert_update_ready_countdown |
int |
≥1 |
当前版本暂不支持该参数。 表示检查host->device搬运是否结束的频率,单位为decode次数。 因为搬运权重为异步搬运,必须所有ep卡搬运完毕后才能刷新权重和路由表,这里引入了通信,在搬运层较多的情况下,可以降低该频率,从而减少EPLB框架侧开销。 |
h3p |
|||
enable_qkvdown_dp |
string |
|
控制是否开启qkvdown dp特性,减少计算及通信量,提升Prefill阶段性能。 默认值:“true” |
enable_gating_dp |
string |
|
控制是否开启gating dp特性,减少计算及通信量,提升Prefill阶段性能。 默认值:“true” 仅“ep_level”=“1”时,支持该特性。 |
enable_shared_expert_dp |
string |
|
控制是否开启共享专家dp特性,提升Prefill阶段性能。 默认值:“false”
|
enable_shared_expert_overlap |
string |
|
控制是否开启共享专家的通信和计算双流掩盖特性,提升特定场景下(输入序列长度为2K~16K)的Prefill阶段性能。 默认值:“false”
|