Instructions to use Bhishaj/Vidhik-Llama-1B-GGU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Bhishaj/Vidhik-Llama-1B-GGU 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 Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M # Run inference directly in the terminal: llama cli -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M # Run inference directly in the terminal: llama cli -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
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 Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
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 Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Use Docker
docker model run hf.co/Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Bhishaj/Vidhik-Llama-1B-GGU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Bhishaj/Vidhik-Llama-1B-GGU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Bhishaj/Vidhik-Llama-1B-GGU", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
- Ollama
How to use Bhishaj/Vidhik-Llama-1B-GGU with Ollama:
ollama run hf.co/Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
- Unsloth Studio
How to use Bhishaj/Vidhik-Llama-1B-GGU 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 Bhishaj/Vidhik-Llama-1B-GGU 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 Bhishaj/Vidhik-Llama-1B-GGU to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Bhishaj/Vidhik-Llama-1B-GGU to start chatting
- Pi
How to use Bhishaj/Vidhik-Llama-1B-GGU with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Bhishaj/Vidhik-Llama-1B-GGU with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use Bhishaj/Vidhik-Llama-1B-GGU with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use Bhishaj/Vidhik-Llama-1B-GGU with Docker Model Runner:
docker model run hf.co/Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
- Lemonade
How to use Bhishaj/Vidhik-Llama-1B-GGU with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Bhishaj/Vidhik-Llama-1B-GGU:Q4_K_M
Run and chat with the model
lemonade run user.Vidhik-Llama-1B-GGU-Q4_K_M
List all available models
lemonade list
⚖️ Vidhik AI: Sovereign Legal SLM (1B)
📌 Model Summary
Vidhik AI is a highly optimized, domain-specific Small Language Model (SLM) engineered for the Indian Judiciary and MSME sector. Fine-tuned on a 1B parameter base, it specializes in drafting formal legal notices (e.g., MSMED Act delayed payments), analyzing case law, and navigating complex Indian officialese ("Babu-speak").
Built with a focus on Edge Compute, this model is designed to run locally on highly constrained hardware (like a 4GB GTX 1050) while retaining the ability to process massive context windows using Google TurboQuant.
- Developer: Gaurav / Bhishaj Technologies
- Base Model: Llama-3.2-1B-Instruct
- Language(s): English, Hindi (Indic Legal Terminology)
- License: Llama 3.2 Community License
🛠️ Training & MLOps Architecture
To bypass local hardware constraints (4GB VRAM), the model was trained using a hybrid cloud-edge pipeline:
1. Data Engineering
- Corpus: Curated and filtered Indian Legal QA datasets (
Techmaestro369/indian-legal-texts-finetuning) and multilingual judiciary data (coild-aikosh/Judiciary_v2). - Formatting: Converted raw unstructured legal texts into strict Alpaca/ShareGPT instruction formats for deterministic instruction following.
2. Fine-Tuning Setup
- Compute: Kaggle Dual T4 GPUs (32GB VRAM combined).
- Optimization: Utilized Unsloth for a 70% VRAM reduction during fine-tuning, accelerating the training process by 2x.
- Methodology: Parameter-Efficient Fine-Tuning (PEFT) using QLoRA.
3. Guardrails & Alignment
- Trained with strict negative stop-sequences and deterministic decoding parameters (
Temperature = 0.0) to cure the base model of MCQ-loop hallucinations. - Aligned to a "Senior Advocate, Supreme Court of India" persona for formal, zero-fluff document generation.
⚡ Edge Deployment & Google TurboQuant (2026)
This model is specifically compiled to run on legacy/constrained hardware.
By utilizing Google TurboQuant, the model compresses the KV-cache to 3-bits during runtime. This allows for 128k context windows (essential for processing long Indian government gazettes and supreme court rulings) without triggering OOM (Out of Memory) crashes on a 4GB GPU, maintaining a throughput of ~24.5 tokens/sec.
💻 Usage: Running Locally (TurboQuant Enabled)
To achieve 6x KV-cache compression on your local machine:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from turboquant import TurboQuantCache
repo_id = "Bhishaj/Vidhik-Llama-1B-GGU"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, device_map="cuda")
# Initialize TurboQuant 4-bit Cache for 4GB VRAM support
tq_cache = TurboQuantCache(bits=4, compute_device="cuda")
prompt = "TASK: Draft a formal legal notice for my client 'M/s Vidhik Electronics' under MSMED Act Sections 15 & 16."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
# Generate with Compressed Context
with torch.no_grad():
outputs = model.generate(
**inputs,
past_key_values=tq_cache, # Injecting the TurboQuant cache
max_new_tokens=512,
temperature=0.0
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 11
4-bit
Model tree for Bhishaj/Vidhik-Llama-1B-GGU
Base model
meta-llama/Llama-3.2-1B-Instruct