File size: 1,666 Bytes
b2a67ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# gate_make_jsonl.py —— writes the WW-6 gate request as a one-row jsonl in the exact schema that
#   vllm_gen_multi_lora.py consumes (messages + max_new), so the gate runs through the SAME proven
#   generation path as the 7 matched evals instead of a bespoke engine boot.
#   用法: python gate_make_jsonl.py OUT.jsonl
import json, sys

SLIPS = [
    ("1", "吴王夫差起师伐越遂克越邦越王句践失邦移登会稽"),
    ("2", "之山使大夫种行成于吴曰寡君乏无使使非材种不敢当君天王"),
    ("3", "敢私告于下执事孤不天上帝降威懠于越邦不在前后当"),
    ("63", "邦人救火进者莫复王乃惧鼓而复之死者千人王大戚哭泣若主三"),
    ("64", "日不食乃训为之赏谷既成王亲以授其后既发王焉饮食王焉始命绝"),
    ("79", "宗庙凡吴之土地民人越君是尽既有之孤余何有面目以视于天下越君其事也"),
]

body = "".join("简%s:%s\n" % (n, t) for n, t in SLIPS)
PROMPT = (
    "以下是出土简牍《吴王》篇的六支简,释文已校订(无句读)。请按简号顺序逐简输出两部分:\n"
    "释文:补出现代标点后的简文;\n"
    "译文:现代汉语今译,紧贴简文,只译简上有的词,不增补简上没有的信息;简与简之间可以连读。\n\n"
    + body
)

row = {"id": "ww6_gate_v1", "max_new": 1600,
       "messages": [{"role": "user", "content": PROMPT}],
       "slips": [{"slip_no": n, "text": t} for n, t in SLIPS]}
with open(sys.argv[1], "w", encoding="utf-8") as f:
    f.write(json.dumps(row, ensure_ascii=False) + "\n")
print("WROTE", sys.argv[1], "prompt_chars", len(PROMPT))