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

Go to the source code of this file.

Namespaces

namespace  aquin
namespace  aquin.compute
namespace  aquin.compute.interp_score

Functions

dict aquin.compute.interp_score._generate_sentences (str label, client, int n=N_SAMPLES)
float aquin.compute.interp_score._get_feature_activation (str sentence, int feature_idx, HookedTransformer model, SparseAutoencoder sae, str model_id="llama-3.2-1b", int|None layer=None)
float aquin.compute.interp_score._cohen_d_score (list[float] pos_acts, list[float] neg_acts)
float|None aquin.compute.interp_score._feature_purity_score (list[str] sentences, client)
float|None aquin.compute.interp_score._finite (float|None x, float|None default=None)
float aquin.compute.interp_score._kl_div (torch.Tensor p, torch.Tensor q)
float aquin.compute.interp_score._entropy (torch.Tensor p)
dict aquin.compute.interp_score.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 aquin.compute.interp_score.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

 aquin.compute.interp_score.DEVICE = resolve_compute_device()
int aquin.compute.interp_score.N_SAMPLES = 10