-
Notifications
You must be signed in to change notification settings - Fork 0
Add RotorQuant KV cache backend with deferred prefill on Metal #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4557598
53a0907
9c93b6e
ff21598
f40e9d4
aba98c2
8545421
032593b
f587d2b
a43ed82
7ba35fc
f41b97d
3d526b7
3100207
bae6455
c5ec472
13a5f47
04893db
6c4ba6f
d612d14
a50a537
856b30f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -449,16 +449,22 @@ export function SettingsPanel({ open, onClose }: SettingsPanelProps) { | |
| filled | ||
| content={ | ||
| `• Default — No cache quantization. Best baseline quality, highest memory use.\n` + | ||
| `• OptiQ — Rotation-based quantization via mlx-optiq. Best long-context quality.\n` + | ||
| `• OptiQ — Rotation-based quantization via mlx-optiq. Good long-context quality, no GQA support.\n` + | ||
| `• TurboQuant Adaptive — Quantizes middle KV layers, keeps edge layers in FP16. Proven stable.\n` + | ||
| `• TurboQuant — Quantizes all KV layers. Most aggressive compression, higher quality risk.\n` + | ||
| `• TurboQuant — Quantizes all KV layers. Most aggressive non-OptiQ compression.\n` + | ||
| `• MLX Quantized — MLX's built-in cache quantization.\n\n` + | ||
| `Takes effect on next model launch. Incompatible models fall back to Default automatically.` | ||
| `RotorQuant/IsoQuant is hidden from normal settings because it is experimental and must be enabled with SKULK_ENABLE_EXPERIMENTAL_ROTORQUANT=1.` | ||
| } | ||
|
Comment on lines
451
to
457
|
||
| /> | ||
| </FieldLabel> | ||
| <Select value={kvBackend} onChange={(e) => setKvBackend(e.target.value)} disabled={!!envOverride}> | ||
| <option value="default">Default (no quantization)</option> | ||
| {kvBackend === 'rotorquant_adaptive' ? ( | ||
| <option value="rotorquant_adaptive">RotorQuant Adaptive (experimental, env-gated)</option> | ||
| ) : null} | ||
| {kvBackend === 'rotorquant' ? ( | ||
| <option value="rotorquant">RotorQuant (experimental, env-gated)</option> | ||
| ) : null} | ||
| <option value="optiq">OptiQ (rotation-based)</option> | ||
| <option value="turboquant_adaptive">TurboQuant Adaptive</option> | ||
| <option value="turboquant">TurboQuant</option> | ||
|
|
@@ -467,7 +473,7 @@ export function SettingsPanel({ open, onClose }: SettingsPanelProps) { | |
| {envOverride ? ( | ||
| <HintText>Overridden by SKULK_KV_CACHE_BACKEND environment variable. Remove the env var to configure here.</HintText> | ||
| ) : ( | ||
| <HintText>Changes take effect on the next model launch. Models with incompatible architectures (GQA, non-power-of-two head_dim) will automatically fall back to default.</HintText> | ||
| <HintText>Changes take effect on the next model launch. RotorQuant is experimental and intentionally unavailable from normal settings.</HintText> | ||
| )} | ||
|
Comment on lines
474
to
477
|
||
| </Fieldset> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bullet links to
docs/kv-cache-backends.md, but that page currently doesn’t mention RotorQuant (it still lists only default/mlx_quantized/turboquant/optiq). Either updatedocs/kv-cache-backends.mdin this PR to include RotorQuant, or change the link to the up-to-date page underwebsite/docs/kv-cache-backends.md/ the published docs URL so readers don’t land on stale information.