CLI Reference¶
Model Garage provides a retro-themed CLI built with Typer and Rich.
Installation¶
The CLI is installed automatically with the package:
Commands¶
garage open¶
Load and display a model's architecture card.
Shows:
- Model family and architecture type
- Parameter count and layer structure
- Hidden dimensions, attention heads, vocabulary size
- Extractable component summary
garage extract¶
Extract components from a model.
# Extract attention from a specific layer
garage extract gpt2 --layer 6 --component self_attention
# Extract FFN from layer 3
garage extract gpt2 --layer 3 --component ffn
# Extract all components from a layer
garage extract gpt2 --layer 6
Options:
| Flag | Description |
|---|---|
--layer, -l |
Layer index to extract from |
--component, -c |
Component type: self_attention, ffn, embedding, layer_norm |
--output, -o |
Output path for saved component |
garage analyze¶
Analyze activations for a given prompt.
garage analyze gpt2 --prompt "The meaning of life is"
garage analyze microsoft/phi-2 --prompt "Hello world" --layers 0,6,11
Shows activation statistics per layer: mean, std, sparsity, and entropy.
Options:
| Flag | Description |
|---|---|
--prompt, -p |
Input text to analyze |
--layers |
Comma-separated layer indices (default: all) |
garage compare¶
Compare two model architectures and find compatible parts.
Shows dimension comparison, layer counts, and lists compatible components.
garage registry list¶
List all models registered in the local registry.
garage registry add¶
Decompose and register a model.