MCPcopy Create free account
hub / github.com/THUDM/LongWriter / score

Function score

evaluation/eval_length.py:5–9  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

3import numpy as np
4
5def score(x, y):
6 if y > x:
7 return 100 * max(0, 1. - (y / x - 1) / 3)
8 else:
9 return 100 * max(0, 1. - (x / y - 1) / 2)
10
11model = "LongWriter-glm4-9b"
12prediction = [json.loads(line) for line in open(f'models/{model}/pred.jsonl', encoding='utf-8')]

Callers 1

eval_length.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected