fix(admin): clarify DFlash draft quantization option + FP16 draft model boost#880
Open
deepsweet wants to merge 1 commit intojundot:mainfrom
Open
fix(admin): clarify DFlash draft quantization option + FP16 draft model boost#880deepsweet wants to merge 1 commit intojundot:mainfrom
deepsweet wants to merge 1 commit intojundot:mainfrom
Conversation
7844f15 to
b078330
Compare
Author
|
Qwen3.6-27B is pretty tough for my M2 Max 64GB MacBook in general, but here are the results. No DFlash: DFlash + DFlash + Have also re-uploaded Qwen3.6-35B-A3B-DFlash-FP16 after the original model got updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi.
Rationale
Currently DFlash "draft quantization" values are the following:
omlx/omlx/admin/templates/dashboard/_modal_model_settings.html
Lines 636 to 638 in 9a095cd
However under the hood it all gets cast into boolean:
omlx/omlx/engine/dflash.py
Lines 94 to 101 in 9a095cd
So the empty "default" becomes
falseand any other value becomestrue, and in this format it goes directly to the dflash-mlx.Which in turn checks for the boolean:
https://github.com/bstnxbt/dflash-mlx/blob/f825ffb268e50d531e8b6524413b0847334a14dd/dflash_mlx/runtime.py#L229-L233
And then hardcodes any
truevalue into 4-bit quantization whatsoever:https://github.com/bstnxbt/dflash-mlx/blob/f825ffb268e50d531e8b6524413b0847334a14dd/dflash_mlx/runtime.py#L769-L771
Proposal
Because actually… FP16 for a draft model strikes again and works as expected on M1/M2 Apple Silicon.
dflash_mlx seem to support it just fine.
DFlash FP16
No DFlash:
DFlash +
DFLASH_MAX_CTX=32768+ default BF16 draft model:DFlash +
DFLASH_MAX_CTX=32768+ my converted to FP16 draft model:DFLASH_MAX_CTX=32768is there just as a reminder that DFlash noticeable degrades on large context, so the default4096value, and maybe8192in some cases, is the sweet spot.Closes #993.