Elffuss BraidHub

kikocis/mlx-vlm public

add lazy eval during conversion (#127)

Changeset89249a5c3a563230f6391f582a5b04c32fe771e75b8b974b452c0e13a9986098
AuthorPrince Canuma <prince.gdt@gmail.com> · 2024-11-27 03:30 +01:00
CommitterGitHub <noreply@github.com> · 2024-11-27 03:30 +01:00
Parents568a6e7a774f

Browse the files at this changeset

1 file changed

modified mlx_vlm/utils.py +1 −1
@@ -728,7 +728,7 @@
728728 ):
729729 print("[INFO] Loading")
730730 model_path = get_model_path(hf_path, revision=revision)
731- model, config, processor = fetch_from_hub(model_path, lazy=False)
731+ model, config, processor = fetch_from_hub(model_path, lazy=True)
732732
733733 weights = dict(tree_flatten(model.parameters()))
734734 dtype = mx.float16 if quantize else getattr(mx, dtype)