End-to-end skills for LLM and ML research engineering.
A library organized by ML pipeline stage: model architecture, tokenization, fine-tuning, mechanistic interpretability, data processing, and post-training (RL).
Arranged in the author's recommended order. Walk through them in sequence, or open any one on its own.
Orchestrates end-to-end autonomous AI research projects using a two-loop architecture. The inner loop runs rapid experiment iterations with clear optimization targets. The outer loop synthesizes results, identifies patterns, and steers research direction.
Implements and trains LLMs using Lightning AI's LitGPT with 20+ pretrained architectures (Llama, Gemma, Phi, Qwen, Mistral).
State-space model with O(n) complexity vs Transformers' O(n²). 5× faster inference, million-token sequences, no KV cache. Selective SSM with hardware-aware design. Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head). Models 130M-2.8B on HuggingFace.
Educational GPT implementation in ~300 lines. Reproduces GPT-2 (124M) on OpenWebText. Clean, hackable code for learning transformers. By Andrej Karpathy. Perfect for understanding GPT architecture from scratch. Train on Shakespeare (CPU) or OpenWebText…
RNN+Transformer hybrid with O(n) inference. Linear time, infinite context, no KV cache. Train like GPT (parallel), infer like RNN (sequential). Linux Foundation AI project. Production at Windows, Office, NeMo. RWKV-7 (March 2025). Models up to 14B parameters.
Provides PyTorch-native distributed LLM pretraining using torchtitan with 4D parallelism (FSDP2, TP, PP, CP).
Fast tokenizers optimized for research and production. Rust-based implementation tokenizes 1GB in <20 seconds. Supports BPE, WordPiece, and Unigram algorithms. Train custom vocabularies, track alignments.
Language-independent tokenizer treating text as raw Unicode. Supports BPE and Unigram algorithms. Fast (50k sentences/sec), lightweight (6MB memory), deterministic vocabulary. Used by T5, ALBERT, XLNet, mBART. Train on raw text without pre-tokenization.
Parameter-efficient fine-tuning for LLMs using LoRA, QLoRA, and 25+ methods.
Provides guidance for interpreting and manipulating neural network internals using nnsight with optional NDIF remote execution.
Provides guidance for performing causal interventions on PyTorch models using pyvene's declarative intervention framework.
Provides guidance for training and analyzing Sparse Autoencoders (SAEs) using SAELens to decompose neural network activations into interpretable features.
Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching.
GPU-accelerated data curation for LLM training. Supports text/image/video/audio. Features fuzzy deduplication (16× faster), quality filtering (30+ heuristics), semantic deduplication, PII redaction, NSFW detection. Scales across GPUs with RAPIDS.
Scalable data processing for ML workloads. Streaming execution across CPU/GPU, supports Parquet/CSV/JSON/images. Integrates with Ray Train, PyTorch, TensorFlow. Scales from single machine to 100s of nodes.
Expert guidance for GRPO/RL fine-tuning with TRL for reasoning and task-specific model training.
Provides guidance for enterprise-grade RL training using miles, a production-ready fork of slime.
High-performance RLHF framework with Ray+vLLM acceleration.
Simple Preference Optimization for LLM alignment. Reference-free alternative to DPO with better performance (+6.4 points on AlpacaEval 2.0). No reference model needed, more efficient than DPO.
Provides guidance for LLM post-training with RL using slime, a Megatron+SGLang framework.
Provides guidance for PyTorch-native agentic RL using torchforge, Meta's library separating infra from algorithms.
Fine-tune LLMs using reinforcement learning with TRL – SFT for instruction tuning, DPO for preference alignment, PPO/GRPO for reward optimization, and reward model training.
Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL).
Anthropic's method for training harmless AI through self-improvement. Two-phase approach – supervised learning with self-critique/revision, then RLAIF (RL from AI Feedback).
Meta's 7-8B specialized moderation model for LLM input/output filtering. 6 safety categories – violence/hate, sexual content, weapons, substances, self-harm, criminal planning. 94-95% accuracy. Deploy with vLLM, HuggingFace.
NVIDIA's runtime safety framework for LLM applications. Features jailbreak detection, input/output validation, fact-checking, hallucination detection, PII filtering, toxicity detection. Uses Colang 2.0 DSL for programmable rails. Production-ready.
Meta's 86M prompt injection and jailbreak detector. Filters malicious prompts and third-party data for LLM apps. 99%+ TPR, <1% FPR. Fast (<2ms GPU). Multilingual (8 languages). Deploy with HuggingFace or batch processing for RAG security.
Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config.
Trains large language models (2B-462B parameters) using NVIDIA Megatron-Core with advanced parallelism strategies.
Adds PyTorch FSDP2 (fully_shard) to training scripts with correct init, sharding, mixed precision/offload config, and distributed checkpointing.
High-level PyTorch framework with Trainer class, automatic distributed training (DDP/FSDP/DeepSpeed), callbacks system, and minimal boilerplate. Scales from laptop to supercomputer with same code.
Distributed training orchestration across clusters. Scales PyTorch/TensorFlow/HuggingFace from laptop to 1000s of nodes. Built-in hyperparameter tuning with Ray Tune, fault tolerance, elastic scaling.
Reserved and on-demand GPU cloud instances for ML training and inference.
Serverless GPU cloud platform for running ML workloads.
Multi-cloud orchestration for ML workloads with automatic cost optimization.
Activation-aware weight quantization for 4-bit LLM compression with 3x speedup and minimal accuracy loss.
Quantizes LLMs to 8-bit or 4-bit for 50-75% memory reduction with minimal accuracy loss.
Optimizes transformer attention with Flash Attention for 2-4x speedup and 10-20x memory reduction.
GGUF format and llama.cpp quantization for efficient CPU/GPU inference.
Post-training 4-bit quantization for LLMs with minimal accuracy loss.
Half-Quadratic Quantization for LLMs without calibration data.
Battle-tested PyTorch training recipes for all domains – LLMs, vision, diffusion, medical imaging, protein/drug discovery, spatial omics, genomics. Covers training loops, optimizer selection (AdamW, Muon), LR scheduling, mixed precision, debugging.
Evaluates code generation models across HumanEval, MBPP, MultiPL-E, and 15+ benchmarks with pass@k metrics.
Evaluates LLMs across 60+ academic benchmarks (MMLU, HumanEval, GSM8K, TruthfulQA, HellaSwag).
Evaluates LLMs across 100+ benchmarks from 18+ harnesses (MMLU, HumanEval, GSM8K, safety, VLM) with multi-backend execution.
Runs LLM inference on CPU, Apple Silicon, and consumer GPUs without NVIDIA hardware.
Fast structured generation and serving for LLMs with RadixAttention prefix caching.
Optimizes LLM inference with NVIDIA TensorRT for maximum throughput and lowest latency.
Serves LLMs with high throughput using vLLM's PagedAttention and continuous batching.
Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow – framework-agnostic ML lifecycle platform.
Provides guidance for experiment tracking with SwanLab.
Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard – Google's ML visualization toolkit.
Track ML experiments with automatic logging, visualize training in real-time, optimize hyperparameters with sweeps, and manage model registry with W&B – collaborative MLOps platform.
Provides guidance for automatically evolving and optimizing AI agents across any domain using LLM-driven evolution algorithms.
Autonomous AI agent platform for building and deploying continuous agents.
Multi-agent orchestration framework for autonomous AI collaboration.
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval.
Data framework for building LLM applications with RAG. Specializes in document ingestion (300+ connectors), indexing, and querying. Features vector indices, query engines, agents, and multi-modal support.
Open-source embedding database for AI applications. Store embeddings and metadata, perform vector and full-text search, filter by metadata. Simple 4-function API. Scales from notebooks to production clusters.
Facebook's library for efficient similarity search and clustering of dense vectors. Supports billions of vectors, GPU acceleration, and various index types (Flat, IVF, HNSW).
Managed vector database for production AI applications. Fully managed, auto-scaling, with hybrid search (dense + sparse), metadata filtering, and namespaces. Low latency (<100ms p95).
High-performance vector similarity search engine for RAG and semantic search.
Framework for state-of-the-art sentence, text, and image embeddings. Provides 5000+ pre-trained models for semantic similarity, clustering, and retrieval. Supports multilingual, domain-specific, and multimodal models.
Build complex AI systems with declarative programming, optimize prompts automatically, create modular RAG systems and agents with DSPy – Stanford NLP's framework for systematic LM programming.
Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance – Microsoft Research's constrained generation framework.
Extract structured data from LLM responses with Pydantic validation, retry failed extractions automatically, parse complex JSON with type safety, and stream partial results with Instructor – battle-tested structured output library.
Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines – dottxt.ai's structured generation library.
LLM observability platform for tracing, evaluation, and monitoring.
Open-source AI observability platform for LLM tracing, evaluation, and monitoring.
PyTorch library for audio generation including text-to-music (MusicGen) and text-to-sound (AudioGen).
Vision-language pre-training framework bridging frozen image encoders and LLMs.
OpenAI's model connecting vision and language. Enables zero-shot image classification, image-text matching, and cross-modal retrieval. Trained on 400M image-text pairs.
Evaluates NVIDIA Cosmos Policy on LIBERO and RoboCasa simulation environments.
Large Language and Vision Assistant. Enables visual instruction tuning and image-based conversations. Combines CLIP vision encoder with Vicuna/LLaMA language models. Supports multi-turn image chat, visual question answering, and instruction following.
Fine-tune and serve Physical Intelligence OpenPI models (pi0, pi0-fast, pi0.5) using JAX or PyTorch backends for robot policy inference across ALOHA, DROID, and LIBERO environments.
Fine-tunes and evaluates OpenVLA-OFT and OpenVLA-OFT+ policies for robot action generation with continuous action heads, LoRA adaptation, and FiLM conditioning on LIBERO simulation and ALOHA real-world setups.
Foundation model for image segmentation with zero-shot transfer.
State-of-the-art text-to-image generation with Stable Diffusion models via HuggingFace Diffusers.
OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params).
Compress large language models using knowledge distillation from teacher to student models.
Extend context windows of transformer models using RoPE, YaRN, ALiBi, and position interpolation techniques.
Merge multiple fine-tuned models using mergekit to combine capabilities without retraining.
Reduce LLM size and accelerate inference using pruning techniques like Wanda and SparseGPT.
Train Mixture of Experts (MoE) models using DeepSpeed or HuggingFace.
Accelerate LLM inference using speculative decoding, Medusa multiple heads, and lookahead decoding techniques.
Generates publication-quality figures for ML papers from research context. Given a paper section or description, extracts system components and relationships to generate architecture diagrams via Gemini.
Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM.
Generates conference presentation slides (Beamer LaTeX PDF and editable PPTX) from a compiled paper with speaker notes and talk script.
Comprehensive guide for writing systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides paragraph-level structural blueprints, writing patterns, venue-specific checklists, reviewer guidelines, LaTeX templates, and conference deadlines.
Guides researchers through structured ideation frameworks to discover high-impact research directions.
Applies cognitive science frameworks for creative thinking to CS and AI research ideation.
Compiles any research input – PDF papers, GitHub repositories, experiment logs, code directories, or raw notes – into a complete Agent-Native Research Artifact (ARA) with cognitive layer (claims, concepts, heuristics), physical layer (configs, code stubs).
Records research provenance as a post-task epilogue, scanning conversation history at the end of a coding or research session to extract decisions, experiments, dead ends, claims, heuristics, and pivots.
Performs ARA Seal Level 2 semantic epistemic review on Agent-Native Research Artifacts, scoring six dimensions (evidence relevance, falsifiability, scope calibration, argument coherence, exploration integrity.