mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-27 20:25:09 -04:00
make hellaswag optional eval yay
This commit is contained in:
parent
67239d9b8f
commit
da59861d38
2 changed files with 14 additions and 7 deletions
|
|
@ -101,16 +101,11 @@ def render_example(example):
|
|||
|
||||
def iterate_examples(split):
|
||||
# there are 10,042 examples in total in val
|
||||
n = 0
|
||||
download(split)
|
||||
with open(os.path.join(DATA_CACHE_DIR, f"hellaswag_{split}.jsonl"), "r") as f:
|
||||
for line in f:
|
||||
example = json.loads(line)
|
||||
n += 1
|
||||
yield example
|
||||
# DEBUGGING, TODO REMOVE
|
||||
if n >= 101:
|
||||
break
|
||||
|
||||
@torch.no_grad()
|
||||
def evaluate(model_type, device):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue