Text Generation
Transformers
Safetensors
English
gpt2
empathy
dialogue
conversational-ai
Generated from Trainer
text-generation-inference
Instructions to use mafgit/empathetic-distilgpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mafgit/empathetic-distilgpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mafgit/empathetic-distilgpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mafgit/empathetic-distilgpt2") model = AutoModelForCausalLM.from_pretrained("mafgit/empathetic-distilgpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mafgit/empathetic-distilgpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mafgit/empathetic-distilgpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mafgit/empathetic-distilgpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mafgit/empathetic-distilgpt2
- SGLang
How to use mafgit/empathetic-distilgpt2 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 "mafgit/empathetic-distilgpt2" \ --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": "mafgit/empathetic-distilgpt2", "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 "mafgit/empathetic-distilgpt2" \ --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": "mafgit/empathetic-distilgpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mafgit/empathetic-distilgpt2 with Docker Model Runner:
docker model run hf.co/mafgit/empathetic-distilgpt2
Training in progress, epoch 1
Browse files- config.json +2 -2
- generation_config.json +1 -1
- model.safetensors +2 -2
- tokenizer.json +9 -0
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
| 25 |
"n_inner": null,
|
| 26 |
"n_layer": 6,
|
| 27 |
"n_positions": 1024,
|
| 28 |
-
"pad_token_id":
|
| 29 |
"reorder_and_upcast_attn": false,
|
| 30 |
"resid_pdrop": 0.1,
|
| 31 |
"scale_attn_by_inverse_layer_idx": false,
|
|
@@ -44,5 +44,5 @@
|
|
| 44 |
"tie_word_embeddings": true,
|
| 45 |
"transformers_version": "5.0.0",
|
| 46 |
"use_cache": false,
|
| 47 |
-
"vocab_size":
|
| 48 |
}
|
|
|
|
| 25 |
"n_inner": null,
|
| 26 |
"n_layer": 6,
|
| 27 |
"n_positions": 1024,
|
| 28 |
+
"pad_token_id": 50257,
|
| 29 |
"reorder_and_upcast_attn": false,
|
| 30 |
"resid_pdrop": 0.1,
|
| 31 |
"scale_attn_by_inverse_layer_idx": false,
|
|
|
|
| 44 |
"tie_word_embeddings": true,
|
| 45 |
"transformers_version": "5.0.0",
|
| 46 |
"use_cache": false,
|
| 47 |
+
"vocab_size": 50258
|
| 48 |
}
|
generation_config.json
CHANGED
|
@@ -4,6 +4,6 @@
|
|
| 4 |
"eos_token_id": [
|
| 5 |
50256
|
| 6 |
],
|
| 7 |
-
"pad_token_id":
|
| 8 |
"transformers_version": "5.0.0"
|
| 9 |
}
|
|
|
|
| 4 |
"eos_token_id": [
|
| 5 |
50256
|
| 6 |
],
|
| 7 |
+
"pad_token_id": 50257,
|
| 8 |
"transformers_version": "5.0.0"
|
| 9 |
}
|
model.safetensors
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:c95f8bc47b606f61257d0d9a89fe051f10cde881d934a8b07bad9c164f63add2
|
| 3 |
+
size 327661000
|
tokenizer.json
CHANGED
|
@@ -16,6 +16,15 @@
|
|
| 16 |
"rstrip": false,
|
| 17 |
"normalized": true,
|
| 18 |
"special": true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
],
|
| 21 |
"normalizer": null,
|
|
|
|
| 16 |
"rstrip": false,
|
| 17 |
"normalized": true,
|
| 18 |
"special": true
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"id": 50257,
|
| 22 |
+
"content": "[PAD]",
|
| 23 |
+
"single_word": false,
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"special": true
|
| 28 |
}
|
| 29 |
],
|
| 30 |
"normalizer": null,
|
tokenizer_config.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
"errors": "replace",
|
| 7 |
"is_local": false,
|
| 8 |
"model_max_length": 1024,
|
| 9 |
-
"pad_token": "
|
| 10 |
"tokenizer_class": "GPT2Tokenizer",
|
| 11 |
"unk_token": "<|endoftext|>"
|
| 12 |
}
|
|
|
|
| 6 |
"errors": "replace",
|
| 7 |
"is_local": false,
|
| 8 |
"model_max_length": 1024,
|
| 9 |
+
"pad_token": "[PAD]",
|
| 10 |
"tokenizer_class": "GPT2Tokenizer",
|
| 11 |
"unk_token": "<|endoftext|>"
|
| 12 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5201
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87671058d8d779a3cc26bb1ff72d7aa2c5cf2670c04b701da62c0e69fceebc4d
|
| 3 |
size 5201
|