--- language: - en tags: - FantasyGPT widget: - "Daenerys kissed Gandalf, as the witcher hacked off Lord Voldemort's head with a brutal swing of Longclaw." - "Harry leapt forward, dodging Fingolfin's wildfire and reaching for the ring." --- GPT-2 (including tokenizer) trained from scratch on some of my favorite books (about 6M words in total). It's only trained on an 3090 for two hours, so don't take it seriously, just have fun! Example usage: ```python from transformers import AutoTokenizer, GPT2LMHeadModel tokenizer = AutoTokenizer.from_pretrained('Geralt-Targaryen/FantasyGPT') model = GPT2LMHeadModel.from_pretrained('Geralt-Targaryen/FantasyGPT') input_text = ["Daenerys kissed Gandalf, as the witcher hacked off Lord Voldemort's head with a brutal swing of Ice."] input_tokenized = tokenizer(input_text, return_tensors='pt') output = model.generate(inputs=input_tokenized.input_ids, max_new_tokens=512, do_sample=True, top_p=0.95, temperature=1) print(tokenizer.decode(output[0])) ``` output: > Daenerys kissed Gandalf, as the witcher hacked off Lord Voldemort's head with a brutal swing of Ice. He felt at her, and his face was strangely red with anger. She took up the cloak of her belt. She took it, and now she drew the dagger, and the other around her shoulders. She looked at her. The witcher was not allowed in his debt. Geralt was forced to cut her in the back of his hand. The witcher did not remember. And then – ‘She’s lying. He’s not there. And her.’ > > ‘She?’ said Gandalf. ‘You can’t, even a little girl, not from a boy and a girl. What do you want?’ > > ‘Your Ladyship,’ said the troubadour slowly, ‘a beautiful memory. And maybe because she was alive for a little girl. And that is why she took her in her bed. The witcher and the princess are waiting for her to stay. She is not alone. I am being told that you remember and that you’ll be prepared for this. You can live with you, I am not going to understand. And I wish you could not. But I’ll die with you, Geralt, I don’t know what that’s here, and the right will want it. I’m going to give you something. It’s going to be true. > > ‘Geralt!’ cried the witcher quietly and stamped his neck, while he stared at the priest. ‘I don’t know that you don’t even know I do. I don’t understand. I don’t know what I am about. Geralt, I don’t want to be able to do it myself. I don’t know the truth, but I didn’t want to be afraid. And if I can.’ > > ‘I do hope you have to. You know that.’ > > ‘I know. But I’m listening. I can hear.’ > > ‘I don’t understand. I didn’t want to be with you,’ said the girl. ‘I didn’t want to lose my weight and listen to you.’ > > ‘What are you saying here?’ she said. > > ‘The Squirrels,’ said the dwarf, ‘I have always thought you’d have to be back there and tell me where it is. I don’t know what I’ll do about. I’m not going to be here. I don’t like you.’ > > ‘I don’t know. I have to. Don’t see me. I’ll