Skip to content

v0.3.19

Choose a tag to compare

@codelion codelion released this 05 Jul 02:19
6a0200c

What's Changed

Fix: import optillm crash on macOS with transformers 5.13 (#316)

A fresh install on Apple silicon crashed with AttributeError: 'str' object has no attribute '__module__' at import optillm.

  • Root cause: transformers 5.13.0 tightened AutoTokenizer.register() to require a class, but mlx-lm 0.31.3 registers a custom tokenizer by string name (tokenizer_utils.py: AutoTokenizer.register("NewlineTokenizer", ...)). transformers ≤5.12.1 tolerated it.
  • macOS-only: optillm installs mlx-lm only on Apple silicon (platform_machine=="arm64" and sys_platform=="darwin"); Linux CI never installs it, so CI was unaffected.
  • Fix: pin transformers>=5.0.0,<5.13.0 (resolves to 5.12.1). The transformers 5.13.0 HF path itself is fine (dhara loads and generates); the incompatibility is purely mlx-lm's. Lift the cap once mlx-lm ships a transformers-5.13-compatible release.

Full Changelog: v0.3.18...v0.3.19