Skip to content

setup: count the 3-bit models' 262K context against RAM, not a fixed 90 GB - #134

Closed
architectds wants to merge 1 commit into
Niko1221:mainfrom
architectds:pr/context-ram
Closed

architectds wants to merge 1 commit into
Niko1221:mainfrom
architectds:pr/context-ram

Conversation

@architectds

Copy link
Copy Markdown
Contributor

The second piece from #103, as you suggested.

setup.py cuts IQ3_S and IQ3_XXS asked for 262K down to 128K on any machine under 90 GB of RAM. With KV streaming, the context costs mostly RAM, so this PR counts the need instead: the experts' arena, plus the context's 8-bit KV (~13.7 KB a token, the same figure setup uses for --kv-resident), plus 24 GB of room for everything else.

RAM IQ3_XXS at 262K (needs 70.5 GB) IQ3_S at 262K (needs 77.9 GB)
64 GB PC (68.7 GB) 128K, as before 128K, as before
83.5 GiB box (89.6 GB) 262K (was cut to 128K) 262K (was cut to 128K)

Measured: a Colab A100-40G (83.5 GiB of RAM) runs IQ3_S at 262K with images in 56 GiB.

The check still only applies above 128K, and it still uses the 8-bit KV figure, because the KV precision is asked after the context. Nothing else changes.

…ixed 90 GB

IQ3_S and IQ3_XXS asked for 262K were cut to 128K on any machine under
90 GB of RAM. The limit is now counted: the experts' arena, plus the
context's 8-bit KV (in RAM with KV streaming, ~13.7 KB a token), plus
24 GB of room.

- A 64 GB PC still gets 128K for both models, as before.
- A box with ~84 GB keeps the 262K it asked for. A Colab A100-40G
  (83.5 GiB) runs IQ3_S at 262K, with images, in 56 GiB.
@Niko1221

Copy link
Copy Markdown
Owner

Thanks @architectds. Counting what's needed is the right rule, 64 GB PCs keep what they had, and it merges cleanly onto 0.1.26. I'll merge after a quick dry run of the setup paths.

@Niko1221

Copy link
Copy Markdown
Owner

Released in 0.1.29: the 3-bit models' 262K counted against RAM. Merged under your name (cherry-picked, so GitHub doesn't show it as merged). Thank you!

@Niko1221 Niko1221 closed this Sep 30, 2026
@architectds
architectds deleted the pr/context-ram branch October 2, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants