distributed-training-deepspeed
O que ela faz
Esta skill oferece orientações para usar o DeepSpeed, uma biblioteca que torna possível treinar modelos grandes com memória limitada. É para engenheiros de ML que treinam modelos grandes demais para uma única GPU.
Quando usar
- ✓Quando um modelo não cabe na memória da GPU e precisa de estágios de treinamento que economizam memória.
- ✓Quando uma equipe quer paralelismo de pipeline em várias GPUs.
- ✓Quando o treinamento deve usar precisão FP16, BF16 ou FP8 para rodar mais rápido.
Link da skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/ai-research/distributed-training-deepspeed/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Meu modelo de 13 bilhões de parâmetros fica sem memória da GPU. Como configuro o DeepSpeed ZeRO para resolver isso?”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill explica recursos do DeepSpeed, como os estágios de otimização ZeRO, o paralelismo de pipeline e a precisão reduzida, e como escolher entre eles. Ela se baseia na documentação oficial.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do 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.
Perguntas frequentes
O que é o ZeRO?
ZeRO é um conjunto de estágios de otimização de memória que distribuem os dados do modelo entre as GPUs para caber modelos maiores.
Ela cobre escolhas de precisão?
Sim. Cobre as opções de treinamento FP16, BF16 e FP8.
É específica para um modelo?
Não. Ela dá orientações gerais que valem para modelos treinados com DeepSpeed.
Detalhes
Descrição original do autor
Expert guidance for distributed training with DeepSpeed - ZeRO optimization stages, pipeline parallelism, FP16/BF16/FP8, 1-bit Adam, sparse attention
Popularidade
- Estrelas no GitHub
- 33 mil
- Posição no ranking
- #8544
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
owasp-security
33 milEnsina seu agente as orientações de segurança da OWASP para apps web, APIs, mobile, contêineres e agentes de IA, identificando fraquezas comuns.
agent-management
33 milPermite que seu agente crie, liste, hiberne, reative, renomeie e apague agentes de IA pela linha de comando do AI Maestro, gerenciando o ciclo de vida de cada um.
agent-messaging
33 milPermite que seu agente envie, receba e responda mensagens assinadas entre agentes de IA pelo Agent Messaging Protocol, na sua própria máquina.
docs-search
33 milPermite que seu agente pesquise a documentação de código gerada automaticamente, conferindo a API real antes de alterar o código.
Skills parecidas
pytorch-patterns
280 milAjuda seu agente a usar PyTorch para criar modelos de aprendizado de máquina. Aplica boas práticas para treinar de forma eficiente e consistente.
evm-token-decimals
280 milAjuda seu agente a evitar erros com números decimais em diferentes redes blockchain. Garante que os valores de tokens sejam precisos em transações e cálculos.
ito-inference
280 milFaz seu agente verificar a disponibilidade de modelos de IA para uso. Ele conecta o pedido de computação com o serviço de modelo pronto.