Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use jjszpak/distilgpt2-SCAN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jjszpak/distilgpt2-SCAN with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jjszpak/distilgpt2-SCAN")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jjszpak/distilgpt2-SCAN") model = AutoModelForCausalLM.from_pretrained("jjszpak/distilgpt2-SCAN", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jjszpak/distilgpt2-SCAN with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jjszpak/distilgpt2-SCAN" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jjszpak/distilgpt2-SCAN", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jjszpak/distilgpt2-SCAN
- SGLang
How to use jjszpak/distilgpt2-SCAN 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 "jjszpak/distilgpt2-SCAN" \ --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": "jjszpak/distilgpt2-SCAN", "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 "jjszpak/distilgpt2-SCAN" \ --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": "jjszpak/distilgpt2-SCAN", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jjszpak/distilgpt2-SCAN with Docker Model Runner:
docker model run hf.co/jjszpak/distilgpt2-SCAN
Training in progress, step 500
Browse files
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 327657928
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b93c7f44937f19c77e6846d2ce34de4e7aa7001823f7f20f9ade55553b049287
|
| 3 |
size 327657928
|
runs/Jan08_20-43-25_23471d640bbe/events.out.tfevents.1704746607.23471d640bbe.345.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e2493637903745a00d043a3a2ddf109b1c65ee161e972aae56dc006ec2336db
|
| 3 |
+
size 5019
|
special_tokens_map.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"bos_token": "<|endoftext|>",
|
| 3 |
"eos_token": "<|endoftext|>",
|
| 4 |
"pad_token": {
|
| 5 |
-
"content": "
|
| 6 |
"lstrip": false,
|
| 7 |
"normalized": false,
|
| 8 |
"rstrip": false,
|
|
|
|
| 2 |
"bos_token": "<|endoftext|>",
|
| 3 |
"eos_token": "<|endoftext|>",
|
| 4 |
"pad_token": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
"lstrip": false,
|
| 7 |
"normalized": false,
|
| 8 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -9,15 +9,6 @@
|
|
| 9 |
"single_word": false,
|
| 10 |
"lstrip": false,
|
| 11 |
"rstrip": false,
|
| 12 |
-
"normalized": true,
|
| 13 |
-
"special": true
|
| 14 |
-
},
|
| 15 |
-
{
|
| 16 |
-
"id": 50257,
|
| 17 |
-
"content": "[PAD]",
|
| 18 |
-
"single_word": false,
|
| 19 |
-
"lstrip": false,
|
| 20 |
-
"rstrip": false,
|
| 21 |
"normalized": false,
|
| 22 |
"special": true
|
| 23 |
}
|
|
|
|
| 9 |
"single_word": false,
|
| 10 |
"lstrip": false,
|
| 11 |
"rstrip": false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
"normalized": false,
|
| 13 |
"special": true
|
| 14 |
}
|
tokenizer_config.json
CHANGED
|
@@ -4,14 +4,6 @@
|
|
| 4 |
"50256": {
|
| 5 |
"content": "<|endoftext|>",
|
| 6 |
"lstrip": false,
|
| 7 |
-
"normalized": true,
|
| 8 |
-
"rstrip": false,
|
| 9 |
-
"single_word": false,
|
| 10 |
-
"special": true
|
| 11 |
-
},
|
| 12 |
-
"50257": {
|
| 13 |
-
"content": "[PAD]",
|
| 14 |
-
"lstrip": false,
|
| 15 |
"normalized": false,
|
| 16 |
"rstrip": false,
|
| 17 |
"single_word": false,
|
|
@@ -22,7 +14,7 @@
|
|
| 22 |
"clean_up_tokenization_spaces": true,
|
| 23 |
"eos_token": "<|endoftext|>",
|
| 24 |
"model_max_length": 1024,
|
| 25 |
-
"pad_token": "
|
| 26 |
"tokenizer_class": "GPT2Tokenizer",
|
| 27 |
"unk_token": "<|endoftext|>"
|
| 28 |
}
|
|
|
|
| 4 |
"50256": {
|
| 5 |
"content": "<|endoftext|>",
|
| 6 |
"lstrip": false,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"normalized": false,
|
| 8 |
"rstrip": false,
|
| 9 |
"single_word": false,
|
|
|
|
| 14 |
"clean_up_tokenization_spaces": true,
|
| 15 |
"eos_token": "<|endoftext|>",
|
| 16 |
"model_max_length": 1024,
|
| 17 |
+
"pad_token": "<|endoftext|>",
|
| 18 |
"tokenizer_class": "GPT2Tokenizer",
|
| 19 |
"unk_token": "<|endoftext|>"
|
| 20 |
}
|
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:96cb5044f98e2ff9505f11ea39753be20da0a686d049bb27b48eea2b977a1f58
|
| 3 |
size 4600
|