mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-22 17:30:42 +02:00
Add files via upload
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user