Instructions to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16 # Run inference directly in the terminal: llama cli -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16 # Run inference directly in the terminal: llama cli -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16 # Run inference directly in the terminal: ./llama-cli -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
Use Docker
docker model run hf.co/shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
- LM Studio
- Jan
- Ollama
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with Ollama:
ollama run hf.co/shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
- Unsloth Studio
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw 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 shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw 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 shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw to start chatting
- Docker Model Runner
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with Docker Model Runner:
docker model run hf.co/shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
- Lemonade
How to use shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shivvamm/Meta-Llama-3.1-8B_16bit_indianlaw:F16
Run and chat with the model
lemonade run user.Meta-Llama-3.1-8B_16bit_indianlaw-F16
List all available models
lemonade list
- Atomic Chat
Model Card
Legal LLM (Fine-Tuned on Indian Supreme Court Synthetic Q&A)
- Developed by: Shivam Pandey (shivvamm)
- License: apache-2.0
- Finetuned from:
unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit
This model is a fine-tuned LLaMA-3.1-8B version optimized using Unsloth for high-speed training and inference.
It was trained on a synthetic legal Q&A dataset derived from Indian Supreme Court case data, enabling the model to reason over legal facts, summarize judgments, and answer domain-specific legal queries.
Training was conducted using the Hugging Face TRL library with Unslothβs accelerated training pipeline, achieving ~2Γ faster fine-tuning compared to standard methods.
π Training Dataset
The training data consists of:
- Synthetic legal questions and answers generated from publicly available Supreme Court of India judgment texts.
- Structured Q&A style conversation format.
- Emphasis on:
- Case summaries
- Legal principles
- Interpretations
- Procedural details
- Outcome classification
No private or confidential data was used.
π§ Model Capabilities
The model has been evaluated on test samples from the synthetic dataset and performs reliably on:
- Answering legal domain questions
- Summarizing court judgments
- Explaining legal concepts in simple language
- Classifying legal issues
- Extracting key principles from case texts
β‘ Performance
Initial testing shows:
- Strong understanding of legal terminology
- Accurate reasoning within the context of Supreme Court judgments
- Smooth conversational and structured Q&A performance
- Improved logical consistency after fine-tuning
Further benchmarking (e.g., LawBench, Indian legal QA datasets) is planned.
π Fine-Tuning Details
- Framework: Unsloth + Hugging Face TRL
- Technique: PEFT / LoRA
- Precision: 4-bit (bnb-4bit)
- Training Speed: ~2Γ faster with Unsloth acceleration
- Training Style: Instruction-tuned Q&A format
π Use Cases
- Legal research assistance
- Court judgment summarization
- Law student Q&A assistant
- Domain-specific legal reasoning
- Automated drafting helpers (non-advisory)
β οΈ Limitations & Disclaimer
- The model does not provide real legal advice.
- Outputs may contain inaccuracies and should not be used for professional legal decision-making.
- The dataset includes synthetically generated labels, which may introduce bias or hallucinations.
β€οΈ Built With
This model was trained using:
Powered by Unsloth, LLaMA, and Hugging Face TRL.
- Downloads last month
- 19
16-bit
