Instructions to use Tropics/DialoGPT-small-peppa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Tropics/DialoGPT-small-peppa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tropics/DialoGPT-small-peppa") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Tropics/DialoGPT-small-peppa") model = AutoModelForCausalLM.from_pretrained("Tropics/DialoGPT-small-peppa") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Tropics/DialoGPT-small-peppa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tropics/DialoGPT-small-peppa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tropics/DialoGPT-small-peppa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tropics/DialoGPT-small-peppa
- SGLang
How to use Tropics/DialoGPT-small-peppa 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 "Tropics/DialoGPT-small-peppa" \ --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": "Tropics/DialoGPT-small-peppa", "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 "Tropics/DialoGPT-small-peppa" \ --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": "Tropics/DialoGPT-small-peppa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tropics/DialoGPT-small-peppa with Docker Model Runner:
docker model run hf.co/Tropics/DialoGPT-small-peppa
Ubuntu commited on
Commit ·
a3f1c11
1
Parent(s): 8d80457
updated model
Browse files- config.json +1 -1
- eval_results.txt +1 -1
- pytorch_model.bin +1 -1
config.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
| 31 |
}
|
| 32 |
},
|
| 33 |
"torch_dtype": "float32",
|
| 34 |
-
"transformers_version": "4.
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 50257
|
| 37 |
}
|
|
|
|
| 31 |
}
|
| 32 |
},
|
| 33 |
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.10.0",
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 50257
|
| 37 |
}
|
eval_results.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
perplexity = tensor(
|
|
|
|
| 1 |
+
perplexity = tensor(3.6857)
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 510403817
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35e8c41af64a77305a023346c763a495573841c3090485032e62e23ce9c630e8
|
| 3 |
size 510403817
|