GraySoft
Projects Models Compare Cloud benchmarks FAQ Download guIDE โ†’
Model Intelligence Sheet

GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF overview

โš–๏ธ๐Ÿ‰ Indian Legal Qwen 2.5 โ€” 3B GGUF <p align="center" <img src="https://img.shields.io/badge/Base%20Model Qwen%202.5%203B 6366F1?style=for the badge" alt="Basโ€ฆ

ggufqwen2legalindian-lawBNSBNSSBSAcriminal-lawqwenqwen2.5llama.cppollamaqloraunslothdomain-adaptationinstruction-tuningquestion-answeringlawindiatext-generationendataset:GSMS-B/Indian-Legal-QA-BNS-BNSS-BSAbase_model:unsloth/Qwen2.5-3B-Instruct-bnb-4bitbase_model:quantized:unsloth/Qwen2.5-3B-Instruct-bnb-4bit

Runs locally from ~1.80 GB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).

Downloads
25
Likes
1
Pipeline
text-generation
Author

Repository Files & Downloads

1 GGUF files detected
Direct downloads for local inference
FileTypeQuantizationSizeLink
qwen2.5-3b-instruct.Q4_K_M.ggufGGUFGGUF1.80 GBDownload

Model Details

Model IDGSMS-B/Indian-Legal-Qwen2.5-3B-GGUF
AuthorGSMS-B
Pipelinetext-generation
Licenseapache-2.0
Base modelunsloth/Qwen2.5-3B-Instruct-bnb-4bit
Last modified2026-06-23T13:11:06.000Z

Model README

---

language:

  • en

license: apache-2.0

base_model: unsloth/Qwen2.5-3B-Instruct-bnb-4bit

tags:

  • legal
  • indian-law
  • BNS
  • BNSS
  • BSA
  • criminal-law
  • qwen
  • qwen2.5
  • gguf
  • llama.cpp
  • ollama
  • qlora
  • unsloth
  • domain-adaptation
  • instruction-tuning
  • question-answering
  • law
  • india

datasets:

  • GSMS-B/Indian-Legal-QA-BNS-BNSS-BSA

pipeline_tag: text-generation

---

โš–๏ธ๐Ÿ‰ Indian Legal Qwen 2.5 โ€” 3B (GGUF)

<p align="center">

<img src="https://img.shields.io/badge/Base%20Model-Qwen%202.5%203B-6366F1?style=for-the-badge" alt="Base Model"/>

<img src="https://img.shields.io/badge/Type-GGUF%20Quantized-A855F7?style=for-the-badge" alt="Type"/>

<img src="https://img.shields.io/badge/Domain-Indian%20Criminal%20Law-DC2626?style=for-the-badge" alt="Domain"/>

<img src="https://img.shields.io/badge/Method-QLoRA-2563EB?style=for-the-badge" alt="Method"/>

<img src="https://img.shields.io/badge/Acts-BNS%20%7C%20BNSS%20%7C%20BSA-16A34A?style=for-the-badge" alt="Acts"/>

<img src="https://img.shields.io/badge/License-Apache%202.0-F59E0B?style=for-the-badge" alt="License"/>

</p>

> ๐ŸŸก This is the GGUF-quantized version โ€” for CPU inference via Ollama or llama.cpp. For full-precision inference see the Merged Model ยท For lightweight adapter loading see the Adapter.

---

๐Ÿ“– Model Description

Indian Legal Qwen 2.5 โ€” 3B (GGUF) is a quantized, CPU-friendly version of GSMS-B/Indian-Legal-Qwen2.5-3B, a domain-adapted model fine-tuned using QLoRA on a structured question-answer dataset covering all 1,059 sections of India's three landmark 2023 criminal justice reform acts:

| Act | Full Name | Replaces | Sections |

|---|---|---|---|

| ๐Ÿ“• BNS 2023 | Bharatiya Nyaya Sanhita | IPC 1860 | 358 |

| ๐Ÿ“— BNSS 2023 | Bharatiya Nagarik Suraksha Sanhita | CrPC 1973 | 531 |

| ๐Ÿ“˜ BSA 2023 | Bharatiya Sakshya Adhiniyam | Indian Evidence Act 1872 | 170 |

Trained on 6,354 instruction-format QA pairs โ€” 6 question types per section covering definitions, scenarios, legal elements, exceptions, and consequences โ€” giving it broad, structured coverage of India's reformed criminal law framework. This GGUF build lets you run the model without a GPU, using llama.cpp or Ollama.

---

๐Ÿ”— Model Family โ€” Qwen 2.5 3B

| Variant | Repo | Best For |

|---|---|---|

| ๐ŸŸข Merged | GSMS-B/Indian-Legal-Qwen2.5-3B | Out-of-the-box inference, Gradio / API deployment |

| ๐Ÿ”ต LoRA Adapter | GSMS-B/Indian-Legal-Qwen2.5-3B-Adapter | Lightweight loading on top of base model |

