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
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
Runs of crumb gpt2-regular-large on huggingface.co
40
Total runs
0
24-hour runs
2
3-day runs
3
7-day runs
33
30-day runs
More Information About gpt2-regular-large huggingface.co Model
gpt2-regular-large huggingface.co
gpt2-regular-large huggingface.co is an AI model on huggingface.co that provides gpt2-regular-large's model effect (), which can be used instantly with this crumb gpt2-regular-large model. huggingface.co supports a free trial of the gpt2-regular-large model, and also provides paid use of the gpt2-regular-large. Support call gpt2-regular-large model through api, including Node.js, Python, http.
gpt2-regular-large huggingface.co is an online trial and call api platform, which integrates gpt2-regular-large's modeling effects, including api services, and provides a free online trial of gpt2-regular-large, you can try gpt2-regular-large online for free by clicking the link below.
crumb gpt2-regular-large online free url in huggingface.co:
gpt2-regular-large is an open source model from GitHub that offers a free installation service, and any user can find gpt2-regular-large on GitHub to install. At the same time, huggingface.co provides the effect of gpt2-regular-large install, users can directly use gpt2-regular-large installed effect in huggingface.co for debugging and trial. It also supports api for free installation.