Jacob Garcia · Hugging Face Model Foundry
Snip Scope
Interactive sparse-feature exemplar browser. This showcase backs up the trained artifacts, measured evaluation, and complete runnable source.
Verified project card
# SNIP Scope SNIP Scope trains a top-k sparse autoencoder on final-layer hidden activations from the pretrained SNIP-0.4M transformer. A 96-dimensional activation is encoded into a 384-feature overcomplete dictionary, but only the 16 largest positive features may fire for each token. The benchmark measures held-out reconstruction, explained variance, active-feature count, dead-feature rate, and token exemplars for each learned feature. A 16-component PCA reconstruction is retained as a dense low-rank control. Feature exemplars are descriptive clues, not proof that a neuron represents one human concept. ## Verified results The SAE trained on 180,000 final-layer token activations and was measured on 40,000 held-out activations. | Metric | Top-k SAE | PCA-16 control | | --- | ---: | ---: | | Reconstruction MSE | 0.02585 | 0.29824 | | Explained variance | 97.41% | 70.11% | | Active features per token | 16.00 | 16 dense components | | Dead dictionary features | 3.39% | not applicable | The learned dictionary contains 384 features and the SAE has 74,112 parameters. The Space exposes each feature's five highest-activating held-out BPE tokens and firing rate. Those exemplars may reflect token identity, syntax, position, or mixed causes; the project does not assign automatic human-readable concepts. ## Reproduce ```powershell uv run python projects/snip-scope/train.py ```
Evaluation snapshot
{
"model": "SNIP Scope top-k sparse autoencoder",
"source_model": "SNIP-0.4M base final hidden layer",
"parameters": 74112,
"training_tokens": 180000,
"heldout_tokens": 40000,
"input_dimension": 96,
"dictionary_features": 384,
"top_k": 16,
"heldout": {
"reconstruction_mse": 0.02585437148809433,
"explained_variance": 0.9740850101195055,
"mean_active_features": 16.0,
"median_active_features": 16.0,
"dead_feature_fraction": 0.033854166666666664
},
"pca_16_control": {
"reconstruction_mse": 0.298243910074234,
"explained_variance": 0.7010568067061413
},
"training_history": [
{
"training_step": 100,
"training_loss": 0.18427926301956177,
"batch_active_features": 16.0
},
{
"training_step": 200,
"training_loss": 0.09680552780628204,
"batch_active_features": 16.0
},
{
"training_step": 300,
"training_loss": 0.0745527446269989,
"batch_active_features": 16.0
},
{
"training_step": 400,
"training_loss": 0.0621606670320034,
"batch_active_features": 16.0
},
{
"training_step": 500,
"training_loss": 0.051943834871053696,
"batch_active_features": 16.0
},
{
"training_step": 600,
"training_loss": 0.048014383763074875,
"batch_active_features": 16.0
},
{
"training_step": 700,
"training_loss": 0.04393930733203888,
"batch_active_features": 16.0
},
{
"training_step": 800,
"training_loss": 0.04151527211070061,
"batch_active_features": 16.0
},
{
"training_step": 900,
"training_loss": 0.03839843347668648,
"batch_active_features": 16.0
},
{
"training_step": 1000,
"training_loss": 0.03772205859422684,
"batch_active_features": 16.0
},
{
"training_step": 1100,
"training_loss": 0.03755463287234306,
"batch_active_features": 16.0
},
{
"training_step": 1200,
"training_loss": 0.03328678011894226,
"batch_active_features": 16.0
},
{
"training_step": 1300,
"training_loss": 0.03515448421239853,
"batch_active_features": 16.0
},
{
"training_step": 1400,
"training_loss": 0.03331328555941582,
"batch_active_features": 16.0
},
{
"training_step": 1500,
"training_loss": 0.03026575781404972,
"batch_active_features": 16.0
},
{
"training_step": 1600,
"training_loss": 0.03202933445572853,
"batch_active_features": 16.0
},
{
"training_step": 1700,
"training_loss": 0.030269039794802666,
"batch_active_features": 16.0
},
{
"training_step": 1800,
"training_loss": 0.029401661828160286,
"batch_active_features": 16.0
},
{
"training_step": 1900,
"training_loss": 0.028512846678495407,
"batch_active_features": 16.0
},
{
"training_step": 2000,
"training_loss": 0.02790793403983116,
"batch_active_features": 16.0
},
{
"training_step": 2100,
"training_loss": 0.029049385339021683,
"batch_active_features": 16.0
},
{
"training_step": 2200,
"training_loss": 0.026964839547872543,
"batch_active_features": 16.0
},
{
"training_step": 2300,
"training_loss": 0.026676125824451447,
"batch_active_features": 16.0
},
{
"training_step": 2400,
"training_loss": 0.024650562554597855,
"batch_active_features": 16.0
},
{
"training_step": 2500,
"training_loss": 0.025682823732495308,
"batch_active_features": 16.0
},
{
"training_step": 2600,
"training_loss": 0.025776153430342674,
"batch_active_features": 16.0
},
{
"training_step": 2700,
"training_loss": 0.02404068596661091,
"batch_active_features": 16.0
},
{
"training_step": 2800,
"training_loss": 0.025123972445726395,
"batch_active_features": 16.0
},
{
"training_step": 2900,
"training_loss": 0.025397324934601784,
"batch_active_features": 16.0
},
{
"training_step": 3000,
"training_loss": 0.02425968647003174,
"batch_active_features": 16.0
}
]
}
Backed-up artifact tree
README.md__pycache__/app.cpython-311.pyc__pycache__/model.cpython-311.pycapp.pyartifacts/snip-scope/evaluation.jsonartifacts/snip-scope/normalization.npzartifacts/snip-scope/sae.safetensorsdata/feature_exemplars.parquetmodel.pyrequirements.txttrain.py