psaiops 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl

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.

Potentially problematic release.


This version of psaiops might be problematic. Click here for more details.

@@ -1,4 +1,6 @@
1
1
  import gradio
2
+ import torch
3
+ import torch.cuda
2
4
 
3
5
  import psaiops.score.attention.lib
4
6
 
@@ -148,9 +148,9 @@ def score_tokens(
148
148
  token_num: int=32,
149
149
  topk_num: int = 4,
150
150
  topp_num: float = 0.9,
151
- token_idx: int, # -1 => avg over all tokens
152
- layer_idx: int, # -1 => avg over layers
153
- head_idx: int, # -1 => avg over heads
151
+ token_idx: int=-1, # -1 => avg over all tokens
152
+ layer_idx: int=-1, # -1 => avg over layers
153
+ head_idx: int=-1, # -1 => avg over heads
154
154
  device_str: str='cuda',
155
155
  ) -> list:
156
156
  # dictionary {'input_ids': _, 'attention_mask': _}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: psaiops
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: Web apps to inspect & engineer NN activations.
5
5
  License: .github/LICENSE.md
6
6
  Author: apehex
@@ -7,9 +7,9 @@ psaiops/elements/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
7
7
  psaiops/elements/data.py,sha256=vGYeMN11uP9gs8rV6aSDffE_TeIX5PmdzWGwUpdGE2Y,906
8
8
  psaiops/score/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  psaiops/score/attention/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- psaiops/score/attention/app.py,sha256=3kltkxpbSNXWAGuzhO1cXNnGUOWNFBgUHA17wJMrICU,6803
11
- psaiops/score/attention/lib.py,sha256=MCpXql8INTdXnFkEBoyJp-unazC9nGbD7y81G2z3l9U,6958
10
+ psaiops/score/attention/app.py,sha256=7LBtd-a0s67YjZlmnyW6egfZLDaVjh1dAIcMoYzq37Y,6834
11
+ psaiops/score/attention/lib.py,sha256=7n0IJwgRFJs90PNhBhEfWVrR9a7GwP0QkICsIIR6psQ,6967
12
12
  psaiops/steer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- psaiops-0.0.4.dist-info/METADATA,sha256=xOUeGbX3yfu06s2HLDPtYkHC8StVNUJB7DQ-kH_J0E0,1221
14
- psaiops-0.0.4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
15
- psaiops-0.0.4.dist-info/RECORD,,
13
+ psaiops-0.0.6.dist-info/METADATA,sha256=4lCywepZHMwbqSKZn658n69tnTM0nBkuJRBJvwyrZT8,1221
14
+ psaiops-0.0.6.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
15
+ psaiops-0.0.6.dist-info/RECORD,,