Saltar al contenido
Skillpedia
Machine learning33 mil · #8544

distributed-training-deepspeed

Qué hace

Esta skill ofrece orientación sobre DeepSpeed, una biblioteca que hace posible entrenar modelos grandes con memoria limitada. Sirve para ingenieros de ML que entrenan modelos demasiado grandes para una sola GPU.

Cuándo usarla

  • ✓Cuando un modelo no cabe en la memoria de la GPU y necesita etapas de entrenamiento que ahorren memoria.
  • ✓Cuando un equipo quiere paralelismo por etapas en varias GPUs.
  • ✓Cuando el entrenamiento debe usar precisión FP16, BF16 o FP8 para ir más rápido.

Link de la skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/distributed-training-deepspeed/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/distributed-training-deepspeed/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Mi modelo de 13.000 millones de parámetros se queda sin memoria de GPU. ¿Cómo configuro DeepSpeed ZeRO para solucionarlo?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La skill explica las funciones de DeepSpeed, como las etapas de optimización ZeRO, el paralelismo por etapas y la precisión reducida, y cómo elegir entre ellas. Se basa en la documentación oficial.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Deepspeed Skill

Comprehensive assistance with deepspeed development, generated from official documentation.

When to Use This Skill

This skill should be triggered when:

  • Working with deepspeed
  • Asking about deepspeed features or APIs
  • Implementing deepspeed solutions
  • Debugging deepspeed code
  • Learning deepspeed best practices

Quick Reference

Common Patterns

Pattern 1: DeepNVMe Contents Requirements Creating DeepNVMe Handles Using DeepNVMe Handles Blocking File Write Non-Blocking File Write Parallel File Write Pinned Tensors Putting it together Acknowledgements Appendix Advanced Handle Creation Performance Tuning DeepNVMe APIs General I/O APIs GDS-specific APIs Handle Settings APIs This tutorial will show how to use DeepNVMe for data transfers between persistent storage and tensors residing in host or device memory. DeepNVMe improves the performance and efficiency of I/O operations in Deep Learning applications through powerful optimizations built on Non-Volatile Memory Express (NVMe) Solid State Drives (SSDs), Linux Asynchronous I/O (libaio), and NVIDIA Magnum IOTM GPUDirect® Storage (GDS). Requirements Ensure your environment is properly configured to use DeepNVMe. First, you need to install DeepSpeed version >= 0.15.0. Next, ensure that the DeepNVMe operators are available in the DeepSpeed installation. The async_io operator is required for any DeepNVMe functionality, while the gds operator is required only for GDS functionality. You can confirm availability of each operator by inspecting the output of ds_report to check that compatible status is [OKAY]. Below is a snippet of ds_report output confirming the availability of both async_io and gds operators. If async_io operator is unavailable, you will need to install the appropriate libaio library binaries for your Linux flavor. For example, Ubuntu users will need to run apt install libaio-dev. In general, you should carefully inspect ds_report output for helpful tips such as the following: [WARNING] async_io requires the dev libaio .so object and headers but these were not found. [WARNING] async_io: please install the libaio-dev package with apt [WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found. To enable gds operator, you will need to install NVIDIA GDS by consulting the appropriate guide for bare-metal systems or Azure VMs (coming soon). Creating DeepNVMe Handles DeepNVMe functionality can be accessed through two abstractions: aio_handle and gds_handle. The aio_handle is usable on both host and device tensors. while gds_handle works only on CUDA tensors, but is more efficient. The first step to use DeepNVMe is to create a desired handle. aio_handle requires async_io operator, while gds_handle requires both async_io and gds operators. The following snippets illustrate aio_handle and gds_handle creation respectively. ### Create aio_handle from deepspeed.ops.op_builder import AsyncIOBuilder aio_handle = AsyncIOBuilder().load().aio_handle() ### Create gds_handle from deepspeed.ops.op_builder import GDSBuilder gds_handle = GDSBuilder().load().gds_handle() For simplicity, the above examples illustrate handle creation using default parameters. We expect that handles created with default parameters to provide good performance in most environments. However, you can see below for advanced handle creation. Using DeepNVMe Handles aio_handle and gds_handle provide identical APIs for storing tensors to files or loading tensors from files. A common feature of these APIs is that they take a tensor and a file path as arguments for the desired I/O operation. For best performance, pinned device or host tensors should be used for I/O operations (see here for details). For brevity, this tutorial will use aio_handle for illustration, but keep in mind that gds_handle works similarly. You can see the available APIs in a Python shell via tab completion on an aio_handle object . This is illustrated using tab completion of h.. >python Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from deepspeed.ops.op_builder import AsyncIOBuilder >>> h = AsyncIOBuilder().load().aio_handle() >>> h. h.async_pread( h.free_cpu_locked_tensor( h.get_overlap_events( h.get_single_submit( h.new_cpu_locked_tensor( h.pwrite( h.sync_pread( h.wait( h.async_pwrite( h.get_block_size( h.get_queue_depth( h.

Preguntas frecuentes

¿Qué es ZeRO?

ZeRO es un conjunto de etapas de optimización de memoria que reparten los datos del modelo entre GPUs para que quepan modelos más grandes.

¿Cubre la elección de precisión?

Sí. Cubre las opciones de entrenamiento en FP16, BF16 y FP8.

¿Es específica de un modelo?

No. Ofrece orientación general que se aplica a los modelos entrenados con DeepSpeed.

Detalles

Descripción original del autor

Expert guidance for distributed training with DeepSpeed - ZeRO optimization stages, pipeline parallelism, FP16/BF16/FP8, 1-bit Adam, sparse attention

repo: davila7/claude-code-templates

Popularidad

Estrellas en GitHub
33 mil
Posición en el ranking
#8544
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas