Closed yonghongwu closed 6 months ago
with open('./head_score/llama-2-7b-80k.json') as file: head_list = json.loads(file.readline())
head_score_list = [([int(ll) for ll in l[0].split("-")],np.mean(l[1])) for l in head_list.items()]
top_retrieval_heads = [[l[0], round(np.mean(l[1]), 2)] for l in head_score_list][:10]
Thanks for pointing out! I just modified these typos.