Instructions to use sangdal/ChatBot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sangdal/ChatBot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sangdal/ChatBot")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sangdal/ChatBot") model = AutoModelForCausalLM.from_pretrained("sangdal/ChatBot", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sangdal/ChatBot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sangdal/ChatBot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sangdal/ChatBot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sangdal/ChatBot
- SGLang
How to use sangdal/ChatBot 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 "sangdal/ChatBot" \ --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": "sangdal/ChatBot", "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 "sangdal/ChatBot" \ --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": "sangdal/ChatBot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sangdal/ChatBot with Docker Model Runner:
docker model run hf.co/sangdal/ChatBot
배치사이즈 안맞아서 다시 업로드
Browse files- config.json +4 -24
- tokenizer.json +0 -0
config.json
CHANGED
|
@@ -1,46 +1,26 @@
|
|
| 1 |
{
|
| 2 |
-
"_num_labels": 1,
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
| 6 |
],
|
| 7 |
"attn_pdrop": 0.1,
|
| 8 |
-
"bos_token_id":
|
| 9 |
"embd_pdrop": 0.1,
|
| 10 |
-
"eos_token_id":
|
| 11 |
-
"gradient_checkpointing": false,
|
| 12 |
-
"id2label": {
|
| 13 |
-
"0": "LABEL_0"
|
| 14 |
-
},
|
| 15 |
"initializer_range": 0.02,
|
| 16 |
-
"label2id": {
|
| 17 |
-
"LABEL_0": 0
|
| 18 |
-
},
|
| 19 |
"layer_norm_epsilon": 1e-05,
|
| 20 |
"model_type": "gpt2",
|
| 21 |
"n_ctx": 1024,
|
| 22 |
"n_embd": 768,
|
| 23 |
"n_head": 12,
|
| 24 |
-
"n_inner": null,
|
| 25 |
"n_layer": 12,
|
| 26 |
"n_positions": 1024,
|
| 27 |
-
"
|
| 28 |
"resid_pdrop": 0.1,
|
| 29 |
"summary_activation": null,
|
| 30 |
"summary_first_dropout": 0.1,
|
| 31 |
"summary_proj_to_labels": true,
|
| 32 |
"summary_type": "cls_index",
|
| 33 |
"summary_use_proj": true,
|
| 34 |
-
"
|
| 35 |
-
"text-generation": {
|
| 36 |
-
"do_sample": true,
|
| 37 |
-
"max_length": 50
|
| 38 |
-
}
|
| 39 |
-
},
|
| 40 |
-
"transformers_version": "4.3.3",
|
| 41 |
-
"use_cache": true,
|
| 42 |
-
"vocab_size": 51200,
|
| 43 |
-
"author": "Heewon Jeon(madjakarta@gmail.com)",
|
| 44 |
-
"created_date": "2021-04-28",
|
| 45 |
-
"license": "CC-BY-NC-SA 4.0"
|
| 46 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
| 3 |
"architectures": [
|
| 4 |
"GPT2LMHeadModel"
|
| 5 |
],
|
| 6 |
"attn_pdrop": 0.1,
|
| 7 |
+
"bos_token_id": 50256,
|
| 8 |
"embd_pdrop": 0.1,
|
| 9 |
+
"eos_token_id": 50256,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
"initializer_range": 0.02,
|
|
|
|
|
|
|
|
|
|
| 11 |
"layer_norm_epsilon": 1e-05,
|
| 12 |
"model_type": "gpt2",
|
| 13 |
"n_ctx": 1024,
|
| 14 |
"n_embd": 768,
|
| 15 |
"n_head": 12,
|
|
|
|
| 16 |
"n_layer": 12,
|
| 17 |
"n_positions": 1024,
|
| 18 |
+
"output_past": true,
|
| 19 |
"resid_pdrop": 0.1,
|
| 20 |
"summary_activation": null,
|
| 21 |
"summary_first_dropout": 0.1,
|
| 22 |
"summary_proj_to_labels": true,
|
| 23 |
"summary_type": "cls_index",
|
| 24 |
"summary_use_proj": true,
|
| 25 |
+
"vocab_size": 50000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|