Instructions to use appvoid/arco-2-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use appvoid/arco-2-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="appvoid/arco-2-instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("appvoid/arco-2-instruct") model = AutoModelForCausalLM.from_pretrained("appvoid/arco-2-instruct") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use appvoid/arco-2-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "appvoid/arco-2-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "appvoid/arco-2-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/appvoid/arco-2-instruct
- SGLang
How to use appvoid/arco-2-instruct 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 "appvoid/arco-2-instruct" \ --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": "appvoid/arco-2-instruct", "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 "appvoid/arco-2-instruct" \ --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": "appvoid/arco-2-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use appvoid/arco-2-instruct with Docker Model Runner:
docker model run hf.co/appvoid/arco-2-instruct
Update tokenizer_config.json
Browse files- tokenizer_config.json +4 -9
tokenizer_config.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"add_bos_token": false,
|
| 3 |
"add_eos_token": false,
|
| 4 |
-
"add_prefix_space": false,
|
| 5 |
"added_tokens_decoder": {
|
| 6 |
"0": {
|
| 7 |
"content": "<unk>",
|
|
@@ -30,18 +29,14 @@
|
|
| 30 |
},
|
| 31 |
"additional_special_tokens": [],
|
| 32 |
"bos_token": "<s>",
|
| 33 |
-
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% if ((message['role'] == 'user') != (loop.index0 % 2 == 0)) or ((message['role'] == 'assistant') != (loop.index0 % 2 == 1)) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '<|prompt|>' + message['content'].strip() + eos_token }}{% elif message['role'] == 'assistant' %}{{ '<|answer|>' + message['content'].strip() + eos_token }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|answer|>' }}{% endif %}",
|
| 34 |
"clean_up_tokenization_spaces": false,
|
| 35 |
-
"cls_token": "</s>",
|
| 36 |
"eos_token": "</s>",
|
| 37 |
-
"legacy":
|
| 38 |
-
"model_max_length":
|
| 39 |
-
"pad_token":
|
| 40 |
-
"padding_side": "left",
|
| 41 |
-
"sep_token": "</s>",
|
| 42 |
"sp_model_kwargs": {},
|
| 43 |
"spaces_between_special_tokens": false,
|
| 44 |
"tokenizer_class": "LlamaTokenizer",
|
| 45 |
"unk_token": "<unk>",
|
| 46 |
"use_default_system_prompt": false
|
| 47 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"add_bos_token": false,
|
| 3 |
"add_eos_token": false,
|
|
|
|
| 4 |
"added_tokens_decoder": {
|
| 5 |
"0": {
|
| 6 |
"content": "<unk>",
|
|
|
|
| 29 |
},
|
| 30 |
"additional_special_tokens": [],
|
| 31 |
"bos_token": "<s>",
|
|
|
|
| 32 |
"clean_up_tokenization_spaces": false,
|
|
|
|
| 33 |
"eos_token": "</s>",
|
| 34 |
+
"legacy": true,
|
| 35 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 36 |
+
"pad_token": null,
|
|
|
|
|
|
|
| 37 |
"sp_model_kwargs": {},
|
| 38 |
"spaces_between_special_tokens": false,
|
| 39 |
"tokenizer_class": "LlamaTokenizer",
|
| 40 |
"unk_token": "<unk>",
|
| 41 |
"use_default_system_prompt": false
|
| 42 |
+
}
|