Skip to content

Commit

Permalink
Update tokenizer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshuPurohit committed Mar 9, 2023
1 parent ad7af96 commit 50d3e6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions megatron/tokenizer/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,11 @@ def eod(self):

class TiktokenTokenizer(AbstractTokenizer):
"""Tokenizer from OpenAI's tiktoken implementation"""
try:
import tiktoken
except ModuleNotFoundError:
print("Please install tiktoken: (https://github.com/openai/tiktoken)")
raise Exception
try:
import tiktoken
except ModuleNotFoundError:
print("Please install tiktoken: (https://github.com/openai/tiktoken)")
raise Exception

def __init__(self, vocab_file):
name = "TiktokenTokenizer"
Expand Down

0 comments on commit 50d3e6c

Please sign in to comment.