Repository navigation
feat(vision): --vision-offload keeps the CUDA image tower in host RAM between images - #187
Closed
barelyworkingcode wants to merge 3 commits into
Closed
barelyworkingcode wants to merge 3 commits into
barelyworkingcode wants to merge 3 commits into
Conversation
… between images With --vision on a 24 GB card the resident tower plus a fixed 4 GiB workspace reserve cut the window sharply. --vision-offload keeps the tower on the host, copies it to the GPU only while an image is encoded, and reserves 2.25 GiB (the tower plus the largest accepted image's activations) instead of the tower plus 4 GiB. Default behaviour is unchanged. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
capacity_geometry keeps upstream's workspace argument; offload is a keyword. Offload also skips the external-weights charge, and warm() moves the tower to the GPU the same way encode() does.
Owner
|
This is in TensorFold 0.6.3, with your commit under your name in the release history: https://github.com/ashhart/TensorFold/releases/tag/v0.6.3
Thank you, @barelyworkingcode! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(vision):
--vision-offloadkeeps the CUDA image tower in host RAM between imagesRefs #185. Opt-in; default behaviour is byte-for-byte unchanged.
--vision-offload(needs--vision, CUDA only; refused otherwise).encodecopies the tower to the GPU under a lock, runs, copies it back and callstorch.cuda.empty_cache().OFFLOAD_WORKSPACE_BYTES = 2.25 GiBinstead ofWORKSPACE_BYTES = 4 GiB.test_offloaded_tower_leaves_the_gpu_budget_but_keeps_a_smaller_workspace,test_vision_offload_is_a_cuda_option_that_needs_vision; the existing vision and CLI tests pass (72).docs/vision.md.Measured (one RTX 4090, Qwen3.8-27B EXL3 3.50bpw + DFlash2,
TENSORFOLD_MEMORY_RESERVE_GIB=2): largest window with--vision11,922 -> 38,686 tokens. Served at 38,000: 1024x768 and 3840x2160 images (4,143 prompt tokens) read correctly; GPU peak 1.3 GB over idle on the large image; a 24k-token prompt plus the large image ran with a 19.6 GB peak and no errors.Not tested: two-rank CUDA, concurrent image requests (the lock serializes them), the 2.25 GiB figure on other cards.
This branch does not include the EXL3 null-bias fix (separate PR); my 4090 test used both.
🤖 Generated with Claude Code