RocketGuard-1B is a text-only MiniCPM5-1B fine-tune for guardrail and agent/tool-call safety experiments.
The GitHub repo contains the training pipeline, notebook, data-ingestion helpers, and reproducibility notes. The model weights are hosted on Hugging Face.
- Hugging Face model: https://huggingface.co/Manitchahar/RocketGuard-1b
- Base model:
openbmb/MiniCPM5-1B - Format: merged full model
- Modality: text only
Weights, datasets, checkpoints, and result zips are intentionally not committed to GitHub.
RocketGuard-1B is trained to produce structured guardrail decisions for prompts and agent actions, including:
allowblockrequire_confirmationask_clarificationrewrite
This is a research and learning release. Treat it as one safety layer, not a complete production safety system.
Run the notebook:
inference.ipynb
Or use the Python script:
pip install -U transformers accelerate safetensors
python inference.pyThe inference path uses raw model output. It does not normalize, remap, or post-process the model's JSON, so failures remain visible during testing.
The runtime prompt follows the training format: a system guardrail instruction plus a JSON user payload containing policy, user_request, retrieved_context, available_tools, agent_plan, and proposed_tool_call.
Agentguard.ipynb- Kaggle/Colab-oriented training notebook.inference.ipynb- minimal raw-output inference notebook for the merged Hugging Face model.inference.py- local inference script.train_rocketguard.py- Python training/evaluation script.ingest_missing_sources.py- data ingestion helper.unsloth.md- Unsloth MiniCPM5-1B fine-tuning recipe and notes.
- Base:
openbmb/MiniCPM5-1B - Fine-tuning: LoRA SFT with Unsloth / TRL
- Training examples: about 48.7k message-format examples
- Held-out clean eval examples prepared: about 2.3k examples
- Epochs: 3
- Final checkpoint step: 4572
- Max sequence length: 2048
Evaluation numbers are pending and should be published before making benchmark claims.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Manitchahar/RocketGuard-1b"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo,
trust_remote_code=True,
device_map="auto",
)The model is text-only. It does not inspect images, audio, browser state, files, private app state, or external tool effects directly.
If you clone this repo, create your own .env locally for credentials. Never commit tokens.