v4 final inference audit: exact incremental decoder, generate_window carry=True fix, GEN_FINAL doc (GitHub 3f54387)
ab69dee verified Download docs/gen_final_data/summ.py from thefinalboss/fractus-cte-atom: direct link, hf CLI and curl.
- Browser
- Download file 724 Bytes
-
https://huggingface.co/thefinalboss/fractus-cte-atom/resolve/main/docs/gen_final_data/summ.py
- Command line
-
hf download hf://thefinalboss/fractus-cte-atom/docs/gen_final_data/summ.py
-
curl -L -o summ.py https://huggingface.co/thefinalboss/fractus-cte-atom/resolve/main/docs/gen_final_data/summ.py
724 Bytes
| import json,re,collections,statistics as st,sys | |
| R=collections.defaultdict(list) | |
| for l in open(sys.argv[1] if len(sys.argv)>1 else 'tune.jsonl'): | |
| d=json.loads(l); R[d['cfg']].append(d) | |
| def distinct(g): | |
| t=re.sub(r'<[^>]+>',' ',g); ws=re.findall(r'[A-Za-z]{2,}',t); return len(set(w.lower() for w in ws))/len(ws) if ws else 0 | |
| print('| config | n | unique@40 | exact@40 | real-word@40 | real-word@80 | real-word>=3 | distinct-word | ') | |
| for k,v in R.items(): | |
| m=lambda f: st.mean(f(x) for x in v) | |
| print(f"| {k} | {len(v)} | {m(lambda x:x['u40']):.1f} | {m(lambda x:x['exact40']):.2f} | {m(lambda x:x['rw40']):.2f} | {m(lambda x:x['rw']):.2f} | {m(lambda x:x['rw3']):.2f} | {m(lambda x:distinct(x['gen'])):.2f} |") | |