Skip to content

Commit c09f587

Browse files
authored
Update 4-Prepare-LLaMA-models.md
1 parent 9ed4622 commit c09f587

File tree

1 file changed

+7
-7
lines changed
  • content/learning-paths/smartphones-and-mobile/Build-Llama3-Chat-Android-App-Using-Executorch-And-XNNPACK

1 file changed

+7
-7
lines changed

content/learning-paths/smartphones-and-mobile/Build-Llama3-Chat-Android-App-Using-Executorch-And-XNNPACK/4-Prepare-LLaMA-models.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ layout: learningpathall
88

99
## Download and export the Llama 3.2 1B model
1010

11-
To get started with Llama 3, you can obtain the pre-trained parameters by visiting [Meta's Llama Downloads](https://llama.meta.com/llama-downloads/) page. Request access by filling out your details, and read through and accept the Responsible Use Guide. This grants you a license and a download link which is valid for 24 hours. The Llama 3.2 1B model is used for this exercise, but the same instructions apply to other options as well with minimal modification.
11+
To get started with Llama 3, you can obtain the pre-trained parameters by visiting [Meta's Llama Downloads](https://llama.meta.com/llama-downloads/) page. Request access by filling out your details, and read through and accept the Responsible Use Guide. This grants you a license and a download link which is valid for 24 hours. The Llama 3.2 1B Instruct model is used for this exercise, but the same instructions apply to other options as well with minimal modification.
1212

1313
Install the `llama-stack` package from `pip`.
1414
```bash
1515
pip install llama-stack
1616
```
1717
Run the command to download, and paste the download link from the email when prompted.
1818
```bash
19-
llama model download --source meta --model-id Llama3.2-1B
19+
llama model download --source meta --model-id Llama3.2-1B-Instruct
2020
```
2121

2222
When the download is finished, the installation path is printed as output.
2323
```output
24-
Successfully downloaded model to /<path-to-home>/.llama/checkpoints/Llama3.2-1B
24+
Successfully downloaded model to /<path-to-home>/.llama/checkpoints/Llama3.2-1B-Instruct
2525
```
2626

2727
Verify by viewing the downloaded files under this path:
2828

2929
```bash
30-
ls $HOME/.llama/checkpoints/Llama3.2-1B
30+
ls $HOME/.llama/checkpoints/Llama3.2-1B-Instruct
3131
checklist.chk consolidated.00.pth params.json tokenizer.model
3232
```
3333

@@ -39,10 +39,10 @@ Export model and generate `.pte` file. Run the Python command to export the mode
3939

4040
```bash
4141
python3 -m examples.models.llama.export_llama \
42-
--checkpoint $HOME/.llama/checkpoints/Llama3.2-1B/consolidated.00.pth \
43-
--params $HOME/.llama/checkpoints/Llama3.2-1B/params.json \
42+
--checkpoint $HOME/.llama/checkpoints/Llama3.2-1B-Instruct/consolidated.00.pth \
43+
--params $HOME/.llama/checkpoints/Llama3.2-1B-Instruct/params.json \
4444
-kv --use_sdpa_with_kv_cache -X --xnnpack-extended-ops -qmode 8da4w \
45-
--group_size 256 -d fp32 \
45+
--group_size 64 -d fp32 \
4646
--metadata '{"get_bos_id":128000, "get_eos_ids":[128009, 128001, 128006, 128007]}' \
4747
--embedding-quantize 4,32 \
4848
--output_name="llama3_1B_kv_sdpa_xnn_qe_4_128_1024_embedding_4bit.pte" \

0 commit comments

Comments
 (0)