File size: 383 Bytes
9d3d980 2b2f744 70f4226 7e951ff 5c02ba4 2b2f744 3dad049 7e951ff 535608c 70f4226 535608c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import itertools
from typing import List
import datasets
import numpy as np
import transformers
import torch
dataset = datasets.load_dataset("syntaxgym", "subordination_src-src")
metric = datasets.load_metric("syntaxgym")
model_ref = "gpt2"
# model_ref = "hf-internal-testing/tiny-random-gpt_neo"
result = metric.compute(suite=dataset["test"], model_id=model_ref)
print(result)
|