ml-engineering
O que ela faz
Oferece métodos práticos e receitas para treinar e servir grandes modelos de IA, desde a escolha do hardware até a recuperação de falhas. Ela é para engenheiros de ML que precisam que grandes treinamentos terminem no prazo e no orçamento.
Quando usar
- ✓Quando você precisa escolher hardware e armazenamento para treinar um modelo grande.
- ✓Quando um treinamento está lento, fica sem memória ou produz valores NaN.
- ✓Quando você precisa de planos de checkpoint e recuperação para treinamentos longos.
Link da skill
https://github.com/stas00/ml-engineering/blob/master/skills/ml-engineering/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
“Nosso treinamento de um modelo grande continua gerando perdas NaN. Me ajude a descobrir por que e como recuperar.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill é um guia condensado extraído de uma longa referência aberta, que cobre benchmarks, agendamento de tarefas, ajuste de memória e vazão, e estabilidade do treinamento. Ela aponta a seção relevante para cada problema, com scripts e benchmarks quando existem.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Machine Learning Engineering
Distilled from Machine Learning Engineering Open Book by Stas Bekman - source: https://github.com/stas00/ml-engineering (CC BY-SA 4.0). Know-how from training BLOOM-176B, IDEFICS-80B and production RAG and RL training and inference systems. This skill is a condensed index; each section links back to the full chapter for depth, scripts, and benchmarks.
A field-tested, end-to-end guide to training and serving large models (LLMs, VLMs, multi-modal, RAG) on real hardware at scale - distilled from actually training BLOOM-176B and IDEFICS-80B and building production inference/RAG systems. It is a practitioner's brain dump: opinionated guidance backed by copy-paste scripts, benchmark tools, and comparison tables, written for the engineers and operators who have to make expensive clusters actually deliver a finished model.
It spans the entire stack that decides whether a run succeeds and how much it costs: selecting and benchmarking accelerators, storage, and network so the fast compute is never starved; orchestrating jobs with SLURM/Kubernetes; maximizing throughput (MFU) and fitting models in memory via parallelism (DP/TP/PP/ZeRO), activation recomputation, and offload; keeping training numerically stable through loss spikes and NaN/Inf; and surviving the inevitable hardware and job failures with frequent checkpointing, spare capacity, and automatic restarts. On the serving side it covers inference latency/throughput/cost trade-offs, KV-cache and memory sizing, and framework selection - plus diagnosing multi-node/multi-GPU hangs and testing the whole thing.
Use it as an operator's runbook: figure out which resource is actually the bottleneck (compute? memory? network? storage? dataloader?), then jump to the targeted recipe. For pure debugging technique (gdb/strace/py-spy/CUDA), pair this with The Art of Debugging.
Core principles
- Measure, don't assume. Vendor/theoretical TFLOPS are marketing; benchmark your hardware and software stack before optimizing or buying. Track MFU/throughput, not vibes.
- Find the actual bottleneck. A training step is gated by the slowest of: accelerator compute, memory bandwidth/capacity, inter/intra-node network, storage IO, or CPU dataloading. Optimizing anything else is wasted effort.
- At scale, failure is the steady state. With hundreds/thousands of accelerators, hardware will fail mid-run. Design for frequent checkpoints, automatic restarts, spare nodes, and kill/save switches from day one.
- Reproduce small and fast. Debug on a tiny model / few layers / one node before burning cluster time - see The Art of Debugging.
- Watch the logbooks. Others have already hit your instability; training chronicles document the loss spikes and the fixes. See LLM/VLM chronicles.
Compute / accelerators
Full chapter: Compute · Accelerators.
- The number that matters is achievable, not theoretical. Real matmul FLOPS are well below spec. Measure Maximum Achievable Matmul FLOPS with
mamf-finder.py; compute MFU (model FLOPS utilization) to compare setups. See the most important thing to understand and what accelerator characteristics we care for. For a full trial-node loop (compute + network + storage → markdown report) see How to evaluate the cluster and the evaluate-cluster skill. - Memory capacity + bandwidth often bind before FLOPS. Check the [accelerator memory size and speed table](https://github.com/stas00/ml-engineering/blob/master/compute/accelera
Perguntas frequentes
É um manual completo de treinamento?
Não. É um índice condensado, e cada seção leva a um capítulo mais completo para aprofundar.
Ela também cobre a publicação de modelos?
Sim. Cobre o treinamento e a execução de grandes modelos, incluindo sistemas de recuperação e inferência.
De onde vem a orientação?
De um livro aberto de Stas Bekman, baseado na experiência com treinamento de grandes modelos.
Detalhes
Descrição original do autor
Field-tested methodology and concrete recipes for training and operating large-scale LLM/VLM/multi-modal models end to end - choosing and benchmarking accelerators, storage and network; SLURM/Kubernetes orchestration; maximizing training throughput and fitting models in memory; diagnosing and surviving training instabilities, NaN/Inf, and hardware/job failures; checkpointing and fault tolerance; inference performance and memory; debugging multi-node/ multi-GPU hangs; and writing/running tests. Use when the user is training or fine-tuning large models, hits low TFLOPS/MFU, OOM, slow dataloading
repo: stas00/ml-engineering
Popularidade
- Estrelas no GitHub
- 20 mil
- Posição no ranking
- #10479
- Licença
- CC-BY-SA-4.0
- Atualizada em
- 01/11/2026
Comentários
- …
Mais skills deste repositório
Skills parecidas
add-model-provider
394 milPermite que seu agente conecte um novo provedor de modelos de IA ao OpenClaw com comandos seguros, guarde as chaves de API com segurança e faça um teste ao vivo.
acp-router
394 milAjuda seu agente a enviar uma tarefa a um assistente de programação, como Claude Code ou Cursor, pelo OpenClaw, para que o trabalho rode nessa ferramenta.
browser-automation
394 milEnsina seu agente a controlar páginas web passo a passo, incluindo logins, abas e recuperação quando uma página para de responder.