Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ You may also wonder what the "--metadata" flag is doing. This flag helps export

Convert tokenizer for Llama 2
```
python -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
python -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
```
Rename tokenizer for Llama 3 with command: `mv tokenizer.model tokenizer.bin`. We are updating the demo app to support tokenizer in original format directly.

Expand Down
2 changes: 1 addition & 1 deletion examples/models/llama2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ You can export and run the original Llama 2 7B model.
```
4. Create tokenizer.bin.
```
python -m extension.llm.tokenizer.tokenizer -t <tokenizer.model> -o tokenizer.bin
python -m pytorch_tokenizers.tools.llama2c.convert -t <tokenizer.model> -o tokenizer.bin
```

Pass the converted `tokenizer.bin` file instead of `tokenizer.model` for subsequent steps.
Expand Down
2 changes: 1 addition & 1 deletion examples/models/phi-3-mini/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pip uninstall -y transformers ; pip install transformers==4.44.2
```
cd executorch
wget -O tokenizer.model "https://huggingface.co/microsoft/Phi-3-mini-128k-instruct/resolve/main/tokenizer.model?download=true"
python -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
python -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin
```
2. Export the model. This step will take a few minutes to finish.
```
Expand Down
2 changes: 1 addition & 1 deletion examples/qualcomm/oss_scripts/llama/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ wget "https://huggingface.co/karpathy/tinyllamas/resolve/main/stories110M.pt"
wget "https://raw.githubusercontent.com/karpathy/llama2.c/master/tokenizer.model"

# tokenizer.bin:
python -m extension.llm.tokenizer.tokenizer -t tokenizer.model -o tokenizer.bin
python -m pytorch_tokenizers.tools.llama2c.convert -t tokenizer.model -o tokenizer.bin

# params.json:
echo '{"dim": 768, "multiple_of": 32, "n_heads": 12, "n_layers": 12, "norm_eps": 1e-05, "vocab_size": 32000}' > params.json
Expand Down
Loading