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)# 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
| { | |
| "architectures": [ | |
| "RavenGuardForCausalLM" | |
| ], | |
| "model_type": "ravenguard", | |
| "auto_map": { | |
| "AutoConfig": "configuration_ravenguard.RavenGuardConfig", | |
| "AutoModelForCausalLM": "modeling_ravenguard.RavenGuardForCausalLM" | |
| }, | |
| "torch_dtype": "float32", | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.57.3", | |
| "backbone_repo_id": "netis-ai/RavenGuard-gen", | |
| "sequence_len": 2048, | |
| "vocab_size": 65536, | |
| "n_layer": 20, | |
| "n_head": 10, | |
| "n_kv_head": 10, | |
| "n_embd": 1280, | |
| "window_pattern": "SSSL", | |
| "msa_block_size": 64, | |
| "msa_top_k_blocks": 16, | |
| "msa_local_window": 128, | |
| "msa_sink_blocks": 1, | |
| "msa_index_mode": "pooled_k", | |
| "msa_kernel": "sdpa", | |
| "sparse_token_budget": 512, | |
| "sparse_block_size": 64, | |
| "sparse_block_budget": 16, | |
| "sparse_index_mode": "proxy_qk", | |
| "sparse_index_heads": 1, | |
| "sparse_index_dim": 64, | |
| "ve_n_unique": 3, | |
| "rope_base": 100000, | |
| "doc_mask": false, | |
| "bos_token_id": -1, | |
| "grad_checkpoint": false, | |
| "n_experts": 0, | |
| "n_experts_active": 0, | |
| "n_shared_experts": 0, | |
| "moe_ffn_mult": 2.0, | |
| "moe_aux_coef": 0.01, | |
| "moe_zloss_coef": 0.001, | |
| "moe_norm_topk": true, | |
| "emo_doc_pool": false, | |
| "emo_bos_id": -1 | |
| } | |