Views
No views yet
unsloth/Llama-3.2-3B-Instruct trained on 14,543 Indian Legal QA pairs covering IPC, CrPC, and the Constitution of India.🚨 Please read before using this model.
| Field | Value |
|---|---|
| Base Model | unsloth/Llama-3.2-3B-Instruct |
| Method | QLoRA — 4-bit + LoRA adapters |
| LoRA Rank | 16 |
| Trainable Params | 24.3M of 3.24B (0.75%) |
| Training Steps | 1,820 (full epoch) |
| Final Loss | 0.695 |
| Dataset | 14,543 Indian Legal QA pairs |
| GPU | 2x Tesla T4 (Kaggle Free) |
| Cost | ₹0 |
| Model | Link |
|---|---|
| 3B GGUF (CPU local) | Ambuj-Tripathi-Indian-Legal-Llama-3B-GGUF |
| 8B Adapter | llama-3.1-8b-legal-india-qlora-v2 |
| 1B Adapter | llama-3.2-1b-legal-india-qlora |
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name = "invincibleambuj/llama-3.2-3b-legal-india-qlora-v2",
5 max_seq_length = 2048,
6 load_in_4bit = True,
7)
8FastLanguageModel.for_inference(model)
9
10inputs = tokenizer(
11 "<|start_header_id|>system<|end_header_id|>\n\nYou are an Indian Legal AI Assistant built by Ambuj Kumar Tripathi.<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWhat is IPC Section 302?<|eot_id|>\n<|start_header_id|>assistant<|end_header_id|>\n\n",
12 return_tensors="pt"
13).to("cuda")
14
15outputs = model.generate(**inputs, max_new_tokens=300, repetition_penalty=1.15)
16print(tokenizer.decode(outputs[0], skip_special_tokens=True))⚠️ This model is provided strictly for educational, research, and skill-development purposes only. It does not constitute legal advice and should not be used for real-world legal compliance or proceedings. Outputs must be independently verified. Always consult a qualified advocate for specific legal matters.
| Platform | Link |
|---|---|
| 🌐 Portfolio | ambuj-portfolio-v2.netlify.app |
| 🤗 HuggingFace | invincibleambuj |
| 💻 GitHub | Ambuj123-lab |
llama-cli -hf invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-3B-GGUF --jinjallama-mtmd-cli -hf invincibleambuj/Ambuj-Tripathi-Indian-Legal-Llama-3B-GGUF --jinjallama-3.2-3b-instruct.Q4_K_M.gguf