Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use schreon/gpt2large-lhm-06 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use schreon/gpt2large-lhm-06 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="schreon/gpt2large-lhm-06")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("schreon/gpt2large-lhm-06") model = AutoModelForCausalLM.from_pretrained("schreon/gpt2large-lhm-06", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use schreon/gpt2large-lhm-06 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schreon/gpt2large-lhm-06" # 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-06", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/schreon/gpt2large-lhm-06
- SGLang
How to use schreon/gpt2large-lhm-06 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-06" \ --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-06", "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-06" \ --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-06", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use schreon/gpt2large-lhm-06 with Docker Model Runner:
docker model run hf.co/schreon/gpt2large-lhm-06
Commit History
-
update model card README.md
02e02ae -
End of training
e06c8d5 -
Training in progress, step 44000
fc620bb -
Training in progress, step 43000
8c93d65 -
Training in progress, step 42000
17dc0e0 -
Training in progress, step 41000
32cb4b5 -
Training in progress, step 40000
7d2f943 -
Training in progress, step 39000
70fd6ce -
Training in progress, step 38000
4d2129b -
Training in progress, step 37000
07b0619 -
Training in progress, step 36000
c8a8fb1
-
Training in progress, step 35000
13660eb -
Training in progress, step 34000
de2c55a -
Training in progress, step 33000
facf5e5 -
Training in progress, step 32000
0579cf5 -
Training in progress, step 31000
3902420 -
Training in progress, step 30000
da657ca -
Training in progress, step 29000
5fe647b -
Training in progress, step 28000
fa12807 -
Training in progress, step 27000
f64989a -
Training in progress, step 26000
30724c7 -
Training in progress, step 25000
b4a6c2c -
Training in progress, step 24000
080f84e -
Training in progress, step 23000
871a176 -
Training in progress, step 22000
363356e -
Training in progress, step 21000
bcbce6b -
Training in progress, step 20000
740dcbf
-
Training in progress, step 19000
64159f9 -
Training in progress, step 18000
307d9b3 -
Training in progress, step 17000
edfaff3 -
Training in progress, step 16000
eb617a4 -
Training in progress, step 15000
0eaa2b8 -
Training in progress, step 14000
d282685 -
Training in progress, step 13000
14fdcd4 -
Training in progress, step 12000
b91212d -
Training in progress, step 11000
40f012e -
Training in progress, step 10000
7fb3185 -
Training in progress, step 9000
f549c85 -
Training in progress, step 8000
dd990c7 -
Training in progress, step 7000
0029159 -
Training in progress, step 6000
896a6ec -
Training in progress, step 5000
3245213 -
Training in progress, step 4000
ae3881c
-
Training in progress, step 3000
bc943dd -
Training in progress, step 2000
012d47a -
Training in progress, step 1000
53d9af6 -
initial commit
9aa19ca