psaiops 0.0.7__tar.gz → 0.0.8__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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: psaiops
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Web apps to inspect & engineer NN activations.
5
5
  License: .github/LICENSE.md
6
6
  Author: apehex
@@ -142,16 +142,17 @@ def postprocess_token_ids(
142
142
  # COMPUTE ########################################################################
143
143
 
144
144
  def score_tokens(
145
+ prompt_str: str,
146
+ token_num: int,
147
+ topk_num: int,
148
+ topp_num: float,
149
+ token_idx: int,
150
+ layer_idx: int,
151
+ head_idx: int,
152
+ *,
153
+ device_str: str,
145
154
  model_obj: object,
146
155
  tokenizer_obj: object,
147
- prompt_str: str,
148
- token_num: int=32,
149
- topk_num: int = 4,
150
- topp_num: float = 0.9,
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
- device_str: str='cuda',
155
156
  ) -> list:
156
157
  # dictionary {'input_ids': _, 'attention_mask': _}
157
158
  __inputs = preprocess_token_ids(
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "psaiops"
3
- version = "0.0.7"
3
+ version = "0.0.8"
4
4
  description = "Web apps to inspect & engineer NN activations."
5
5
  license = ".github/LICENSE.md"
6
6
  readme = ".github/README.md"
File without changes
File without changes