Add files via upload

This commit is contained in:
pliny
2026-03-04 12:38:18 -08:00
committed by GitHub
commit 0f6114fe87
100 changed files with 46937 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# Example: Full ablation — all strategies on GPT-2
# Run with: obliteratus run examples/full_study.yaml
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
max_samples: 50
strategies:
- name: layer_removal
params: {}
- name: head_pruning
params: {}
- name: ffn_ablation
params: {}
- name: embedding_ablation
params:
chunk_size: 48 # ablate 48 dims at a time (GPT-2 has 768)
metrics:
- perplexity
batch_size: 4
max_length: 256
output_dir: results/gpt2_full
+26
View File
@@ -0,0 +1,26 @@
# Example: Ablate every attention head in GPT-2
# Run with: obliteratus run examples/gpt2_head_ablation.yaml
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
max_samples: 50
strategies:
- name: head_pruning
params: {}
metrics:
- perplexity
batch_size: 4
max_length: 256
output_dir: results/gpt2_heads
+28
View File
@@ -0,0 +1,28 @@
# Example: Ablate every layer and FFN block in GPT-2
# Run with: obliteratus run examples/gpt2_layer_ablation.yaml
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu # change to "cuda" or "auto" for GPU
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
max_samples: 100 # keep small for a quick demo
strategies:
- name: layer_removal
params: {}
- name: ffn_ablation
params: {}
metrics:
- perplexity
batch_size: 4
max_length: 256
output_dir: results/gpt2_layers
+19
View File
@@ -0,0 +1,19 @@
# Example: Deep-dive into attention heads
# Uses the "attention" preset — prunes every head individually
# Run with: obliteratus run examples/preset_attention.yaml
preset: attention
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
output_dir: results/gpt2_attention
+18
View File
@@ -0,0 +1,18 @@
# Example: Find where knowledge is stored (FFNs + embeddings)
# Run with: obliteratus run examples/preset_knowledge.yaml
preset: knowledge
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
output_dir: results/gpt2_knowledge
+19
View File
@@ -0,0 +1,19 @@
# Example: Use the "quick" preset for a fast scan
# This automatically configures layer_removal + ffn_ablation, 25 samples, etc.
# Run with: obliteratus run examples/preset_quick.yaml
preset: quick
model:
name: gpt2
task: causal_lm
dtype: float32
device: cpu
dataset:
name: wikitext
subset: wikitext-2-raw-v1
split: test
text_column: text
output_dir: results/gpt2_quick