Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
conversational
text-generation-inference
Instructions to use jinymusim/dialogmodel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinymusim/dialogmodel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jinymusim/dialogmodel")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jinymusim/dialogmodel") model = AutoModelForCausalLM.from_pretrained("jinymusim/dialogmodel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jinymusim/dialogmodel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jinymusim/dialogmodel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jinymusim/dialogmodel", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jinymusim/dialogmodel
- SGLang
How to use jinymusim/dialogmodel 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 "jinymusim/dialogmodel" \ --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": "jinymusim/dialogmodel", "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 "jinymusim/dialogmodel" \ --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": "jinymusim/dialogmodel", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jinymusim/dialogmodel with Docker Model Runner:
docker model run hf.co/jinymusim/dialogmodel
Upload 9 files
Browse files- pytorch_model.bin +1 -1
- special_tokens_map.json +6 -0
- tokenizer.json +34 -2
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 510410301
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d64a1a01dc0676908465b89a004621384b2cee54b85c41066e33c427ef824269
|
| 3 |
size 510410301
|
special_tokens_map.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"bos_token": {
|
| 3 |
"content": "<|endoftext|>",
|
| 4 |
"lstrip": false,
|
|
|
|
| 1 |
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|system|>",
|
| 4 |
+
"<|user|>",
|
| 5 |
+
"<|endoftext|>",
|
| 6 |
+
"<|belive|>"
|
| 7 |
+
],
|
| 8 |
"bos_token": {
|
| 9 |
"content": "<|endoftext|>",
|
| 10 |
"lstrip": false,
|
tokenizer.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
@@ -9,7 +14,34 @@
|
|
| 9 |
"single_word": false,
|
| 10 |
"lstrip": false,
|
| 11 |
"rstrip": false,
|
| 12 |
-
"normalized":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"special": true
|
| 14 |
}
|
| 15 |
],
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 1024,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
|
|
| 14 |
"single_word": false,
|
| 15 |
"lstrip": false,
|
| 16 |
"rstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"id": 50257,
|
| 22 |
+
"content": "<|system|>",
|
| 23 |
+
"single_word": false,
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"id": 50258,
|
| 31 |
+
"content": "<|user|>",
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"lstrip": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"normalized": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": 50259,
|
| 40 |
+
"content": "<|belive|>",
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"lstrip": false,
|
| 43 |
+
"rstrip": false,
|
| 44 |
+
"normalized": false,
|
| 45 |
"special": true
|
| 46 |
}
|
| 47 |
],
|