Add topK, minP and penalty parameters to GenerateParameters#141
Add topK, minP and penalty parameters to GenerateParameters#141davidkoski merged 1 commit intoml-explore:mainfrom
Conversation
|
@davidkoski could you re-run the tests? Looks like |
Yes, this is #128 . Rerunning! |
Thanks! |
davidkoski
left a comment
There was a problem hiding this comment.
Changes look good, thank you!
Proposed changes
The Swift
func GenerateParametershas been lacking some parameters compared to Python mlx-lm. This is an attempt to add more parameters using mlx_lm/sample_utils.py as reference.Motivated mainly by the new Qwen 3.5 models recommending more parameters for inference.
Example from https://huggingface.co/Qwen/Qwen3.5-4B:
Hard to correctly test in real world but here some examples I have used:
Would appreciate a review from someone more knowledgeable than me on the subject, making sure no regression and correct implementation.
Checklist
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes