sayehghp commited on
Commit
3600cfd
·
1 Parent(s): e09b1c8

Visualization

Browse files
Files changed (1) hide show
  1. vg_token_attention.py +4 -1
vg_token_attention.py CHANGED
@@ -355,7 +355,10 @@ def run_token_ca_visualization(
355
  per_term_attn_full[t] = attn_per_query
356
 
357
  if not per_term_attn_kept:
358
- raise ValueError(f"None of the terms were found in the first T tokens: {terms}")
 
 
 
359
 
360
  # aggregate terms
361
  agg = None
 
355
  per_term_attn_full[t] = attn_per_query
356
 
357
  if not per_term_attn_kept:
358
+ # raise ValueError(f"None of the terms were found in the first T tokens: {terms}")
359
+ print(f"[TokenCA] None of the terms were found in the first T tokens: {terms}")
360
+ # Return an empty dict (or whatever your function usually returns)
361
+ return {}
362
 
363
  # aggregate terms
364
  agg = None