Text Generation
Transformers
Safetensors
English
mistral
unsloth
conversational
text-generation-inference
Instructions to use unsloth/Mistral-Nemo-Instruct-2407 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/Mistral-Nemo-Instruct-2407 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/Mistral-Nemo-Instruct-2407") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("unsloth/Mistral-Nemo-Instruct-2407") model = AutoModelForCausalLM.from_pretrained("unsloth/Mistral-Nemo-Instruct-2407", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/Mistral-Nemo-Instruct-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-Instruct-2407" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Mistral-Nemo-Instruct-2407", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/Mistral-Nemo-Instruct-2407
- SGLang
How to use unsloth/Mistral-Nemo-Instruct-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-Instruct-2407" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Mistral-Nemo-Instruct-2407", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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-Instruct-2407" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/Mistral-Nemo-Instruct-2407", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/Mistral-Nemo-Instruct-2407 with Docker Model Runner:
docker model run hf.co/unsloth/Mistral-Nemo-Instruct-2407
Commit History
-
Add files using upload-large-folder tool
Verified signaturee997604
-
fix position embeddings (#1)
Verified signature- fix position embeddings (3853355033115985bb90288eb4e8b8203c79a658) Co-authored-by: Casper Hansen <PatentPilotAI@users.noreply.huggingface.co>9d99330
-
Upload tekken.json with huggingface_hub
Verified signature2a92194 -
Delete tokenizer.model.v3
Verified signatureb8d5d17 -
Upload tokenizer.model.v3 with huggingface_hub
Verified signatureadf8544
-
Upload tokenizer
Verified signature0756785 -
Upload config
Verified signature2993d2f -
Upload config
Verified signaturee5b796f
-
Upload tokenizer
Verified signatured507298 -
Upload config
Verified signature54ee71b -
Upload config
Verified signature411afa0
-
Upload tokenizer
Verified signature29372c3 -
Upload config
Verified signature4ad852a -
Upload config
Verified signaturef462a70
-
Upload tokenizer
Verified signature776702b -
Upload config
Verified signature9def072 -
Upload config
Verified signature1b088e6
-
Upload tokenizer
Verified signature142fd90 -
Upload config
Verified signature2cef2e3 -
Upload config
Verified signature9dce4c1
-
Upload tokenizer
Verified signaturea997a7c -
Upload config
Verified signature4d69df2 -
Upload config
Verified signature6c19cba
-
Upload tokenizer
Verified signature12f6ce2 -
Upload config
Verified signature5cde066 -
Upload config
Verified signature0e9c223
-
Upload tokenizer
Verified signaturea519a29 -
Upload config
Verified signature81894c2 -
Upload config
Verified signature97320ae -
Upload tokenizer
Verified signaturee6121c5 -
Upload config
Verified signaturede304d9 -
Upload config
Verified signature7825fb0 -
Upload tokenizer
Verified signature892685c -
Upload config
Verified signaturea43b8d9 -
Upload config
Verified signature965fff9 -
Upload tokenizer
Verified signature5794cc3 -
Upload config
Verified signaturecf95680 -
Upload config
Verified signature64ed781 -
Upload tokenizer
Verified signature3c4b8eb -
Upload config
Verified signatureae77084 -
Upload config
Verified signaturea8276be -
Upload config
Verified signature1729834 -
Upload config
Verified signature2c3bfc8
-
Upload tokenizer
Verified signatureeb76b70 -
Upload config
Verified signature13642cb -
Upload config
Verified signature9606b9c -
Upload tokenizer
Verified signature5006905 -
Upload config
Verified signature984f18b -
Upload config
Verified signatured954405 -
Upload tokenizer
Verified signaturec8af582