Model Description
This model was finetuned on the DatasetA-Roucher/english_historical_quotes using the model gpt2-large
Example Use cases
from transformers import pipeline
pipe = pipeline("text-generation", model="damerajee/gpt2-large-hist-quotes-2")
prompt = "write a quote based on business"
generated_quote = pipe(prompt,top_k=2, temperature=2.0,repetition_penalty=2.0)[0]['generated_text']
print('\n\n', generated_quote)
Streaming option
from transformers import import AutoModelForCausalLM, AutoTokenizer, TextStreamer, pipeline
streamer = TextStreamer(tokenzier, skip_prompt=True)
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenzier,
max_length=40,
temperature=0.6,
pad_token_id=tokenzier.eos_token_id,
top_p=0.95,
repetition_penalty=1.2,
streamer=streamer
)
pipe("write a quote based on war and business")
- Downloads last month
- 14
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.