Instructions to use typeof/all-MiniLM-L6-v2-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typeof/all-MiniLM-L6-v2-decoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="typeof/all-MiniLM-L6-v2-decoder")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("typeof/all-MiniLM-L6-v2-decoder") model = AutoModelForCausalLM.from_pretrained("typeof/all-MiniLM-L6-v2-decoder") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use typeof/all-MiniLM-L6-v2-decoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "typeof/all-MiniLM-L6-v2-decoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "typeof/all-MiniLM-L6-v2-decoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/typeof/all-MiniLM-L6-v2-decoder
- SGLang
How to use typeof/all-MiniLM-L6-v2-decoder 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 "typeof/all-MiniLM-L6-v2-decoder" \ --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": "typeof/all-MiniLM-L6-v2-decoder", "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 "typeof/all-MiniLM-L6-v2-decoder" \ --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": "typeof/all-MiniLM-L6-v2-decoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use typeof/all-MiniLM-L6-v2-decoder with Docker Model Runner:
docker model run hf.co/typeof/all-MiniLM-L6-v2-decoder
init
Browse files- tokenizer.json +1 -76
tokenizer.json
CHANGED
|
@@ -59,81 +59,6 @@
|
|
| 59 |
"pre_tokenizer": {
|
| 60 |
"type": "BertPreTokenizer"
|
| 61 |
},
|
| 62 |
-
"post_processor": {
|
| 63 |
-
"type": "TemplateProcessing",
|
| 64 |
-
"single": [
|
| 65 |
-
{
|
| 66 |
-
"SpecialToken": {
|
| 67 |
-
"id": "[CLS]",
|
| 68 |
-
"type_id": 0
|
| 69 |
-
}
|
| 70 |
-
},
|
| 71 |
-
{
|
| 72 |
-
"Sequence": {
|
| 73 |
-
"id": "A",
|
| 74 |
-
"type_id": 0
|
| 75 |
-
}
|
| 76 |
-
},
|
| 77 |
-
{
|
| 78 |
-
"SpecialToken": {
|
| 79 |
-
"id": "[SEP]",
|
| 80 |
-
"type_id": 0
|
| 81 |
-
}
|
| 82 |
-
}
|
| 83 |
-
],
|
| 84 |
-
"pair": [
|
| 85 |
-
{
|
| 86 |
-
"SpecialToken": {
|
| 87 |
-
"id": "[CLS]",
|
| 88 |
-
"type_id": 0
|
| 89 |
-
}
|
| 90 |
-
},
|
| 91 |
-
{
|
| 92 |
-
"Sequence": {
|
| 93 |
-
"id": "A",
|
| 94 |
-
"type_id": 0
|
| 95 |
-
}
|
| 96 |
-
},
|
| 97 |
-
{
|
| 98 |
-
"SpecialToken": {
|
| 99 |
-
"id": "[SEP]",
|
| 100 |
-
"type_id": 0
|
| 101 |
-
}
|
| 102 |
-
},
|
| 103 |
-
{
|
| 104 |
-
"Sequence": {
|
| 105 |
-
"id": "B",
|
| 106 |
-
"type_id": 1
|
| 107 |
-
}
|
| 108 |
-
},
|
| 109 |
-
{
|
| 110 |
-
"SpecialToken": {
|
| 111 |
-
"id": "[SEP]",
|
| 112 |
-
"type_id": 1
|
| 113 |
-
}
|
| 114 |
-
}
|
| 115 |
-
],
|
| 116 |
-
"special_tokens": {
|
| 117 |
-
"[CLS]": {
|
| 118 |
-
"id": "[CLS]",
|
| 119 |
-
"ids": [
|
| 120 |
-
101
|
| 121 |
-
],
|
| 122 |
-
"tokens": [
|
| 123 |
-
"[CLS]"
|
| 124 |
-
]
|
| 125 |
-
},
|
| 126 |
-
"[SEP]": {
|
| 127 |
-
"id": "[SEP]",
|
| 128 |
-
"ids": [
|
| 129 |
-
102
|
| 130 |
-
],
|
| 131 |
-
"tokens": [
|
| 132 |
-
"[SEP]"
|
| 133 |
-
]
|
| 134 |
-
}
|
| 135 |
-
}
|
| 136 |
-
},
|
| 137 |
"decoder": {
|
| 138 |
"type": "WordPiece",
|
| 139 |
"prefix": "##",
|
|
@@ -146,7 +71,7 @@
|
|
| 146 |
"max_input_chars_per_word": 100,
|
| 147 |
"vocab": {
|
| 148 |
"[PAD]": 0,
|
| 149 |
-
"[
|
| 150 |
"[unused1]": 2,
|
| 151 |
"[unused2]": 3,
|
| 152 |
"[unused3]": 4,
|
|
|
|
| 59 |
"pre_tokenizer": {
|
| 60 |
"type": "BertPreTokenizer"
|
| 61 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
"decoder": {
|
| 63 |
"type": "WordPiece",
|
| 64 |
"prefix": "##",
|
|
|
|
| 71 |
"max_input_chars_per_word": 100,
|
| 72 |
"vocab": {
|
| 73 |
"[PAD]": 0,
|
| 74 |
+
"[EOS]": 1,
|
| 75 |
"[unused1]": 2,
|
| 76 |
"[unused2]": 3,
|
| 77 |
"[unused3]": 4,
|