Assistance to run phi-2

#9
by sasidhar92 - opened
MLX Community org

Hello, I am getting this error when I am trying to run phi-2. Can you help?

Users/thisdev/.env/lib/python3.9/site-packages/urllib3/init.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
Traceback (most recent call last):
File "/Users/thisdev/mlx-examples/llms/phi2/phi2.py", line 198, in
model, tokenizer = load_model(args.model_path)
File "/Users/thisdev/mlx-examples/llms/phi2/phi2.py", line 161, in load_model
weights = mx.load(str(model_path / "weights.npz"))
RuntimeError: [load] Failed to open file weights.npz

MLX Community org

Are you sure you downloaded the weights file?

MLX Community org

Yes. I can see the 5.56Gb file in the phi2 folder

hi @sasidhar92 ,

can you please make sure you running the command python llms/phi2/phi2.py --prompt "My name is" from /mlx-examples
and your model is located /mlx-examples/phi2 , or you have the option to pass the model path
python llms/phi2/phi2.py --prompt "My name is" --model-pat ./mlx-examples/phi2 whenever it is located

MLX Community org

Hello! this helped. Than you

sasidhar92 changed discussion status to closed

Sign up or log in to comment