Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use headmediadesign/gpt2-nathan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use headmediadesign/gpt2-nathan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="headmediadesign/gpt2-nathan")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("headmediadesign/gpt2-nathan") model = AutoModelForCausalLM.from_pretrained("headmediadesign/gpt2-nathan") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use headmediadesign/gpt2-nathan with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "headmediadesign/gpt2-nathan" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "headmediadesign/gpt2-nathan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/headmediadesign/gpt2-nathan
- SGLang
How to use headmediadesign/gpt2-nathan 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 "headmediadesign/gpt2-nathan" \ --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": "headmediadesign/gpt2-nathan", "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 "headmediadesign/gpt2-nathan" \ --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": "headmediadesign/gpt2-nathan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use headmediadesign/gpt2-nathan with Docker Model Runner:
docker model run hf.co/headmediadesign/gpt2-nathan
Commit ·
3085beb
1
Parent(s): 26fad55
Training in progress, step 1000
Browse files
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 510398013
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bfc85557655e036be87a9e28b77aa52d05db63376899f60ae423e1ddd2742782
|
| 3 |
size 510398013
|
runs/Mar16_05-54-42_ba8473751311/events.out.tfevents.1678946097.ba8473751311.6474.11
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:179c444078095bdf0c5258022fb1f5db7137b86e7ab7f6e2e5818614b4de352b
|
| 3 |
+
size 5582
|