Update app.py
Browse files
app.py
CHANGED
@@ -99,7 +99,7 @@ def get_hidden_states(raw_original_prompt, force_hidden_states=False):
|
|
99 |
important_tokens = (1 +
|
100 |
F.normalize(hidden_states, dim=-1).diff(dim=0)
|
101 |
.norm(dim=-1).topk(k=4).indices[:, 0].cpu().numpy())
|
102 |
-
print(f'{important_tokens=}')
|
103 |
global_state.local_state.hidden_states = hidden_states.cpu().detach()
|
104 |
|
105 |
token_btns = ([gr.Button(token, visible=True,
|
|
|
99 |
important_tokens = (1 +
|
100 |
F.normalize(hidden_states, dim=-1).diff(dim=0)
|
101 |
.norm(dim=-1).topk(k=4).indices[:, 0].cpu().numpy())
|
102 |
+
print(f'{important_tokens=}\t\t{hidden_states.shape=}')
|
103 |
global_state.local_state.hidden_states = hidden_states.cpu().detach()
|
104 |
|
105 |
token_btns = ([gr.Button(token, visible=True,
|