mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
AI and ML infrastructure
rl-post-training
RLHF / RL post-training pipeline
OpenRLHF
System
Techniques · 10
Primitives · 46
rl-post-training
Policy gradient and PPO
machine-learning · medium: Raise the log-probability of actions in proportion to their advantage; PPO clips the probability ratio so several epochs on one rollout stay safe.
›
Direct preference optimization
ml-training · medium: DPO and variants: optimize a policy directly on preference pairs with a reference-model log-ratio loss
Grpo
ml-training · medium: Group relative policy optimization: advantages from rewards of several samples per prompt, no value network
LLM fine-tuning
ml-training · medium: Adapting a pretrained LLM with supervised fine-tuning, LoRA/QLoRA adapters and preference optimization (DPO), and evaluating that it improved without forgetting.
›
Reward modeling
ml-training · medium: Training a scalar reward model on preference pairs with a Bradley-Terry loss; overoptimization pitfalls
Verifiable rewards
ml-training · medium: Rewards from programmatic checkers (unit tests, math answer matching) for RL and data filtering
Egress proxy filtering
security · medium: Forcing sandbox network traffic through a proxy with domain allowlists, TLS SNI checks and request logging
Lora adapters
ml-training · low: Low-rank adapter matrices for fine-tuning; QLoRA; serving many adapters on one base model
Bradley terry model
statistics · low: Pairwise comparison model P(i beats j)=s_i/(s_i+s_j); MLE fit, link to Elo and reward models
Token sampling
ml-training · low: Turn a vector of scores into one chosen item with temperature, top-k, top-p, min-p, repetition penalties and a seed.
›
Agent sandboxing
agentic-ai · unknown:
Continuous batching
ml-training · low: Schedule LLM inference per iteration, not per request; finished sequences leave and new ones join the running batch every step, which keeps the GPU full.
›
Mixed-precision training
ml-training · low: Run matmuls in bf16/fp16/fp8 on tensor cores while keeping master weights, optimizer state and reductions in fp32; about 2x speed, half the activation memory.
›
Paged KV cache
ml-training · low: Store each sequence's attention keys/values in fixed-size blocks mapped through a block table, like virtual memory pages; near-zero fragmentation and copy-on-write sharing.
›
Rejection sampling
ml-training · low: Best-of-n and filtered sampling: generate many candidates, keep those passing a verifier or reward threshold
Weight synchronization
ml-training · low: Pushing updated policy weights from trainers to inference/actor workers (NCCL broadcast, sharded resharding)
ZeRO and FSDP sharding
ml-training · low: Data parallelism that shards optimizer state, gradients and weights across ranks and gathers weights just in time; per-GPU model memory drops from 16Ψ to 16Ψ/N.
›
AdamW
ml-training · low: Adam's per-parameter adaptive steps with weight decay applied directly to the weights; the default optimizer for transformers and LLM pretraining.
›
Gradient clipping
ml-training · low: Clipping gradients by global norm (or value) to prevent loss spikes; interaction with mixed precision
Reverse-mode automatic differentiat…
ml-training · low: Record the forward computation on a tape, then sweep it backwards once to get the gradient of a scalar loss for all inputs.
›
Loss functions
machine-learning · low: The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.
›
Gradient checkpointing
ml-training · low: Save only some activations in the forward pass and recompute the rest during backward, trading about 33% extra compute for O(√n) activation memory.
›
Learning-rate warmup and cosine dec…
ml-training · low: Ramp the learning rate up linearly for the first ~1% of steps, then decay it along a half cosine to ~10% of peak.
›
+ 3 more techniques
+ 30 more primitives
System
Techniques · 10
Primitives · 46
rl-post-training
Policy gradient and PPO
machine-learning · medium: Raise the log-probability of actions in proportion to their advantage; PPO clips the probability ratio so several epochs on one rollout stay safe.
›
Direct preference optimization
ml-training · medium: DPO and variants: optimize a policy directly on preference pairs with a reference-model log-ratio loss
Grpo
ml-training · medium: Group relative policy optimization: advantages from rewards of several samples per prompt, no value network
LLM fine-tuning
ml-training · medium: Adapting a pretrained LLM with supervised fine-tuning, LoRA/QLoRA adapters and preference optimization (DPO), and evaluating that it improved without forgetting.
›
Reward modeling
ml-training · medium: Training a scalar reward model on preference pairs with a Bradley-Terry loss; overoptimization pitfalls
Verifiable rewards
ml-training · medium: Rewards from programmatic checkers (unit tests, math answer matching) for RL and data filtering
Egress proxy filtering
security · medium: Forcing sandbox network traffic through a proxy with domain allowlists, TLS SNI checks and request logging
Microvm isolation
security · medium: Minimal KVM-based VMs (Firecracker-style) with tiny device model, fast boot and snapshot restore
Process sandboxing
security · medium: Run risky work in a separate, deliberately powerless process and let a small privileged broker do the few things it needs, over a narrow pipe.
›
Hermetic execution
systems · medium: Run actions with only declared inputs in a sandbox and fixed environment
Lora adapters
ml-training · low: Low-rank adapter matrices for fine-tuning; QLoRA; serving many adapters on one base model
Bradley terry model
statistics · low: Pairwise comparison model P(i beats j)=s_i/(s_i+s_j); MLE fit, link to Elo and reward models
Token sampling
ml-training · low: Turn a vector of scores into one chosen item with temperature, top-k, top-p, min-p, repetition penalties and a seed.
›
Agent sandboxing
agentic-ai · unknown:
Continuous batching
ml-training · low: Schedule LLM inference per iteration, not per request; finished sequences leave and new ones join the running batch every step, which keeps the GPU full.
›
Mixed-precision training
ml-training · low: Run matmuls in bf16/fp16/fp8 on tensor cores while keeping master weights, optimizer state and reductions in fp32; about 2x speed, half the activation memory.
›
Paged KV cache
ml-training · low: Store each sequence's attention keys/values in fixed-size blocks mapped through a block table, like virtual memory pages; near-zero fragmentation and copy-on-write sharing.
›
Rejection sampling
ml-training · low: Best-of-n and filtered sampling: generate many candidates, keep those passing a verifier or reward threshold
Weight synchronization
ml-training · low: Pushing updated policy weights from trainers to inference/actor workers (NCCL broadcast, sharded resharding)
ZeRO and FSDP sharding
ml-training · low: Data parallelism that shards optimizer state, gradients and weights across ranks and gathers weights just in time; per-GPU model memory drops from 16Ψ to 16Ψ/N.
›
AdamW
ml-training · low: Adam's per-parameter adaptive steps with weight decay applied directly to the weights; the default optimizer for transformers and LLM pretraining.
›
Gradient clipping
ml-training · low: Clipping gradients by global norm (or value) to prevent loss spikes; interaction with mixed precision
Reverse-mode automatic differentiat…
ml-training · low: Record the forward computation on a tape, then sweep it backwards once to get the gradient of a scalar loss for all inputs.
›
Loss functions
machine-learning · low: The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.
›
Gradient checkpointing
ml-training · low: Save only some activations in the forward pass and recompute the rest during backward, trading about 33% extra compute for O(√n) activation memory.
›
Learning-rate warmup and cosine dec…
ml-training · low: Ramp the learning rate up linearly for the first ~1% of steps, then decay it along a half cosine to ~10% of peak.
›
Sequence packing
ml-training · low: Packing variable-length sequences into fixed-size batches with attention masks to avoid padding waste
Weight quantization
ml-training · low: Store weights as 8/4-bit integers with per-group scales; decode is memory-bound, so 4-bit weights give about 3-4x tokens/s and fit 4x larger models.
›
Calibration
machine-learning · low: Make predicted probabilities match observed frequencies: measure with ECE, fix post hoc with temperature, Platt or isotonic scaling on held-out data.
›
Transformer block
ml-training · low: The decoder-only pre-norm block (attention plus MLP on a residual stream) behind every modern LLM, with exact shapes, parameter, FLOP and KV-cache counts.
›
Annotator agreement
statistics · low: Inter-annotator agreement measures: Cohen and Fleiss kappa, Krippendorff alpha, gold-question accuracy
Pass at k
machine-learning · low: Unbiased pass@k estimator from n samples with c correct, for code and agent benchmarks
Text normalization
machine-learning · low: Rewrite messy text into one canonical form for matchers and models, or into spoken words for speech output (and back), keeping a map to the original offsets.
›
DNS message format and client looku…
networking · low: Binary query/response format of DNS (RFC 1035) and how a stub client uses it: record types, name compression, UDP/TCP/EDNS sizes, TTL caching.
›
Http connect tunneling
networking · low: HTTP CONNECT tunnels for proxying TLS and arbitrary TCP
Public Suffix List
networking · low: Find the registrable domain (eTLD+1) of a host name by matching the longest rule in a community-maintained list of shared suffixes.
›
Glob matching
search-sort · low: Glob/gitignore pattern matching without backtracking blowup
Cgroups and namespaces
hardware-os · low: Linux namespaces limit what a process can see; cgroup v2 limits and accounts what it may use. Containers, sandboxes and job schedulers are built from the two.
›
Hardware virtualization kvm
hardware-os · low: VT-x/AMD-V via KVM: vCPU run loop, VM exits, MMIO emulation
Nested paging ept
hardware-os · low: EPT/NPT two-level address translation for guests
Virtio devices
hardware-os · low: Virtqueue rings for paravirtual block, net and vsock devices
Seccomp bpf
security · low: Syscall filtering with seccomp BPF programs
Overlay filesystem
hardware-os · low: Union mounts (overlayfs) stacking read-only layers under a writable layer
Least privilege and isolation
security · low: Assume every component will be compromised and limit what it can then reach: narrow identities, separate accounts, sandboxed processes.
›
Cryptographic hashes (SHA-2, BLAKE3)
security · low: Collision-resistant fingerprints of data; SHA-256 for interoperability, BLAKE3 for speed, HMAC/HKDF for keyed uses.
›
Content-addressed storage
storage · low: Store each blob under the hash of its bytes: immutable, deduplicated by construction, self-verifying on every read, and composable into Merkle trees.
›
Reference counting
compilers · low: Keep a count of owners in each object, free it when the count hits zero; deterministic and local, but pays on every copy and leaks cycles.
›
Merkle dag
data-structures · low: Content-addressed DAG of hashed nodes (git trees/commits) for dedupe and verifiable history
Atomic file replacement
hardware-os · low: Write temp file, fsync, rename over target, fsync directory: crash-safe whole-file updates
Linear and logistic regression
machine-learning · low: Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.
›
Collective communication
ml-training · low: The family of group exchanges (broadcast, reduce, all-gather, reduce-scatter, all-to-all) and the latency-plus-bytes cost model that picks ring, tree or direct algorithms by message size and topology.
›
Ring all-reduce
ml-training · low: Sum a buffer across N workers via reduce-scatter then all-gather around a ring; each link carries 2(N−1)/N of the buffer, which is bandwidth-optimal.
›
Floating-point error
numerics · low: How IEEE 754 rounding error accumulates and how to contain it: compensated (Kahan/Neumaier) and pairwise summation, error-free transformations with FMA, ULP comparisons.
›
L-BFGS
numerics · low: Quasi-Newton minimizer that approximates the inverse Hessian from the last m gradient differences via the two-loop recursion; O(m·n) memory and work per step.
›
Low precision number formats
numerics · low: Bf16, fp16, fp8 (E4M3, E5M2), MX block formats and int4: ranges, rounding, scaling
LU and Cholesky factorization
numerics · low: Factor A = PLU (any square matrix, partial pivoting) or A = LLᵀ (SPD) once in O(n³), then solve each right-hand side in O(n²).
›
Copy for AI
Similar systems
Share the most building blocks with this one.
reasoning-rl
39 %
synthetic-data
22 %
ai-for-math
16 %