mirror of
https://github.com/karpathy/nanochat.git
synced 2026-02-16 00:20:29 +00:00
Merge 3bf06802e6 into 41bb2eac32
This commit is contained in:
commit
bdd78848dd
|
|
@ -96,7 +96,8 @@ def evaluate_model(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]
|
||||
|
||||
# run the evaluation for this task
|
||||
accuracy = evaluate_task(model, tokenizer, data, device, task_meta)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user