--- tags: - generated_from_trainer model-index: - name: gpt-regular-test results: [] --- # gpt-regular-test i was stupid and all the newline tokens are replaced with [/n] so be wary if you're using the demo on this page that that just means new line ```python from transformers import AutoTokenizer from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("crumb/gpt2-regular-large") tokenizer = AutoTokenizer.from_pretrained("gpt2-large", use_fast=True) prompt = """(Episode begins with Mordecai and Rigby watching TV) Mordecai: Dude, what are you doing? I think I'm gonna lose my mind. Rigby:""" prompt=prompt.replace("\n","[/n]") tokenz = tokenizer(prompt,return_tensors='pt')['input_ids'] output = model.generate( tokenz, max_length=length, num_return_sequences=1, top_p=.92, temperature=.65, do_sample=True, top_k=125, early_stopping=True, pad_token_id=tokenizer.eos_token_id ) output = tokenizer.decode(output[0]).replace("[/n]","\n") print(output) ``` This model is a fine-tuned version of gpt2-large on the entirety of Regular Show. It achieves the following results on the evaluation set (The Power, Death Punchies, Do Me a Solid): - Loss: 1.6383 ## Intended uses & limitations Same as gpt2-large ### Training hyperparameters The following hyperparameters were used during training: - learning_rate: 1e-05 - train_batch_size: 1 - eval_batch_size: 1 - seed: 42 - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 - lr_scheduler_type: linear - num_epochs: 1 ### Training results | Training Loss | Epoch | Step | Validation Loss | |:-------------:|:-----:|:----:|:---------------:| | 2.1844 | 1.0 | 7633 | 1.6383 | ### Framework versions - Transformers 4.18.0 - Pytorch 1.11.0 - Datasets 2.1.0 - Tokenizers 0.12.1