Skip to main content

Data & Model Management

Model Ingestion

Models Panel — Browse downloaded models

When you enter a HuggingFace ID (e.g., google/gemma-2-2b), miStudio:

  1. Downloads the model weights to local cache
  2. Runs Dynamic Layer Discovery to map every layer and hook point
  3. Displays the architecture in the model detail view

Use the Preview button to inspect a model's metadata before downloading:

Model Preview — Architecture, parameters, and layer structure

Quantization reduces VRAM usage at the cost of precision:

ModeBitsVRAM SavingsQuality ImpactBest For
FP16/BF1616BaselineNoneMaximum precision SAE training
Q8 (INT8)8~50%MinimalGood balance of speed and accuracy
Q4 (NF4)4~75%ModerateRunning large models on consumer GPUs
Q22~87%SignificantMaximum compression, research only
Quantization and SAE Quality

For high-precision SAE training, use FP16/BF16 if VRAM allows. Quantized models add noise to activations, which propagates into the SAE's learned features. The SAE itself is always trained in full precision — only the base model is quantized.

Understanding Hook Points

When configuring extraction or training, you must choose where to place probes inside the model. Each location reveals different aspects of the model's computation:

Hook TypeWhat It CapturesWhen to Use
Residual Stream (residual)The "main highway" — cumulative information from all previous layersDefault choice. Best for general feature discovery.
MLP Layer (mlp)Factual "lookup tables" — world knowledge, entity associationsWhen investigating specific facts or knowledge storage
Attention Layer (attention)Relational reasoning — how tokens attend to each otherWhen investigating grammar, coreference, or syntactic patterns
Multi-Hook Training

You can train SAEs on multiple layers and multiple hook types simultaneously. For example, selecting layers [6, 12] with hooks [residual, mlp] creates 4 separate SAEs in one training job — one for each layer×hook combination.

Tokenization & Stride

Models process text as integer tokens, not words. When tokenizing a dataset:

  • Max Length: The context window size (e.g., 1024 tokens). Longer = more context per sample but more VRAM.
  • Stride: Overlap between chunks. A stride of 512 with max length 1024 means each chunk shares half its tokens with the next, preventing concepts from being split across chunk boundaries.