Skip to content

Issue with converting and quantising deepseek-ai/DeepSeek-R1-Distill-Llama-8B #703

@jaycoolslm

Description

@jaycoolslm

I've tried various mlx_lm.convert configs to manually convert this deepseek model, but always the output seems to be partial gibberish which isn't decoded propertly.

Things I've tried:

mlx_lm.convert \                                                                                                                        ✔
  --hf-path deepseek-ai/DeepSeek-R1-Distill-Llama-8B \
  --mlx-path ./output_models/deepseek_r1_llama8b \
  -q

mlx_lm.convert \                                                                                                                        ✔
  --hf-path deepseek-ai/DeepSeek-R1-Distill-Llama-8B \
  --mlx-path ./output_models/deepseek_r1_llama8b_mxfp4 \
  -q --q-mode mxfp4 --q-bits 4 --q-group-size 32 \
  --trust-remote-code


mlx_lm.convert \                                                                                                                        ✔
  --hf-path deepseek-ai/DeepSeek-R1-Distill-Llama-8B \
  --mlx-path ./output_models/deepseek_r1_llama8b_affine \
  -q --q-mode affine --q-bits 4 --q-group-size 64 \
  --trust-remote-code

And the generated response generally looks like this:

>> hey there
ĊĊ</think>ĊĊHello!ĠHowĠcanĠIĠassistĠyouĠtoday?ĠðŁĺĬ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions