from transformers import TFAutoModelForCausalLM | |
model = TFAutoModelForCausalLM.from_pretrained("username/my_awesome_eli5_clm-model") | |
outputs = model.generate(input_ids=inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95) | |
Decode the generated token ids back into text: | |
tokenizer.batch_decode(outputs, skip_special_tokens=True) | |
['Somatic hypermutation allows the immune system to detect the presence of other viruses as they become more prevalent. |