sae-lens 6.27.1__tar.gz → 6.27.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sae_lens-6.27.1 → sae_lens-6.27.2}/PKG-INFO +1 -1
- {sae_lens-6.27.1 → sae_lens-6.27.2}/pyproject.toml +1 -1
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/__init__.py +1 -1
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/mixing_buffer.py +4 -3
- {sae_lens-6.27.1 → sae_lens-6.27.2}/LICENSE +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/README.md +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/analysis/__init__.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/analysis/hooked_sae_transformer.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/analysis/neuronpedia_integration.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/cache_activations_runner.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/config.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/constants.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/evals.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/llm_sae_training_runner.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/load_model.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/loading/__init__.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/loading/pretrained_sae_loaders.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/loading/pretrained_saes_directory.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/pretokenize_runner.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/pretrained_saes.yaml +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/registry.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/__init__.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/batchtopk_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/gated_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/jumprelu_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/matching_pursuit_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/matryoshka_batchtopk_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/standard_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/temporal_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/topk_sae.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/saes/transcoder.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/tokenization_and_batching.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/__init__.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/activation_scaler.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/activations_store.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/optim.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/sae_trainer.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/types.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/training/upload_saes_to_huggingface.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/tutorial/tsea.py +0 -0
- {sae_lens-6.27.1 → sae_lens-6.27.2}/sae_lens/util.py +0 -0
|
@@ -44,9 +44,10 @@ def mixing_buffer(
|
|
|
44
44
|
if mix_fraction > 0:
|
|
45
45
|
storage_buffer = storage_buffer[torch.randperm(storage_buffer.shape[0])]
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
# Keep a fixed amount for mixing, serve the rest
|
|
48
|
+
keep_for_mixing = int(buffer_size * mix_fraction)
|
|
49
|
+
num_to_serve = storage_buffer.shape[0] - keep_for_mixing
|
|
50
|
+
num_serving_batches = max(1, num_to_serve // batch_size)
|
|
50
51
|
serving_cutoff = num_serving_batches * batch_size
|
|
51
52
|
serving_buffer = storage_buffer[:serving_cutoff]
|
|
52
53
|
storage_buffer = storage_buffer[serving_cutoff:]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|