forked from OptimalScale/LMFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-pi-readme
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Train & Merge Tokenizer | ||
To automatically convert data, train a SentencePiece tokenizer, and merge the tokenizer, you can run the following script: | ||
``` | ||
bash scripts/vocab_extension/train_merge_tokenizer.sh | ||
``` | ||
Alternatively, you can run each of the three steps separately: | ||
|
||
# Convert JSON Data to TXT | ||
To convert JSON data to TXT for sentencepiece tokenizer training, run: | ||
``` | ||
bash scripts/vocab_extension/convert_json_to_txt.sh | ||
``` | ||
# Train SentencePiece Tokenizer | ||
To train a SentencePiece tokenizer, run: | ||
``` | ||
bash scripts/vocab_extension/train_tokenizer.sh | ||
``` | ||
# Merge New Tokenizer with the Origin One | ||
To merge a new tokenizer with the original one, run: | ||
``` | ||
bash scripts/vocab_extension/merge_tokenizer.sh | ||
``` |