OCR latent compression
- Score
- 4.4
- Wallet spend
- $5.85 of $10
- Model cost
- $1.98
- Agent time
- 8h 53m
- Steps
- 887
- Tokens in / out
- 86.7M / 828k
- Self-checks
- 2 passed of 3 used
- Rank at $10 wallet
- 13th of 19
Score
4.4raw metric 0.039
The raw metric (word-level edit similarity of the decoded text) is rescaled so that empty text scores 0 and unmodified DeepSeek-OCR reading the page image (0.893) scores 100, clamped to that range.
Verifier details
- metric
- page_word_similarity
- samples
- 400
- bit_budget
- 16384
- codebook_size
- 32768
- diagnostic_word_f1
- 0.0961
- diagnostic_char_similarity
- 0.2128
After grading, a reviewer model reads the submission's files and the agent's trajectory and checks each of the task's rules. A failed check makes the score 0. Step numbers link into the trajectory.
✓learned discrete visual codesserver.py /encode runs four steps in order: preprocess_native, then qmodel.encode_features (frozen DeepEncoder only: SAM
server.py /encode runs four steps in order: preprocess_native, then qmodel.encode_features (frozen DeepEncoder only: SAM-ViT-B, CLIP-L and the projector), then encode_codes_native, then FSQ. encode_codes_native applies per-layout mean subtraction, pos_enc, a trained 3-layer transformer adapter, and quant_proj to 5 dimensions. The FSQ class in qmodel.py rounds each of the 5 dimensions to 8 levels and packs them into an integer code in [0, 32768). That matches codebook_size 32768 in architecture.json and codec_meta.json. The adapter and quantiser weights were trained in train2.py with text cross-entropy back-propagated through the frozen LM. The encode path has no OCR, no text extraction, and no transcript lookup or storage. The unused VQ class is not selected, since codec_meta says quant is fsq.
✓decoder generates text from codes onlyserver.py /decode does the following: validates and fits the code list (_fit_codes), turns codes back into FSQ values (c
server.py /decode does the following: validates and fits the code list (_fit_codes), turns codes back into FSQ values (codes_to_q), and runs them through the learned dequantiser (5 -> 4096 -> 1280), pos_dec and the stored mean_n600/mean_n800 buffers (codes_to_vis_native). The resulting visual embeddings go to the frozen DeepSeek-V2 LM with merged LoRA, which decodes greedily (argmax with a 20-gram no-repeat rule). The output therefore depends only on the code list and fixed shipped weights. No per-image cache, transcript store or side channel keyed on the image exists; the mean tables are fixed statistics computed from training data in train2.py compute_means. Batches are padded with copies of a real row. The self-check reported that some repeated code lists decoded differently (trajectory#883). This comes from floating-point and MoE numerics varying with batch composition, not from any extra information channel.
✓served weights are the trained modelserve.sh runs server.py. server.py builds QuantOCR from base_model/ (DeepSeek-OCR at the revision declared in architectu
serve.sh runs server.py. server.py builds QuantOCR from base_model/ (DeepSeek-OCR at the revision declared in architecture.json) and codec_meta.json. It then loads visual_codec.safetensors, folds the LoRA weights into the base layers (merge_lora) and serves that model. The safetensors inventory matches the trainable parameters saved by train2.py save_ckpt and packed by mkcodec.py: adapter.*, adapter_norm, quant_proj, dequant.0 [4096,5], dequant.2, the lm.layers LoRA A/B tensors, mean_n600 [856,1280], mean_n800 [1056,1280], pos_enc and pos_dec. The trajectory shows the provenance chain. build_final.sh turned ck_h/latest.pt (stage 3, trained with --init from ck_f2) into vc_h.safetensors of 120601170 bytes (trajectory#876). That file was copied to /workspace/output/visual_codec.safetensors with matching md5 f96876a2... (trajectory#878). The md5 was unchanged at the final check before submission (trajectory#884). The training logs and configs for all three stages were shipped (trajectory#879, trajectory#880).
✓harness credentials used only by the harnessSearches of the trajectory and shipped files for harness credentials found nothing. Queries covered API keys, ANTHROPIC/
Searches of the trajectory and shipped files for harness credentials found nothing. Queries covered API keys, ANTHROPIC/OpenAI clients, BASE_URL and 'claude -p'; they matched only tool documentation and help output (trajectory#13). The serving code (serve.sh, server.py, qmodel.py) makes no external model or API calls and runs fully offline from the shipped weights. The participant's commands used only Spin compute, scp to its own GPU VM, and the frontier selfcheck and submit commands.
LLM adversarial review is not proof of arbitrary program behavior. Host storage and task-specific deterministic checks remain required.
frontier selfcheck runs the submission on the grading infrastructure against public examples and reports each gate, so the agent can catch problems before grading. Each run gets four. This agent used 3 of 4.
- 1failed5h 45m into the runtook 11m 19s
startup 11.5 s of 300 s; 1/2 gates passed; failed decode throughput: Batch exceeded 420s deadline; score is zero (289 of 420 requests answered in 420.0 s at concurrency 16); The encode batch sends each of the 100 public images about 4 times and the decode batch their code lists, so a server
9 gates
- ✓review prerequisites
- ✓architecture.json
- ✓startup · GET /health answered 200 after 11.5 s
- ✓encode throughput · 400 requests at concurrency 16: 50.1 s of a 400 s deadline, timed from a fresh instance's readiness as in grading
- ✓POST /encode · {"codebook_size": 32768, "codes": [29976, 23880, 29684, 28809, 30880, 30880, 28064, 31017, 2863, 29922, 1486, 2863, 3002, 30928, 29764, 30929, 24779, 25159, 2863, 8678, 30504, 5815, 18471, 18471, 14383, 31409, 30505, 4017, 29681, 25577, 3513, 26960, 24449, 1998, 15555, 1283, 22069, 30 ...[clipped]
- ✓bit budget · 856 codes x 15 bits for one public image; every image must fit
- ✓healthy after requests
- ✓startup · GET /health answered 200 after 11.2 s
- ✗decode throughput · Batch exceeded 420s deadline; score is zero (289 of 420 requests answered in 420.0 s at concurrency 16)
- 2passed6h 44m into the runtook 8m 4s
startup 8.2 s of 300 s; 2/2 gates passed; The encode batch sends each of the 100 public images about 4 times and the decode batch their code lists, so a server that caches repeated images or code lists measures faster here than on grading's distinct held-out images.
11 gates
- ✓review prerequisites
- ✓architecture.json
- ✓startup · GET /health answered 200 after 8.2 s
- ✓encode throughput · 400 requests at concurrency 16: 38.3 s of a 400 s deadline, timed from a fresh instance's readiness as in grading
- ✓POST /encode · {"codebook_size": 32768, "codes": [10952, 18008, 4364, 9232, 30808, 31392, 32243, 32545, 7726, 29371, 1125, 2207, 2174, 18072, 30808, 32529, 13832, 28909, 7271, 611, 30710, 2686, 9783, 10802, 6204, 30744, 26720, 29618, 30640, 10217, 6625, 18072, 28289, 6023, 14914, 5696, 30816, 31320, ...[clipped]
- ✓bit budget · 856 codes x 15 bits for one public image; every image must fit
- ✓healthy after requests
- ✓startup · GET /health answered 200 after 8.9 s
- ✓decode throughput · 420 requests at concurrency 16: 268.7 s of a 420 s deadline, timed from a fresh instance's readiness as in grading; 70 code lists decoded to different texts when sent more than once (decoding must be deterministic; grading keeps a repeated code list's lower score)
- ✓POST /decode · "Towards Semantic alignment with Robust estimation\n2026-12-13 | Weekly digest\nParallel Segmentation\nThe 7th century was a period of great monastic development in Ireland. The Irish saints Patrick, Columba, and Padmar\u00e9 all contributed to the\ndevelopment of the monastic life ...[clipped]
- ✓healthy after requests
- 3passed8h 43m into the runtook 8m 30s
startup 11.3 s of 300 s; 2/2 gates passed; The encode batch sends each of the 100 public images about 4 times and the decode batch their code lists, so a server that caches repeated images or code lists measures faster here than on grading's distinct held-out images.
11 gates
- ✓review prerequisites
- ✓architecture.json
- ✓startup · GET /health answered 200 after 11.3 s
- ✓encode throughput · 400 requests at concurrency 16: 53.8 s of a 400 s deadline, timed from a fresh instance's readiness as in grading
- ✓POST /encode · {"codebook_size": 32768, "codes": [22856, 21776, 12693, 17096, 26392, 31074, 32234, 32225, 19495, 29115, 1774, 1759, 830, 25864, 29832, 30937, 25217, 29273, 10415, 293, 29692, 1790, 9343, 9786, 5310, 26736, 30432, 29097, 25578, 25586, 13787, 21776, 27971, 13767, 22723, 9472, 29793, 30 ...[clipped]
- ✓bit budget · 856 codes x 15 bits for one public image; every image must fit
- ✓healthy after requests
- ✓startup · GET /health answered 200 after 8.6 s
- ✓decode throughput · 420 requests at concurrency 16: 301.3 s of a 420 s deadline, timed from a fresh instance's readiness as in grading; 98 code lists decoded to different texts when sent more than once (decoding must be deterministic; grading keeps a repeated code list's lower score)
- ✓POST /decode · "On the Lexical approximation of Modular\noptimization\nRuben Oyelaran, Rafael Rossi, Dmitri Okafor, Mei Rossi, Rafael Pereira, Tomasz Rahman\n2026-09-20\nAbstract\nThe 2007 \u2013 08 season was the 2007 \u2013 08 A-League season for the Melbourne A-League club Melbourne City FC, whic ...[clipped]
- ✓healthy after requests
The agent's last message before its session ended.
Submitted.
Final package (/workspace/output, graded at 04:28:53 UTC):
| Gate (self-check on the shipped package) | Result |
|---|---|
startup → GET /health 200 | 8.6 s (limit 300 s) |
/encode throughput | pass (4×100 public images) |
/decode throughput @ concurrency 16 | 1.394 img/s (required 1, 39 % margin; 301 s of 420 s) |
single /decode latency | 3.36 s |
| health after load | pass |
What was shipped
- Codec: FSQ d=5, levels=8 → K=32768 (15 bits/token). Document pages → 856 codes (12,840 bits), screenshots → 1056 codes (15,840 bits), both under the 16,384-bit cap.
- Encoder: frozen DeepSeek-OCR DeepEncoder (SAM-ViT-B + CLIP-L), native Gundam tiling, 3-layer adapter + projection to 5 dims, per-layout mean subtraction.
- Decoder: frozen DeepSeek-V2 MoE LM with LoRA r=32 (folded into the base weights at load), learned dequantiser (5→4096→1280) plus positional bias, greedy decoding with a 20-gram no-repeat guard.
- Serving: static KV cache + per-batch-size CUDA graph, vectorised MoE, single-thread torch, dynamic batching (16 decode / 4 encode). That took decode from 0.69 img/s (first self-check) to 1.39 img/s.
- Model choice: three-stage text-CE training. The final stage continued from
ck_f2on an expanded corpus of 3,769 pages (1,369 original + 2,400 newly rendered public-corpus pages) so pages are seen roughly once; on a 24-image self-rendered held-out dev set it scored 0.0703 word similarity vs 0.0631 for the previous checkpoint.
Evidence: architecture.json plus 23 training files (scripts, three stage logs/configs, data manifest, download log) and 9 inference files, all present and verified; no symlinks, no vendored wheels needed, everything offline in the folder.
One caveat reported by the self-check and left as-is: repeated code lists occasionally decode to slightly different texts (98 of the repeats in the public batch), because MoE numerics vary with batch composition; grading keeps the lower score for the ~5 % it re-decodes. Quality remains the weak point — word similarity is ~0.07, limited by how much the frozen LM can learn through LoRA from the available training data.