From ee335ce9c24a8fedd9a90957be3bfb86b44d2b7d Mon Sep 17 00:00:00 2001 From: can1357 Date: Tue, 4 Aug 2026 02:20:03 +0200 Subject: [PATCH] feat(snapcompact): implemented squad context compression benchmark - Added a new SQuAD-based context-compression benchmark script for evaluating recall conditions. - Added model and shape command-line arguments along with pricing and shape configurations. - Updated default model variants and added an unknown billing family to shape resolution. - Updated shape resolution and model resolution tests to verify the new defaults. --- packages/snapcompact/research/bench_kimi.py | 70 +++- packages/snapcompact/research/final.py | 1 + packages/snapcompact/research/mono_prod.py | 20 + packages/snapcompact/research/run.py | 353 ++++++++++++++++++ packages/snapcompact/src/snapcompact.ts | 30 +- packages/snapcompact/test/snapcompact.test.ts | 18 +- 6 files changed, 457 insertions(+), 35 deletions(-) create mode 100644 packages/snapcompact/research/run.py diff --git a/packages/snapcompact/research/bench_kimi.py b/packages/snapcompact/research/bench_kimi.py index 5d020a6db..7a6957202 100644 --- a/packages/snapcompact/research/bench_kimi.py +++ b/packages/snapcompact/research/bench_kimi.py @@ -2,16 +2,20 @@ # requires-python = ">=3.10" # dependencies = ["pillow"] # /// -"""Kimi K2.6 chunked benchmark runner (KimiK26Bench scratch file). +"""Kimi-line chunked benchmark runner over PRODUCTION-rendered frames. mono_prod protocol (same flow/questions/seed) but every request carries <=8 frames: OpenRouter silently drops images after the first 8, and kimi itself dilutes >8 genuine frames. Chunk plan = windows of 8 frames, overlap >=1, evenly spread (reproduces the diag [(0,8),(6,14),(13,21)] plan for 21 frames -so the .973 anchor is a cache hit). Questions are routed to the chunk where -their answer position is most interior. +so the k2.6 .973 anchor is a cache hit). Questions are routed to the chunk +where their answer position is most interior. - uv run --with pillow python bench_kimi.py --shape-json '' --name