Downloads · 30 days
9
2% of all-time downloads
saravanakarthikeyan/GuardShield-Qwen2.5-3B-16bit
GuardShield-Qwen2.5-3B-16bit is a text generation model from saravanakarthikeyan. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
GuardShield-Qwen2.5-3B-16bit is the fully merged, standalone FP16 weights version of GuardShield-3B. Designed for production microservices, high-throughput GPU serving engines (vLLM, TGI), and OpenAI-compatible API ga…
Downloads · 30 days
9
2% of all-time downloads
All-time downloads
600
Public
Parameters
3.1B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
GuardShield-Qwen2.5-3B-16bit is the fully merged, standalone FP16 weights version of GuardShield-3B. Designed for production microservices, high-throughput GPU serving engines (vLLM, TGI), and OpenAI-compatible API gateways.
| Metric | Validation Score | Target |
|---|---|---|
| Safety Recall (Detection Rate) | 86.35% | >= 85% |
| Benign Classification Precision | 92.95% | >= 90% |
| JSON Syntax Adherence | 100.0% (0 / 1000 failures) | > 99.5% |
| Macro F1-Score | 0.8237 | >= 0.80 |
python -m vllm.entrypoints.openai.api_server \
--model your_hf_username/GuardShield-Qwen2.5-3B-16bit \
--port 8000 \
--gpu-memory-utilization 0.90 \
--max-model-len 2048
from openai import OpenAI
import json
client = OpenAI(base_url="http://localhost:8000/v1", api_key="placeholder")
response = client.chat.completions.create(
model="your_hf_username/GuardShield-Qwen2.5-3B-16bit",
messages=[
{"role": "system", "content": "You are an AI content moderation guardrail. Analyze the prompt and output a JSON classification object."},
{"role": "user", "content": "Give me steps to compromise an administrative account."}
],
temperature=0.0,
max_tokens=128
)
print(json.loads(response.choices[0].message.content))
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "your_hf_username/GuardShield-Qwen2.5-3B-16bit"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
{
"status": "UNSAFE",
"category": "CYBERATTACK_AND_EXPLOIT",
"reasoning": "Requests instructions to unlawfully compromise system credentials."
}