dar-tau commited on
Commit
6dcb485
1 Parent(s): c4b84e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -98,7 +98,7 @@ def get_hidden_states(raw_original_prompt, force_hidden_states=False):
98
  # TODO: document this!
99
  important_tokens = (1 +
100
  F.normalize(hidden_states, dim=-1).diff(dim=0)
101
- .norm(dim=-1).topk(k=7).indices[:, 0].cpu().numpy())
102
  print(f'{important_tokens=}')
103
  global_state.local_state.hidden_states = hidden_states.cpu().detach()
104
 
 
98
  # TODO: document this!
99
  important_tokens = (1 +
100
  F.normalize(hidden_states, dim=-1).diff(dim=0)
101
+ .norm(dim=-1).topk(k=5).indices[:, 0].cpu().numpy())
102
  print(f'{important_tokens=}')
103
  global_state.local_state.hidden_states = hidden_states.cpu().detach()
104