Download render_scripts/addgroup.py from jakeatx/llamampere-evalcache: direct link, hf CLI and curl.
- Browser
- Download file 504 Bytes
-
https://huggingface.co/datasets/jakeatx/llamampere-evalcache/resolve/main/render_scripts/addgroup.py
- Command line
-
hf download hf://datasets/jakeatx/llamampere-evalcache/render_scripts/addgroup.py
-
curl -L -o addgroup.py https://huggingface.co/datasets/jakeatx/llamampere-evalcache/resolve/main/render_scripts/addgroup.py
504 Bytes
| import json,sys,os | |
| W=os.path.expanduser('~/evalhf_work') | |
| for f in ['mrcr/8needle-64k-128k-first50.jsonl','ruler/128k-13tasks-x3.jsonl','longbench-v2/196k-245k-27items.jsonl']: | |
| p=f'{W}/prompts/{f}' | |
| L=[json.loads(l) for l in open(p,encoding='utf-8')] | |
| with open(p,'w',encoding='utf-8',newline='') as o: | |
| for r in L: | |
| r2={"id":r["id"],"group":r["id"],"messages":r["messages"],"reasoning_effort":r["reasoning_effort"]} | |
| o.write(json.dumps(r2,ensure_ascii=False)+"\n") | |