mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#164
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?
Originally created by @CoolJohn-lab on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/418
GLM conversations containing an image are excluded from parked conversation slots in v1.1.25, causing a full prefill after switching to another conversation even with ample RAM cache capacity.
This is an independent reproduction of the problem addressed by open PR #331. That PR appears to contain the appropriate upstream fix; please consider this report additional validation rather than a competing implementation.
Environment
94878e25e3860e22ea29b4fff506ade8c477a57bMAYA_GLM_SLOT_RAM_GB=32,MAYA_GLM_SLOTS=16,MAYA_GLM_RAM_HEADROOM_GB=44Reproduction
Expected: A's compatible prefix restores from a parked slot.
Actual: image-bearing A repeatedly starts with zero cached tokens; text-only conversations restore normally. In the real workload, approximately 70–74K-token image conversations repeatedly required a full prefill. At diagnosis only approximately 4.3 GB of the 32 GiB cache budget was used, so this was not a capacity eviction.
A controlled pre-fix blue-image probe returned zero cached tokens after the switch.
Root cause / proposed fix
In
src/program/generate.cpp,slot_putreturns whensnap_img_hash != kNoImages, andslot_takereturns when!cur_img_pos.empty().Removing those guards alone would be unsafe: different images can have identical text and placeholder tokens. The fix should:
saved.image_hash == img_hash(saved.tokens.size()).snap_img_hashfrom the selected slot.We applied and tested a narrower local RAM-only implementation. It leaves the existing disk format and image checkpoint guards unchanged. PR #331 handles the broader persistent-slot case.
Live results after RAM-only fix
Greedy short answers, same running model, alternating controlled blue/red images and text conversations:
These are request wall times, not isolated prefill benchmarks. The changed-image miss and later restoration of both variants verify image identity protection and safe slot supersession. Native RAM save/load logs also confirm restoration.
Five local checks passed, including compiled C++ prefix/image-identity and supersession checks. Authentication rejection, arithmetic, forced tool use, and vision smoke checks passed after deployment. Full-budget/1M-context cache soak and image slot persistence across restart were not tested by us.
Would be happy to provide the small RAM-only diff if useful; #331 already proposes the same core identity checks with persistent-slot support.
@mw00 commented on GitHub (Oct 28, 2026):
Fixed by @Cass67's #331: GLM's conversation slots now keep picture conversations too, so a chat with an image is restored after a switch instead of read again from the start (on our V100s a 3.6K-token picture conversation came back in 0.5 s instead of 8 s). Thanks for the clear report - closing.
Released in v1.1.35: https://github.com/mw00/project-maya/releases/tag/v1.1.35