Instructions to use MeWan2808/SIT_legalTech_llama3.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use MeWan2808/SIT_legalTech_llama3.2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/llama-3.2-1b-bnb-4bit") model = PeftModel.from_pretrained(base_model, "MeWan2808/SIT_legalTech_llama3.2") - Transformers
How to use MeWan2808/SIT_legalTech_llama3.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MeWan2808/SIT_legalTech_llama3.2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MeWan2808/SIT_legalTech_llama3.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MeWan2808/SIT_legalTech_llama3.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MeWan2808/SIT_legalTech_llama3.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MeWan2808/SIT_legalTech_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MeWan2808/SIT_legalTech_llama3.2
- SGLang
How to use MeWan2808/SIT_legalTech_llama3.2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MeWan2808/SIT_legalTech_llama3.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MeWan2808/SIT_legalTech_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MeWan2808/SIT_legalTech_llama3.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MeWan2808/SIT_legalTech_llama3.2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use MeWan2808/SIT_legalTech_llama3.2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MeWan2808/SIT_legalTech_llama3.2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MeWan2808/SIT_legalTech_llama3.2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MeWan2808/SIT_legalTech_llama3.2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="MeWan2808/SIT_legalTech_llama3.2", max_seq_length=2048, ) - Docker Model Runner
How to use MeWan2808/SIT_legalTech_llama3.2 with Docker Model Runner:
docker model run hf.co/MeWan2808/SIT_legalTech_llama3.2
Model Card for Legal-Tech-LLaMA-1B-LoRA
A lightweight Legal Tech Question-Answering model fine-tuned on domain-specific legal datasets (contracts, statutes, case law, compliance FAQs).
Built using Unsloth’s 4-bit quantized LLaMA-3.2-1B for efficient inference and memory-friendly fine-tuning.
Model Details
Model Description
This model specializes in legal question-answering, document reasoning, and legal text summarization.
It is fine-tuned using LoRA adapters with PEFT for efficient task-specific adaptation.
The dataset combines curated Legal Q&A pairs derived from public legal sources, open government acts, and synthesized question-answer examples using large instruction models (LLaMA-4-Scout + Groq).
- Developed by: Arav Saxena
- Funded by: Independent Research / Self-funded
- Shared by: Arav Saxena (Legal AI Research Series)
- Model type: Instruction-tuned text generation (LoRA adapter)
- Language(s): English
- License: Apache 2.0 (follows base model’s terms)
- Finetuned from model:
unsloth/llama-3.2-1b-bnb-4bit
Model Sources
- Repository: [Coming soon — Legal-Tech-LLaMA GitHub Repo]
- Paper: N/A (Independent fine-tuning experiment)
- Demo: Streamlit + FastAPI deployment (endpoint:
/hackrx/run)
Uses
Direct Use
- Legal question answering (acts, rights, contracts)
- Compliance chatbots / law firm assistants
- Legal document understanding & summarization
- Semantic search augmentation (retrieval-augmented generation)
Downstream Use
- Fine-tuning for specific jurisdictions (e.g., Indian law, US law)
- Integration into legal document analysis pipelines
- AI assistants for paralegals, compliance officers, or legal students
Out-of-Scope Use
- Not for providing legally binding advice or court submissions
- Not suitable for non-English legal systems or nuanced case reasoning
- Should not replace professional legal counsel
Bias, Risks, and Limitations
- Model responses may vary in accuracy depending on jurisdiction and source material.
- Training data may contain biases from public legal corpora and synthetic data.
- Model does not provide official legal interpretation or advice.
- Limited context length (4k tokens) — may truncate long legal documents.
Recommendations
- Always validate model outputs with qualified legal professionals.
- Use within human-in-the-loop workflows for compliance and research.
- Avoid relying solely on this model for mission-critical legal decisions.
How to Get Started with the Model
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
import torch
model_id = "aravsaxena/legal-tech-llama-1b-lora"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
qa = pipeline("text-generation", model=model, tokenizer=tokenizer)
qa("Q: What are the key clauses in a Non-Disclosure Agreement?\nA:")
- Downloads last month
- 4