Instructions to use Dans-DiscountModels/Dans-StructureEvaluator-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dans-DiscountModels/Dans-StructureEvaluator-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dans-DiscountModels/Dans-StructureEvaluator-Small")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Dans-DiscountModels/Dans-StructureEvaluator-Small") model = AutoModelForCausalLM.from_pretrained("Dans-DiscountModels/Dans-StructureEvaluator-Small") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Dans-DiscountModels/Dans-StructureEvaluator-Small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dans-DiscountModels/Dans-StructureEvaluator-Small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dans-DiscountModels/Dans-StructureEvaluator-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Dans-DiscountModels/Dans-StructureEvaluator-Small
- SGLang
How to use Dans-DiscountModels/Dans-StructureEvaluator-Small 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 "Dans-DiscountModels/Dans-StructureEvaluator-Small" \ --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": "Dans-DiscountModels/Dans-StructureEvaluator-Small", "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 "Dans-DiscountModels/Dans-StructureEvaluator-Small" \ --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": "Dans-DiscountModels/Dans-StructureEvaluator-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Dans-DiscountModels/Dans-StructureEvaluator-Small with Docker Model Runner:
docker model run hf.co/Dans-DiscountModels/Dans-StructureEvaluator-Small
Upload 6 files
Browse files- config.json +4 -4
- pytorch_model.bin +1 -1
- special_tokens_map.json +3 -7
- tokenizer.json +7 -7
- tokenizer_config.json +4 -7
config.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "Locutusque/TinyMistral-248M",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
-
"bos_token_id":
|
| 8 |
-
"eos_token_id":
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 1024,
|
| 11 |
"initializer_range": 0.02,
|
|
@@ -21,6 +21,6 @@
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.37.0.dev0",
|
| 24 |
-
"use_cache":
|
| 25 |
"vocab_size": 32005
|
| 26 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "Locutusque/TinyMistral-248M-v2",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 32000,
|
| 8 |
+
"eos_token_id": 32001,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 1024,
|
| 11 |
"initializer_range": 0.02,
|
|
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.37.0.dev0",
|
| 24 |
+
"use_cache": false,
|
| 25 |
"vocab_size": 32005
|
| 26 |
}
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 496085129
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0060eab619ce323402a2ddce11c510df345ea9ddfc52a5eef987b0b0c6d59650
|
| 3 |
size 496085129
|
special_tokens_map.json
CHANGED
|
@@ -1,24 +1,20 @@
|
|
| 1 |
{
|
| 2 |
-
"additional_special_tokens": [
|
| 3 |
-
"<|ASSISTANT|>",
|
| 4 |
-
"<|USER|>"
|
| 5 |
-
],
|
| 6 |
"bos_token": {
|
| 7 |
-
"content": "<
|
| 8 |
"lstrip": false,
|
| 9 |
"normalized": false,
|
| 10 |
"rstrip": false,
|
| 11 |
"single_word": false
|
| 12 |
},
|
| 13 |
"eos_token": {
|
| 14 |
-
"content": "<
|
| 15 |
"lstrip": false,
|
| 16 |
"normalized": false,
|
| 17 |
"rstrip": false,
|
| 18 |
"single_word": false
|
| 19 |
},
|
| 20 |
"pad_token": {
|
| 21 |
-
"content": "
|
| 22 |
"lstrip": false,
|
| 23 |
"normalized": false,
|
| 24 |
"rstrip": false,
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"bos_token": {
|
| 3 |
+
"content": "<|bos|>",
|
| 4 |
"lstrip": false,
|
| 5 |
"normalized": false,
|
| 6 |
"rstrip": false,
|
| 7 |
"single_word": false
|
| 8 |
},
|
| 9 |
"eos_token": {
|
| 10 |
+
"content": "<|endoftext|>",
|
| 11 |
"lstrip": false,
|
| 12 |
"normalized": false,
|
| 13 |
"rstrip": false,
|
| 14 |
"single_word": false
|
| 15 |
},
|
| 16 |
"pad_token": {
|
| 17 |
+
"content": "<|endoftext|>",
|
| 18 |
"lstrip": false,
|
| 19 |
"normalized": false,
|
| 20 |
"rstrip": false,
|
tokenizer.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
| 98 |
"single": [
|
| 99 |
{
|
| 100 |
"SpecialToken": {
|
| 101 |
-
"id": "<
|
| 102 |
"type_id": 0
|
| 103 |
}
|
| 104 |
},
|
|
@@ -112,7 +112,7 @@
|
|
| 112 |
"pair": [
|
| 113 |
{
|
| 114 |
"SpecialToken": {
|
| 115 |
-
"id": "<
|
| 116 |
"type_id": 0
|
| 117 |
}
|
| 118 |
},
|
|
@@ -124,7 +124,7 @@
|
|
| 124 |
},
|
| 125 |
{
|
| 126 |
"SpecialToken": {
|
| 127 |
-
"id": "<
|
| 128 |
"type_id": 1
|
| 129 |
}
|
| 130 |
},
|
|
@@ -136,13 +136,13 @@
|
|
| 136 |
}
|
| 137 |
],
|
| 138 |
"special_tokens": {
|
| 139 |
-
"<
|
| 140 |
-
"id": "<
|
| 141 |
"ids": [
|
| 142 |
-
|
| 143 |
],
|
| 144 |
"tokens": [
|
| 145 |
-
"<
|
| 146 |
]
|
| 147 |
}
|
| 148 |
}
|
|
|
|
| 98 |
"single": [
|
| 99 |
{
|
| 100 |
"SpecialToken": {
|
| 101 |
+
"id": "<|bos|>",
|
| 102 |
"type_id": 0
|
| 103 |
}
|
| 104 |
},
|
|
|
|
| 112 |
"pair": [
|
| 113 |
{
|
| 114 |
"SpecialToken": {
|
| 115 |
+
"id": "<|bos|>",
|
| 116 |
"type_id": 0
|
| 117 |
}
|
| 118 |
},
|
|
|
|
| 124 |
},
|
| 125 |
{
|
| 126 |
"SpecialToken": {
|
| 127 |
+
"id": "<|bos|>",
|
| 128 |
"type_id": 1
|
| 129 |
}
|
| 130 |
},
|
|
|
|
| 136 |
}
|
| 137 |
],
|
| 138 |
"special_tokens": {
|
| 139 |
+
"<|bos|>": {
|
| 140 |
+
"id": "<|bos|>",
|
| 141 |
"ids": [
|
| 142 |
+
32000
|
| 143 |
],
|
| 144 |
"tokens": [
|
| 145 |
+
"<|bos|>"
|
| 146 |
]
|
| 147 |
}
|
| 148 |
}
|
tokenizer_config.json
CHANGED
|
@@ -67,17 +67,14 @@
|
|
| 67 |
"special": true
|
| 68 |
}
|
| 69 |
},
|
| 70 |
-
"additional_special_tokens": [
|
| 71 |
-
|
| 72 |
-
"<|USER|>"
|
| 73 |
-
],
|
| 74 |
-
"bos_token": "<s>",
|
| 75 |
"clean_up_tokenization_spaces": false,
|
| 76 |
-
"eos_token": "<
|
| 77 |
"legacy": true,
|
| 78 |
"max_length": 1536,
|
| 79 |
"model_max_length": 1000000000000000019884624838656,
|
| 80 |
-
"pad_token": "
|
| 81 |
"sp_model_kwargs": {},
|
| 82 |
"spaces_between_special_tokens": false,
|
| 83 |
"stride": 0,
|
|
|
|
| 67 |
"special": true
|
| 68 |
}
|
| 69 |
},
|
| 70 |
+
"additional_special_tokens": [],
|
| 71 |
+
"bos_token": "<|bos|>",
|
|
|
|
|
|
|
|
|
|
| 72 |
"clean_up_tokenization_spaces": false,
|
| 73 |
+
"eos_token": "<|endoftext|>",
|
| 74 |
"legacy": true,
|
| 75 |
"max_length": 1536,
|
| 76 |
"model_max_length": 1000000000000000019884624838656,
|
| 77 |
+
"pad_token": "<|endoftext|>",
|
| 78 |
"sp_model_kwargs": {},
|
| 79 |
"spaces_between_special_tokens": false,
|
| 80 |
"stride": 0,
|