You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Qwen3-0.6B-SafeMath-ZJU

这是 ZJU 考核最终用于评分的完整合并模型,基于 Qwen/Qwen3-0.6B 进行安全与数学推理联合微调。 模型经过混合 SFT、失败驱动 SFT 和多目标 GRPO 三个阶段,最终选择固定评测加权分最高的 Round 3,而不是后续未通过防遗忘门禁的 Round 2b 或 Round 3b。

模型选择与结果

  • 固定基座版本: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 下载。

ZJU 考核训练过程与评测结果

限制

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

Downloads last month
-
Safetensors
Model size
0.8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Yy245/Qwen3-0.6B-SafeMath-ZJU

Finetuned
Qwen/Qwen3-0.6B
Finetuned
(1139)
this model