ai-scaling-laws

Featured

Sizes models and token budgets using Kaplan/Chinchilla scaling laws. Use when reasoning about compute-optimal N and D, tokens-per-parameter ratios, or over-training tradeoffs.

AI & Automation 87 stars 19 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
65
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# AI Scaling Laws — Compute-Optimal Sizing Skill **Functional reference** for pre-training researchers and engineers who need to reason cold about compute, token, and parameter tradeoffs. Covers Kaplan et al. (2020), Chinchilla / Hoffmann et al. (2022), GPT-3 sizing, over-training for inference efficiency, and the mechanics of budget allocation for a from-scratch run. This is a standard interview probe. Know the key ratios and be ready to work through a concrete sizing calculation without a lookup. ## Quick Reference | Concept | Formula / Heuristic | Notes | |---------|---------------------|-------| | Compute budget | C ≈ 6 N D | N = non-embedding params, D = training tokens; approximate, constant ≈6 accounts for forward + backward | | Chinchilla-optimal ratio | D ≈ 20 × N | From Hoffmann et al. 2022; holds compute constant | | Kaplan (2020) ratio | D ≈ 1.7–2 × N (roughly) | Pre-Chinchilla; model-heavy. Difference from Chinchilla is *methodological* (FLOP counting, warmup, optimizer tuning), not simply "wrong" — see post-Chinchilla ref | | Optimal N given C | N* ≈ (C / 120)^0.5 | Approximate; from Chinchilla Table A3 | | Optimal D given C | D* ≈ (C / 0.3)^0.5 | Paired with above; verify against Hoffmann et al. Table A3 numbers | | Over-training (Llama-style) | D ≫ 20 × N | Trades higher training loss for cheaper inference; standard for deployed open models. Llama 3 8B: 15T tokens ≈ 1,875 tok/param (dense example). Llama 4 (2025) is the current MoE example — apply the rati...

Details

Author
vasilyu1983
Repository
vasilyu1983/AI-Agents-public
Created
10 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

ai-hardware-selection

Selecting accelerators for AI workloads: GPU vs TPU vs NPU vs FPGA vs CPU, and the metrics that actually decide it — memory capacity & bandwidth, TOPS/ FLOPS, interconnect, and cost/Watt. Architect-level hardware-fit reasoning. USE WHEN: choosing AI hardware/accelerators, "which GPU", "TPU vs GPU", "NPU", "FPGA", "HBM/memory bandwidth", "TOPS", "cost per token", VRAM sizing for a model, training vs inference hardware, accelerator interconnect. DO NOT USE FOR: serving software topology (use `inference-serving-topology`); on-device runtimes (use `edge-inference`); generic CPU perf (use systems/hardware-aware-design).

33 Updated today
claude-dev-suite
AI & Automation Listed

ai-ml-landscape

Comprehensive practitioner reference for the 2025–2026 AI/ML landscape covering frontier model selection and routing, open-weight vs hosted API trade-offs, reasoning models and test-time compute, RAG and agent production patterns, classical ML for tabular data, deep learning foundations (transformers, attention, MoE, SSMs), LLM training and post-training (DPO/GRPO/LoRA/QLoRA), inference serving (vLLM/SGLang), evaluation benchmark skepticism, safety/alignment, EU AI Act governance, and hardware selection. Use when advising on model selection, AI architecture decisions, LLM deployment, fine-tuning strategy, benchmark interpretation, or AI governance compliance.

1 Updated 1 weeks ago
adammatthewsteinberger
AI & Automation Listed

token-budget-tracker

Track AI model usage, token costs, and optimize spend across agents

4 Updated 2 days ago
Silex-Research