[GG] loader: add explicit InstantTensor borrowed-buffer mode - #281
lukealonso merged 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Add an explicit, opt-in InstantTensor borrowed-buffer mode for large model
loads.
INSTANTTENSOR_COPY=0forwardscopy=Falsetosafe_open; the defaultremains the existing owned-copy behavior.
Why
The R7 EXL3 checkpoint is close enough to the per-rank memory ceiling that an
extra loader-owned copy can OOM before quantized weights finish preparation.
InstantTensor already supports borrowed buffers, but vLLM did not expose that
contract and therefore always requested copied tensors.
Contract
INSTANTTENSOR_COPY=1is the default and preserves current behavior;INSTANTTENSOR_COPY=0requests borrowed tensors and marks each yielded tensorwith
_vllm_instanttensor_borrowed=True;retains one beyond the yield must materialize owned storage;
0or1fail immediately with a clear error.This PR deliberately does not change InstantTensor's default or the model
quantization runtime.
Validation
invalid configuration;
LOAD_FORMAT=instanttensor, BUFFERED backend, andINSTANTTENSOR_COPY=0;prompt-logprob, and correctness smoke tests;
git diff --check: pass.