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
Fixes the `Qwen3-Embedding-4B-4bit-DWQ` all-NaN embedding bug (P@1 0.200
→ 1.000 on the 25-prompt labeled-corpus quality eval). MLX's DWQ rebuild
ships scales/biases as BF16 instead of the original AFFINE F16 convention;
the embedding loader was reading both as F16, which silently misinterpreted
the 5-vs-8-bit exponent layout and propagated NaN through every projection.
Loader now dispatches on the safetensors dtype and handles both formats.
Other user-visible changes:
- Configurable default `max_tokens` in the CONTEXT card (schema v6 → v7).
Was hardcoded server-side at 2048 for any chat/completion request that
omitted the field; now mirrors a UI input via `LUMEN_DEFAULT_MAX_TOKENS`.
Existing configs migrate stamped at 2048 so behavior is preserved.
- `scan_local` now strictly matches the HuggingFace repo-id grammar
(`[A-Za-z0-9._-]+`). Filters Finder duplicates (`mlx-community--…-8bit 2`)
and other scratch dirs so the periodic update check stops emitting 401
Unauthorized log lines for repo ids that aren't real.
Under-the-hood (no catalog recommendation yet):
- Full MXFP8 (OCP) Metal kernel — E4M3 elements + E8M0 byte scales,
group_size=32, no biases. Naive + qmv_fast cooperative simdgroup
variants; GPU↔CPU bit-identical parity on random inputs. Loader path
+ `QuantProj::M8` wired through so a future `mxfp8` catalog entry
works end-to-end without further plumbing. Validated against
`mlx-community/Qwen3-Embedding-4B-mxfp8` (P@1 = 1.000, mean cosine
0.948 vs the DWQ 4B reference) — implementation is correct but DWQ is
faster (2.8×) and uses half the memory at equivalent quality, so the
catalog stays DWQ-only for the 4B slot.
"Stacks with TurboQuant — sliding bounds which tokens are kept, TurboQuant compresses how they're stored.",
184
185
"context.hint.prefill":
185
186
"Prompt-processing chunk cap. Server rejects prompts longer than this with a \"prompt too large\" error. Larger = accepts long prompts but more peak memory during prefill (attention QK·T = chunk × KV",
187
+
"context.hint.defaultMaxTokens":
188
+
"Generation budget applied to OpenAI-compatible chat / completion requests that omit `max_tokens`. Request bodies that explicitly set `max_tokens` always win — this is only the server-side fallback.",
186
189
187
190
// ── SERVER memory explainer ─────────────────────────────────────
0 commit comments