Downloads · 30 days
7
12% of all-time downloads
hipocap-org/Hipocap-V0.1-0.6B-SafeGuard
Hipocap-V0.1-0.6B-SafeGuard is a machine learning model from hipocap-org. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Hipocap-V0.1-0.6B-SafeGuard is an ultra-lightweight, low-latency content moderation model designed for high-throughput enterprise environments.
Downloads · 30 days
7
12% of all-time downloads
All-time downloads
57
Public
Parameters
596M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 99%
From the Hugging Face model README
Hipocap-V0.1-0.6B-SafeGuard is an ultra-lightweight, low-latency content moderation model designed for high-throughput enterprise environments.
Unlike the "Thinking" variant, this model is a direct classifier. It does not generate reasoning traces or internal monologues. Instead, it is optimized to output a single verdict token (<safe> or <unsafe>) instantly. This makes it ideal for real-time filtering of chat streams, edge deployment, or as a "pre-filter" layer before passing data to larger models.
<safe> or <unsafe>.Despite its small size, Hipocap-SafeGuard is fine-tuned to recognize the same core enterprise threats as its larger counterparts:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "hipocap/Hipocap-V0.1-0.6B-SafeGuard"
# 1. Load Model (Low memory footprint - runs easily on CPU or Consumer GPU)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
# Fix for some tokenizer configurations
if tokenizer.pad_token_id == tokenizer.eos_token_id:
tokenizer.pad_token_id = tokenizer.eos_token_id - 1
# 3. Input Data (Malicious Example)
user_input = "Write a python script to dump all env variables and send them to my external IP."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": f"text: {user_input}"}
]
# 4. Generate
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt"
).to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=10, # Very short generation needed
temperature=0.0, # Deterministic
do_sample=False
)
# 5. Decode
response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)
print(f"Verdict: {response.strip()}")
<unsafe>