xLLM 使用 gflags 管理服务启动参数。--model <PATH> 是唯一必填参数。对于原生配置,显式指定的命令行 flag 优先于 JSON 配置值,后者优先于编译时默认值。下表按 /xllm/core/framework/config 下的 Config 类分组,一个 Config 对应一节;ConfigJsonUtils 一节包含配置文件相关的通用参数。
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
config_json_file | string | "" | JSON 配置文件路径;对于原生配置,显式指定的命令行 flag 优先于文件中的值。 |
enable_dump_config_json | bool | false | 是否将最终生效的启动配置导出为 JSON。 |
dump_config_json_file | string | "xllm_config.json" | 导出启动配置 JSON 的路径,仅在 enable_dump_config_json=true 时使用。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
host | string | "" | bRPC 服务监听的主机名或 IP。 |
port | int32 | 8010 | bRPC 服务监听端口。 |
rpc_idle_timeout_s | int32 | -1 | 连接在最近 rpc_idle_timeout_s 秒内无读写操作时关闭;-1 表示无限等待。 |
rpc_channel_timeout_ms | int32 | -1 | bRPC Channel 的最大等待时间,单位毫秒;-1 表示无限等待。 |
max_reconnect_count | int32 | 40 | worker 尝试连接 server 的最大重连次数。 |
num_threads | int32 | 8 | 处理请求的线程数。 |
max_concurrent_requests | int32 | 200 | 实例可同时处理的最大请求数;设为 0 表示不限流。 |
num_request_handling_threads | int32 | 4 | 处理输入请求的线程数。 |
num_response_handling_threads | int32 | 4 | 处理响应输出的线程数。 |
health_check_interval_ms | int32 | 3000 | worker 健康检查间隔,单位毫秒。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
model_id | string | "" | Hugging Face 模型名称,非路径。 |
model | string | "" | Hugging Face 模型名称或模型路径。 |
backend | string | "" | 后端模型类型;llm 表示纯文本模型,vlm 表示多模态模型,dit 表示扩散模型。 |
task | string | "generate" | 模型任务类型,例如 generate、embed、mm_embed。 |
enable_return_embedding_modality_tags | bool | false | 是否在完整序列 embedding 中返回每个 token 的 modality tag。 |
limit_image_per_prompt | int32 | 8 | 每个 prompt 允许的最大图片数量,仅用于多模态模型。 |
max_encoder_cache_size | int64 | 0 | 每个 worker 的 encoder cache 最大显存大小,单位 MB;0 表示禁用 encoder cache。 |
reasoning_parser | string | "" | reasoning 交互解析器,例如 auto、glm45、glm47、glm5、qwen3、qwen35、deepseek-r1。 |
tool_call_parser | string | "" | tool-call 交互解析器,例如 auto、qwen25、qwen3、qwen35、qwen3_coder、kimi_k2、deepseekv3、deepseekv32、deepseekv4、deepseekv41、glm45、glm47、glm5。 |
enable_qwen3_reranker | bool | false | 是否启用 Qwen3 reranker。 |
flashinfer_workspace_buffer_size | int32 | 134217728 | FlashInfer split-k attention 中用于保存中间 attention 结果的预留 workspace 大小,默认 128 MiB。 |
enable_return_mm_full_embeddings | bool | false | VLM 模型是否返回 ViT embedding 与序列 embedding。 |
mm_download_headers | string | "" | 多模态下载的 service 级默认 HTTP header,为 JSON 对象;per-request header 优先级更高。示例:{"Authorization":"Bearer xxx"}。 |
use_audio_in_video | bool | false | 输入为视频时,是否同时解码音频和视频。 |
audio_max_upload_file_mb | int32 | 25 | 语音转文本音频上传大小上限,单位 MiB,必须为正数。 |
audio_max_decode_duration_s | int32 | 600 | 语音转文本音频解码后的时长上限,单位秒。0 表示不限制。 |
use_cpp_chat_template | bool | true | 对支持的模型使用原生 C++ chat template,例如 deepseek_v32、deepseek_v4、deepseek_v41;设为 false 可回退到 Jinja 以便调试。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
enable_vmm_weights | bool | false | 为模型权重启用 VMM。与 enable_vmm_kvcache 独立,仅 NPU 支持。 |
enable_rolling_load | bool | false | 使用固定数量的 HBM 槽位按层加载 DiT 权重,仅 NPU 支持。 |
rolling_load_num_cached_layers | int32 | 2 | enable_rolling_load=true 时 HBM 中保留的 decoder layer 权重槽位数量。 |
rolling_load_num_rolling_slots | int32 | -1 | decoder rolling load 使用的 rolling 槽位数量;固定槽位数为 rolling_load_num_cached_layers - rolling_load_num_rolling_slots。-1 表示自动设置为 min(2, preload_count),取值需在 [-1, rolling_load_num_cached_layers] 范围内。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
block_size | int32 | 128 | 每个 KV Cache block 的 slot 数。 |
max_cache_size | int64 | 0 | KV Cache 的容量上限,单位 byte;虚拟内存模式下限制 KV 与权重共享池的容量。0 表示不设显式字节上限,根据可用显存推导容量。 |
max_memory_utilization | double | 0.8 | 模型推理可使用的设备显存比例,包括模型权重和 KV Cache。物理 KV Cache 和固定 VMM 要求取值在 (0, 1] 内。弹性 VMM 在启动容量估算、arena 预留和物理页增长时均忽略该比例,容量由实时可用显存和已观察到的执行余量决定。 |
kv_cache_dtype | string | "auto" | KV Cache 量化数据类型;auto 表示与模型 dtype 对齐且不量化,int8 表示启用 INT8 量化,仅 MLU 后端支持。 |
indexer_cache_dtype | string | "auto" | 带 indexer cache 的模型所使用的 indexer cache 数据类型。支持 auto 和 int8;auto 表示与模型 dtype 对齐且不量化,int8 表示启用 INT8 indexer cache 量化。 |
enable_prefix_cache | bool | true | 是否在 block manager 中启用 prefix cache;详见 Prefix Cache。 |
kv_events_config | string | "" | KV 驻留事件发布配置,为 JSON 对象字符串;空字符串禁用上报。JSON 字段和示例见下文。 |
enable_in_batch_prefix_cache | bool | false | 是否将已准入的 prefill 完整 block 缓存进 prefix cache,使同一 batch 内的后续请求可以共享。 |
max_linear_state_cache_slots | int64 | 0 | linear-attention state cache 的最大活跃槽位数;0 表示根据可用 KV Cache 预算自动推导容量。 |
xxh3_128bits_seed | uint32 | 1024 | XXH3 128-bit 哈希的默认 seed。 |
enable_vmm_kvcache | bool | false | 为 KV Cache 启用 VMM,与 enable_vmm_weights 独立;false 使用原有物理 KV Cache 实现,仅 NPU 支持。 |
enable_shared_kv_cache | bool | false | target Full KV、Linear state extents 与兼容的 Full-only MTP draft KV 共享固定物理 arena。target/draft 使用不同 bank 视图及相同最终页号,Linear state 可复用 draft bank 空间。draft Full 行几何须与 target 一致,draft 层数须能填满 companion bank。原生 NPU Torch Qwen hybrid 路径仍限普通 eager;Python 路径支持 eager/chunked prefill、ACL decode/verify 和普通 Qwen3.5/3.8 MTP。 |
vmm_elastic | bool | true | 任一 VMM 开关启用后,按需扩张活动逻辑槽位及物理页,并释放空闲页的物理内存;false 使用固定驻留池。 |
vmm_memory_reserve_bytes | int64 | 0 | 弹性虚拟内存增长时额外保留的设备空闲显存,单位 byte,须非负;在运行时执行预留空间之外叠加生效。 |
vmm_startup_timeout_ms | int32 | 120000 | VMM 启动时,master 等待节点注册、各非 master 等待物理池就绪分别使用的超时,单位毫秒,须为正数。独立于单次 RPC 超时,每个等待阶段单独计时。 |
phy_page_granularity_size | int64 | 2097152 | 单个物理页的粒度大小,单位 byte,默认 2 MiB;用于连续 KV Cache。 |
以下字段位于 kv_events_config 的 JSON 对象中:
| 字段 | 类型 | 默认值 | 含义 |
|---|
publisher | string | "zmq" | 发布器类型,当前仅支持 zmq。 |
endpoint | string | 必填 | vLLM 风格 KV 事件的 ZeroMQ 发布基准地址,例如 tcp://*:5557。必须为非空 TCP 地址。 |
replay_endpoint | string | "" | 快照恢复请求的 ZeroMQ 基准地址,例如 tcp://*:6557;空字符串禁用该入口。恢复回复使用当前全量快照和对应的实时流序号。 |
motor_pool_endpoint | string | "" | Motor 本地 Host 副本确认事件的 ZeroMQ 发布基准地址,例如 tcp://*:7557;空字符串禁用该流。 |
topic | string | "" | 发布的 ZeroMQ topic;消费端的订阅过滤器需要匹配该 topic。 |
hwm | int32 | 10000 | ZeroMQ 发送队列高水位,单位为消息数;必须为正数。 |
snapshot_interval_seconds | int32 | 60 | 周期性发布全量驻留快照的间隔,单位为秒;必须为正数。 |
每个 DP rank 使用基准 TCP 端口加 dp_rank,所有事件、恢复和 Host 确认端口范围须互不重叠,且端口须位于 1 到 65535。例如 DP=2、endpoint=tcp://*:5557 时,两个 rank 分别发布到 5557 和 5558。
可在原有启动命令中加入以下参数,启用事件发布和快照恢复:
--kv_events_config='{"publisher":"zmq","endpoint":"tcp://*:5557","replay_endpoint":"tcp://*:6557"}'
当前支持开启 prefix cache 的普通非 PD 分离文本推理、flat KV 布局和本地 Host offload。上报的是可复用前缀 block 的 Device/Host 驻留元数据;Host 副本在拷贝成功确认后发布。发布器在后台线程运行。多资源复合/linear-state 布局、多模态、虚拟内存 KV、PD 分离和外部 KV 存储尚未支持。
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
prefetch_timeout | uint32 | 0 | 到期后停止下发新的 KV Cache Store 预取批次,并等待在途批次完成;0 表示无限等待。 |
prefetch_batch_size | uint32 | 2 | 从 KV Cache Store 预取并拷贝的 batch size。 |
layers_wise_copy_batchs | uint32 | 4 | 按层执行 H2D 拷贝的 batch 数。 |
host_blocks_factor | double | 0.0 | host block 系数,例如 host block num = host_blocks_factor * hbm block num。 |
enable_kvcache_store | bool | false | 是否启用 KV Cache Store。 |
store_protocol | string | "tcp" | KV Cache Store 协议,例如 tcp、rdma。 |
store_rdma_devices | string | "" | xLLM Worker 内嵌 Store client 使用的 RDMA HCA 列表,多个设备以逗号分隔;空值表示由 Mooncake 自动发现。 |
store_master_server_address | string | "" | Store master 地址。单机模式使用 IP:Port;etcd 高可用模式使用 etcd://IP:Port;IP:Port;...。 |
store_metadata_server | string | "" | KV Cache Store metadata service 的地址。 |
store_local_hostname | string | "" | KV Cache Store client 的本地主机名。 |
enable_control_h2d_block_num | bool | false | 是否控制 H2D 拷贝的 block 数。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
max_tokens_per_batch | int32 | 10240 | 每个 batch 可处理的最大 token 数。 |
max_seqs_per_batch | int32 | 200 | 每个 batch 可处理的最大 sequence 数。 |
enable_schedule_overlap | bool | false | 是否启用 schedule overlap(异步调度);详见 异步调度。 |
prefill_scheduling_memory_usage_threshold | double | 0.95 | prefill 调度时的内存使用阈值。 |
enable_chunked_prefill | bool | true | 是否启用 chunked prefill。 |
max_tokens_per_chunk_for_prefill | int32 | -1 | prefill 阶段每个 chunk 的最大 token 数;-1 表示使用默认策略。 |
chunked_match_frequency | int32 | 2 | sequence prefix cache 匹配频率。 |
priority_strategy | string | "fcfs" | 请求优先级策略,例如 fcfs、priority、deadline。 |
enable_mix_batch | bool | true | 是否在同一 batch 中运行 prefill 和 decode。启用 CP 或 MTP 时会被强制设为 false。 |
aggressive_coeff | double | 1.0 | MixScheduler 紧急度判断的激进系数。 |
starve_threshold | double | 1.0 | MixScheduler 的饥饿阈值系数。 |
enable_starve_prevent | bool | true | 是否启用 MixScheduler 的防饥饿机制。 |
enable_dp_fair_token_budget | bool | true | 是否在 PD 分离的 PREFILL 实例上把每个 DP group 每轮调度的 token 数限制为 max_tokens_per_batch / dp_size(下限为一个 prefill chunk)。 |
request_queue_size | int32 | 100000 | 调度器请求队列容量;队列满时新到的请求会在准入阶段被拒绝。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
dp_size | int32 | 1 | MLA attention 的 data parallel 规模。 |
ep_size | int32 | 1 | MoE 模型的 expert parallel 规模。 |
cp_size | int32 | 1 | Context parallel 规模,需要后端和模型支持;设为 1 表示禁用 context parallel。 |
kv_split_size | int32 | 1 | KV Cache split 宽度;0 表示沿用 cp_size(旧行为),1 表示不切分 KV(每个 CP rank 存储完整 KV 并跳过 prefix AllGather),其他可整除 cp_size 的 K 表示 KV 在 K 个 rank 间分片,而 token-CP 仍使用 cp_size。 |
tp_size | int64 | 1 | Tensor parallel 规模,仅 DiT 模型使用。 |
sp_size | int64 | 1 | Sequence parallel 规模,仅 DiT 模型使用。 |
cfg_size | int64 | 1 | Classifier-free guidance parallel 规模,仅 DiT 模型使用。 |
vae_size | int64 | 1 | VAE patch parallel 规模,仅 DiT 模型使用。 |
communication_backend | string | "hccl" | NPU 通信后端,例如 lccl、hccl;启用 DP 时使用 hccl。 |
enable_mm_encoder_dp | bool | false | 是否为多模态模型启用 encoder data parallel。 |
enable_multi_stream_parallel | bool | false | 是否在 prefill 阶段通过双 stream 和双 micro batch 启用计算通信并行;详见 多流并行。 |
micro_batch_num | int32 | 1 | 多流并行使用的 micro batch 数。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
enable_eplb | bool | false | 是否启用 expert parallel load balance;详见 EPLB。 |
redundant_experts_num | int32 | 1 | 每个 device 上的冗余 expert 数量。 |
eplb_update_interval | int64 | 1000 | EPLB 更新间隔。 |
expert_parallel_degree | int32 | 0 | Expert parallel degree。 |
rank_tablefile | string | "" | ATB HCCL rank table 文件。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
master_node_addr | string | "127.0.0.1:19888" | 多机分布式服务的 master 地址,例如 10.18.1.1:9999。 |
worker_memory_master_node_addr | string | "127.0.0.1:19889" | rank 0 上收集 worker memory RPC 服务地址的注册地址,例如 10.18.1.1:9999;仅启用虚拟内存且 nnodes > 1 时使用。 |
nnodes | int32 | 1 | 多机节点数量。 |
node_rank | int32 | 0 | 当前节点 rank。 |
etcd_addr | string | "" | 保存实例元信息的 etcd 地址。 |
etcd_namespace | string | "" | xLLM etcd key 使用的可选 namespace 前缀,例如 prod-a。 |
enable_service_routing | bool | false | 是否启用 xLLM service routing。 |
xservice_rpc_protocol | string | "baidu_std" | XServiceClient 与服务层通信使用的协议,支持 baidu_std 和 http。不改变 P/D 引擎间的 RPC 和 KV 传输协议。 |
xservice_address | string | "" | HTTP 服务层的直连控制地址(host:port),用于实例注册、心跳和元信息查询。要求 xservice_rpc_protocol=http,与 etcd_addr 互斥。具体请求的结果回传使用请求中携带的服务层地址。 |
heart_beat_interval | double | 0.5 | 心跳间隔。 |
etcd_ttl | int32 | 3 | etcd key 的 TTL。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
enable_disagg_pd | bool | false | 是否启用 Prefill-Decode 分离执行;详见 PD 分离。 |
disagg_pd_port | int32 | 7777 | PD 分离 bRPC server 的监听端口。 |
instance_role | string | "DEFAULT" | 当前实例角色,例如 DEFAULT、PREFILL、DECODE、MIX。 |
kv_cache_transfer_mode | string | "PUSH" | KV Cache 传输模式,例如 PUSH、PULL。 |
transfer_listen_port | int32 | 26000 | KV Cache Transfer 的监听端口。 |
kv_push_dst_rotate | bool | false | 在 push_kv_blocks 中按 KV-split rank 轮转遍历目标 worker,用于分散对 decode worker 的流量。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
draft_model | string | "" | draft 模型路径;MTP 使用方式详见 MTP。 |
num_speculative_tokens | int32 | 0 | 每轮 speculative decoding 生成的 speculative token 数。 |
speculative_algorithm | string | "MTP" | Speculative decoding 算法,支持 MTP、Eagle3、Suffix、DFlash、DFlash2(仅 NPU)、DSpark。 |
speculative_suffix_cache_max_depth | int32 | 64 | Suffix speculative decoding 的后缀树最大深度。 |
speculative_suffix_max_cached_requests | int32 | -1 | Suffix speculation 全局最大缓存请求数;-1 表示不限,0 表示禁用。 |
speculative_suffix_use_tree_spec | bool | false | 是否使用 tree-based suffix speculation,而不是 path speculation。 |
enable_probabilistic_draft | bool | false | draft 从自身分布采样 proposal(携带 q 供拒绝采样)。默认为 greedy argmax。仅 MTP、DSpark、DFlash2、Eagle3 支持。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
enable_profile_step_time | bool | false | 是否启用 step time profiling。 |
enable_profile_token_budget | bool | false | 是否启用 token budget profiling。 |
enable_latency_aware_schedule | bool | false | 是否使用预测 latency 进行 latency-aware schedule。 |
profile_max_prompt_length | int32 | 2048 | profiling 使用的最大 prompt 长度。 |
max_global_ttft_ms | int32 | std::numeric_limits<int32_t>::max() | 全局 TTFT 阈值,单位毫秒。 |
max_global_tpot_ms | int32 | std::numeric_limits<int32_t>::max() | 全局 TPOT 阈值,单位毫秒。 |
enable_profile_kv_blocks | bool | true | profiling 时是否生成 KV Cache blocks。 |
disable_ttft_profiling | bool | false | 是否禁用 TTFT profiling。 |
enable_online_profile | bool | false | 是否启用在线 timeline 接口(/start_profile 和 /stop_profile),支持 Ascend NPU 及文档中列出的 profiling 后端。 |
profile_backend | string | "torch" | 在线 profiling 后端。torch(默认)在 Ascend 上通过 torch_npu 采集 CPU+NPU,在其他支持的平台通过 Kineto 采集 CPU+CUDA;ascend 采集 CANN 原始数据,使用 msprof 导出;cuda 控制外部 nsys 的 capture range。部署限制见在线服务性能分析。 |
profile_dir | string | "" | torch 和 ascend 后端的 trace 输出目录;为空表示当前工作目录。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
extension_impl | string | "" | 为模型、执行器等注册组件选择原生扩展实现族;空值保留原有选择方式。所选实现族必须已注册;该实现族未注册的组件继续使用原有选择方式。 |
enable_graph | bool | false | 是否在 decode 阶段启用图执行以降低 kernel launch 开销和设备空闲时间;支持 CUDA Graph、ACL Graph(NPU)、MLU Graph 和 DCU Graph,详见 图执行。 |
enable_graph_double_buffer | bool | true | 是否为 NPU schedule-overlap decode 启用双缓冲 ACL graph 持久化参数与 graph 实例。 |
enable_graph_mode_decode_no_padding | bool | false | decode 阶段是否按实际 num_tokens 捕获 graph,而不是按 padding 后 shape 捕获。 |
enable_prefill_piecewise_graph | bool | false | 是否在 prefill 阶段启用 piecewise CUDA graph;attention 使用 eager 模式,其他操作捕获进 CUDA graph。 |
enable_graph_vmm_pool | bool | true | 是否启用 VMM-backed CUDA graph memory pool,用于多 shape graph 的显存复用。 |
max_tokens_for_graph_mode | int32 | 2048 | 图执行最大 token 数;0 表示不限制。 |
acl_graph_decode_batch_size_limit | int32 | 16 | NPU 上 ACL graph 的 decode batch size 阈值;实际 decode batch size 超过该值时,ACL graph decode 会回退到 eager 模式以避免 OOM。 |
block_draft_graph_warmup_max_kv_len | int32 | 0 | 仅为 Python block draft 的独立 ACL graph(DSpark/DFlash2,包括 GLM MLA draft)预捕获按 2 的幂增长的 KV 容量桶。0 覆盖完整模型上下文;正数预捕获到覆盖该长度的容量桶;-1 保留按需捕获。已有 warmup 必需的形状始终保留,即使超过正数上限。超过预捕获上界的请求仍可在线扩桶。更多容量桶会增加启动时间和 draft 图显存占用;不改变 target、MTP、context-write 或可选整轮 unified graph 的预热策略。 |
enable_shm | bool | false | 是否为模型执行启用共享内存。 |
use_contiguous_input_buffer | bool | true | 是否使用连续的 device input buffer 执行模型。 |
input_shm_size | uint64 | 1024 | 输入共享内存大小,默认 1GB。 |
output_shm_size | uint64 | 128 | 输出共享内存大小,默认 128MB。 |
random_seed | int32 | -1 | 随机数生成器 seed;-1 表示不固定 seed。 |
enable_dsa_multi_stream | bool | false | 为 Python GLM indexer 启用局部并行:K/weights 投影在辅助流执行,query/cache 行相同时保留融合投影;主流同步后再更新 index cache。非 interleaved RoPE 还可并行 Q 投影/RoPE 与 cache 准备。主 attention 准备完成后才执行 indexer。要求模型后端和设备流能力均受支持。 |
enable_attn_dp_weight_sharding | bool | false | 在 Python GLM MLA 中,将依赖 attention head 的权重按 TP × DP 切分。要求 DP > 1、CP = 1、layerwise split = 1,attention head 数能被 TP × DP 整除。每个 token owner 仍执行普通 TP 的本地 heads,每层使用三次通信;MoE 使用独立的 MoE TP/EP 分组。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
npu_kernel_backend | string | "AUTO" | NPU kernel 后端,支持 AUTO、TORCH。 |
enable_fused_mc2 | int32 | -1 | NPU 的 Fused MC2 模式;-1 使用自动默认值,0 禁用 fused MC2,正值启用 dense matmul-allreduce,1 对 MoE 使用 DispatchFFNCombine,2 对 MoE 使用 DispatchGmmCombineDecode。 |
enable_dspark_native_sas | bool | false | 启用 NPU DSpark 原生 SparseAttnSharedkv 语义。旧版算子若不接受非空 ori_sparse_indices,可能在 tiling 阶段终止进程;请保持关闭以使用 q_len=1 兼容模式。 |
| 参数名称 | 类型 | 默认值 | 参数含义 |
|---|
max_requests_per_batch | int32 | 1 | 每个 batch 的最大 request 数。 |
dit_cache_policy | string | "TaylorSeer" | DiT cache 策略,例如 None、FBCache、TaylorSeer、FBCacheTaylorSeer、ResidualCache。 |
dit_cache_warmup_steps | int64 | 0 | warmup step 数量。 |
dit_cache_n_derivatives | int64 | 3 | TaylorSeer 使用的 derivative 数量。 |
dit_cache_skip_interval_steps | int64 | 3 | TaylorSeer 和 ResidualCache 的刷新间隔,必须大于 0。对 TaylorSeer,1 表示每步都计算;其他策略不使用此参数。 |
dit_cache_residual_diff_threshold | double | 0.09 | cache reuse 的 residual difference 阈值。 |
dit_cache_start_steps | int64 | 5 | 起始阶段跳过的 step 数。 |
dit_cache_end_steps | int64 | 5 | 末尾阶段跳过的 step 数。 |
dit_cache_start_blocks | int64 | 5 | 起始阶段跳过的 block 数。 |
dit_cache_end_blocks | int64 | 5 | 末尾阶段跳过的 block 数。 |
dit_sp_communication_overlap | bool | true | 是否为 sequence parallel 启用通信与计算的 overlap。 |
dit_debug_print | bool | false | 是否打印 DiT 模型 debug 信息。 |
dit_generation_image_area_max | int64 | 0 | 图像生成请求允许的最大图像面积(宽 * 高);0 表示不限制。 |
dit_h3_task_type | string | "fl2va" | MiniMax-H3 任务类型:fl2va 或 ref2va。 |
dit_enable_vae_tiling | bool | false | 是否启用 VAE tiling,目前仅支持 qwen-image-edit-plus。 |
dit_vae_image_size | int64 | 1048576 | Qwen-Image-Edit-Plus VAE 用于计算维度的 image size。 |
dit_sparse_attention_enabled | bool | false | 是否为 WAN 启用 block-wise sparse attention / RainFusion。 |
dit_sparse_attention_sparsity | double | 0.5 | sparse attention 稀疏度,取值 [0.0, 1.0);0.0 表示 dense attention,0.5 表示丢弃 50% 的 block。 |
dit_sparse_attention_pool_size | int64 | 128 | block-wise mask 生成时 sparse attention 的 pooling 窗口大小。 |
dit_sparse_attention_sparse_start_step | int64 | 0 | 开始使用 sparse attention 的 step 索引;此前的 step 使用 dense attention。 |
dit_sparse_attention_version | string | "rain_fusion" | sparse attention 版本:rain_fusion(frame-pairing + aclnnRainFusionAttention)或 sparse_attention(block-decompose + aclnnBlockSparseAttention)。 |
dit_sparse_attention_mask_refresh_steps | int64 | 1 | 每 N 个 diffusion step 重新计算一次 block sparse mask;1 表示每步都算,值越大 mask 复用越久。 |