AutoTP rollout engine: generate with a tensor-parallel copy of a ZeRO training model
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
Línea de trabajo
Start by reading the existing RolloutEngine interface, HybridEngineRollout, the build_rollout factory, and _resolve_autotp_partition plus the universal-checkpoint restore path. Then trace how ZeRO exposes master weights through safe_get_full_fp32_param and how AutoTP records layer layout metadata. Done means an opt-in AutoTP rollout engine syncs weights in memory, generates across ranks with matching tokens and rank-local output layouts, and is wired into the factory.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
HybridEngineRollout generates with the training model itself, on each rank's own ZeRO replica. Users who train with ZeRO have no built-in way to run rollout tensor-parallel across ranks unless training also moves to AutoTP. Keeping a separately sharded inference model current today takes a checkpoint round trip, which is too slow to repeat at every RL step.
Describe the solution you'd like
A new opt-in engine, build_rollout(RolloutConfig(engine="autotp"), ...). AutoTPRollout leaves training on ZeRO and generates with a separate inference copy sharded across all ranks with AutoTP. sync_weights(step) refreshes the copy in memory after each optimizer step.
- Sync:
safe_get_full_fp32_paramgathers each master weight, and_resolve_autotp_partition, the universal-checkpoint restore path, cuts this rank's shard from the layout metadata each AutoTP layer records. Sharing that function means sync and checkpoint restore cannot disagree about a layout. - Generation: one TP group spans all ranks, so ranks generate together. Each rank's left-padded prompts are gathered and padded to a common width, the union is generated once with a shared seed, tokens are checked to match on every rank, and each rank gets back only its own rows in its own
[B', T_p + T_r]layout. - Size: one new module on the existing
RolloutEngineinterface, plus factory wiring. No changes toHybridEngineRollout, the engine, ZeRO ordeepspeed.comm. - Cost: the inference copy needs roughly one more model's memory, divided by the number of ranks.
- Not supported at first: graph capture, shared prefill, continuous batching, models with tied embeddings.
Describe alternatives you've considered
- Keep using
HybridEngineRollout. This is the simpler option, needs no second model and no weight sync, and remains the default (see #8942). This engine is an opt-in addition for users who want tensor-parallel generation while training on ZeRO. - Reload weights through a universal checkpoint. I tested this path and it produces correct weights, but it needs disk I/O for every update, and DeepSpeed has no reader from universal checkpoints into a plain inference model.
- Train with AutoTP as well, so rollout can share the model (#9008 addresses the rollout cache sizing for this setup). That changes the training configuration, which not every user wants.
- Keep this outside DeepSpeed, in DeepSpeedExamples. It would then depend on the private
_resolve_autotp_partition, which is one of the questions below.
- Lenguaje dominante
- Python
- Estrellas
- 43.3k
- Forks
- 5.1k
- Merge medio
- 5 d 10 h
- PR fusionados (30 d)
- 85
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de deepspeedai/DeepSpeed
-
[Bug] DeepSpeedEngine.step leaves _running_engine_step=True permanently on exception, corrupting is_gradient_accumulation_boundary()Posiblemente ocupada @its-amann la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
deepspeedai/DeepSpeed#9190 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[Bug] PipelineEngine._exec_reduce_grads and _exec_optimizer_step leave _force_grad_boundary=True permanently after any exceptionPosiblemente ocupada @bantianyue la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
deepspeedai/DeepSpeed#9183 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
deepspeedai/DeepSpeed#9019 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
fp16 `hysteresis: 0` (or negative) makes DynamicLossScaler never lower the loss scale, so every overflowing step is skipped foreverPosiblemente ocupada @damienen la tomó hace 26 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
deepspeedai/DeepSpeed#8982 ·
Los mantenedores suelen responder en 2 días
-
[BUG] OneCycle applies the minimum momentum to the first Adam updatePosiblemente ocupada @ai-yang la tomó hace 30 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
deepspeedai/DeepSpeed#8951 ·
Los mantenedores suelen responder en 2 días
Todos los issues de deepspeedai/DeepSpeed
Issues similares
-
area/auth comp/agent P3 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NousResearch/hermes-agent#161417 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Dao-AILab/flash-attention#3251 ·
Los mantenedores suelen responder en 2 días
-
[New Check]: sqlserver_public_network_access_disabledPosiblemente ocupada @pouria-l la tomó hoy. Abiertofeature-request status/needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prowler-cloud/prowler#13607 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
external langchain
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
langchain-ai/docs#8184 ·
Los mantenedores suelen responder en 1 día