mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3879] [Engine] enable image prefix reuse with encoded row counts #4815
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4815
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3879
Author: @nleve
Created: 10/23/2026
Status: 🔄 Open
Base:
main← Head:fix/image-prefix-cache📝 Commits (1)
a8dcc33[Engine] resolve shared image prefixes using encoded row counts📊 Changes
3 files changed (+77 additions, -26 deletions)
View changed files
📝
docs/DETAILS.md(+4 -0)📝
serve/server.py(+39 -26)📝
serve/test_server.py(+34 -0)📄 Description
Problem and result
Requests containing images ignored
strata_prefix, preventing explicit prefix reuse. Resolve those prefixes using image row counts already encoded for the request, without another image encode.Related discussion
#2874 (closed in tracker reset) covers the same behavior.
Approach
Share image-pad expansion between full prompts and prefix heads. Log and ignore boundaries inside an image’s token rows. Preserve existing image-identity checks.
Validation
Tested
a8dcc33dagainst upstream7ddc17a3.Passed:
python -m unittest serve.test_server.SharedPrefix serve.test_server.ImageMarkers -q: 10 tests, using a mock tokenizer and vision encoder.Failed:
python -m unittest serve.test_server -q: 352/353 passed. GpuChoice.test_hip_ordinal also fails on unchanged upstream with the same device-order mismatch.Not run: Windows and other GPU backends.
Limits
These are targeted prefix-cache and vision regression checks, not a general model-quality evaluation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.