Instructions to use ethzanalytics/ai-msgbot-gpt2-L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ethzanalytics/ai-msgbot-gpt2-L with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ethzanalytics/ai-msgbot-gpt2-L")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/ai-msgbot-gpt2-L") model = AutoModelForCausalLM.from_pretrained("ethzanalytics/ai-msgbot-gpt2-L", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ethzanalytics/ai-msgbot-gpt2-L with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ethzanalytics/ai-msgbot-gpt2-L" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethzanalytics/ai-msgbot-gpt2-L", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ethzanalytics/ai-msgbot-gpt2-L
- SGLang
How to use ethzanalytics/ai-msgbot-gpt2-L 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 "ethzanalytics/ai-msgbot-gpt2-L" \ --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": "ethzanalytics/ai-msgbot-gpt2-L", "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 "ethzanalytics/ai-msgbot-gpt2-L" \ --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": "ethzanalytics/ai-msgbot-gpt2-L", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ethzanalytics/ai-msgbot-gpt2-L with Docker Model Runner:
docker model run hf.co/ethzanalytics/ai-msgbot-gpt2-L
:memo: add citations
Browse files
README.md
CHANGED
|
@@ -20,4 +20,32 @@ The dataset was tokenized and fed to the model as a conversation between two spe
|
|
| 20 |
## examples
|
| 21 |
|
| 22 |
- the default inference API examples should work _okay_
|
| 23 |
-
- an ideal test would be explicitly adding `person beta` to the **end** of the prompt text. The model is forced to respond to the entered chat prompt instead of adding to the entered prompt and then responding to that (which may cut off the response text due to the Inference API limits).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
## examples
|
| 21 |
|
| 22 |
- the default inference API examples should work _okay_
|
| 23 |
+
- an ideal test would be explicitly adding `person beta` to the **end** of the prompt text. The model is forced to respond to the entered chat prompt instead of adding to the entered prompt and then responding to that (which may cut off the response text due to the Inference API limits).
|
| 24 |
+
|
| 25 |
+
## citations
|
| 26 |
+
```
|
| 27 |
+
@inproceedings{dinan2019wizard,
|
| 28 |
+
author={Emily Dinan and Stephen Roller and Kurt Shuster and Angela Fan and Michael Auli and Jason Weston},
|
| 29 |
+
title={{W}izard of {W}ikipedia: Knowledge-powered Conversational Agents},
|
| 30 |
+
booktitle = {Proceedings of the International Conference on Learning Representations (ICLR)},
|
| 31 |
+
year={2019},
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
@inproceedings{li-etal-2017-dailydialog,
|
| 35 |
+
title = "{D}aily{D}ialog: A Manually Labelled Multi-turn Dialogue Dataset",
|
| 36 |
+
author = "Li, Yanran and
|
| 37 |
+
Su, Hui and
|
| 38 |
+
Shen, Xiaoyu and
|
| 39 |
+
Li, Wenjie and
|
| 40 |
+
Cao, Ziqiang and
|
| 41 |
+
Niu, Shuzi",
|
| 42 |
+
booktitle = "Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
|
| 43 |
+
month = nov,
|
| 44 |
+
year = "2017",
|
| 45 |
+
address = "Taipei, Taiwan",
|
| 46 |
+
publisher = "Asian Federation of Natural Language Processing",
|
| 47 |
+
url = "https://aclanthology.org/I17-1099",
|
| 48 |
+
pages = "986--995",
|
| 49 |
+
abstract = "We develop a high-quality multi-turn dialog dataset, \textbf{DailyDialog}, which is intriguing in several aspects. The language is human-written and less noisy. The dialogues in the dataset reflect our daily communication way and cover various topics about our daily life. We also manually label the developed dataset with communication intention and emotion information. Then, we evaluate existing approaches on DailyDialog dataset and hope it benefit the research field of dialog systems. The dataset is available on \url{http://yanran.li/dailydialog}",
|
| 50 |
+
}
|
| 51 |
+
```
|