Replies: 5 comments 2 replies
|
My settings are like yours, though I reduced the overall context size due to "only" having a 256GB mac. I'd hoped we'd be getting presets when new models like this came out. The settings below don't capture everything as they fall back to defaults for things like repetition, top_k, etc. I've set all of those to be disabled. I'd extend your question by asking what model to use. Thanks for this great project, Jundot! |
|
I profiled and optimized the DeepSeek V4 Flash 0731 prefill path against oMLX The comparison used the same existing official native mixed FP4/FP8 checkpoint, all native kernels enabled, unchanged DSpark/MTP settings, cache disabled, temperature 0, and repeated cold prompts. Results:
The patch is shape-gated to the measured DeepSeek V4 production paths. It combines faster MXFP4 dispatch, native compressed-attention routes, an indexer fast path when the entire pooled set fits under top-k, fused hyperconnection prefill expansion, and fused expert routing/block-plan construction. Code and reviewable diff:
I have not opened an upstream PR. If the maintainers are interested, I’m happy to rebase the focused patch onto the latest |
|
@DiscoStew6082, thank you for putting this together. The profiling and validation are thorough, and I appreciate that the patch stays focused on the measured production paths. The fused expert route-plan construction and indexer fast path are particularly well done. I tested the patch independently on the same M3 Ultra. With the official I found one deterministic output regression on the more aggressive oQ2.5 variant, so I would like the upstream review to include low-bit quantization coverage and per-path numerical tests. That does not take away from the quality of the work here. It is exactly the kind of edge case that is easier to sort out in a focused PR. Please open an upstream PR against the current |
|
Thank you — I’ll open a focused upstream draft PR from the validated branch and treat oQ2.5 parity as the first blocker. Could you share the exact oQ2.5 checkpoint, request/config, and expected deterministic output or hash you used? I’ll add that case plus per-path numerical coverage and the benchmark reproduction commands before marking the PR ready for merge. |
|
Draft PR filed: #2553 I downloaded
The fix derives a mandatory guard from DeepSeek V4 checkpoint metadata: sub-4-bit configs retain the upstream dense pooled-attention and compiled hyperconnection paths, while the other native MoE improvements remain enabled. I also restored the previous large-block threshold specifically for 2/3-bit affine kernels. Validation is 210/210 focused tests and 7,900 passed / 70 skipped / 74 deselected for the full suite. I left the PR as a draft for cross-chip review. Thanks again for the exact isolation details. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I am trying out the DeepSeek V4 Flash 0731 and I wonder what is the 'best' setup config for it in omlx?
Model: DeepSeek-V4-Flash-0731-oQ8e-mtp
My current setup:
CTX Window: 1048576 (Load Defaults)
Temperature: 1
Top P: 0.95
Max tokens: 384000 (recommended for high/max reasoning effort levels)
Enable Thinking: True
Lighting MTP: True
Chat Template Kwargs: REASONING_EFFORT max (not sure if I should click Force or not)
Something interesting
When I load and run it in the chat, I asked the model "What model are you?" and the response is Gemini which is not the same response if I asked DeepSeek V4 Flash online.
omlx chat:
online Deep Seek:
I don't know if it is because I have other models running at the same time (mlx-community/gemma-4-31B-it-qat-mxfp8 with VLM MTP mlx-community/gemma-4-31B-it-qat-assistant-mxfp8, jwindle47/chandra-ocr-2-8bit-mlx, mlx-community/Qwen3-Embedding-8B-4bit-DWQ) and causing the response to be different?
Fix? If I set the REASONING PARSER to deepseek_v4 (DeepSeek-V4) (Should I choose this option?)

Then the response is more closer, but not the knowledge cutoff date.

Performance Benchmarks
Sorry I'm new to LLM and I'm not sure what continuous batching tests mean... (like what this implies in application?).
How to get better performance?
System: M3 Ultra, 512 GB Memory, macOS Tahoe 26.5.1
oMLX version: v0.5.4
Resource Management
Memory guard: aggressive (True)
Hot Cache Limit (In-Memory Cache): 12% (61 GB)
Cold Cache Limit (SSD Cache): 20% (744 GB)
Max Concurrent Requests: 1 (set to 2 will drop the tg TPS by half or even worse)
Embedding Batch Size: 32
Chunked Prefill: False
Prefill Priority: Max Context
Ide Timeout: None (disabled)
Cache
Cache Enabled: True
Hot Cache Only: False
Advanced
Burst Decode: Aggressive (fastest)
Preserve Prefix Cache for Mid-Conversation System Notes: True
Initial Cache Blocks: 1024
SSE Keepalive Mode: Chunk (default, OpenClaw / WorkBuddy compatible)
I wonder if there are any resources recommended to learn all the terms, knowledge, VLM MTP, DFlash, MTP, Quantization, better resource management, reasoning parser, TurboQuant KV Cache, SpecPrefill, etc.? Like I really want to maximize the usage of the project and/or contribute more as I'm a beginner and not sure how to support the community.
Thank you for your patience and reading this entire message.
All reactions