Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use kaizerBox/gpt2-summarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaizerBox/gpt2-summarization with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaizerBox/gpt2-summarization")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kaizerBox/gpt2-summarization") model = AutoModelForCausalLM.from_pretrained("kaizerBox/gpt2-summarization") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use kaizerBox/gpt2-summarization with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaizerBox/gpt2-summarization" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaizerBox/gpt2-summarization", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kaizerBox/gpt2-summarization
- SGLang
How to use kaizerBox/gpt2-summarization 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 "kaizerBox/gpt2-summarization" \ --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": "kaizerBox/gpt2-summarization", "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 "kaizerBox/gpt2-summarization" \ --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": "kaizerBox/gpt2-summarization", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kaizerBox/gpt2-summarization with Docker Model Runner:
docker model run hf.co/kaizerBox/gpt2-summarization
Time is 197.06894804239272 minutes, Memory is 9.5GB
Browse files
README.md
CHANGED
|
@@ -15,7 +15,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [](https://huggingface.co/) on the xsum dataset.
|
| 17 |
It achieves the following results on the evaluation set:
|
| 18 |
-
- Loss: 4.
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
@@ -50,9 +50,9 @@ The following hyperparameters were used during training:
|
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
|:-------------:|:-----:|:-----:|:---------------:|
|
| 53 |
-
| 4.
|
| 54 |
-
| 4.
|
| 55 |
-
|
|
| 56 |
|
| 57 |
|
| 58 |
### Framework versions
|
|
|
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [](https://huggingface.co/) on the xsum dataset.
|
| 17 |
It achieves the following results on the evaluation set:
|
| 18 |
+
- Loss: 4.0100
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 50 |
|
| 51 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
|:-------------:|:-----:|:-----:|:---------------:|
|
| 53 |
+
| 4.7132 | 1.0 | 5762 | 4.2108 |
|
| 54 |
+
| 4.111 | 2.0 | 11525 | 4.0528 |
|
| 55 |
+
| 3.9871 | 3.0 | 17286 | 4.0100 |
|
| 56 |
|
| 57 |
|
| 58 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 27456776
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:646b52577bf1f1d8839fef81f4123a524c94a999fbf627b34802f8db56e3a377
|
| 3 |
size 27456776
|
runs/Nov28_19-01-57_a0d0a02a0f22/events.out.tfevents.1701198117.a0d0a02a0f22.772.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b048b0563957bffd2894ff1efe2bbb14c07fa3e15cc03b810b84d36d2d1bd8a
|
| 3 |
+
size 5922
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4600
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c84be90d63547910ee99ccc36705197532d4ae22da68c9e669691128de900e4
|
| 3 |
size 4600
|