How to use from
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 "abhinavsunil/lexai-gemma2b-lora" \
    --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": "abhinavsunil/lexai-gemma2b-lora",
		"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 "abhinavsunil/lexai-gemma2b-lora" \
        --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": "abhinavsunil/lexai-gemma2b-lora",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

LexAI - Gemma-2B (LoRA Fine-Tuned for Indian Legal Instruction)

This is a LoRA fine-tuned version of Google's Gemma-2B model on a custom dataset of Indian legal instructions, writ petitions, bail applications, and more.

The model is part of the LexAI initiative β€” a lightweight legal language model assistant that can be integrated with voice systems like Whisper ASR and Coqui TTS.


🧠 Model Details

  • Base Model: google/gemma-2b
  • LoRA Config:
    • r=8
    • alpha=16
    • dropout=0.05
    • Target Modules: ["q_proj", "v_proj"]
  • Quantization: 8-bit (via bitsandbytes)
  • Fine-Tuned Using: Hugging Face PEFT + Transformers
  • Training Epochs: 3
  • Batch Size: 2 (accumulated over 4 steps)
  • Device: Google Colab T4 (12GB VRAM)

πŸ“š Training Data

Custom JSONL dataset with 1,000+ legal examples formatted like:

### Instruction:
What is a bail application?

### Input:

### Response:
A bail application is a request made by a defendant seeking release from custody while the case is pending...
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