Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use PDG/gpt2_ft_police_articles with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PDG/gpt2_ft_police_articles with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PDG/gpt2_ft_police_articles")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PDG/gpt2_ft_police_articles") model = AutoModelForCausalLM.from_pretrained("PDG/gpt2_ft_police_articles") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PDG/gpt2_ft_police_articles with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PDG/gpt2_ft_police_articles" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PDG/gpt2_ft_police_articles", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/PDG/gpt2_ft_police_articles
- SGLang
How to use PDG/gpt2_ft_police_articles 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 "PDG/gpt2_ft_police_articles" \ --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": "PDG/gpt2_ft_police_articles", "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 "PDG/gpt2_ft_police_articles" \ --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": "PDG/gpt2_ft_police_articles", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use PDG/gpt2_ft_police_articles with Docker Model Runner:
docker model run hf.co/PDG/gpt2_ft_police_articles
Training in progress, epoch 1
Browse files- pytorch_model.bin +1 -1
- runs/Feb07_21-49-53_e4adce1c568c/1675806608.0271628/events.out.tfevents.1675806608.e4adce1c568c.24637.1 +3 -0
- runs/Feb07_21-49-53_e4adce1c568c/events.out.tfevents.1675806608.e4adce1c568c.24637.0 +3 -0
- runs/Feb07_21-57-53_e4adce1c568c/1675807084.375659/events.out.tfevents.1675807084.e4adce1c568c.27553.1 +3 -0
- runs/Feb07_21-57-53_e4adce1c568c/1675807170.0307522/events.out.tfevents.1675807170.e4adce1c568c.27553.2 +3 -0
- runs/Feb07_21-57-53_e4adce1c568c/events.out.tfevents.1675807084.e4adce1c568c.27553.0 +3 -0
- runs/Feb07_22-02-06_e4adce1c568c/1675807339.0768666/events.out.tfevents.1675807339.e4adce1c568c.28737.1 +3 -0
- runs/Feb07_22-02-06_e4adce1c568c/events.out.tfevents.1675807339.e4adce1c568c.28737.0 +3 -0
- training_args.bin +1 -1
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6281000113
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0063d7698234a990a4438e3602dd8845d268cf0a0d075efd0ef37685adfcb7b5
|
| 3 |
size 6281000113
|
runs/Feb07_21-49-53_e4adce1c568c/1675806608.0271628/events.out.tfevents.1675806608.e4adce1c568c.24637.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec4011516edbbe6a96fdf7693db248135058bddae72a3b0ca07e46742e1380fb
|
| 3 |
+
size 5688
|
runs/Feb07_21-49-53_e4adce1c568c/events.out.tfevents.1675806608.e4adce1c568c.24637.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e226038987d56f3a18e34fea8f0dd588a290798be25c01d0ea828fda70283ce2
|
| 3 |
+
size 4906
|
runs/Feb07_21-57-53_e4adce1c568c/1675807084.375659/events.out.tfevents.1675807084.e4adce1c568c.27553.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d80e786561acfc04f7492628794c288f1b3e87f048bcd23a8b00b6282e53bb05
|
| 3 |
+
size 5688
|
runs/Feb07_21-57-53_e4adce1c568c/1675807170.0307522/events.out.tfevents.1675807170.e4adce1c568c.27553.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d9fd2a986261f53b4f58e0fc07b3cc1a9f2d7e7851a29f6159e676c489e0e8d
|
| 3 |
+
size 5688
|
runs/Feb07_21-57-53_e4adce1c568c/events.out.tfevents.1675807084.e4adce1c568c.27553.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1f46d89f022086eec1038fccb1d8a64a0115e11685b656750dffa5b559d39df
|
| 3 |
+
size 8366
|
runs/Feb07_22-02-06_e4adce1c568c/1675807339.0768666/events.out.tfevents.1675807339.e4adce1c568c.28737.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:841597077668a0c9fba7cef19fc9e9ee74dfef539b7bb65f0f2a73241e460747
|
| 3 |
+
size 5688
|
runs/Feb07_22-02-06_e4adce1c568c/events.out.tfevents.1675807339.e4adce1c568c.28737.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53557bfa2dd12b4dff09509c347aef376b1031b82b46dd619cd9f17656b52475
|
| 3 |
+
size 7374
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3515
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b12fbb5436655edecf18e83523be46feb38108b67bb8089cb7abbd3bf5f4f02
|
| 3 |
size 3515
|