模型选择与结果
- 固定基座版本:
c1899de289a04d12100db370d81485cdf75e47ca
- 最终模型:Round 3(GRPO)
- 参数量:596,049,920,与基座完全一致
- 权重 SHA-256:
64f97589d3743bfd531adc08863bfaee14c5b3fb3056f0cd023ed28bc4943773
- 安全代理分:79.60%
- 数学均值(GSM8K / MATH-500):36.00%
- 通用均值(MMLU / ARC-Challenge):32.92%
- 加权总分:52.51%,高于 Round 2b 的 52.09% 和 Round 3b 的 51.03%
加权规则为 0.4 × 安全 + 0.3 × 数学 + 0.3 × 通用。详细逐轮结果见
evaluation/model_selection.json,重训分支审计见
evaluation/retrain_comparison.json。
与原始 Qwen3-0.6B 无缝兼容
本仓库上传的是完整合并权重,不需要 PEFT/LoRA 适配器。架构、词表、token ID、聊天模板、
thinking 开关和默认生成配置均与原始 Qwen/Qwen3-0.6B 兼容。原调用代码只需替换模型 ID:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Yy245/Qwen3-0.6B-SafeMath-ZJU"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
)
messages = [{"role": "user", "content": "Give me a short introduction to large language models."}]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=512)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):]
print(tokenizer.decode(output_ids, skip_special_tokens=True))
enable_thinking=False、多轮对话、pipeline、SGLang 和 vLLM 的调用方式也与原模型一致。
例如原 vLLM 命令只需替换模型 ID:
vllm serve Yy245/Qwen3-0.6B-SafeMath-ZJU \
--enable-reasoning --reasoning-parser deepseek_r1
建议使用 transformers>=4.51.0;thinking 模式可沿用原模型的默认采样设置
(temperature 0.6、top-p 0.95、top-k 20)。
训练过程报告
完整的一页 PDF 可在 training_report.pdf 下载。

限制
这些分数来自固定代理评测,并不等同于真实部署中的绝对安全保证。模型仍可能对含糊但无害的
请求过度拒答,也可能在较难数学题、长上下文或分布外输入上生成错误内容;高风险场景应继续
使用独立安全策略、人工复核和领域评测。