Instructions to use LACAI/DialoGPT-small-PFG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LACAI/DialoGPT-small-PFG with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LACAI/DialoGPT-small-PFG")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LACAI/DialoGPT-small-PFG") model = AutoModelForCausalLM.from_pretrained("LACAI/DialoGPT-small-PFG") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LACAI/DialoGPT-small-PFG with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LACAI/DialoGPT-small-PFG" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LACAI/DialoGPT-small-PFG", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LACAI/DialoGPT-small-PFG
- SGLang
How to use LACAI/DialoGPT-small-PFG 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 "LACAI/DialoGPT-small-PFG" \ --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": "LACAI/DialoGPT-small-PFG", "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 "LACAI/DialoGPT-small-PFG" \ --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": "LACAI/DialoGPT-small-PFG", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LACAI/DialoGPT-small-PFG with Docker Model Runner:
docker model run hf.co/LACAI/DialoGPT-small-PFG
Commit ·
c8dee7b
1
Parent(s): 3961ade
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Base model: [microsoft/DialoGPT-small](https://huggingface.co/microsoft/DialoGPT-small)
|
| 2 |
+
|
| 3 |
+
Fine tuned for dialogue response generation on the [Persuasion For Good Dataset](https://gitlab.com/ucdavisnlp/persuasionforgood) (Wang et al., 2019)
|
| 4 |
+
|
| 5 |
+
Three additional special tokens were added during the fine-tuning process:
|
| 6 |
+
- <|pad|> padding token
|
| 7 |
+
- <|user|> speaker control token to prompt user responses
|
| 8 |
+
- <|system|> speaker control token to prompt system responses
|
| 9 |
+
|
| 10 |
+
The following Dialogues were excluded:
|
| 11 |
+
- Those with donation amounts outside of the task range of [$0, $2].
|
| 12 |
+
- Those where a donation of 0 was made at the end of the task but a non-zero amount was pledged in the dialogue.
|
| 13 |
+
- Those with more than 800 words.
|
| 14 |
+
|
| 15 |
+
Stats:
|
| 16 |
+
- Training set: 519 dialogues
|
| 17 |
+
- Validation set: 58 dialogues
|
| 18 |
+
- ~20 utterances per dialogue
|