Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle1668 committed Aug 9, 2023
1 parent 5630341 commit f4b02c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ def accumilate_inference_log(
inference_log["generation_perplexity"] = perplexities[index][1]
inference_log["sequence_perplexity"] = perplexities[index][2]
if "attn" in features:
process_args = [layer_index, attention_layer for layer_index, attention_layer in enumerate(outputs.attentions)]
p = Process(target=get_layer_entropy, args=(e, index, total_entropy, total_gini, inference_log, layer_index, attention_layer))
# process_args = [layer_index, attention_layer for layer_index, attention_layer in enumerate(outputs.attentions)]
# p = Process(target=get_layer_entropy, args=(e, index, total_entropy, total_gini, inference_log, layer_index, attention_layer))
for layer_index, attention_layer in enumerate(outputs.attentions):
get_layer_entropy(e, index, total_entropy, total_gini, inference_log, layer_index, attention_layer)

Expand Down

0 comments on commit f4b02c0

Please sign in to comment.