You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is --kv option applies at all for Inkling 2 Mini?
#407
Recently I found a bug in setup script, it didn't allow any --kv settings for Inkling model, just dropping off this option. I was told to use --kv in .json config directly (what I did) and that didn't bring any errors (which I was glad of) but then I've noticed - nothing has changed in memory consumption. Same expert count (~850), same VRAM for experts (3.5-3.6 Gb), and I didn't change context size (32k) between runs. So, is kv quantization even working? Maybe it's the case where I'm trying to set it to q8_0 and it's already there by default? It could've explain the similar memory use.
Yes, Inkling 2 Mini uses --kv q8_0, and it isn't the default: that's fp16 on your card. But an expert count of about 850 at startup can't tell you which one is active. This is unconfirmed static analysis of v0.2.20-poly.8. I haven't run the model.
Memory: with q8_0, a K or V row takes 1,088 bytes instead of 2,048. By default on CUDA, though, the full-attention caches start at 4,096 rows, not 32K, and grow later, taking VRAM from the experts when it's short. Going by the base model's config, those caches take 128 MiB (fp16) or 68 MiB (q8_0) at load, and 1,000 or 531 MiB at 32,000 tokens, before allocation rounding. The sliding-window caches are quantized too, but rounding may hide that saving at startup.
Check: while it's running, ps -C strata-poly -o args= should show --kv q8_0. You can also add "STRATA_KV_INT8": "1" to the config's "env" for one start. The log should then say on the q8_0 cache, or the cache is not q8_0 if it isn't active. Remove it afterwards, because it also changes how attention is computed.
To see the difference, add "--kv-whole" to "args" for one run with each format. It allocates the full-attention caches at load, so you can compare N of 3072 routed experts in VRAM in the log.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Recently I found a bug in setup script, it didn't allow any --kv settings for Inkling model, just dropping off this option. I was told to use --kv in .json config directly (what I did) and that didn't bring any errors (which I was glad of) but then I've noticed - nothing has changed in memory consumption. Same expert count (~850), same VRAM for experts (3.5-3.6 Gb), and I didn't change context size (32k) between runs. So, is kv quantization even working? Maybe it's the case where I'm trying to set it to q8_0 and it's already there by default? It could've explain the similar memory use.
All reactions