Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move tokenizer model to third party llama2 #27

Merged
merged 1 commit into from
Apr 3, 2024
Merged
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
3 changes: 1 addition & 2 deletions jetstream/tests/engine/test_token_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def decode(self, t: int) -> str:

class TokenUtilsTest(unittest.TestCase):
def setup(self):
tokenizer_path = "tokenizer.model"
tokenizer_path = "third_party/llama2/tokenizer.model"
current_dir = os.path.dirname(__file__)
tokenizer_path = os.path.join(current_dir, tokenizer_path)
print(f"model_path: {tokenizer_path}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit outside of this change: Should probably be renamed to tokenizer_path.

Also typos in comments above "Tokenier" -> "Tokenizer"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Pate! there could be more data set from llama2. Keep it as "third_party/llama2"

Expand All @@ -61,7 +61,6 @@ def test_decode_vs_piece(self):
tokens = [304, 13, 2266, 526, 777, 9590, 2020, 29901]
expeted_sp_output = []
jt_output = []
print(f"jt_output: {jt_output}")
for t in tokens:
expeted_sp_output.append(self.sp_tokenizer.decode([t]))
jt_output.append(self.jt_tokenizer.decode(t))
Expand Down
Loading