Instructions to use anshengli2/DialogGPT-small-Bot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anshengli2/DialogGPT-small-Bot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anshengli2/DialogGPT-small-Bot") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anshengli2/DialogGPT-small-Bot") model = AutoModelForCausalLM.from_pretrained("anshengli2/DialogGPT-small-Bot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use anshengli2/DialogGPT-small-Bot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anshengli2/DialogGPT-small-Bot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anshengli2/DialogGPT-small-Bot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anshengli2/DialogGPT-small-Bot
- SGLang
How to use anshengli2/DialogGPT-small-Bot 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 "anshengli2/DialogGPT-small-Bot" \ --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": "anshengli2/DialogGPT-small-Bot", "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 "anshengli2/DialogGPT-small-Bot" \ --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": "anshengli2/DialogGPT-small-Bot", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use anshengli2/DialogGPT-small-Bot with Docker Model Runner:
docker model run hf.co/anshengli2/DialogGPT-small-Bot
Commit ·
128b91b
1
Parent(s): 3199f74
Initial commit
Browse files- checkpoint-3500/config.json +37 -0
- checkpoint-3500/merges.txt +0 -0
- checkpoint-3500/optimizer.pt +3 -0
- checkpoint-3500/pytorch_model.bin +3 -0
- checkpoint-3500/scheduler.pt +3 -0
- checkpoint-3500/special_tokens_map.json +1 -0
- checkpoint-3500/tokenizer.json +0 -0
- checkpoint-3500/tokenizer_config.json +1 -0
- checkpoint-3500/training_args.bin +3 -0
- checkpoint-3500/vocab.json +0 -0
- eval_results.txt +1 -1
- pytorch_model.bin +1 -1
- training_args.bin +1 -1
checkpoint-3500/config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/DialoGPT-small",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 50256,
|
| 9 |
+
"embd_pdrop": 0.1,
|
| 10 |
+
"eos_token_id": 50256,
|
| 11 |
+
"gradient_checkpointing": false,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"model_type": "gpt2",
|
| 15 |
+
"n_ctx": 1024,
|
| 16 |
+
"n_embd": 768,
|
| 17 |
+
"n_head": 12,
|
| 18 |
+
"n_inner": null,
|
| 19 |
+
"n_layer": 12,
|
| 20 |
+
"n_positions": 1024,
|
| 21 |
+
"resid_pdrop": 0.1,
|
| 22 |
+
"scale_attn_weights": true,
|
| 23 |
+
"summary_activation": null,
|
| 24 |
+
"summary_first_dropout": 0.1,
|
| 25 |
+
"summary_proj_to_labels": true,
|
| 26 |
+
"summary_type": "cls_index",
|
| 27 |
+
"summary_use_proj": true,
|
| 28 |
+
"task_specific_params": {
|
| 29 |
+
"conversational": {
|
| 30 |
+
"max_length": 1000
|
| 31 |
+
}
|
| 32 |
+
},
|
| 33 |
+
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.10.2",
|
| 35 |
+
"use_cache": true,
|
| 36 |
+
"vocab_size": 50257
|
| 37 |
+
}
|
checkpoint-3500/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-3500/optimizer.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:592c733ef598b5dd9d77127bc252e7304ee6c1f1ec38ecf5f8fff7da701dfd37
|
| 3 |
+
size 995604017
|
checkpoint-3500/pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91c3bb526759277b5210c30ee796ad99c64db2536e2f928e30bb7256d3b0fd95
|
| 3 |
+
size 510403817
|
checkpoint-3500/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31cfb1580a57cec53320d6a8bc602d004e9b6a7767f74d7e3303665fd13c95cb
|
| 3 |
+
size 623
|
checkpoint-3500/special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}}
|
checkpoint-3500/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
checkpoint-3500/tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "microsoft/DialoGPT-small", "errors": "replace", "tokenizer_class": "GPT2Tokenizer"}
|
checkpoint-3500/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f4dab78199a1103cc3a1c37e3f87b0bc54f781ac4a7ad9b7af8f7f5bea4e996
|
| 3 |
+
size 1327
|
checkpoint-3500/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eval_results.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
perplexity = tensor(
|
|
|
|
| 1 |
+
perplexity = tensor(3.4634)
|
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:857e8408a5fe5aca51efa0f977613907c4ff1f39ae578ac2600d51510f1ccbef
|
| 3 |
size 510403817
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1327
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f4dab78199a1103cc3a1c37e3f87b0bc54f781ac4a7ad9b7af8f7f5bea4e996
|
| 3 |
size 1327
|