minhtoan/gpt3-small-finetune-cnndaily-news
GPT-3 small
Pretrained GPT-3 small, continuing the development of GPT NEO, with architecture that purposefully mimics that of GPT-3, model was trained on CNN Daily Mail News dataset for text generation.
How to use the model
~~~~ from transformers import GPT2Tokenizer, GPTNeoForCausalLM
tokenizer = GPT2Tokenizer.frompretrained('minhtoan/gpt3-small-finetune-cnndaily-news') model = GPTNeoForCausalLM.frompretrained('minhtoan/gpt3-small-finetune-cnndaily-news')
text = "Ever noticed how plane seats appear to be getting smaller and smaller? " inputids = tokenizer.encode(text, returntensors='pt') max_length = 150
sampleoutputs = model.generate(inputids, dosample=True, maxlength=max_length,temperature = 0.8)
for i, sampleoutput in enumerate(sampleoutputs): print(">> Generated text {}\n\n{}".format(i+1, tokenizer.decode(sample_output.tolist()))) print('\n---') ~~~~
Author
Phan Minh Toan
