mirror of
https://github.com/teamchong/pxpipe.git
synced 2026-07-22 02:02:51 +02:00
c6a0d61f00
- 3 tiers: facts-at-depth w/ distractors (50), hard near-miss distractors on 45k-char sessions (30), 3x-mutated state tracking (18); 16 unanswerable confabulation guards. claude-fable-5, real production renderer, exact-match grading, no LLM grader. - text 98/98, image 98/98, 0 wrong, 0 confabulated UNKNOWNs in either arm - README benchmark table + FINDINGS dated update; PNGs gitignored, probes/results.jsonl committed as receipts
13 lines
802 B
JavaScript
13 lines
802 B
JavaScript
// Render each session txt to PNGs at the proxy's production density.
|
|
import { renderTextToPngsWithCharLimit, DENSE_CONTENT_COLS, DENSE_CONTENT_CHARS_PER_IMAGE, DENSE_RENDER_STYLE } from '../../dist/core/render.js';
|
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
let tok = 0, pages = 0;
|
|
for (let s = 0; s < 10; s++) {
|
|
const text = readFileSync(`work2/s${s}.txt`, 'utf8');
|
|
const imgs = await renderTextToPngsWithCharLimit(text, DENSE_CONTENT_COLS, DENSE_CONTENT_CHARS_PER_IMAGE, DENSE_RENDER_STYLE);
|
|
imgs.forEach((im, i) => writeFileSync(`work2/s${s}_p${i}.png`, im.png));
|
|
pages += imgs.length;
|
|
tok += imgs.reduce((a, im) => a + Math.round(im.width * im.height / 750), 0);
|
|
}
|
|
console.log(`rendered ${pages} pages, ~${tok} img tokens total (vs ~${Math.round(10*15900/4)} text tokens)`);
|