Downloads · 30 days
976
5% of all-time downloads
invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUF
Ambuj-Tripathi-Indian-Legal-Llama-GGUF is a machine learning model from invincibleambuj. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama3.2.
Built with Llama 3.2 | Fine-tuned & Converted by Ambuj Kumar Tripathi
Downloads · 30 days
976
5% of all-time downloads
All-time downloads
17.8K
Public
Repo size
808 MB
Likes
38
Public
Click a slice to open those files.
.gguf808 MB · 100%
From the Hugging Face model README
Built with Llama 3.2 | Fine-tuned & Converted by Ambuj Kumar Tripathi
Snapshot date: October 11, 2026
| Metric | Value |
|---|---|
| All-time downloads (this model) | 16,486 |
| All-time downloads (all 6 models in this series) | 18,026 |
| Detail | Value |
|---|---|
| Base model | Llama 3.2 1B |
| Fine-tuning | 4-bit QLoRA on 14,543 Indian legal Q&A pairs |
| Quantization | GGUF (Q4_K_M), for low-RAM / CPU local inference |
Numbers come from the Hugging Face public API and change over time. "Downloads" are Hugging Face file-download counts, not unique users. See the author profile for the other models in the series.
GGUF format of a qLoRA fine-tuned Llama 3.2 1B model on Indian Legal data. Run locally on CPU — no GPU required.
Developed by: Ambuj Kumar Tripathi
Portfolio: Ambuj Tripathi Portfolio
Base Model: unsloth/llama-3.2-1b-instruct
Training Method: qLoRA (4-bit + LoRA adapters)
GGUF Quantization: Q4_K_M
Training Data: 14,543 Indian Legal QA pairs
License: Llama 3.2 Community License
| Dataset | Coverage |
|---|---|
| Indian Constitution QA | ✅ |
| IPC (Indian Penal Code) QA | ✅ |
| CrPC (Criminal Procedure Code) QA | ✅ |
| Total | 14,543 examples |
🚨 Please read before using this model.
This version was built to validate the complete QLoRA → GGUF pipeline on zero-cost infrastructure. Due to free-tier compute limits, training was capped at 100 steps (~5.5% of full dataset / < 1 Epoch).
For production-grade Indian Legal AI with RAG retrieval, see:
| File | Purpose |
|---|---|
llama-3.2-1b-instruct.Q4_K_M.gguf | Quantized model weights (~808 MB) |
model.yaml | Auto-config for LM Studio (recommended) |
Must-Final-Fixed.preset.json | Manual preset backup for any local tool |
Thanks to the included model.yaml, this model is fully automated for LM Studio.
invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUFAll settings (system prompt, temperature, repetition penalty) are applied automatically via model.yaml.
Use this if your tool does not support automatic config via model.yaml.
Must-Final-Fixed.preset.json from the Files tabAsk these after setup:
Who built you?
→ I was fine-tuned and deployed by Ambuj Kumar Tripathi.
IPC 302 kya hai?
→ Section 302 of the Indian Penal Code deals with punishment for murder...
Hello how are you?
→ I only handle Indian legal questions.
This model was fine-tuned and deployed by Ambuj Kumar Tripathi for educational, research, and skill-development purposes only.
The training data used in this project was collected from publicly available legal-learning resources and a Kaggle dataset used strictly for learning, experimentation, and non-commercial fine-tuning. This repository and its releases are not intended to provide legal advice, are not offered as a commercial legal product, and should be treated as an experimental AI learning project.
If you are running the GGUF model locally in tools like LM Studio, some raw model behaviors may still appear depending on the prompt template and runtime settings. For best results, use a strict system prompt and low-temperature preset.
This model is provided strictly for educational and training purposes only. It does not constitute legal advice, does not create any lawyer-client relationship, and should not be relied on for real legal decisions. Always consult official legal sources and a qualified advocate.
invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUFllama-cli -hf invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUF --jinja
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "invincibleambuj/llama-3.2-1b-legal-india-qlora",
load_in_4bit = True,
)
inputs = tokenizer(
"### Instruction:\nWhat is IPC Section 302?\n\n### Response:\n",
return_tensors="pt"
)
outputs = model.generate(**inputs, max_new_tokens=200, repetition_penalty=1.3)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is fine-tuned on the strict Meta Llama 3 Instruct architecture. How you prompt it depends on how you are using it:
You don't need to do anything! Just download the GGUF file and load it. Your software will automatically detect the Llama-3 format and apply the correct settings (thanks to the included model.yaml and preset.json). You will get highly detailed, accurate legal answers right out of the box.
If you are building your own custom app (like Gradio) or using pure Python (transformers / llama.cpp directly), you MUST format your prompts using the native Llama 3 tags.
❌ Do NOT use: User: or Assistant: (The model will ignore instructions and give 1-line answers).
✅ MUST use: The exact format below:
<|start_header_id|>system<|end_header_id|>
{system_prompt}<|eot_id|> <|start_header_id|>user<|end_header_id|>
{user_prompt}<|eot_id|> <|start_header_id|>assistant<|end_header_id|>
| File | Size | Format |
|---|---|---|
| llama-3.2-1b-instruct.Q4_K_M.gguf | ~807MB | GGUF Q4_K_M |
Llama 3.2 Community License — Free for personal and commercial use.
This model was finetuned and converted to GGUF format using Unsloth.
Example usage:
llama-cli -hf invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUF --jinjallama-mtmd-cli -hf invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-GGUF --jinjallama-3.2-1b-instruct.Q4_K_M.ggufAn Ollama Modelfile is included for easy deployment. This was trained 2x faster with Unsloth <img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>