Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use schreon/gpt2large-lhm-07 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use schreon/gpt2large-lhm-07 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="schreon/gpt2large-lhm-07")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("schreon/gpt2large-lhm-07") model = AutoModelForCausalLM.from_pretrained("schreon/gpt2large-lhm-07", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use schreon/gpt2large-lhm-07 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schreon/gpt2large-lhm-07" # 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-07", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/schreon/gpt2large-lhm-07
- SGLang
How to use schreon/gpt2large-lhm-07 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-07" \ --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-07", "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-07" \ --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-07", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use schreon/gpt2large-lhm-07 with Docker Model Runner:
docker model run hf.co/schreon/gpt2large-lhm-07
Commit History
-
update model card README.md
70a1858 -
End of training
617c263 -
Training in progress, step 4400
1ba863c -
Training in progress, step 4300
a40b7dc -
Training in progress, step 4200
a6b6852 -
Training in progress, step 4100
e573f68 -
Training in progress, step 4000
d3ebd53 -
Training in progress, step 3900
c667c46
-
Training in progress, step 3800
7297f4e -
Training in progress, step 3700
fa006ed -
Training in progress, step 3600
2569d6f -
Training in progress, step 3500
06c00c5 -
Training in progress, step 3400
49d75c6 -
Training in progress, step 3300
f662106 -
Training in progress, step 3200
93d73c1 -
Training in progress, step 3100
d5b3a32 -
Training in progress, step 3000
2703d12 -
Training in progress, step 2900
329f9a9 -
Training in progress, step 2800
9cb0dd4 -
Training in progress, step 2700
9442d28 -
Training in progress, step 2600
0f10676 -
Training in progress, step 2500
6bcf2e3 -
Training in progress, step 2400
a0ecb08 -
Training in progress, step 2300
f05f48c -
Training in progress, step 2200
5212b5c
-
Training in progress, step 2100
037e2ac -
Training in progress, step 2000
a8ba1f4 -
Training in progress, step 1900
8835cde -
Training in progress, step 1800
f2edb62 -
Training in progress, step 1700
8ba9c25 -
Training in progress, step 1600
db11c6b -
Training in progress, step 1500
276028e -
Training in progress, step 1400
b0ea079 -
Training in progress, step 1300
60445b7 -
Training in progress, step 1200
8aae0c2 -
Training in progress, step 1100
2304e3c -
Training in progress, step 1000
364a20f -
Training in progress, step 900
d2ced5d -
Training in progress, step 800
101093f -
Training in progress, step 700
4c0df71 -
Training in progress, step 600
9b06d8f
-
Training in progress, step 500
1b8a070 -
Training in progress, step 400
3d54f1d -
Training in progress, step 300
8cd3cc5 -
Training in progress, step 200
6ba6cfb -
Training in progress, step 100
ba1c0b8 -
initial commit
8af83c2