Open JoaoLages opened 1 year ago
Hi Joao, Great idea! If I find some spare time, I’ll try to add it!
In the meantime, you might want to try to tokenize with AutoTokenizer or Sentencpiece . Also try just to input a List[int] of token_ids?
Just got it to work! It has to be a list of the tokens in str!
for x in model.model.generate_tokens(model.tokenizer.tokenize("What is love?")):
pass
Hi there! Thank you so much for your awesome work in this package and the open-source contributions 💪
I'm interested in having access to the native
ctranslate2.Generator.generate_tokens
method 👀I'm using this code snippet:
but the output is garbage 🚮
What am I doing wrong here? 🤔