Repository navigation
Fit near-full cards: shrink, drop dual-copy, fix quant/OOM units - #185
Merged
Merged
Conversation
Marlin dual-copy was counted as steady VRAM and refused 27B NVFP4 on a 32 GB card that runs it after auto-shrink. Registry --quantization modelopt_fp4 also aborted compressed-tensors checkpoints at startup.
Keep Marlin in the weight budget (measured ~30 GB resident) but raise mem_fraction to 0.99 and skip the 1.5+1.8 padding when weights already fill the card and KV has been shrunk away — matching SGLang's own floor.
Marlin's second weight copy left no KV/mamba room on full cards; plan without it (GOETHE_MARLIN=0) when that yields a better or only placement, and allow mem_fraction up to 1.0. Remove the near-full padding bypass that falsely allowed oversubscribed loads.
Torch OOM lines report MiB; treating them as GiB inflated learned weights into hundreds of GB. Prefill graph capture also OOMs after a near-full static pool, so disable it automatically when mem_fraction is high.
peti12352
force-pushed
the
fit-nvfp4-auto
branch
from
November 19, 2026 00:18
bf687e1 to
3066878
Compare
Prefill capture lives outside the static pool and OOMs on tight cards — decode graphs are enough. Also skip the bare-weight replan when the dual-copy plan already meets the asked ctx/concurrency.
peti12352
force-pushed
the
fit-nvfp4-auto
branch
from
November 19, 2026 00:20
3066878 to
2988e04
Compare
Tighten calc shortfall asserts under mem_fraction=1.0 and exercise planner shapes (roomy/tight/foreign/empty/partial) plus drop_quantization across common quant_method values without needing a live GPU.
With mem_fraction capped at 1.0 the static-pool shortfall path never bound; margin already covers it. Lint-clean the CPU fit tests.
Fit stays scan+card only; leave engine_overhead learning untouched for a separate decision.
One helper converts the allocate/free figures to GB so MiB lines stop inflating learned static VRAM; same DB learn path as before.
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.
Summary
GOETHE_MARLIN=0) only if that places better or is the only fit.mem_fractionmay hit 1.0. Dead pool-cap branch removed.--quantizationwhenconfig.jsonalready hasquant_method.Test plan
quant_methods; mem_fraction=1.0; OOM MiB→GB