tinygrad
Deep learning framework development with tinygrad - a minimal tensor library with autograd, JIT compilation, and multi-device support. Use when writing neural networks, training models, implementing tensor operations, working with UOps/PatternMatcher for graph transformations, or contributing to tinygrad internals. Triggers on tinygrad imports, Tensor operations, nn modules, optimizer usage, schedule/codegen work, or device backends.
npx skills add majiayu000/claude-skill-registry --skill tinygrad --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# tinygrad A minimal deep learning framework focused on beauty and minimalism. Every line must earn its keep. ## Quick Reference ```python from tinygrad import Tensor, TinyJit, nn, dtypes, Device, GlobalCounters # Tensor creation x = Tensor([1, 2, 3]) x = Tensor.rand(2, 3) x = Tensor.kaiming_uniform(128, 784) # Operations are lazy until realized y = (x + 1).relu().sum() y.realize() # or y.numpy() # Training context with Tensor.train(): loss = model(x).sparse_categorical_crossentropy(labels).backward() optim.step() ``` ## Architecture Pipeline 1. **Tensor** (`tinygrad/tensor.py`) - User API, creates UOp graph 2. **UOp** (`tinygrad/uop/ops.py`) - Unified IR for all operations 3. **Schedule** (`tinygrad/engine/schedule.py`) - Converts tensor UOps to kernel UOps 4. **Codegen** (`tinygrad/codegen/`) - Converts kernel UOps to device code 5. **Runtime** (`tinygrad/runtime/`) - Device-specific execution ## Training Loop Pattern ```python from tinygrad import Tensor, TinyJit, nn from tinygrad.nn.datasets import mnist X_train, Y_train, X_test, Y_test = mnist() model = Model() optim = nn.optim.Adam(nn.state.get_parameters(model)) @TinyJit @Tensor.train() def train_step(): optim.zero_grad() sa
- Quick Reference
- Architecture Pipeline
- Training Loop Pattern
- Model Definition
- State Dict / Weights
- JIT Compilation
- Device Management
- Environment Variables
- Debugging
- UOp and PatternMatcher (Internals)
- Style Guide
- Testing
Visualize computation graph Show generated code Run tests python -m pytest test/test_tensor.py -xvs python -m pytest test/unit/test_schedule_cache.py -x --timeout=60
What does the tinygrad skill do?
Deep learning framework development with tinygrad - a minimal tensor library with autograd, JIT compilation, and multi-device support. Use when writing neural networks, training models, implementing tensor operations, working with UOps/PatternMatcher for graph transformations, or contributing to tinygrad internals. Triggers on tinygrad imports, Tensor operations, nn modules, optimizer usage, schedule/codegen work, or device backends.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill tinygrad --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
