Instructions to use unsloth/Mistral-Nemo-Base-2407 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Mistral-Nemo-Base-2407 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/Mistral-Nemo-Base-2407")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/Mistral-Nemo-Base-2407") model = AutoModelForCausalLM.from_pretrained("unsloth/Mistral-Nemo-Base-2407", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/Mistral-Nemo-Base-2407 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/Mistral-Nemo-Base-2407" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Mistral-Nemo-Base-2407", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/unsloth/Mistral-Nemo-Base-2407
- SGLang
How to use unsloth/Mistral-Nemo-Base-2407 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 "unsloth/Mistral-Nemo-Base-2407" \ --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": "unsloth/Mistral-Nemo-Base-2407", "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 "unsloth/Mistral-Nemo-Base-2407" \ --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": "unsloth/Mistral-Nemo-Base-2407", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/Mistral-Nemo-Base-2407 with Docker Model Runner:
docker model run hf.co/unsloth/Mistral-Nemo-Base-2407
Upload tokenizer
Browse files- tokenizer.json +0 -18
- tokenizer_config.json +2 -0
tokenizer.json
CHANGED
|
@@ -9038,12 +9038,6 @@
|
|
| 9038 |
"id": "A",
|
| 9039 |
"type_id": 0
|
| 9040 |
}
|
| 9041 |
-
},
|
| 9042 |
-
{
|
| 9043 |
-
"SpecialToken": {
|
| 9044 |
-
"id": "</s>",
|
| 9045 |
-
"type_id": 0
|
| 9046 |
-
}
|
| 9047 |
}
|
| 9048 |
],
|
| 9049 |
"pair": [
|
|
@@ -9059,12 +9053,6 @@
|
|
| 9059 |
"type_id": 0
|
| 9060 |
}
|
| 9061 |
},
|
| 9062 |
-
{
|
| 9063 |
-
"SpecialToken": {
|
| 9064 |
-
"id": "</s>",
|
| 9065 |
-
"type_id": 0
|
| 9066 |
-
}
|
| 9067 |
-
},
|
| 9068 |
{
|
| 9069 |
"SpecialToken": {
|
| 9070 |
"id": "<s>",
|
|
@@ -9076,12 +9064,6 @@
|
|
| 9076 |
"id": "B",
|
| 9077 |
"type_id": 1
|
| 9078 |
}
|
| 9079 |
-
},
|
| 9080 |
-
{
|
| 9081 |
-
"SpecialToken": {
|
| 9082 |
-
"id": "</s>",
|
| 9083 |
-
"type_id": 1
|
| 9084 |
-
}
|
| 9085 |
}
|
| 9086 |
],
|
| 9087 |
"special_tokens": {
|
|
|
|
| 9038 |
"id": "A",
|
| 9039 |
"type_id": 0
|
| 9040 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9041 |
}
|
| 9042 |
],
|
| 9043 |
"pair": [
|
|
|
|
| 9053 |
"type_id": 0
|
| 9054 |
}
|
| 9055 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9056 |
{
|
| 9057 |
"SpecialToken": {
|
| 9058 |
"id": "<s>",
|
|
|
|
| 9064 |
"id": "B",
|
| 9065 |
"type_id": 1
|
| 9066 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9067 |
}
|
| 9068 |
],
|
| 9069 |
"special_tokens": {
|
tokenizer_config.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
| 1 |
{
|
|
|
|
|
|
|
| 2 |
"add_prefix_space": false,
|
| 3 |
"added_tokens_decoder": {
|
| 4 |
"0": {
|
|
|
|
| 1 |
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
"add_prefix_space": false,
|
| 5 |
"added_tokens_decoder": {
|
| 6 |
"0": {
|