Quantized GGUF weights of LegalTrace-Qwen3-4B-LSI, fine-tuned for Indian Penal Code (IPC) Legal Statute Identification over 100 core criminal statute sections.
This repository provides single-file GGUF binaries and a turnkey Modelfile for immediate deployment with Ollama, llama.cpp, LM Studio, and vLLM.
| File | Quant Method | File Size | Recommended Hardware | Generation Speed (RTX 5050 Laptop) |
|---|---|---|---|---|
legaltrace-lsi-q8_0.gguf |
Q8_0 | 4.28 GB | 6 GB+ VRAM / 8 GB+ RAM | ~65 tokens/sec |
ollama run hf.co/spicysweetner/LegalTrace-Qwen3-4B-LSI-GGUF
legaltrace-lsi-q8_0.gguf and Modelfile.ollama create legaltrace-lsi -f Modelfile
ollama run legaltrace-lsi "The victim, a minor girl aged 14 years, was kidnapped from the lawful guardianship of her parents by the accused and kept in confinement for three days demanding ransom."
Output:363, 366, 366A
import urllib.request
import json
payload = json.dumps({
"model": "legaltrace-lsi",
"prompt": "On 12.03.2021, the accused armed with an iron rod entered the complainant dwelling house at midnight, committed house-breaking, assaulted the complainant causing fracture on his left arm, and looted gold jewelry.",
"stream": False
}).encode("utf-8")
req = urllib.request.Request(
"http://127.0.0.1:11434/api/generate",
data=payload,
headers={"Content-Type": "application/json"}
)
with urllib.request.urlopen(req) as resp:
data = json.loads(resp.read().decode("utf-8"))
print("Predicted IPC Sections:", data["response"])
# Output: 392, 394, 397, 452, 457
Qwen/Qwen3-4B-Instruct-2507