Text Generation
Transformers
Safetensors
gpt2
alignment-handbook
trl
sft
Generated from Trainer
text-generation-inference
Run this model with HF Jobs
Run applied-ai-018/gpt2 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/applied-ai-018/gpt2. 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/applied-ai-018/gpt2 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/applied-ai-018/gpt2. 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/applied-ai-018/gpt2. 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.
Instructions to use applied-ai-018/gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use applied-ai-018/gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="applied-ai-018/gpt2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("applied-ai-018/gpt2") model = AutoModelForCausalLM.from_pretrained("applied-ai-018/gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use applied-ai-018/gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "applied-ai-018/gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "applied-ai-018/gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/applied-ai-018/gpt2
- SGLang
How to use applied-ai-018/gpt2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "applied-ai-018/gpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "applied-ai-018/gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "applied-ai-018/gpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "applied-ai-018/gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use applied-ai-018/gpt2 with Docker Model Runner:
docker model run hf.co/applied-ai-018/gpt2
Commit History
-
End of training
Applied AIVerified signatured05d73d -
Model save
Applied AIVerified signatureeb6ff4a -
Training in progress, step 3700
Applied AIVerified signatureaf7db09 -
Training in progress, step 3600
Applied AIVerified signatured50aec7 -
Training in progress, step 3500
Applied AIVerified signature04a5812 -
Training in progress, step 3400
Applied AIVerified signature0075a38 -
Training in progress, step 3300
Applied AIVerified signature1e9becd -
Training in progress, step 3200
Applied AIVerified signature25e5b8b -
Training in progress, step 3100
Applied AIVerified signature54e67a0 -
Training in progress, step 3000
Applied AIVerified signature2884e17 -
Training in progress, step 2900
Applied AIVerified signature92c75ea -
Training in progress, step 2800
Applied AIVerified signature6b6b929 -
Training in progress, step 2700
Applied AIVerified signaturea3eea98 -
Training in progress, step 2600
Applied AIVerified signature9ca853b -
Training in progress, step 2500
Applied AIVerified signaturebbc1c33 -
Training in progress, step 2400
Applied AIVerified signature5dc67e1 -
Training in progress, step 2300
Applied AIVerified signature556536a -
Training in progress, step 2200
Applied AIVerified signaturef6d23f4 -
Training in progress, step 2100
Applied AIVerified signaturece2ea3e -
Training in progress, step 2000
Applied AIVerified signature0776116 -
Training in progress, step 1900
Applied AIVerified signature8e9aaa7 -
Training in progress, step 1800
Applied AIVerified signature92bf719 -
Training in progress, step 1700
Applied AIVerified signature87028da -
Training in progress, step 1600
Applied AIVerified signaturef461eaf -
Training in progress, step 1500
Applied AIVerified signature7008cbc -
Training in progress, step 1400
Applied AIVerified signature5cd1ddf -
Training in progress, step 1300
Applied AIVerified signature4c6f1d5 -
Training in progress, step 1200
Applied AIVerified signature2042f2b -
Training in progress, step 1100
Applied AIVerified signatureae20e5f -
Training in progress, step 1000
Applied AIVerified signatureaa4f0b1 -
Training in progress, step 900
Applied AIVerified signaturec44040d -
Training in progress, step 800
Applied AIVerified signatured080c89 -
Training in progress, step 700
Applied AIVerified signaturecde2e68 -
Training in progress, step 600
Applied AIVerified signaturec1546ac -
Training in progress, step 500
Applied AIVerified signature67f1334 -
Training in progress, step 400
Applied AIVerified signature8213280 -
Training in progress, step 300
Applied AIVerified signaturea22e7c5 -
Training in progress, step 200
Applied AIVerified signature8abeb9c -
Training in progress, step 100
Applied AIVerified signature48d8a56 -
End of training
Applied AIVerified signature93276c2 -
Model save
Applied AIVerified signature099b201 -
Training in progress, step 100
Applied AIVerified signature6545507 -
End of training
Applied AIVerified signature91c2274 -
Model save
Applied AIVerified signaturefa96977 -
Training in progress, step 100
Applied AIVerified signaturec5b5885 -
End of training
Applied AIVerified signature705d40c -
Model save
Applied AIVerified signature029dde9 -
Training in progress, step 100
Applied AIVerified signature6caa959 -
Training in progress, step 200
Applied AIVerified signaturecbb4dfa -
Training in progress, step 100
Applied AIVerified signaturebd1f397