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 config
Browse files- config.json +3 -1
config.json
CHANGED
|
@@ -16,12 +16,14 @@
|
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
"num_hidden_layers": 40,
|
| 18 |
"num_key_value_heads": 8,
|
|
|
|
| 19 |
"rms_norm_eps": 1e-05,
|
| 20 |
"rope_theta": 1000000.0,
|
| 21 |
"sliding_window": null,
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
-
"transformers_version": "4.
|
|
|
|
| 25 |
"use_cache": true,
|
| 26 |
"vocab_size": 131072
|
| 27 |
}
|
|
|
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
"num_hidden_layers": 40,
|
| 18 |
"num_key_value_heads": 8,
|
| 19 |
+
"pad_token_id": 10,
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_theta": 1000000.0,
|
| 22 |
"sliding_window": null,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.44.0",
|
| 26 |
+
"unsloth_version": "2024.8",
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 131072
|
| 29 |
}
|