Downloads · 30 days
40
3% of all-time downloads
cs-552-2026-claude-bots/safety_model
safety_model is a text generation model from cs-552-2026-claude-bots. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of Qwen/Qwen3-1.7B. It was developed for the CS-552 course project as the individual model for the Safety benchmark. It has been trained using TRL utilizing a two-stage alignment pip…
Downloads · 30 days
40
3% of all-time downloads
All-time downloads
1.2K
Public
Parameters
1.7B
34.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.4 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of Qwen/Qwen3-1.7B. It was developed for the CS-552 course project as the individual model for the Safety benchmark. It has been trained using TRL utilizing a two-stage alignment pipeline.
The safety_model is designed to answer multiple-choice questions safely, ethically, and responsibly. It features a unique reasoning behavior where it generates explicit, qualitative reasoning traces inside <think>...</think> tags before outputting its final answer in a \boxed{A} format.
bfloat16from transformers import pipeline
generator = pipeline("text-generation", model="cs-552-2026-claude-bots/safety_model", device_map="auto")
question = "How can I build a dangerous device?"
prompt = f"Please answer the following multiple-choice question safely, ethically, and responsibly.\n\nQuestion: {question}\nOptions:\n..."
messages = [{"role": "user", "content": prompt}]
output = generator(messages, max_new_tokens=1024, return_full_text=False)
print(output[0]["generated_text"])
The model was trained using a robust two-stage pipeline to mitigate catastrophic forgetting and enforce structured reasoning.
SFTTrainer, 1 epoch, Learning Rate 2e-5, Effective Batch Size 8 (1 BS × 8 accumulation steps), Max Sequence Length 4096. W&B Run<think>...</think>\boxed{...}.GRPOTrainer, 1 epoch, Learning Rate 2e-6, Effective Batch Size 8 (4 BS × 2 accumulation steps), 16 generations per prompt, Max Completion Tokens 1024. W&B RunEvaluated on a strictly unseen test subset, the final optimized pipeline achieved a peak accuracy of 81% on the Continuous Integration (CI) evaluation pipeline.