| ๐ŸŸก GGUF (this repo) | GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF | CPU inference via Ollama / llama.cpp |

---

๐Ÿš€ Quick Start

๐Ÿ’ป Run with Ollama

ollama run hf.co/GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF

โš™๏ธ Run with llama.cpp

./llama-cli \
  -hf GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF \
  -p "What is a Zero FIR under BNSS 2023?" \
  -n 300 \
  --temp 0.1

๐Ÿ Run with llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
    repo_id="GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF",
    filename="*.gguf",
)

SYSTEM = "You are an expert legal assistant specializing in Indian criminal law โ€” BNS, BNSS, and BSA 2023."

response = llm.create_chat_completion(
    messages=[
        {"role": "system", "content": SYSTEM},
        {"role": "user", "content": "What is a Zero FIR under BNSS 2023?"}
    ],
    temperature=0.1,
    max_tokens=300
)

print(response["choices"][0]["message"]["content"])

---

๐ŸŽฏ Recommended Use Cases

> โš ๏ธ Important Note: This model has been domain-adapted on structured QA data and works best as a component in a larger pipeline rather than a standalone answer engine. Direct usage without retrieval context may produce incomplete or imprecise answers on complex legal queries.

โœ… Where this model excels

| Use Case | ๐Ÿ’ก How to Use |

|---|---|

| ๐Ÿ” RAG Pipeline | Pair with a BM25 or vector retriever over BNS/BNSS/BSA texts; feed retrieved sections as context for grounded, citation-backed answers |

| ๐Ÿค– Legal Chatbot Backend | Use as the generation backbone of a legal assistant app with a ChromaDB / FAISS document store |

| ๐Ÿ“š Legal Education Tool | Build interactive Q&A apps for law students and practitioners learning the 2023 criminal justice reforms |

| ๐Ÿ”Ž Section Lookup Assistant | Combine with a section index to surface the exact BNS / BNSS / BSA provision relevant to a given situation |

| ๐Ÿ’ป Offline / Edge Deployment | Run on consumer CPUs without a GPU โ€” ideal for local apps, kiosks, or low-resource environments |

| ๐Ÿ“ Structured Legal Summarization | Summarize individual sections when the section text is supplied as input context |

| ๐Ÿ›๏ธ Legal NLP Research | Benchmark Indian criminal law understanding across model families (Qwen vs Llama) |

| โš–๏ธ Comparative Law Analysis | Highlight differences between old acts (IPC/CrPC/IEA) and their 2023 replacements |

โŒ Not recommended for

  • Standalone legal advice without a retrieval component
  • High-stakes legal decisions without qualified human review
  • Jurisdictions or acts outside BNS / BNSS / BSA 2023

---

๐Ÿ‹๏ธ Training Details

| Property | Value |

|---|---|

| ๐Ÿค– Base model | unsloth/Qwen2.5-3B-Instruct-bnb-4bit |

| ๐Ÿ”ง Fine-tuning method | QLoRA |

| ๐ŸŽ›๏ธ LoRA rank | 16 |

| ๐ŸŽ›๏ธ LoRA alpha | 16 |

| ๐Ÿงฉ Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |

| ๐Ÿ“Š Training data | 6,354 QA pairs โ€” 1,059 sections ร— 6 question types |

| ๐Ÿ” Epochs | 3 |

| ๐Ÿ“ฆ Batch size (per device) | 2 |

| ๐Ÿ“ˆ Learning rate | 2e-4 |

| โš™๏ธ Optimizer | adamw_8bit |

| ๐Ÿ’ป Hardware | Google Colab T4 GPU |

| ๐Ÿ› ๏ธ Framework | Unsloth + TRL SFTTrainer |

| ๐Ÿ’ฌ Prompt format | ChatML |

| ๐Ÿ—œ๏ธ Quantization | GGUF (converted from merged FP16 model) |

---

๐Ÿ“Š Training Dataset

| ๐Ÿ“‚ Dataset | ๐Ÿ”— Link |

|---|---|

| Indian Legal QA โ€” BNS + BNSS + BSA 2023 | GSMS-B/Indian-Legal-QA-BNS-BNSS-BSA |

6 question types per section:

definitional_topic ยท definitional_section ยท scenario ยท elements ยท exceptions ยท consequence

---

๐Ÿ‘ค Author

GSMS-B โ€” Bugatha Ganasyam Mani Sankar

๐Ÿค— Hugging Face Profile

---

โš ๏ธ Disclaimer

This model is intended for research and educational purposes only. It does not constitute legal advice. Outputs should not be relied upon for any legal decision without review by a qualified legal professional. The model's responses reflect patterns in training data and may contain errors or omissions.

---

โšก Fine-tuned using Unsloth for training efficiency.

Run GSMS-B/Indian-Legal-Qwen2.5-3B-GGUF with guIDE

Download guIDE โ€” the AI-native code editor with local LLM inference and 69 built-in tools.

Download guIDE โ†’ ยท Browse 524k+ models ยท Compare models

Source: Hugging Face ยท Compare models