Text Generation
PEFT
Safetensors
Transformers
lora
sft
trl
unsloth
safety
content-moderation
indic-languages
multilingual
conversational
Instructions to use l3cube-pune/IndicGuard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use l3cube-pune/IndicGuard with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-3-4b-it-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "l3cube-pune/IndicGuard") - Transformers
How to use l3cube-pune/IndicGuard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="l3cube-pune/IndicGuard") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("l3cube-pune/IndicGuard", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use l3cube-pune/IndicGuard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "l3cube-pune/IndicGuard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "l3cube-pune/IndicGuard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/l3cube-pune/IndicGuard
- SGLang
How to use l3cube-pune/IndicGuard 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 "l3cube-pune/IndicGuard" \ --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": "l3cube-pune/IndicGuard", "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 "l3cube-pune/IndicGuard" \ --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": "l3cube-pune/IndicGuard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use l3cube-pune/IndicGuard with Docker Model Runner:
docker model run hf.co/l3cube-pune/IndicGuard
Update README.md
Browse files
README.md
CHANGED
|
@@ -397,6 +397,16 @@ The model is evaluated across three dataset splits per language:
|
|
| 397 |
Metrics reported: **Accuracy**, **Precision**, **Recall**, and **F1 Score** (weighted) for both `User Safety` and `Response Safety` fields.
|
| 398 |
See the accompanying paper for full benchmark numbers.
|
| 399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
## Intended Use
|
| 401 |
|
| 402 |
- Content moderation pipelines for Indic-language LLM deployments
|
|
|
|
| 397 |
Metrics reported: **Accuracy**, **Precision**, **Recall**, and **F1 Score** (weighted) for both `User Safety` and `Response Safety` fields.
|
| 398 |
See the accompanying paper for full benchmark numbers.
|
| 399 |
|
| 400 |
+
### Combined Evaluation — Mean F1 Across 11 Languages
|
| 401 |
+
|
| 402 |
+
| Setting | User Safety F1 | Response Safety F1 |
|
| 403 |
+
|-----------|---------------|-------------------|
|
| 404 |
+
| Generic | 0.8673 | 0.8691 |
|
| 405 |
+
| Culture-Adaptive | 0.8516 | 0.8246 |
|
| 406 |
+
| Jailbreak | 0.9225 | 0.9360 |
|
| 407 |
+
| Gen+CA | 0.8651 | 0.8604 |
|
| 408 |
+
| **Combined** | **0.8800** | **0.8846** |
|
| 409 |
+
|
| 410 |
## Intended Use
|
| 411 |
|
| 412 |
- Content moderation pipelines for Indic-language LLM deployments
|