Instructions to use allenai/open-instruct-dolly-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/open-instruct-dolly-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="allenai/open-instruct-dolly-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("allenai/open-instruct-dolly-13b") model = AutoModelForMultimodalLM.from_pretrained("allenai/open-instruct-dolly-13b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use allenai/open-instruct-dolly-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "allenai/open-instruct-dolly-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "allenai/open-instruct-dolly-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/allenai/open-instruct-dolly-13b
- SGLang
How to use allenai/open-instruct-dolly-13b 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 "allenai/open-instruct-dolly-13b" \ --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": "allenai/open-instruct-dolly-13b", "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 "allenai/open-instruct-dolly-13b" \ --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": "allenai/open-instruct-dolly-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use allenai/open-instruct-dolly-13b with Docker Model Runner:
docker model run hf.co/allenai/open-instruct-dolly-13b
tokenizer fix
Browse files- tokenizer.json +0 -9
- tokenizer_config.json +4 -23
tokenizer.json
CHANGED
|
@@ -100,15 +100,6 @@
|
|
| 100 |
}
|
| 101 |
],
|
| 102 |
"special_tokens": {
|
| 103 |
-
"</s>": {
|
| 104 |
-
"id": "</s>",
|
| 105 |
-
"ids": [
|
| 106 |
-
2
|
| 107 |
-
],
|
| 108 |
-
"tokens": [
|
| 109 |
-
"</s>"
|
| 110 |
-
]
|
| 111 |
-
},
|
| 112 |
"<s>": {
|
| 113 |
"id": "<s>",
|
| 114 |
"ids": [
|
|
|
|
| 100 |
}
|
| 101 |
],
|
| 102 |
"special_tokens": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
"<s>": {
|
| 104 |
"id": "<s>",
|
| 105 |
"ids": [
|
tokenizer_config.json
CHANGED
|
@@ -1,33 +1,14 @@
|
|
| 1 |
{
|
| 2 |
-
"add_bos_token": true,
|
| 3 |
-
"add_eos_token": false,
|
| 4 |
-
"bos_token": {
|
| 5 |
-
"__type": "AddedToken",
|
| 6 |
-
"content": "",
|
| 7 |
-
"lstrip": false,
|
| 8 |
-
"normalized": true,
|
| 9 |
-
"rstrip": false,
|
| 10 |
-
"single_word": false
|
| 11 |
-
},
|
| 12 |
"clean_up_tokenization_spaces": false,
|
| 13 |
-
"
|
|
|
|
| 14 |
"__type": "AddedToken",
|
| 15 |
-
"content": "",
|
| 16 |
"lstrip": false,
|
| 17 |
"normalized": true,
|
| 18 |
"rstrip": false,
|
| 19 |
"single_word": false
|
| 20 |
},
|
| 21 |
-
"model_max_length": 1000000000000000019884624838656,
|
| 22 |
-
"pad_token": null,
|
| 23 |
"sp_model_kwargs": {},
|
| 24 |
-
"tokenizer_class": "LlamaTokenizer"
|
| 25 |
-
"unk_token": {
|
| 26 |
-
"__type": "AddedToken",
|
| 27 |
-
"content": "",
|
| 28 |
-
"lstrip": false,
|
| 29 |
-
"normalized": true,
|
| 30 |
-
"rstrip": false,
|
| 31 |
-
"single_word": false
|
| 32 |
-
}
|
| 33 |
}
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"clean_up_tokenization_spaces": false,
|
| 3 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 4 |
+
"pad_token": {
|
| 5 |
"__type": "AddedToken",
|
| 6 |
+
"content": "<pad>",
|
| 7 |
"lstrip": false,
|
| 8 |
"normalized": true,
|
| 9 |
"rstrip": false,
|
| 10 |
"single_word": false
|
| 11 |
},
|
|
|
|
|
|
|
| 12 |
"sp_model_kwargs": {},
|
| 13 |
+
"tokenizer_class": "LlamaTokenizer"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|