Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/elder-plinius/OBLITERATUS
/ functions
Functions
1,841 in github.com/elder-plinius/OBLITERATUS
⨍
Functions
1,841
◇
Types & classes
359
Function
direction_specificity_test
Test whether the extracted refusal direction is specific to harmful prompts. Computes the ratio of harmful-to-harmless projection magnitudes.
obliteratus/evaluation/baselines.py:122
Function
empty_cache
Release cached allocations on the current accelerator.
obliteratus/device.py:178
Method
enumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/ffn_ablation.py:19
Method
enumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/embedding_ablation.py:23
Method
enumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/head_pruning.py:23
Method
enumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/layer_removal.py:25
Function
export_artifacts
Package all research artifacts from the last obliteration into a downloadable archive. Exports: - refusal_directions.pt: Per-layer refusal di
app.py:3485
Function
extra_presets
Return a list of ModelPreset objects for open-weight models in the BESTIARY catalog that aren't already curated. Empty list on any failure (safe n
obliteratus/bestiary_sync.py:51
Method
extract_all_layers
Extract LEACE directions for all layers. Args: harmful_acts: {layer_idx: [activations]} from activation collection. h
obliteratus/analysis/leace.py:188
Function
fake_from_pretrained
(model: str, **kwargs)
tests/test_gemma4_hard_tier_bench.py:46
Function
fake_load_dataset_source
(key)
tests/test_hard_negative.py:44
Method
find
(x)
obliteratus/analysis/cross_model_transfer.py:369
Method
format_report
Format full decomposition pipeline results.
obliteratus/analysis/sae_abliteration.py:720
Method
format_report
Format activation patching results as a report.
obliteratus/analysis/activation_patching.py:332
Method
format_report
Format probe results as a human-readable report.
obliteratus/analysis/activation_probing.py:224
Method
format_report
Format Bayesian optimization results.
obliteratus/analysis/bayesian_kernel_projection.py:390
Method
format_report
Format Wasserstein-optimal extraction results.
obliteratus/analysis/wasserstein_optimal.py:319
Method
format_report
Format single-layer cone analysis as a report.
obliteratus/analysis/concept_geometry.py:344
Method
format_report
Format cross-layer analysis as a human-readable report.
obliteratus/analysis/cross_layer.py:196
Method
format_report
Format multi-layer logit lens analysis as a report.
obliteratus/analysis/logit_lens.py:337
Method
forward
Forward pass returning reconstruction and latent features.
obliteratus/analysis/sae_abliteration.py:108
Method
forward
(self, x)
tests/test_abliterate.py:1510
Method
forward
(self, x)
tests/test_abliterate.py:2030
Method
forward
(self, x)
tests/test_abliterate.py:2040
Method
forward
(self, input_ids)
tests/test_new_analysis_modules.py:126
Function
free_gpu_memory
Aggressive memory cleanup: GC + accelerator cache flush.
obliteratus/device.py:188
Method
from_dict
(cls, d: dict)
obliteratus/remote.py:65
Method
from_dict
(cls, d: dict)
obliteratus/auto_obliterate.py:82
Function
generate
Generate text using the MLX model. Parameters ---------- handle : MLXModelHandle A loaded MLX model handle. prompt : str
obliteratus/mlx_backend.py:102
Function
get_activations
Extract hidden-state activations from specified layers. Uses MLX's computation graph to capture intermediate outputs. Parameters -------
obliteratus/mlx_backend.py:156
Method
get_all_models
Return all tracked models.
obliteratus/watchtower.py:379
Function
get_memory_info
Query memory for the given accelerator (or system RAM for MPS/CPU).
obliteratus/device.py:115
Method
get_model
Get a specific model by ID.
obliteratus/watchtower.py:384
Method
get_new_models
Return models with status 'new' (not yet queued or obliterated).
obliteratus/watchtower.py:369
Function
get_total_free_gb
Sum of free memory across all accelerator devices, in GB.
obliteratus/device.py:156
Function
get_weight
Retrieve a weight matrix from the model. Parameters ---------- handle : MLXModelHandle Loaded model. layer_idx : int
obliteratus/mlx_backend.py:253
Function
handle
()
tests/test_abliterate.py:76
Function
handle
()
tests/test_strategies.py:50
Method
hook
(module, input, output)
obliteratus/analysis/steering_vectors.py:263
Function
hook_fn
(module, input, output)
app.py:802
Function
hook_fn
(module, input, output)
scripts/gemma4_refusal_sniper.py:60
Function
hook_fn
(module, input, output)
scripts/abliteration_comparison.py:170
Method
hook_fn
(module, input, output)
obliteratus/abliterate.py:1061
Method
hook_fn
(module, input, output)
obliteratus/analysis/activation_patching.py:235
Function
insights
Default AnalysisInsights for testing.
tests/test_informed_pipeline.py:23
Method
is_active
(self)
obliteratus/analysis/steering_vectors.py:252
Function
is_gpu_available
True if *any* GPU backend (CUDA or MPS) is available.
obliteratus/device.py:37
Function
is_oom_error
Return True if *exc* is an out-of-memory error on any backend.
obliteratus/device.py:272
Method
is_scanning
True if the scheduler is actively running.
obliteratus/watchtower.py:461
Method
iterate
Convenience: yield specs one at a time, applying + restoring around each.
obliteratus/strategies/base.py:36
Function
load_bench_into_chat
Re-run abliteration with a benchmark config and load result into Chat. On ZeroGPU, uses the visitor's GPU quota.
app.py:2548
Function
load_model
Load a HuggingFace model via ``mlx-lm`` for Apple-native execution. Parameters ---------- model_name : str HuggingFace model iden
obliteratus/mlx_backend.py:70
Method
make_hook
(layer_idx: int)
obliteratus/abliterate.py:1060
Method
make_hook
(layer_idx)
obliteratus/analysis/activation_patching.py:234
Method
mean_score
(self)
obliteratus/adaptive_defaults.py:163
Method
median_score
(self)
obliteratus/adaptive_defaults.py:171
Method
metric
(logits: torch.Tensor)
obliteratus/analysis/activation_patching.py:151
Function
mlx_to_torch_tensor
Convert an MLX array to a PyTorch tensor.
obliteratus/mlx_backend.py:436
Method
mock_apply
(messages, tokenize=False, add_generation_prompt=True)
tests/test_abliterate_extended.py:233
Function
mock_decode
(ids)
tests/test_logit_lens.py:44
Function
mock_decode
(ids, **kwargs)
tests/test_benchmarks.py:57
Function
mock_encode
(text, add_special_tokens=False)
tests/test_logit_lens.py:49
Function
mock_encode
(text, **kwargs)
tests/test_benchmarks.py:60
Function
mock_forward
(**kwargs)
tests/test_benchmarks.py:24
Function
mock_generate
(**kwargs)
tests/test_benchmarks.py:35
Function
mock_model
A minimal mock transformer model. Provides: - model.config with config.num_hidden_layers = 4 - model.named_parameters() returning fake w
tests/conftest.py:17
Function
mock_tokenizer
(prompt, **kwargs)
tests/test_abliterate.py:65
Function
mock_tokenizer
A minimal mock tokenizer with encode, decode, and apply_chat_template.
tests/conftest.py:44
Function
mock_tokenizer
(prompt, **kwargs)
tests/test_abliterate_extended.py:61
Function
model_ids
Just the ids — the common case for populating a dropdown or a config.
obliteratus/models_client.py:81
Method
models_and_tokenizer
(self)
tests/test_heretic_eval.py:445
Function
modify_weights
Modify a weight matrix in-place using a function. Parameters ---------- handle : MLXModelHandle Loaded model. layer_idx : int
obliteratus/mlx_backend.py:285
Function
objective
Multi-objective: minimize (refusal_rate, kl_divergence).
obliteratus/bayesian_optimizer.py:400
Function
obliterate
Run the full obliteration pipeline, streaming log updates to the UI. On ZeroGPU Spaces, this function runs on the visitor's GPU quota (up to
app.py:1804
Function
on_log
(msg)
obliteratus/ui_watchtower.py:177
Function
on_round
(rnd)
obliteratus/cli.py:862
Function
on_stage
(result)
app.py:1190
Function
on_stage
(result)
obliteratus/cli.py:951
Method
patch_hook
(module, input, output)
obliteratus/analysis/activation_patching.py:287
Function
pipeline
An InformedAbliterationPipeline with no model loaded.
tests/test_informed_pipeline.py:29
Function
plot_capability_safety_pareto
Plot the capability vs safety tradeoff.
obliteratus/analysis/visualization.py:303
Function
plot_logit_lens_spectrum
Visualize the logit lens token promotion/suppression spectrum.
obliteratus/analysis/visualization.py:180
Function
project_out_direction
Project a direction out of a weight matrix (abliteration). Given weight matrix W and unit direction d, computes:: W' = W - (W @ d) outer
obliteratus/mlx_backend.py:333
Function
push_session_to_hub
Push a session model to HuggingFace Hub, with optional refinement.
app.py:584
Function
random_direction_ablation
Ablate random directions as a negative control. For each trial: 1. Generate a random unit vector in activation space 2. Project it out of
obliteratus/evaluation/baselines.py:43
Method
ranked_methods
All methods ranked by mean score, descending.
obliteratus/adaptive_defaults.py:236
Function
refusal_direction
A normalized random torch tensor of shape (768,).
tests/conftest.py:59
Function
register_strategy
Class decorator that registers a strategy under its `name` attribute.
obliteratus/strategies/registry.py:12
Method
reset
Clear all state and start fresh.
obliteratus/auto_obliterate.py:605
Function
run_pipeline
()
app.py:1197
Function
run_sweep
Run a hyperparameter sweep over abliteration configurations. For each combination of sweep_params (crossed with n_seeds random seeds), runs t
obliteratus/sweep.py:69
Function
run_tourney
Run an elimination tournament across selected abliteration methods. Each individual method is run inside its own ``@spaces.GPU`` allocation (
app.py:3283
Function
safe_svd_dtype
Return a dtype safe for SVD on the tensor's device. MPS does not support float64, so we cap at float32.
obliteratus/device.py:258
Function
save_model
Save the (modified) MLX model to disk. Saves in safetensors format compatible with both MLX and HuggingFace. Parameters ---------- h
obliteratus/mlx_backend.py:365
Function
set_seed_all
Set random seed on all available accelerators.
obliteratus/device.py:216
Method
setup_method
(self)
tests/test_telemetry.py:43
Method
setup_method
(self)
tests/test_telemetry.py:325
Method
setup_method
(self)
tests/test_telemetry.py:418
Method
setup_method
(self)
tests/test_telemetry.py:518
Method
setup_method
(self)
tests/test_telemetry.py:646
← previous
next →
901–1,000 of 1,841, ranked by callers