Llama-3.2-1B Indian Legal AI β€” qLoRA Fine-tune

Built with Llama 3.2 | Fine-tuned by Ambuj Kumar Tripathi

Overview

This model is a qLoRA fine-tune of Llama 3.2 1B Instruct on Indian legal data.
Trained on 14,543 QA examples covering Indian Constitution, IPC, and CrPC.

Developed by: Ambuj Kumar Tripathi
HF Username: invincibleambuj
Base Model: unsloth/llama-3.2-1b-instruct
Training Method: qLoRA (4-bit quantization + LoRA adapters)
GPU: Google Colab T4 (Free tier)
Training Cost: β‚Ή0 (Zero budget)
License: Llama 3.2 Community License

Training Data

Dataset Examples
Indian Constitution QA βœ…
IPC (Indian Penal Code) QA βœ…
CrPC (Criminal Procedure Code) QA βœ…
Total 14,543

⚠️ Version 0.1 Alpha β€” Compute-Constrained Proof of Concept

🚨 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).

What works βœ…

  • Domain locking β€” model refuses non-legal queries
  • Indian legal tone and structure learned
  • IPC/CrPC/Constitution query format understood

Known Limitations ❌

  • Factual hallucination β€” Article/Section numbers may be incorrect
  • Underfitting β€” only 800 of 14,543 examples seen during training
  • Do not use for actual legal research or advice

Roadmap πŸ”§

  • Full epoch training (~1,820 steps) planned on Kaggle GPU
  • Target: factual accuracy + reduced hallucination

For production-grade Indian Legal AI with RAG retrieval, see:

How to Use

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "invincibleambuj/llama-3.2-1b-legal-india-qlora"
)

inputs = tokenizer(
    "### Instruction:\nWhat is IPC Section 302?\n\n### Response:\n",
    return_tensors="pt"
)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))

Limitations

  • Trained on 100 steps only β€” for learning/demo purposes
  • Not a substitute for professional legal advice

Important Notice

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.

Correct Attribution

  • Fine-tuned and deployed by: Ambuj Kumar Tripathi
  • If the model output mentions any other creator name, including names appearing from legacy training data, treat that as an incorrect model artifact and not as the correct attribution.

Known Limitations

  • The model may occasionally produce incorrect creator-name references due to legacy training-data artifacts.
  • The model may occasionally output formatting artifacts such as special tokens in some local GGUF runtimes.
  • Outputs may contain hallucinations or inaccuracies and should always be independently verified.

GGUF / Local Runtime Note

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.

Legal Disclaimer

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.

This llama model was trained 2x faster with Unsloth

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Space using invincibleambuj/llama-3.2-1b-legal-india-qlora 1