mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #288] [CLOSED] strata-vision: --flash-attn switch, CPU runs without a CUDA context or warm-up; relative vision paths #2554
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#2554
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/288
Author: @sergqwer
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/vision-cpu📝 Commits (1)
8f8bbc7strata-vision: --flash-attn on|off|auto; on the CPU no CUDA context, no warm-up, a thread per core📊 Changes
2 files changed (+31 additions, -5 deletions)
View changed files
📝
serve/server.py(+5 -2)📝
tools/vision/strata_vision.cpp(+26 -3)📄 Description
Summary
Four small changes to the image encoder and its config:
--flash-attn on|off|auto(mtmd'sflash_attn_type). Flash attention keeps K and V in FP16. On the NVFP4 forkthe vision tower's output was 11.2% off with it on the GPU, and 0.1% with FP32 attention on the CPU. The
default stays
auto; the switch makes the choice possible.GPU: 0.4-0.7 GB of VRAM, 150-260 expert slots less for the engine beside it. It now hides the GPU
(
CUDA_VISIBLE_DEVICES=-1before the runtime starts).--threads, the CPU encoder uses one thread per core (mtmd's default is 4), andit skips the warm-up encode (~6 s of start at 1,024 image tokens).
serve/server.py, relativeexe,mmprojandmodelpaths in the vision config nowresolve against the config's
cwd, as the engine's paths already do.Measured
On the NVFP4 fork with an FP32 mmproj on the CPU: 2-6 s per picture, and no VRAM taken from the expert cache.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.