nnsight 0.5.0.dev4__tar.gz → 0.5.0.dev5__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.
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/PKG-INFO +1 -1
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/envoy.py +59 -2
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight.egg-info/PKG-INFO +1 -1
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/.github/workflows/publish.yml +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/.github/workflows/python-app.yml +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/.gitignore +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/CHANGELOG.md +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/CODE_OF_CONDUCT.md +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/LICENSE +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/NNsight_Walkthrough.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/NNsight_v0_3_guide.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/NNsight_v0_4_guide.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/README.md +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/conftest.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/Makefile +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/contributing.md +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/make.bat +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/requirements.txt +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/css/custom.css +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/css/home.css +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/css/pygments.css +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/css/status.css +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/execution.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/icon.ico +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/interleaved.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/ioi.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/nnsight_logo.svg +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/activation_patching.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/attribution_patching.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/dictionary_learning.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/function_vectors.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/future_lens.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/logit_lens.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/walkthrough.webp +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/js/.DS_Store +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/js/code.js +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/js/custom.js +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_templates/layout.html +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_templates/ndif_status.html +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/about.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/conf.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation/intervention.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation/modeling.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation/schema.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation/tracing.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation/util.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/documentation.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/features.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/index.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/conditionals.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/cross_prompt.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/custom_functions.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/early_stopping.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/editing_tutorial.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/getting.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/gradients.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/iterator.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/lora_training.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/model_editing.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/modules.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/multiple_token.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/operations.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/remote_execution.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/scan_validate.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/sessions.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/setting.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/streaming.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/vllm_support.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/LoRA_tutorial.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/activation_patching.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/attribution_patching.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/boundless_DAS.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/dict_learning.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/diffusion_lens.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/images/Activation_patching-figure1.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/images/LoRA_tutorial_figure_1.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/images/LoRA_tutorial_figure_2.png +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/logit_lens.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/start_remote_access.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/tutorial_price_tagging_utils.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/walkthrough.ipynb +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/pages/home.html +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/start.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/status.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/tutorials.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/conf.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/contexts.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/intervention.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/models.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/module.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/patching.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/tracing.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/documentation/util.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/sourcelatex/index.rst +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/pyproject.toml +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/pytest.ini +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/setup.cfg +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/setup.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/_c/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/_c/py_mount.c +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/config.yaml +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/backends/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/backends/base.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/backends/editing.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/backends/execution.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/backends/remote.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/batching.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/inject.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/interleaver.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/serialization.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/backwards.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/base.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/editing.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/globals.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/invoker.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/iterator.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/tracer.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/intervention/tracing/util.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/log.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/base.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/diffusion.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/language.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/mixins/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/mixins/loadable.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/mixins/meta.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/mixins/remoteable.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/model_runners/GPUModelRunner.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/model_runners/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/sampling.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/vllm.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/workers/GPUWorker.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/workers/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/schema/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/schema/config.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/schema/request.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/schema/response.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/util.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight.egg-info/SOURCES.txt +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight.egg-info/dependency_links.txt +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight.egg-info/requires.txt +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight.egg-info/top_level.txt +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/tests/__init__.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/tests/test_diffusion.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/tests/test_lm.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/tests/test_tiny.py +0 -0
- {nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/tests/test_vllm.py +0 -0
|
@@ -188,6 +188,7 @@ class Envoy(Batchable):
|
|
|
188
188
|
The module's input values as a tuple of positional and keyword arguments. i.e (args, kwargs)
|
|
189
189
|
|
|
190
190
|
"""
|
|
191
|
+
|
|
191
192
|
if self.interleaving:
|
|
192
193
|
return self._interleaver.current.request(
|
|
193
194
|
self._interleaver.current.iterate(f"{self.path}.input")
|
|
@@ -734,11 +735,60 @@ class Envoy(Batchable):
|
|
|
734
735
|
|
|
735
736
|
# If the module already has a sub-module named 'input' or 'output',
|
|
736
737
|
# mount the proxy access to 'nns_input' or 'nns_output instead.
|
|
738
|
+
|
|
737
739
|
if hasattr(Envoy, name):
|
|
738
740
|
self._handle_overloaded_mount(envoy, name)
|
|
739
741
|
else:
|
|
740
742
|
super().__setattr__(name, envoy)
|
|
741
743
|
|
|
744
|
+
def _handle_overloaded_mount(self, envoy: Envoy, mount_point: str) -> None:
|
|
745
|
+
"""If a given module already has an attribute of the same name as something nnsight wants to add, we need to rename it.
|
|
746
|
+
|
|
747
|
+
Directly edits the underlying class to accomplish this.
|
|
748
|
+
|
|
749
|
+
Args:
|
|
750
|
+
envoy (Envoy): Envoy to handle.
|
|
751
|
+
mount_point (str): Overloaded attribute name.
|
|
752
|
+
"""
|
|
753
|
+
|
|
754
|
+
warnings.warn(
|
|
755
|
+
f"Module `{self.path}` of type `{type(self._module)}` has pre-defined a `{mount_point}` attribute. nnsight access for `{mount_point}` will be mounted at `.nns_{mount_point}` instead of `.{mount_point}` for this module only."
|
|
756
|
+
)
|
|
757
|
+
|
|
758
|
+
# If we already shifted a mount point dont create another new class.
|
|
759
|
+
if "Preserved" in self.__class__.__name__:
|
|
760
|
+
|
|
761
|
+
new_cls = self.__class__
|
|
762
|
+
|
|
763
|
+
else:
|
|
764
|
+
|
|
765
|
+
new_cls = type(
|
|
766
|
+
f"{self.__class__.__name__}.Preserved",
|
|
767
|
+
(self.__class__,),
|
|
768
|
+
{},
|
|
769
|
+
)
|
|
770
|
+
|
|
771
|
+
self.__class__ = new_cls
|
|
772
|
+
|
|
773
|
+
# Get the normal proxy mount point
|
|
774
|
+
mount = getattr(Envoy, mount_point)
|
|
775
|
+
|
|
776
|
+
setattr(new_cls, f"nns_{mount_point}", mount)
|
|
777
|
+
|
|
778
|
+
if isinstance(mount, property):
|
|
779
|
+
|
|
780
|
+
mount = property(
|
|
781
|
+
lambda slf: slf.__dict__[mount_point],
|
|
782
|
+
mount.fset,
|
|
783
|
+
mount.fdel,
|
|
784
|
+
mount.__doc__,
|
|
785
|
+
)
|
|
786
|
+
|
|
787
|
+
setattr(new_cls, mount_point, mount)
|
|
788
|
+
|
|
789
|
+
# Move it to nns_<mount point>
|
|
790
|
+
self.__dict__[mount_point] = envoy
|
|
791
|
+
|
|
742
792
|
def _update(self, module: torch.nn.Module) -> None:
|
|
743
793
|
"""Updates the ._model attribute using a new model of the same architecture.
|
|
744
794
|
Used when loading the real weights (dispatching) and need to replace the underlying modules.
|
|
@@ -759,12 +809,19 @@ class Envoy(Batchable):
|
|
|
759
809
|
self._module.__path__ = self.path
|
|
760
810
|
|
|
761
811
|
if self._source is not None:
|
|
812
|
+
|
|
762
813
|
def wrap(fn: Callable, **kwargs):
|
|
763
814
|
|
|
764
|
-
bound_obj =
|
|
815
|
+
bound_obj = (
|
|
816
|
+
fn.__self__
|
|
817
|
+
if inspect.ismethod(fn) and fn.__name__ != "forward"
|
|
818
|
+
else None
|
|
819
|
+
)
|
|
765
820
|
|
|
766
821
|
if self.interleaving:
|
|
767
|
-
return self._interleaver.wrap_operation(
|
|
822
|
+
return self._interleaver.wrap_operation(
|
|
823
|
+
fn, **kwargs, bound_obj=bound_obj
|
|
824
|
+
)
|
|
768
825
|
else:
|
|
769
826
|
return fn
|
|
770
827
|
|
|
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
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/function_vectors.webp
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/future_lens.webp
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/logit_lens.webp
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/_static/images/tutorials/walkthrough.webp
RENAMED
|
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
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/custom_functions.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/early_stopping.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/editing_tutorial.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/lora_training.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/model_editing.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/multiple_token.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/remote_execution.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/features/scan_validate.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/LoRA_tutorial.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/activation_patching.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/attribution_patching.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/boundless_DAS.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/dict_learning.ipynb
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/diffusion_lens.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/docs/source/notebooks/tutorials/start_remote_access.ipynb
RENAMED
|
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
|
|
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
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/model_runners/GPUModelRunner.py
RENAMED
|
File without changes
|
{nnsight-0.5.0.dev4 → nnsight-0.5.0.dev5}/src/nnsight/modeling/vllm/model_runners/__init__.py
RENAMED
|
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
|