mlx-examples icon indicating copy to clipboard operation
mlx-examples copied to clipboard

mlx_lm support for Bloom models

Open psambit9791 opened this issue 11 months ago • 1 comments

Thanks for building the mlx_lm library - it is absolutely great to work with this.

I was trying to work with this huggingface model: bigscience/bloom-560m (Link: https://huggingface.co/bigscience/bloom-560m) and while trying to convert using the mlx_lm.convert() command, I encountered this error:

Traceback (most recent call last):
  File "<path>/venv/lib/python3.10/site-packages/mlx_lm/utils.py", line 123, in _get_classes
    arch = importlib.import_module(f"mlx_lm.models.{model_type}")
  File "<path>/.pyenv/versions/3.10.13/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mlx_lm.models.bloom'

Is there any plan to add support for bloom models?

psambit9791 avatar Jan 02 '25 21:01 psambit9791

It's not exactly on the roadmap.. but we would be happy to accept it as a contribution.

awni avatar Jan 02 '25 21:01 awni