Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use payelb/GPT2L_one_example with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use payelb/GPT2L_one_example with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="payelb/GPT2L_one_example")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("payelb/GPT2L_one_example") model = AutoModelForCausalLM.from_pretrained("payelb/GPT2L_one_example") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use payelb/GPT2L_one_example with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "payelb/GPT2L_one_example" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "payelb/GPT2L_one_example", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/payelb/GPT2L_one_example
- SGLang
How to use payelb/GPT2L_one_example 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 "payelb/GPT2L_one_example" \ --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": "payelb/GPT2L_one_example", "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 "payelb/GPT2L_one_example" \ --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": "payelb/GPT2L_one_example", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use payelb/GPT2L_one_example with Docker Model Runner:
docker model run hf.co/payelb/GPT2L_one_example
Training in progress, step 120
Browse files
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3096165928
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7010423f3b6d884f5711938826bd0a91857a62d8d6c6f0e93c2b979b18023589
|
| 3 |
size 3096165928
|
runs/Jul11_03-18-40_8784a1a14cc1/events.out.tfevents.1752203923.8784a1a14cc1.4214.0
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:9f3a5300682345722623fc3c93e5365e82917f4561b5e89ecff965cff62e1489
|
| 3 |
+
size 7958
|