Tokenizers should be framework agnostic (#8599)
* Tokenizers should be framework agnostic * Run the slow tests * Not testing * Fix documentation * Apply suggestions from code review Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com> Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
This commit is contained in:
@@ -58,7 +58,7 @@ tiny_model = FSMTForConditionalGeneration(config)
|
||||
print(f"num of params {tiny_model.num_parameters()}")
|
||||
|
||||
# Test
|
||||
batch = tokenizer.prepare_seq2seq_batch(["Making tiny model"])
|
||||
batch = tokenizer.prepare_seq2seq_batch(["Making tiny model"], return_tensors="pt")
|
||||
outputs = tiny_model(**batch)
|
||||
|
||||
print("test output:", len(outputs.logits[0]))
|
||||
|
||||
@@ -29,7 +29,7 @@ tiny_model = FSMTForConditionalGeneration(config)
|
||||
print(f"num of params {tiny_model.num_parameters()}")
|
||||
|
||||
# Test
|
||||
batch = tokenizer.prepare_seq2seq_batch(["Making tiny model"])
|
||||
batch = tokenizer.prepare_seq2seq_batch(["Making tiny model"], return_tensors="pt")
|
||||
outputs = tiny_model(**batch)
|
||||
|
||||
print("test output:", len(outputs.logits[0]))
|
||||
|
||||
Reference in New Issue
Block a user