mirror of
https://github.com/karpathy/nanochat.git
synced 2026-04-01 13:15:21 +00:00
Merge 4bd03a77be into a445144d39
This commit is contained in:
commit
d6fd29d866
|
|
@ -154,7 +154,8 @@ def evaluate_core(model, tokenizer, device, max_per_task=-1):
|
|||
shuffle_rng = random.Random(1337)
|
||||
shuffle_rng.shuffle(data)
|
||||
if max_per_task > 0:
|
||||
data = data[:max_per_task]
|
||||
data_cutoff = max(task_meta['num_fewshot']+1, max_per_task)
|
||||
data = data[:data_cutoff]
|
||||
|
||||
accuracy = evaluate_task(model, tokenizer, data, device, task_meta)
|
||||
results[label] = accuracy
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user