mirror of
https://github.com/p-e-w/heretic.git
synced 2026-06-02 05:03:33 +02:00
fix(ara): set batch size on HFLM object
This commit is contained in:
@@ -98,11 +98,14 @@ class Evaluator:
|
||||
def get_score(self) -> tuple[tuple[float, float], float, int]:
|
||||
if self.settings.use_piqa:
|
||||
print(" * Running PIQA benchmark...")
|
||||
hflm = HFLM(pretrained=self.model.model, tokenizer=self.model.tokenizer) # ty:ignore[invalid-argument-type]
|
||||
hflm = HFLM(
|
||||
pretrained=self.model.model, # ty:ignore[invalid-argument-type]
|
||||
tokenizer=self.model.tokenizer, # ty:ignore[invalid-argument-type]
|
||||
batch_size="auto",
|
||||
)
|
||||
results = lm_eval.simple_evaluate(
|
||||
model=hflm,
|
||||
tasks=["piqa"],
|
||||
batch_size="auto",
|
||||
)
|
||||
piqa_acc_norm: float = results["results"]["piqa"]["acc_norm,none"]
|
||||
print(f" * PIQA acc_norm: [bold]{piqa_acc_norm:.4f}[/]")
|
||||
|
||||
+1
-1
@@ -1052,6 +1052,7 @@ def run():
|
||||
hflm = HFLM(
|
||||
pretrained=model.model, # ty:ignore[invalid-argument-type]
|
||||
tokenizer=model.tokenizer, # ty:ignore[invalid-argument-type]
|
||||
batch_size="auto",
|
||||
)
|
||||
|
||||
table = Table()
|
||||
@@ -1075,7 +1076,6 @@ def run():
|
||||
results = lm_eval.simple_evaluate(
|
||||
model=hflm,
|
||||
tasks=[benchmark.task],
|
||||
batch_size="auto",
|
||||
)
|
||||
return results["results"][benchmark.task]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user