[GH-ISSUE #5443] Vision CPU reader (300-token cap) reads dense Japanese pages far worse than the GPU reader (CER 12.1% vs 1.66%) #3252

Open
opened 2026-11-07 14:39:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @masatokus on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5443

Summary

On a 12 GB card, --vision cpu (the default under 24 GB) caps the picture reader at max_tokens: 300. For dense vertical Japanese book pages this gave a character error rate of 12.1 %, versus 1.66 % with --vision gpu (max_tokens: 1024) on the same model and prompt. I could not isolate "CPU vs GPU compute" from "300 vs 1024 tokens", so the cause is the cap or the CPU reader itself. I am reporting it because the engine already prints a hint about this and nothing in launch lets me raise the CPU cap.

This is related to #625 (CPU path 300-token cap, closed), but that thread only mentions charts, small text and screenshots; I did not find a measured accuracy impact for dense text pages.

Environment

  • Strata 0.2.11, engine 0.1.57 (linux-x86_64-cuda13)
  • Ubuntu 24.04, RTX 3060 12 GB, 96 GB RAM, 8 encoder threads
  • Model: Qwen3.8-Flash-Next IQ3_XXS (GSQ-RCO), mmproj-Qwen3.8-Flash-Next-BF16.gguf, 128K context, drafting DFlash2

Measurement

30 page images of vertical-text Japanese books. Prompt asks for a plain transcription of the page (no ruby), temperature 0, thinking off, 4000 max output tokens. Metric: character error rate against human-corrected text (NFKC, whitespace removed). All 30 requests succeeded in every run; none hit the length limit.

Setup Picture reader Mean CER Seconds per page
Strata, --vision cpu (max_tokens: 300) CPU, 8 threads 12.1 % not recorded
Strata, --vision gpu (max_tokens: 1024) GPU 1.66 % 8.4
llama.cpp b12143, unsloth UD-IQ3_XXS + same mmproj GPU 1.11 % 20.4 (H200, not comparable)

For reference, two OCR engines on the same pages score 1.02 % and 1.39 %.

What I saw in the engine log

Every CPU start prints:

load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks
load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024
strata-vision: on the CPU, 8 threads, no warm-up

while the generated run config has "vision": {"gpu": false, "max_tokens": 300, ...}. The GPU run's config has "gpu": true, "max_tokens": 1024 and logs warmed up at 1024 image tokens.

Requests

  1. Is there a supported way to raise the CPU reader's token cap through strata launch or a preset? launch --help does not list --vision-tokens, and --set vision-tokens=1024 is passed through to the engine, which prints its usage text and exits with code 1 ("The engine stopped while it was loading the model").
  2. Could launch --plan (or the first start) warn when the CPU reader's cap is below the 1024 tokens that llama.cpp says Qwen-VL needs, and mention that text-heavy pages may read badly?
  3. Could the docs state the accuracy trade-off between the CPU and GPU readers, not only the speed and VRAM trade-off? The GPU reader costs about 2 GB of VRAM on a 12 GB card, so some users will want to keep the CPU reader and raise its cap if that is the cause.

I can run more measurements (for example the CPU reader at 768 or 1024 tokens) if that helps; tell me which flag to use.

Originally created by @masatokus on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5443 ## Summary On a 12 GB card, `--vision cpu` (the default under 24 GB) caps the picture reader at `max_tokens: 300`. For dense vertical Japanese book pages this gave a character error rate of **12.1 %**, versus **1.66 %** with `--vision gpu` (`max_tokens: 1024`) on the same model and prompt. I could not isolate "CPU vs GPU compute" from "300 vs 1024 tokens", so the cause is the cap *or* the CPU reader itself. I am reporting it because the engine already prints a hint about this and nothing in `launch` lets me raise the CPU cap. This is related to #625 (CPU path 300-token cap, closed), but that thread only mentions charts, small text and screenshots; I did not find a measured accuracy impact for dense text pages. ## Environment - Strata 0.2.11, engine 0.1.57 (linux-x86_64-cuda13) - Ubuntu 24.04, RTX 3060 12 GB, 96 GB RAM, 8 encoder threads - Model: Qwen3.8-Flash-Next IQ3_XXS (`GSQ-RCO`), `mmproj-Qwen3.8-Flash-Next-BF16.gguf`, 128K context, drafting DFlash2 ## Measurement 30 page images of vertical-text Japanese books. Prompt asks for a plain transcription of the page (no ruby), temperature 0, thinking off, 4000 max output tokens. Metric: character error rate against human-corrected text (NFKC, whitespace removed). All 30 requests succeeded in every run; none hit the length limit. | Setup | Picture reader | Mean CER | Seconds per page | |---|---|---|---| | Strata, `--vision cpu` (`max_tokens: 300`) | CPU, 8 threads | **12.1 %** | not recorded | | Strata, `--vision gpu` (`max_tokens: 1024`) | GPU | **1.66 %** | 8.4 | | llama.cpp b12143, unsloth UD-IQ3_XXS + same mmproj | GPU | 1.11 % | 20.4 (H200, not comparable) | For reference, two OCR engines on the same pages score 1.02 % and 1.39 %. ## What I saw in the engine log Every CPU start prints: ``` load_hparams: Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks load_hparams: if you encounter problems with accuracy, try adding --image-min-tokens 1024 strata-vision: on the CPU, 8 threads, no warm-up ``` while the generated run config has `"vision": {"gpu": false, "max_tokens": 300, ...}`. The GPU run's config has `"gpu": true, "max_tokens": 1024` and logs `warmed up at 1024 image tokens`. ## Requests 1. Is there a supported way to raise the CPU reader's token cap through `strata launch` or a preset? `launch --help` does not list `--vision-tokens`, and `--set vision-tokens=1024` is passed through to the engine, which prints its usage text and exits with code 1 ("The engine stopped while it was loading the model"). 2. Could `launch --plan` (or the first start) warn when the CPU reader's cap is below the 1024 tokens that llama.cpp says Qwen-VL needs, and mention that text-heavy pages may read badly? 3. Could the docs state the accuracy trade-off between the CPU and GPU readers, not only the speed and VRAM trade-off? The GPU reader costs about 2 GB of VRAM on a 12 GB card, so some users will want to keep the CPU reader and raise its cap if that is the cause. I can run more measurements (for example the CPU reader at 768 or 1024 tokens) if that helps; tell me which flag to use.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6699786948 --> @github-actions[bot] commented on GitHub (Nov 7, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3252
No description provided.