yuaay/vanguard
0348
VANGUARD
VANGUARD is a general-purpose causal language model based on Qwen3-8B and further trained for agent-safety judgment. It uses the standard text-generation interface rather than a dedicated classifier head.
The safety training follows JANUS: Foreseeing Latent Risk for Long-Horizon Agent Safety. In addition to judging an observed trajectory, VANGUARD can anticipate safety-relevant future events from a partial trajectory and use them to identify risks before a harmful action occurs.
Model details
Usage
pip install -U transformers accelerate torchimport torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "YOUR_ORG/VANGUARD"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
torch_dtype="auto",
device_map="auto",
)
messages = [
{
"role": "system",
"content": "<SYSTEM_PROMPT>",
},
{
"role": "user",
"content": "<USER_PROMPT>",
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False,
)
generated = output[0, inputs["input_ids"].shape[1]:]
print(tokenizer.decode(generated, skip_special_tokens=True))Use the exact prompt template released with the checkpoint when reproducing paper results.
Citation
JANUS: Foreseeing Latent Risk for Long-Horizon Agent Safety
@misc{xiong2026janusforeseeinglatentrisk,
title = {JANUS: Foreseeing Latent Risk for Long-Horizon Agent Safety},
author = {Yuan Xiong and Linji Hao and Shizhu He and Yequan Wang and Lijun Li},
year = {2026},
eprint = {2607.19913},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
url = {https://arxiv.org/abs/2607.19913}
}