Add usage instructions

#2
by pcuenq HF staff - opened
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -15,6 +15,20 @@ Llama 2 is a collection of pretrained and fine-tuned generative text models rang
15
 
16
  Weights have been converted to `float16` from the original `bfloat16` type, because `numpy` is not compatible with `bfloat16` out of the box.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  Please, refer to the [original model card](https://huggingface.co/meta-llama/Llama-2-7b/tree/main) for details on Llama 2.
19
 
20
 
 
15
 
16
  Weights have been converted to `float16` from the original `bfloat16` type, because `numpy` is not compatible with `bfloat16` out of the box.
17
 
18
+ ```bash
19
+ # Install mlx, mlx-examples, huggingface-cli
20
+ pip install mlx
21
+ pip install huggingface_hub hf_transfer
22
+ git clone https://github.com/ml-explore/mlx-examples.git
23
+
24
+ # Download model
25
+ export HF_HUB_ENABLE_HF_TRANSFER=1
26
+ huggingface-cli download --local-dir Llama-2-7b-mlx mlx-llama/Llama-2-7b-mlx
27
+
28
+ # Run example
29
+ python mlx-examples/llama/llama.py Llama-2-7b-mlx/llama-2-7b.npz Llama-2-7b-mlx/tokenizer.model "My name is "
30
+ ```
31
+
32
  Please, refer to the [original model card](https://huggingface.co/meta-llama/Llama-2-7b/tree/main) for details on Llama 2.
33
 
34