File size: 2,021 Bytes
c3da366 1da493a 5d69262 cadf68d 5d69262 c71db00 c3da366 c71db00 c3da366 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
---
tags:
- generated_from_trainer
model-index:
- name: gpt-regular-test
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# 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
|