Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use schreon/gpt2large-lhm-08 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use schreon/gpt2large-lhm-08 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="schreon/gpt2large-lhm-08")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("schreon/gpt2large-lhm-08") model = AutoModelForCausalLM.from_pretrained("schreon/gpt2large-lhm-08", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use schreon/gpt2large-lhm-08 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schreon/gpt2large-lhm-08" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "schreon/gpt2large-lhm-08", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/schreon/gpt2large-lhm-08
- SGLang
How to use schreon/gpt2large-lhm-08 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 "schreon/gpt2large-lhm-08" \ --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": "schreon/gpt2large-lhm-08", "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 "schreon/gpt2large-lhm-08" \ --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": "schreon/gpt2large-lhm-08", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use schreon/gpt2large-lhm-08 with Docker Model Runner:
docker model run hf.co/schreon/gpt2large-lhm-08
Commit History
-
update model card README.md
b3629c7 -
End of training
a56d371 -
Training in progress, step 2200
9791452
-
Training in progress, step 2100
73d3ece -
Training in progress, step 2000
ca93c57 -
Training in progress, step 1900
94c5668 -
Training in progress, step 1800
a8ce5f2 -
Training in progress, step 1700
8ee475d -
Training in progress, step 1600
75d76b8 -
Training in progress, step 1500
8896d09 -
Training in progress, step 1400
02a983f -
Training in progress, step 1300
7ec3055
-
Training in progress, step 1200
79db79c -
Training in progress, step 1100
da1a40b -
Training in progress, step 1000
4c2b2ff -
Training in progress, step 900
c8bf11f -
Training in progress, step 800
3c8d997 -
Training in progress, step 700
ae4e2df -
Training in progress, step 600
aaccb57 -
Training in progress, step 500
d29cd9d -
Training in progress, step 400
8de3538
-
Training in progress, step 300
84f1316 -
Training in progress, step 200
1452757 -
Training in progress, step 100
0f6e7ee -
initial commit
9a054fc