-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch split task to token based splitting (#283)
Co-authored-by: Chris Jarrett <[email protected]> Co-authored-by: Devin Robison <[email protected]>
- Loading branch information
1 parent
766f35d
commit 6960827
Showing
25 changed files
with
431 additions
and
471 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
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
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,15 @@ | ||
import os | ||
from transformers import AutoTokenizer | ||
|
||
if os.getenv("DOWNLOAD_LLAMA_TOKENIZER") == "True": | ||
tokenizer_path = "/workspace/models/llama-3.2-1b/tokenizer/" | ||
os.makedirs(tokenizer_path) | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-1B", token=os.getenv("HF_ACCESS_TOKEN")) | ||
tokenizer.save_pretrained(tokenizer_path) | ||
else: | ||
tokenizer_path = "/workspace/models/e5-large-unsupervised/tokenizer/" | ||
os.makedirs(tokenizer_path) | ||
|
||
tokenizer = AutoTokenizer.from_pretrained("intfloat/e5-large-unsupervised") | ||
tokenizer.save_pretrained(tokenizer_path) |
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
Oops, something went wrong.