Text Generation
Transformers
Safetensors
ravenguard
guardrail
content-safety
moderation
multilingual
cross-lingual
multilingual-safety
agent-safety
custom_code
Instructions to use netis-ai/RavenGuard-gen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use netis-ai/RavenGuard-gen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="netis-ai/RavenGuard-gen", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("netis-ai/RavenGuard-gen", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use netis-ai/RavenGuard-gen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "netis-ai/RavenGuard-gen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netis-ai/RavenGuard-gen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/netis-ai/RavenGuard-gen
- SGLang
How to use netis-ai/RavenGuard-gen 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 "netis-ai/RavenGuard-gen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netis-ai/RavenGuard-gen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "netis-ai/RavenGuard-gen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netis-ai/RavenGuard-gen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use netis-ai/RavenGuard-gen with Docker Model Runner:
docker model run hf.co/netis-ai/RavenGuard-gen
Commit History
-
weights: v11-rgclean step3000 (clean firewalled ckpt; replaces prior weights). Card update pending.
Verified signaturebf8d98e
-
reproduce_eval: neutral scoring note (Severity-token, reference AUROC)
Verified signature67bd6e2 -
manifest: align score description to shipped Severity-token read
Verified signatured59a728 -
card: AUROC -> reproducible Severity-token figures (87/89); drop unshipped Decision-token 92/96 headline + false reproduce_eval attribution
Verified signature8993dbf -
Add eval_data/ (4 datasets, 4858 rows)
Verified signature576f936 -
Add reproduce_eval.py (self-contained 4-axis reproduction)
Verified signature5e9622a
-
Update PolyGuard figure: RavenGuard AUROC 87.0->92.2 (Decision-token)
Verified signature2d2fc35 -
Backfill corrected Decision-token AUROC (ChineseSafe 89→96.1, PolyGuard 87→92.2)
Verified signatured1182f1 -
Fix critical: rotary embeddings were all-zero (no positional encoding)
Verified signaturefrom_pretrained builds under init_empty_weights, so the non-persistent cos/sin buffers start on meta; the loader then materialized them as ALL-ZERO real tensors and _ensure_rotary's None/meta/device checks did not detect the zero buffer, so the model ran with NO positional encoding -- fine on tiny inputs but collapsing to a flat P(block)~0.517 on real (~1000-token) inputs. A _rotary_ready flag now forces one real rebuild after load; outputs are byte-identical to the reference checkpoint (verified). Also: raise on padded attention_mask instead of silently misscoring, add GenerationMixin (.generate works), add injection-safe apply_chat_template + policy_prompt_v2.txt, add manifest.json, refresh README (Decision-token P(block) score, sdpa backend note, batch-size-1 guidance).752d194 -
Correct RavenGuard language metadata to the base-18 training list
Verified signaturea9816d4 -
Make bundled backbone snapshot resolution deterministic
Verified signature97a2e7c -
Fix bundled Netis Amniota loading and update 0.8B parameter labels
Verified signature31199ea -
Self-contained backbone (netis_amniota); remove nanoai dependency & naming (forward bit-identical)
Verified signaturebcbed37 -
Gen-only model card: remove Stream sections/rows (Stream ships in its own repo)
Verified signature2d2f68b -
refresh figure size_vs_chinese.png
Verified signature9657d5f -
refresh figure service_sim_disruption.png
Verified signatureec237e1 -
refresh figure polyguard_multilingual.png
Verified signatureea05105 -
refresh figure chinesesafe_f1.png
Verified signaturea607ee6 -
Refresh model card: honest Stream numbers (remove fabricated Qwen AUROC / 2270ms / 140x; add measured 13.2ms latency, categorical-vs-continuous framing)
Verified signature0daf984
-
RavenGuard-Gen v16-s2000: weights (HF trust_remote_code) + refreshed card/figures
Verified signature40ee3bf -
RavenGuard-Gen v16-s2000: weights (HF trust_remote_code) + refreshed card/figures
Verified signature5be5643
-
Add comparison figures
Verified signature44d98c3 -
Add model card (v0)
Verified signature07bb941 -
initial commit
Verified signaturea60e6ce