MCPcopy Create free account

hub / github.com/elder-plinius/OBLITERATUS / functions

Functions1,841 in github.com/elder-plinius/OBLITERATUS

↓ 7 callersFunction_sanitize_label
Strip filesystem paths, tokens, and overly-long strings from labels.
obliteratus/evaluation/benchmark_plots.py:30
↓ 7 callersMethodanalyze
Characterize the Riemannian geometry of the refusal manifold. Args: harmful_activations: {layer_idx: (n_harmful, hidden_dim)} act
obliteratus/analysis/riemannian_manifold.py:132
↓ 7 callersMethodapply
Apply a single ablation in-place. The caller is responsible for calling handle.restore() afterwards to undo the modification.
obliteratus/strategies/base.py:32
↓ 7 callersMethodcompute_transfer
Compute Wasserstein transfer of refusal directions. Args: source_activations: {layer_idx: (n_samples, d_source)} from source.
obliteratus/analysis/wasserstein_transfer.py:130
↓ 7 callersFunctionenable_telemetry
Enable telemetry collection.
obliteratus/telemetry.py:212
↓ 7 callersMethodextract
Extract the Wasserstein-optimal refusal direction for one layer. Args: harmful_activations: List of (hidden_dim,) tensors from ha
obliteratus/analysis/wasserstein_optimal.py:117
↓ 7 callersMethodfrom_refusal_direction
Create a steering vector from a pre-computed refusal direction. By default, alpha=-1.0 steers AWAY from refusal (removes it). Use alp
obliteratus/analysis/steering_vectors.py:90
↓ 7 callersMethodprofile_defense
Generate a comprehensive defense profile for the model. Analyzes the distribution and strength of refusal signals across layers to ch
obliteratus/analysis/defense_robustness.py:93
↓ 6 callersMethod_compute_expert_granular_directions
Extract per-expert refusal directions via routing-weighted decomposition. **Expert-Granular Abliteration (EGA)** — a novel technique that dec
obliteratus/abliterate.py:3045
↓ 6 callersMethod_find_router_module
Find the router/gate module in an MoE FFN block. Searches standard names first (_ROUTER_NAMES), then falls back to heuristic auto-det
obliteratus/abliterate.py:1011
↓ 6 callersFunction_generate_harmless_counterparts
Generate n harmless prompts by cycling through the pool. For external datasets that only provide harmful prompts, we need matching harmless p
obliteratus/prompts.py:341
↓ 6 callersMethod_mask_safety_neurons
Zero out safety-critical neurons identified by z-score outlier detection. GateBreaker (Wu et al., 2025) showed that masking ~2.4% of neurons
obliteratus/abliterate.py:3170
↓ 6 callersMethod_project_fused_3d_granular
Project fused 3D expert params with per-expert directions. Like _project_fused_3d but uses expert-specific refusal directions when av
obliteratus/abliterate.py:5601
↓ 6 callersMethod_project_moe_experts_granular
Expert-Granular Abliteration: per-expert direction projection. Uses routing-weighted refusal directions specific to each expert, fall
obliteratus/abliterate.py:5484
↓ 6 callersFunction_style_ax
Apply consistent styling to an axis.
obliteratus/evaluation/benchmark_plots.py:57
↓ 6 callersMethodanalyze_direction
Analyze a single refusal direction through the logit lens. Args: direction: (hidden_dim,) refusal direction vector. m
obliteratus/analysis/logit_lens.py:126
↓ 6 callersMethodapply_sparse_projection
Apply sparse direction projection to a weight matrix. Only modifies the top-k% of rows by projection magnitude. Args: we
obliteratus/analysis/sparse_surgery.py:232
↓ 6 callersFunctioncapability_summary
(data: dict[str, Any] | None)
scripts/aspa_pareto_controller.py:118
↓ 6 callersFunctionget_source_key_from_label
Map a dropdown label back to a source key.
obliteratus/prompts.py:456
↓ 6 callersFunctionkl_summary
(data: dict[str, Any] | None)
scripts/aspa_pareto_controller.py:132
↓ 6 callersFunctionlinear_cka
Compute Linear Centered Kernel Alignment between two activation matrices. CKA measures representational similarity between neural network layers,
obliteratus/evaluation/advanced_metrics.py:551
↓ 6 callersFunctionload_jailbreakbench_prompts
Load the 100 standard JailbreakBench harmful behaviors. Tries the jailbreakbench Python package first, then HuggingFace Hub, then falls back
obliteratus/evaluation/heretic_eval.py:51
↓ 6 callersMethodrun
Execute the full tournament. Returns TourneyResult with winner.
obliteratus/tourney.py:1011
↓ 6 callersFunctionset_seed
Set all random seeds for reproducibility. Args: seed: The seed value to use everywhere. deterministic: If True, also enable PyTor
obliteratus/reproducibility.py:22
↓ 6 callersMethodsnapshot
Save a copy of the model state dict so we can restore after ablation. Tensors are moved to CPU to avoid doubling GPU memory usage on
obliteratus/models/loader.py:314
↓ 6 callersMethodsummary
(self)
obliteratus/models/loader.py:350
↓ 6 callersMethodtail
Return the last *n* log lines joined by newlines. ``n=0`` returns all.
app.py:3270
↓ 6 callersMethodto_dataframe
Convert results to a pandas DataFrame with delta columns.
obliteratus/reporting/report.py:49
↓ 5 callersFunction_add_gpu_args
Add --gpus flag for multi-GPU control.
obliteratus/cli.py:25
↓ 5 callersFunction_elapsed
()
app.py:1916
↓ 5 callersMethod_excise
Remove refusal directions from model weights. Supports multiple projection strategies: - Standard: full orthogonal projection (basic)
obliteratus/abliterate.py:3402
↓ 5 callersFunction_extract_excise_details
Extract excision operation details from a pipeline.
obliteratus/telemetry.py:1006
↓ 5 callersMethod_extract_number
Extract the final number from a math response.
obliteratus/evaluation/benchmarks.py:338
↓ 5 callersFunction_extract_prompt_counts
Extract prompt count information from a pipeline.
obliteratus/telemetry.py:1050
↓ 5 callersFunction_fmt
(val, delta=None)
obliteratus/evaluation/heretic_eval.py:858
↓ 5 callersMethod_format_metrics
Format iteration metrics as a markdown table.
obliteratus/auto_obliterate.py:582
↓ 5 callersMethod_is_quantized_param
Check if a parameter is quantized (bitsandbytes, GPTQ, or AWQ).
obliteratus/abliterate.py:4622
↓ 5 callersFunction_make_mock_pipeline
Build a mock pipeline with all fields the telemetry module reads.
tests/test_telemetry.py:355
↓ 5 callersFunction_make_report
()
tests/test_report.py:10
↓ 5 callersMethod_project_head_selective
Project refusal direction only from the top refusal attention heads. Instead of modifying the full o_proj (which affects all heads equally),
obliteratus/abliterate.py:3238
↓ 5 callersFunction_register
(source: DatasetSource)
obliteratus/prompts.py:360
↓ 5 callersFunction_should_quantize
Return '4bit' if the model needs quantization for available GPU, else None.
app.py:718
↓ 5 callersFunction_test_writable
Test if a directory exists and is writable.
obliteratus/telemetry.py:82
↓ 5 callersFunctionactivation_cosine_similarity
Compute mean cosine similarity between original and modified activations. Args: acts_original: (n_samples, hidden_dim) original model act
obliteratus/evaluation/advanced_metrics.py:525
↓ 5 callersMethodanalyze_cross_layer
Analyze how well directions transfer between layers. Args: refusal_directions: {layer_idx: refusal_direction}. Returns:
obliteratus/analysis/cross_model_transfer.py:255
↓ 5 callersFunctiondefault_self_improve_params
Conservative size-aware defaults for recursive residue runs.
obliteratus/model_profile.py:173
↓ 5 callersFunctiondisable_telemetry
Disable telemetry collection.
obliteratus/telemetry.py:206
↓ 5 callersMethodextract
Extract the LEACE direction for a single layer. Args: harmful_activations: List of (hidden_dim,) tensors from harmful prompts.
obliteratus/analysis/leace.py:87
↓ 5 callersFunctionfirst_token_kl_on_prompts
Compute first-token KL divergence across a set of prompts. This is the standard metric used by Heretic and Young (2025) for measuring collate
obliteratus/evaluation/heretic_eval.py:466
↓ 5 callersFunctionget_device
Resolve a device string. Parameters ---------- preference : str ``"auto"`` picks the best GPU, ``"cuda"``/``"mps"``/``"cpu"`` for
obliteratus/device.py:42
↓ 5 callersFunctionget_profile_summary
Return a human-readable markdown summary of the detected profile.
obliteratus/architecture_profiles.py:520
↓ 5 callersFunctionlist_study_presets
Return all presets in display order.
obliteratus/study_presets.py:248
↓ 5 callersFunctionload_json
(path: Path)
scripts/aspa_pareto_controller.py:90
↓ 5 callersFunctionmake_display
()
obliteratus/cli.py:912
↓ 5 callersFunctionmake_hook
(d: torch.Tensor, s: float)
app.py:801
↓ 5 callersMethodmap_entanglement
Map safety-capability entanglement across the model. For each layer, estimates how much abliterating refusal would also damage genera
obliteratus/analysis/defense_robustness.py:236
↓ 5 callersFunctionmodels
Return catalog records filtered by channel / vendor / open_weight / capability.
obliteratus/models_client.py:60
↓ 5 callersMethodprobe_all_layers
Probe all layers for residual refusal signal. Args: harmful_acts: {layer_idx: [activations]} from post-excision forward pass.
obliteratus/analysis/activation_probing.py:139
↓ 5 callersFunctionprompt_hash
Return a short SHA-256 fingerprint for a prompt.
obliteratus/hard_negative.py:50
↓ 5 callersFunctionrestore_from_hub
Download community records from Hub into the local JSONL file. This is the critical path for surviving factory rebuilds: even if ``/data`` is
obliteratus/telemetry.py:563
↓ 5 callersMethodrun
Run the full decomposition pipeline. Args: harmful_acts: Activations from harmful prompts. harmless_acts: Activations
obliteratus/analysis/sae_abliteration.py:427
↓ 5 callersFunctionsend_report
Send a telemetry report in a background thread.
obliteratus/telemetry.py:1164
↓ 5 callersFunctionthinking_tag_flag
(text: str)
scripts/gemma4_hard_tier_bench.py:218
↓ 5 callersFunctiontoken_kl_divergence
Compute mean per-token KL divergence between two models' outputs. KL(P_orig || Q_mod) = sum P(x) * (log P(x) - log Q(x)) Args: logit
obliteratus/evaluation/advanced_metrics.py:413
↓ 5 callersFunctiontrain_sae
Train a sparse autoencoder on collected activations. Uses reconstruction loss + L1 sparsity penalty with train/test split, early stopping on
obliteratus/analysis/sae_abliteration.py:134
↓ 5 callersFunctionwords
(text: str)
scripts/gemma4_hard_tier_bench.py:156
↓ 4 callersFunction_add_remote_args
Add --remote execution flags to a subcommand parser.
obliteratus/cli.py:38
↓ 4 callersFunction_capture_exit
Call main(argv), expecting SystemExit; return captured stderr text.
tests/test_cli.py:24
↓ 4 callersFunction_format_benchmark_results
Format benchmark results as a Markdown table with context header.
app.py:1398
↓ 4 callersFunction_format_multi_model_results
Format multi-model benchmark results as a Markdown table.
app.py:1746
↓ 4 callersFunction_get_bench_choices
Return dropdown choices from completed benchmark configs.
app.py:2537
↓ 4 callersMethod_install_router_profiling_hooks
Install forward hooks on MoE router modules for dynamic profiling. Records per-prompt router logits during forward passes so that Exp
obliteratus/abliterate.py:1034
↓ 4 callersFunction_install_steering_hooks
Re-install activation steering hooks on a (possibly reloaded) model. The steering metadata dict contains: - refusal_directions: dict[int, T
app.py:752
↓ 4 callersFunction_is_mount_point
Check if a path is a mount point (different device from parent).
obliteratus/telemetry.py:72
↓ 4 callersFunction_last_real_token_indices
Return the index of the last non-padding token per sequence. For right-padded batches (the HuggingFace default), the last real token is NOT a
obliteratus/evaluation/heretic_eval.py:449
↓ 4 callersMethod_make_direction
(self, hidden_dim=16)
tests/test_abliterate.py:2235
↓ 4 callersMethod_make_expert
()
tests/test_abliterate.py:470
↓ 4 callersMethod_make_moe_config
(self, num_experts=8, active=2, layers=32, hidden=4096)
tests/test_architecture_profiles.py:438
↓ 4 callersFunction_make_varied_tokenizer
Set up a tokenizer mock that returns different tokens per call.
tests/test_abliterate.py:62
↓ 4 callersFunction_parametric_layer_weight
Compute ablation weight for a layer using a piecewise-linear tent kernel. Faithful reproduction of Heretic's parametric kernel (p-e-w/heretic):
obliteratus/bayesian_optimizer.py:137
↓ 4 callersFunction_persist_session_meta
Write session metadata next to a checkpoint so we can recover later.
app.py:194
↓ 4 callersFunction_recover_sessions_from_disk
Scan /tmp for obliterated checkpoints and repopulate _session_models. Called on startup and when a stale dropdown value is detected. Skips d
app.py:204
↓ 4 callersMethod_replace_quantized_weight
Re-quantize and replace a weight after projection. Packs the modified float tensor back into the original quantization format (NF4/GP
obliteratus/abliterate.py:4701
↓ 4 callersFunction_resolve_attr
Resolve a dotted attribute path like 'model.layers'.
obliteratus/strategies/utils.py:148
↓ 4 callersMethod_run_round
Execute one round of the tournament.
obliteratus/tourney.py:946
↓ 4 callersFunction_sanitize_model_path
Validate model_path for safe interpolation into lm-eval model_args. Prevents argument injection via commas or special characters in the path.
obliteratus/evaluation/heretic_eval.py:687
↓ 4 callersMethod_stabilize_router_weights
Clamp router weights after projection to prevent extreme routing. After projecting the refusal direction from router weights, modified
obliteratus/abliterate.py:5127
↓ 4 callersFunctionaccuracy
Simple accuracy.
obliteratus/evaluation/metrics.py:36
↓ 4 callersMethodadd_result
(self, result: AblationResult)
obliteratus/reporting/report.py:46
↓ 4 callersMethodanalyze_all_layers
Analyze refusal directions across all (or strong) layers. Args: refusal_directions: {layer_idx: direction} for each layer.
obliteratus/analysis/logit_lens.py:215
↓ 4 callersMethodanalyze_cross_category
Analyze transfer between harm categories. Args: category_directions: {category_name: refusal_direction}. Returns:
obliteratus/analysis/cross_model_transfer.py:195
↓ 4 callersFunctionapply_profile_to_method_config
Apply architecture profile overrides to a method config dict. Takes the base method config (from METHODS[method_key]) and applies the profile
obliteratus/architecture_profiles.py:561
↓ 4 callersFunctionbuild_weighted_prompt_pairs
Load base prompt pairs and append repeated hard-negative residue pairs. The returned metadata is safe for logs/model cards: it records counts,
obliteratus/hard_negative.py:152
↓ 4 callersFunctioncompute_steering_effectiveness
Compute how effective steering was. Args: clean_projection: Refusal projection without steering. steered_projection: Refusal proj
obliteratus/analysis/steering_vectors.py:321
↓ 4 callersFunctioneval_mmlu
Evaluate on a list of MMLU-Pro rows.
scripts/gemma4_mmlu_head2head.py:65
↓ 4 callersFunctionidentify_refusal_features
Identify SAE features that encode refusal behavior. Compares feature activations between harmful and harmless prompts. Features with large po
obliteratus/analysis/sae_abliteration.py:264
↓ 4 callersFunctionload_model
( model: str, *, dtype_name: str, device: str, device_map: str | None, quantization: s
scripts/gemma4_hard_tier_bench.py:321
↓ 4 callersFunctionload_tokenizer
(model: str)
scripts/gemma4_hard_tier_bench.py:308
↓ 4 callersFunctionlog_benchmark_from_dict
Convenience wrapper: create a BenchmarkRecord from benchmark result dict. Called from app.py benchmark() after each method completes.
obliteratus/telemetry.py:710
↓ 4 callersFunctionmaybe_send_pipeline_report
Build and send a telemetry report from a completed pipeline.
obliteratus/telemetry.py:1179
← previousnext →101–200 of 1,841, ranked by callers