Instructions to use Digish/slm_json_mapper with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Digish/slm_json_mapper with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Digish/slm_json_mapper")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Digish/slm_json_mapper") model = AutoModelForCausalLM.from_pretrained("Digish/slm_json_mapper", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Digish/slm_json_mapper with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Digish/slm_json_mapper" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Digish/slm_json_mapper", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Digish/slm_json_mapper
- SGLang
How to use Digish/slm_json_mapper 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 "Digish/slm_json_mapper" \ --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": "Digish/slm_json_mapper", "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 "Digish/slm_json_mapper" \ --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": "Digish/slm_json_mapper", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Digish/slm_json_mapper with Docker Model Runner:
docker model run hf.co/Digish/slm_json_mapper
Upload tokenizer
Browse files- tokenizer_config.json +4 -0
tokenizer_config.json
CHANGED
|
@@ -160,9 +160,13 @@
|
|
| 160 |
"bos_token": "<|endoftext|>",
|
| 161 |
"clean_up_tokenization_spaces": false,
|
| 162 |
"eos_token": "<|endoftext|>",
|
|
|
|
| 163 |
"model_max_length": 8192,
|
| 164 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 165 |
"tokenizer_class": "GPT2Tokenizer",
|
|
|
|
|
|
|
| 166 |
"unk_token": "<|endoftext|>",
|
| 167 |
"vocab_size": 49152
|
| 168 |
}
|
|
|
|
| 160 |
"bos_token": "<|endoftext|>",
|
| 161 |
"clean_up_tokenization_spaces": false,
|
| 162 |
"eos_token": "<|endoftext|>",
|
| 163 |
+
"max_length": 512,
|
| 164 |
"model_max_length": 8192,
|
| 165 |
"pad_token": "<|endoftext|>",
|
| 166 |
+
"stride": 0,
|
| 167 |
"tokenizer_class": "GPT2Tokenizer",
|
| 168 |
+
"truncation_side": "right",
|
| 169 |
+
"truncation_strategy": "longest_first",
|
| 170 |
"unk_token": "<|endoftext|>",
|
| 171 |
"vocab_size": 49152
|
| 172 |
}
|