Instructions to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
Use Docker
docker model run hf.co/duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
- SGLang
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF 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 "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF" \ --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": "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF", "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 "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF" \ --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": "duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with Ollama:
ollama run hf.co/duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with Docker Model Runner:
docker model run hf.co/duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
- Lemonade
How to use duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull duyntnet/Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Mistral-NeMo-Minitron-8B-Instruct-imatrix-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Quantizations of https://huggingface.co/nvidia/Mistral-NeMo-Minitron-8B-Instruct
Inference Clients/UIs
From original readme
Mistral-NeMo-Minitron-8B-Instruct is a model for generating responses for various text-generation tasks including roleplaying, retrieval augmented generation, and function calling. It is a fine-tuned version of nvidia/Mistral-NeMo-Minitron-8B-Base, which was pruned and distilled from Mistral-NeMo 12B using our LLM compression technique. The model was trained using a multi-stage SFT and preference-based alignment technique with NeMo Aligner. For details on the alignment technique, please refer to the Nemotron-4 340B Technical Report. The model supports a context length of 8,192 tokens.
Try this model on build.nvidia.com.
Model Developer: NVIDIA
Model Dates: Mistral-NeMo-Minitron-8B-Instruct was trained between August 2024 and September 2024.
License
Model Architecture
Mistral-NeMo-Minitron-8B-Instruct uses a model embedding size of 4096, 32 attention heads, MLP intermediate dimension of 11520, with 40 layers in total. Additionally, it uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).
Architecture Type: Transformer Decoder (Auto-regressive Language Model)
Network Architecture: Mistral-NeMo
Prompt Format:
We recommend using the following prompt template, which was used to fine-tune the model. The model may not perform optimally without it.
<extra_id_0>System
{system prompt}
<extra_id_1>User
{prompt}
<extra_id_1>Assistant\n
- Note that a newline character
\nshould be added at the end of the prompt. - We recommend using
<extra_id_1>as a stop token.
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
# Load the tokenizer and model
tokenizer = AutoTokenizer.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
model = AutoModelForCausalLM.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
# Use the prompt template
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(tokenized_chat, stop_strings=["<extra_id_1>"], tokenizer=tokenizer)
print(tokenizer.decode(outputs[0]))
You can also use pipeline but you need to create a tokenizer object and assign it to the pipeline manually.
from transformers import AutoTokenizer
from transformers import pipeline
tokenizer = AutoTokenizer.from_pretrained("nvidia/Mistral-NeMo-Minitron-8B-Instruct")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe = pipeline("text-generation", model="nvidia/Mistral-NeMo-Minitron-8B-Instruct")
pipe(messages, max_new_tokens=64, stop_strings=["<extra_id_1>"], tokenizer=tokenizer)
- Downloads last month
- 1,177
1-bit
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit