Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training fails for Mistral 7B #1

Open
bengrine opened this issue May 20, 2024 · 0 comments
Open

Training fails for Mistral 7B #1

bengrine opened this issue May 20, 2024 · 0 comments

Comments

@bengrine
Copy link

python run.py --train --model ./Mistral-7B-v0.1 --data ./data --batch-size 1 --lora-layers 4 fails with the following error:

Loading pretrained model Traceback (most recent call last): File "/Users/Tony/Devel/qlora-mlx/run.py", line 153, in <module> model, tokenizer, train_set, valid_set, test_set = initilize_converted_model(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Tony/Devel/qlora-mlx/run.py", line 20, in initilize_converted_model model, tokenizer, _ = lora_utils.load(args.model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Tony/Devel/qlora-mlx/utils.py", line 137, in load model.load_weights(list(weights.items())) File "/Users/Tony/opt/miniconda3/envs/AppleMLX2/lib/python3.11/site-packages/mlx/nn/layers/base.py", line 215, in load_weights raise ValueError( ValueError: Expected shape (4096, 512) but received shape (4096, 4096) for parameter model.layers.0.self_attn.q_proj.weight

Running on Intel Mac Pro 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant