|
AQIT 0.1.0
|
Functions | |
| dict | _generate_sentences (str label, client, int n=N_SAMPLES) |
| float | _get_feature_activation (str sentence, int feature_idx, HookedTransformer model, SparseAutoencoder sae, str model_id="llama-3.2-1b", int|None layer=None) |
| float | _cohen_d_score (list[float] pos_acts, list[float] neg_acts) |
| float|None | _feature_purity_score (list[str] sentences, client) |
| float|None | _finite (float|None x, float|None default=None) |
| float | _kl_div (torch.Tensor p, torch.Tensor q) |
| float | _entropy (torch.Tensor p) |
| dict | run_mui_score (int feature_idx, str prompt, HookedTransformer model, SparseAutoencoder sae, int n_positions=8, str model_id="llama-3.2-1b", int|None layer=None) |
| dict | run_interp_score (int feature_idx, str prompt, HookedTransformer model, SparseAutoencoder sae, client, int n_samples=N_SAMPLES, str model_id="llama-3.2-1b", int|None layer=None) |
Variables | |
| DEVICE = resolve_compute_device() | |
| int | N_SAMPLES = 10 |
|
protected |
Definition at line 78 of file interp_score.py.
Referenced by run_interp_score().
|
protected |
Definition at line 136 of file interp_score.py.
Referenced by run_mui_score().
|
protected |
Definition at line 90 of file interp_score.py.
Referenced by run_interp_score().
|
protected |
Definition at line 116 of file interp_score.py.
Referenced by run_mui_score().
|
protected |
Definition at line 37 of file interp_score.py.
Referenced by run_interp_score().
|
protected |
Definition at line 63 of file interp_score.py.
Referenced by run_interp_score().
|
protected |
Definition at line 130 of file interp_score.py.
Referenced by run_mui_score().
| dict run_interp_score | ( | int | feature_idx, |
| str | prompt, | ||
| HookedTransformer | model, | ||
| SparseAutoencoder | sae, | ||
| client, | |||
| int | n_samples = N_SAMPLES, | ||
| str | model_id = "llama-3.2-1b", | ||
| int | None | layer = None ) |
Definition at line 228 of file interp_score.py.
References _cohen_d_score(), _feature_purity_score(), _generate_sentences(), _get_feature_activation(), and run_mui_score().
| dict run_mui_score | ( | int | feature_idx, |
| str | prompt, | ||
| HookedTransformer | model, | ||
| SparseAutoencoder | sae, | ||
| int | n_positions = 8, | ||
| str | model_id = "llama-3.2-1b", | ||
| int | None | layer = None ) |
Definition at line 141 of file interp_score.py.
References _entropy(), _finite(), and _kl_div().
Referenced by run_interp_score().
| aquin.compute.interp_score.DEVICE = resolve_compute_device() |
Definition at line 33 of file interp_score.py.
| int aquin.compute.interp_score.N_SAMPLES = 10 |
Definition at line 34 of file interp_score.py.