Instructions to use gazam/LegalEase_IndianConsumerLaw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gazam/LegalEase_IndianConsumerLaw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gazam/LegalEase_IndianConsumerLaw")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gazam/LegalEase_IndianConsumerLaw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gazam/LegalEase_IndianConsumerLaw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gazam/LegalEase_IndianConsumerLaw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gazam/LegalEase_IndianConsumerLaw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/gazam/LegalEase_IndianConsumerLaw
- SGLang
How to use gazam/LegalEase_IndianConsumerLaw 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 "gazam/LegalEase_IndianConsumerLaw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gazam/LegalEase_IndianConsumerLaw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "gazam/LegalEase_IndianConsumerLaw" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gazam/LegalEase_IndianConsumerLaw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use gazam/LegalEase_IndianConsumerLaw with Docker Model Runner:
docker model run hf.co/gazam/LegalEase_IndianConsumerLaw
LegalEase_IndianConsumerLaw
Model Details
Model Description
LegalEase_IndianConsumerLaw is a fine-tuned model designed to assist in answering legal questions related to Indian consumer laws. It is based on Mistral-7B and optimized for structured legal Q&A, consumer rights explanations, and legal text interpretation.
- Developed by: Gulfarogh Azam
- Model type: Causal Language Model (LLM)
- Language(s): English (with a focus on Indian legal terminology)
- Finetuned from:
mistralai/Mistral-7B-v0.1 - Trained on: The Consumer Protection Act, 2019, India.
Model Sources
- Repository: Hugging Face Model Repo
Uses
Direct Use
- Legal professionals, researchers, and individuals can query the model for Indian consumer law-related information.
- Useful for understanding legal provisions and consumer rights.
Downstream Use
- Can be integrated into legal chatbots or AI-powered legal assistance tools.
Out-of-Scope Use
- Not a replacement for legal advice from a qualified lawyer.
- May not cover state-specific regulations.
- Should not be used for non-legal inquiries.
Bias, Risks, and Limitations
Bias
- The model has been trained on a limited dataset, which may introduce biases.
- Responses may not always align with the latest amendments in law.
Risks
- May generate incorrect or outdated legal interpretations.
- Does not account for regional variations in legal practice.
Recommendations
Users should cross-check critical legal information with official sources before making any decisions.
How to Use the Model
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "gazam/LegalEase_IndianConsumerLaw"
# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained(repo_id)
tokenizer = AutoTokenizer.from_pretrained(repo_id)
# Generate a response
input_text = "What are my rights under the Consumer Protection Act?"
inputs = tokenizer(input_text, return_tensors="pt")
output = model.generate(**inputs, max_length=256)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Model tree for gazam/LegalEase_IndianConsumerLaw
Base model
mistralai/Mistral-7B-v0.1