MCPcopy Create free account

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

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

Functiondirection_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
Functionempty_cache
Release cached allocations on the current accelerator.
obliteratus/device.py:178
Methodenumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/ffn_ablation.py:19
Methodenumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/embedding_ablation.py:23
Methodenumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/head_pruning.py:23
Methodenumerate
(self, handle: ModelHandle, **kwargs)
obliteratus/strategies/layer_removal.py:25
Functionexport_artifacts
Package all research artifacts from the last obliteration into a downloadable archive. Exports: - refusal_directions.pt: Per-layer refusal di
app.py:3485
Functionextra_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
Methodextract_all_layers
Extract LEACE directions for all layers. Args: harmful_acts: {layer_idx: [activations]} from activation collection. h
obliteratus/analysis/leace.py:188
Functionfake_from_pretrained
(model: str, **kwargs)
tests/test_gemma4_hard_tier_bench.py:46
Functionfake_load_dataset_source
(key)
tests/test_hard_negative.py:44
Methodfind
(x)
obliteratus/analysis/cross_model_transfer.py:369
Methodformat_report
Format full decomposition pipeline results.
obliteratus/analysis/sae_abliteration.py:720
Methodformat_report
Format activation patching results as a report.
obliteratus/analysis/activation_patching.py:332
Methodformat_report
Format probe results as a human-readable report.
obliteratus/analysis/activation_probing.py:224
Methodformat_report
Format Bayesian optimization results.
obliteratus/analysis/bayesian_kernel_projection.py:390
Methodformat_report
Format Wasserstein-optimal extraction results.
obliteratus/analysis/wasserstein_optimal.py:319
Methodformat_report
Format single-layer cone analysis as a report.
obliteratus/analysis/concept_geometry.py:344
Methodformat_report
Format cross-layer analysis as a human-readable report.
obliteratus/analysis/cross_layer.py:196
Methodformat_report
Format multi-layer logit lens analysis as a report.
obliteratus/analysis/logit_lens.py:337
Methodforward
Forward pass returning reconstruction and latent features.
obliteratus/analysis/sae_abliteration.py:108
Methodforward
(self, x)
tests/test_abliterate.py:1510
Methodforward
(self, x)
tests/test_abliterate.py:2030
Methodforward
(self, x)
tests/test_abliterate.py:2040
Methodforward
(self, input_ids)
tests/test_new_analysis_modules.py:126
Functionfree_gpu_memory
Aggressive memory cleanup: GC + accelerator cache flush.
obliteratus/device.py:188
Methodfrom_dict
(cls, d: dict)
obliteratus/remote.py:65
Methodfrom_dict
(cls, d: dict)
obliteratus/auto_obliterate.py:82
Functiongenerate
Generate text using the MLX model. Parameters ---------- handle : MLXModelHandle A loaded MLX model handle. prompt : str
obliteratus/mlx_backend.py:102
Functionget_activations
Extract hidden-state activations from specified layers. Uses MLX's computation graph to capture intermediate outputs. Parameters -------
obliteratus/mlx_backend.py:156
Methodget_all_models
Return all tracked models.
obliteratus/watchtower.py:379
Functionget_memory_info
Query memory for the given accelerator (or system RAM for MPS/CPU).
obliteratus/device.py:115
Methodget_model
Get a specific model by ID.
obliteratus/watchtower.py:384
Methodget_new_models
Return models with status 'new' (not yet queued or obliterated).
obliteratus/watchtower.py:369
Functionget_total_free_gb
Sum of free memory across all accelerator devices, in GB.
obliteratus/device.py:156
Functionget_weight
Retrieve a weight matrix from the model. Parameters ---------- handle : MLXModelHandle Loaded model. layer_idx : int
obliteratus/mlx_backend.py:253
Functionhandle
()
tests/test_abliterate.py:76
Functionhandle
()
tests/test_strategies.py:50
Methodhook
(module, input, output)
obliteratus/analysis/steering_vectors.py:263
Functionhook_fn
(module, input, output)
app.py:802
Functionhook_fn
(module, input, output)
scripts/gemma4_refusal_sniper.py:60
Functionhook_fn
(module, input, output)
scripts/abliteration_comparison.py:170
Methodhook_fn
(module, input, output)
obliteratus/abliterate.py:1061
Methodhook_fn
(module, input, output)
obliteratus/analysis/activation_patching.py:235
Functioninsights
Default AnalysisInsights for testing.
tests/test_informed_pipeline.py:23
Methodis_active
(self)
obliteratus/analysis/steering_vectors.py:252
Functionis_gpu_available
True if *any* GPU backend (CUDA or MPS) is available.
obliteratus/device.py:37
Functionis_oom_error
Return True if *exc* is an out-of-memory error on any backend.
obliteratus/device.py:272
Methodis_scanning
True if the scheduler is actively running.
obliteratus/watchtower.py:461
Methoditerate
Convenience: yield specs one at a time, applying + restoring around each.
obliteratus/strategies/base.py:36
Functionload_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
Functionload_model
Load a HuggingFace model via ``mlx-lm`` for Apple-native execution. Parameters ---------- model_name : str HuggingFace model iden
obliteratus/mlx_backend.py:70
Methodmake_hook
(layer_idx: int)
obliteratus/abliterate.py:1060
Methodmake_hook
(layer_idx)
obliteratus/analysis/activation_patching.py:234
Methodmean_score
(self)
obliteratus/adaptive_defaults.py:163
Methodmedian_score
(self)
obliteratus/adaptive_defaults.py:171
Methodmetric
(logits: torch.Tensor)
obliteratus/analysis/activation_patching.py:151
Functionmlx_to_torch_tensor
Convert an MLX array to a PyTorch tensor.
obliteratus/mlx_backend.py:436
Methodmock_apply
(messages, tokenize=False, add_generation_prompt=True)
tests/test_abliterate_extended.py:233
Functionmock_decode
(ids)
tests/test_logit_lens.py:44
Functionmock_decode
(ids, **kwargs)
tests/test_benchmarks.py:57
Functionmock_encode
(text, add_special_tokens=False)
tests/test_logit_lens.py:49
Functionmock_encode
(text, **kwargs)
tests/test_benchmarks.py:60
Functionmock_forward
(**kwargs)
tests/test_benchmarks.py:24
Functionmock_generate
(**kwargs)
tests/test_benchmarks.py:35
Functionmock_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
Functionmock_tokenizer
(prompt, **kwargs)
tests/test_abliterate.py:65
Functionmock_tokenizer
A minimal mock tokenizer with encode, decode, and apply_chat_template.
tests/conftest.py:44
Functionmock_tokenizer
(prompt, **kwargs)
tests/test_abliterate_extended.py:61
Functionmodel_ids
Just the ids — the common case for populating a dropdown or a config.
obliteratus/models_client.py:81
Methodmodels_and_tokenizer
(self)
tests/test_heretic_eval.py:445
Functionmodify_weights
Modify a weight matrix in-place using a function. Parameters ---------- handle : MLXModelHandle Loaded model. layer_idx : int
obliteratus/mlx_backend.py:285
Functionobjective
Multi-objective: minimize (refusal_rate, kl_divergence).
obliteratus/bayesian_optimizer.py:400
Functionobliterate
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
Functionon_log
(msg)
obliteratus/ui_watchtower.py:177
Functionon_round
(rnd)
obliteratus/cli.py:862
Functionon_stage
(result)
app.py:1190
Functionon_stage
(result)
obliteratus/cli.py:951
Methodpatch_hook
(module, input, output)
obliteratus/analysis/activation_patching.py:287
Functionpipeline
An InformedAbliterationPipeline with no model loaded.
tests/test_informed_pipeline.py:29
Functionplot_capability_safety_pareto
Plot the capability vs safety tradeoff.
obliteratus/analysis/visualization.py:303
Functionplot_logit_lens_spectrum
Visualize the logit lens token promotion/suppression spectrum.
obliteratus/analysis/visualization.py:180
Functionproject_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
Functionpush_session_to_hub
Push a session model to HuggingFace Hub, with optional refinement.
app.py:584
Functionrandom_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
Methodranked_methods
All methods ranked by mean score, descending.
obliteratus/adaptive_defaults.py:236
Functionrefusal_direction
A normalized random torch tensor of shape (768,).
tests/conftest.py:59
Functionregister_strategy
Class decorator that registers a strategy under its `name` attribute.
obliteratus/strategies/registry.py:12
Methodreset
Clear all state and start fresh.
obliteratus/auto_obliterate.py:605
Functionrun_pipeline
()
app.py:1197
Functionrun_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
Functionrun_tourney
Run an elimination tournament across selected abliteration methods. Each individual method is run inside its own ``@spaces.GPU`` allocation (
app.py:3283
Functionsafe_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
Functionsave_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
Functionset_seed_all
Set random seed on all available accelerators.
obliteratus/device.py:216
Methodsetup_method
(self)
tests/test_telemetry.py:43
Methodsetup_method
(self)
tests/test_telemetry.py:325
Methodsetup_method
(self)
tests/test_telemetry.py:418
Methodsetup_method
(self)
tests/test_telemetry.py:518
Methodsetup_method
(self)
tests/test_telemetry.py:646
← previousnext →901–1,000 of 1,841, ranked by callers