Does this work for everyone? It seems to have a bug for me ...
model, tokenizer = load("mlx-community/Meta-Llama-3-120B-Instruct-4bit")
ValueError Traceback (most recent call last)
Cell In[5], line 1
----> 1 model, tokenizer = load("mlx-community/Meta-Llama-3-120B-Instruct-4bit")
File /opt/homebrew/Caskroom/miniconda/base/envs/play/lib/python3.11/site-packages/mlx_lm/utils.py:384, in load(path_or_hf_repo, tokenizer_config, adapter_path, lazy)
363 """
364 Load the model and tokenizer from a given path or a huggingface repository.
365
(...)
380 ValueError: If model class or args class are not found.
381 """
382 model_path = get_model_path(path_or_hf_repo)
--> 384 model = load_model(model_path, lazy)
385 if adapter_path is not None:
386 model = apply_lora_layers(model, adapter_path)
File /opt/homebrew/Caskroom/miniconda/base/envs/play/lib/python3.11/site-packages/mlx_lm/utils.py:348, in load_model(model_path, lazy)
338 class_predicate = (
339 lambda p, m: isinstance(m, (nn.Linear, nn.Embedding))
340 and f"{p}.scales" in weights
341 )
342 nn.quantize(
343 model,
344 **quantization,
...
226 )
228 self.update(tree_unflatten(weights))
229 return self
ValueError: Expected shape (28672, 1024) but received shape (14336, 4096) for parameter model.layers.9.mlp.up_proj.weight