Download scripts/gate_make_jsonl.py from Raphael2099/llm-data-eval-20261030: direct link, hf CLI and curl.
- Browser
- Download file 1.67 kB
-
https://huggingface.co/datasets/Raphael2099/llm-data-eval-20261030/resolve/main/scripts/gate_make_jsonl.py
- Command line
-
hf download hf://datasets/Raphael2099/llm-data-eval-20261030/scripts/gate_make_jsonl.py
-
curl -L -o gate_make_jsonl.py https://huggingface.co/datasets/Raphael2099/llm-data-eval-20261030/resolve/main/scripts/gate_make_jsonl.py
1.67 kB
| # 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)) | |