AQIT 0.1.0
Loading...
Searching...
No Matches
sae_diff.py File Reference

Go to the source code of this file.

Namespaces

namespace  aquin
namespace  aquin.compute
namespace  aquin.compute.sae_diff

Functions

list[str] aquin.compute.sae_diff.load_prompts (str|Path|None path, *, list[str]|None fallback=None)
tuple[dict[str, Any], int|None] aquin.compute.sae_diff.load_checkpoint_state (str|Path checkpoint_path)
Any aquin.compute.sae_diff.load_tl_from_checkpoint (str model_id, str|Path|None checkpoint_path=None, *, dict[str, Any]|None state_dict=None)
torch.Tensor aquin.compute.sae_diff.mean_sae_activations ("HookedTransformer" model, Any sae, int layer, list[str] prompts, str model_id, *, int max_prompt_chars=512)
dict[str, Any] aquin.compute.sae_diff.build_sae_diff_payload (*, torch.Tensor base_acts, torch.Tensor target_acts, str model_id, str checkpoint_name, int layer, list[str] prompts, int top_k=50, float delta_threshold=1e-4, dict[str, Any]|None extra=None)
dict[str, Any] aquin.compute.sae_diff.run_sae_diff (str model_id, list[str] prompts, *, str|Path|None target_checkpoint=None, dict[str, Any]|None target_state_dict=None, str checkpoint_name="checkpoint", int|None layer=None, str|Path|None sae_path=None, int top_k=50)
torch.Tensor aquin.compute.sae_diff._feature_directions (Any sae)
list[dict[str, Any]] aquin.compute.sae_diff.align_sae_decoders (Any sae_a, Any sae_b, *, int|None max_features=None)

Variables

list aquin.compute.sae_diff.DEFAULT_PROMPTS