Run this model with HF Jobs

Run damerajee/gpt2-large-hist-quotes-2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/damerajee/gpt2-large-hist-quotes-2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/damerajee/gpt2-large-hist-quotes-2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/damerajee/gpt2-large-hist-quotes-2. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/damerajee/gpt2-large-hist-quotes-2. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

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
21
Safetensors
Model size
0.8B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train damerajee/gpt2-large-hist-quotes-2