peal.sparse_dictionaries.msae_decomposition.MSAEDecompositionConfig¶
- class peal.sparse_dictionaries.msae_decomposition.MSAEDecompositionConfig[source]¶
Bases:
SparseDictionaryConfigConfiguration for MSAE (Matryoshka Sparse Autoencoder) decomposition.
- Parameters:
clip_model (
str, optional) – Encoder the pretrained checkpoint was trained on. Default"clip:ViT-L/14".ckpt_url (
strorNone, optional) – URL of the pretrained MSAE weights;Noneskips the download and leaves the dictionary in trainable mode.interp_url (
strorNone, optional) – URL of the concept-interpreter similarity matrix used to name each latent with a vocabulary entry.local_dir (
str, optional) – Download cache directory. Default"/tmp/msae_weights".vocab_filename (
str, optional) – Vocabulary file underpeal/dependencies/MSAE/vocab.n_components (
intorNone, optional) – Number of latents; overwritten by the checkpoint’slatent_dimwhen a pretrained model is loaded. Default 6144.activation (
str, optional) – Activation spec for training from scratch. Default"TopKReLU_64".use_matryoshka (
bool, optional) – Train aMatryoshkaAutoencoderinstead of a plainAutoencoder.lr – Hyper-parameters for
MSAEDecomposition.fit().epochs – Hyper-parameters for
MSAEDecomposition.fit().batch_size – Hyper-parameters for
MSAEDecomposition.fit().
Methods
Attributes
- ckpt_url: str | None = 'https://huggingface.co/WolodjaZ/MSAE/resolve/main/ViT-L_14/centered/6144_768_TopKReLU_64_RW_False_False_0.0_cc3m_ViT-L~14_train_image_2905936_768.pth'¶