Nemotron-4-Mini-Hindi-4B-Instruct GGUF Models

Model Generation Details

This model was generated using llama.cpp at commit b9c3eefd.


Quantization Beyond the IMatrix

I've been experimenting with a new quantization approach that selectively elevates the precision of key layers beyond what the default IMatrix configuration provides.

In my testing, standard IMatrix quantization underperforms at lower bit depths, especially with Mixture of Experts (MoE) models. To address this, I'm using the --tensor-type option in llama.cpp to manually "bump" important layers to higher precision. You can see the implementation here:
👉 Layer bumping with llama.cpp

While this does increase model file size, it significantly improves precision for a given quantization level.

I'd love your feedback—have you tried this? How does it perform for you?


Click here to get info on choosing the right GGUF model format

Nemotron-4-Mini-Hindi-4B-Instruct

Model Overview

Nemotron-4-Mini-Hindi-4B-Instruct is a model for generating responses to questions grounded in the Indian context. It supports queries in Hindi, English, and Hinglish. It is a small language model (SLM) which is fine-tuned/aligned version of nvidia/Nemotron-4-Mini-Hindi-4B-Base, which was continuously pre-trained on top of Nemotron-Mini-4B-Base (Minitron-4B-Base). The alignment stage uses a mix of real and synthetically generated alignment corpus. It supports a context length of 4,096 tokens. This model is ready for commercial use. Please refer to our arXiv paper for more details.

Try this model on build.nvidia.com.

Model Developer: NVIDIA

Model Dates: Nemotron-4-Mini-Hindi-4B-Instruct was trained between June 2024 and Oct 2024.

License

Nemotron-4-Mini-Hindi-4B-Instruct is released under the NVIDIA Open Model License Agreement.

Model Architecture

Nemotron-4-Mini-Hindi-4B-Instruct uses a model embedding size of 3072, 32 attention heads, and an MLP intermediate dimension of 9216. It also uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).

Architecture Type: Transformer Decoder (auto-regressive language model)

Network Architecture: Nemotron-4

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.

Single Turn

<extra_id_0>System
{system prompt}

<extra_id_1>User
{prompt}
<extra_id_1>Assistant\n

Multi Turn

<extra_id_0>System
{system prompt}

<extra_id_1>User
{prompt 1}
<extra_id_1>Assistant
{response 1}
<extra_id_1>User
{prompt 2}
<extra_id_1>Assistant
{response 2}
...
<extra_id_1>User
{prompt N}
<extra_id_1>Assistant\n

Note that a newline character \n should 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/Nemotron-4-Mini-Hindi-4B-Instruct")
model = AutoModelForCausalLM.from_pretrained("nvidia/Nemotron-4-Mini-Hindi-4B-Instruct")

# Use the prompt template
messages = [

    {"role": "user", "content": "भारत की संस्कृति के बारे में बताएं।"},
 ]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")

outputs = model.generate(tokenized_chat, max_new_tokens=128) 
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/Nemotron-4-Mini-Hindi-4B-Instruct")

messages = [
    {"role": "user", "content": "भारत की संस्कृति के बारे में बताएं।"},
]
pipe = pipeline("text-generation", model="nvidia/Nemotron-4-Mini-Hindi-4B-Instruct", max_new_tokens=128)
pipe.tokenizer = tokenizer  # You need to assign tokenizer manually
pipe(messages)

Evaluation Results

Zero-shot performance. Evaluated using select Hindi datasets from the Airavata Evaluation Framework with additions:

MMLU ARC-C ARC-E HellaSwag BoolQ IndicQuest (GPT4-Turbo)
50.5 65.53 79.97 39.9 67.86 4.15

Please refer to our paper for the full set of results.

Inference

Engine: TensorRT-LLM

Test Hardware: NVIDIA A100

DType: Float16/BFloat16

AI Safety Efforts

The Nemotron-4-Mini-Hindi-4B-Instruct model underwent AI safety evaluation including adversarial testing via three distinct methods:

  • Garak, is an automated LLM vulnerability scanner that probes for common weaknesses, including prompt injection and data leakage.
  • AEGIS, is a content safety evaluation dataset and LLM based content safety classifier model, that adheres to a broad taxonomy of 13 categories of critical risks in human-LLM interactions.
  • Human Content Red Teaming leveraging human interaction and evaluation of the models' responses.

Limitations

The model was trained on data that contains toxic language and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive. The model may answer with I statements, exhibiting some anthropomorphizing. This issue could be exacerbated without the use of the recommended prompt template.

Ethical Considerations

NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. For more detailed information on ethical considerations for this model, please see the Model Card++. Please report security vulnerabilities or NVIDIA AI Concerns here.

Citation

If you find our work helpful, please consider citing our paper:

@article{hindinemotron2024,
  title={Adapting Multilingual LLMs to Low-Resource Languages using Continued Pre-training and Synthetic Corpus},
  author={Joshi, Raviraj and Singla, Kanishk and Kamath, Anusha and Kalani, Raunak and Paul, Rakesh and Vaidya, Utkarsh and Chauhan, Sanjay Singh and Wartikar, Niranjan and Long, Eileen},
  journal={arXiv preprint arXiv:2410.14815},
  year={2024}
}

🚀 If you find these models useful

Help me test my AI-Powered Quantum Network Monitor Assistant with quantum-ready security checks:

👉 Quantum Network Monitor

The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : Source Code Quantum Network Monitor. You will also find the code I use to quantize the models if you want to do it yourself GGUFModelBuilder

💬 How to test:
Choose an AI assistant type:

  • TurboLLM (GPT-4.1-mini)
  • HugLLM (Hugginface Open-source models)
  • TestLLM (Experimental CPU-only)

What I’m Testing

I’m pushing the limits of small open-source models for AI network monitoring, specifically:

  • Function calling against live network services
  • How small can a model go while still handling:
    • Automated Nmap security scans
    • Quantum-readiness checks
    • Network Monitoring tasks

🟡 TestLLM – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space):

  • Zero-configuration setup
  • ⏳ 30s load time (slow inference but no API costs) . No token limited as the cost is low.
  • 🔧 Help wanted! If you’re into edge-device AI, let’s collaborate!

Other Assistants

🟢 TurboLLM – Uses gpt-4.1-mini :

  • **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited.
  • Create custom cmd processors to run .net code on Quantum Network Monitor Agents
  • Real-time network diagnostics and monitoring
  • Security Audits
  • Penetration testing (Nmap/Metasploit)

🔵 HugLLM – Latest Open-source models:

  • 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita.

💡 Example commands you could test:

  1. "Give me info on my websites SSL certificate"
  2. "Check if my server is using quantum safe encyption for communication"
  3. "Run a comprehensive security audit on my server"
  4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a Quantum Network Monitor Agent to run the .net code on. This is a very flexible and powerful feature. Use with caution!

Final Word

I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is open source. Feel free to use whatever you find helpful.

If you appreciate the work, please consider buying me a coffee ☕. Your support helps cover service costs and allows me to raise token limits for everyone.

I'm also open to job opportunities or sponsorship.

Thank you! 😊

Downloads last month
50
GGUF
Model size
4.19B params
Architecture
nemotron
Hardware compatibility
Log In to view the estimation

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Mungert/Nemotron-4-Mini-Hindi-4B-Instruct-GGUF

Quantized
(2)
this model