mirror of
https://github.com/karpathy/nanochat.git
synced 2026-02-05 01:59:52 +00:00
Merge 3bf06802e6 into 230d6cf6c6
This commit is contained in:
commit
3a205e898f
|
|
@ -156,7 +156,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