Instructions to use skouras/DialoGPT-small-swda with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use skouras/DialoGPT-small-swda with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="skouras/DialoGPT-small-swda") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("skouras/DialoGPT-small-swda") model = AutoModelForCausalLM.from_pretrained("skouras/DialoGPT-small-swda") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use skouras/DialoGPT-small-swda with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "skouras/DialoGPT-small-swda" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "skouras/DialoGPT-small-swda", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/skouras/DialoGPT-small-swda
- SGLang
How to use skouras/DialoGPT-small-swda 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 "skouras/DialoGPT-small-swda" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "skouras/DialoGPT-small-swda", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "skouras/DialoGPT-small-swda" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "skouras/DialoGPT-small-swda", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use skouras/DialoGPT-small-swda with Docker Model Runner:
docker model run hf.co/skouras/DialoGPT-small-swda
DialoGPT-small finetuned in the Switchboard Dialogue Act (SwDa) Corpus. The repository with additionally pre-processed SwDa dialogues of concatenated utterances per speaker, 80/10/10 train/val/test split and metadata, is a fork of the Nathan Duran's repository. For finetuning the train_dialogpt.ipynb notebook from Nathan Cooper's Tutorial was used to finetune the model with slight modifications in Google Collab.
History dialogue context = 5. Number of utterances: 80704 (train set), 9749 (test set), 9616 (val set). Checkpoint-84000 after fine-tuning for 2 epochs with batch size 2.
Evaluation perplexity in SwDa from 635.6993 (pre-trainded model) to 18.1693 (fine-tuned model).
- Downloads last month
- 5