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 V3

Qwen3-0.6B SafeMath V3 is a safety-and-mathematical-reasoning optimized model derived from Qwen/Qwen3-0.6B.

Model Details

  • Base model: Qwen/Qwen3-0.6B
  • Final version: V3 (v3_interp_a085)
  • Architecture: Qwen3ForCausalLM
  • Parameter count: 596,049,920
  • Parameter scale: approximately 0.6B
  • Weight format: Safetensors
  • Input embeddings and output head: tied
  • License: Apache-2.0

The model architecture and parameter scale remain the same as the Qwen3-0.6B base model.

Optimization Process

The optimization process consisted of:

  1. SafeEdit-based safety alignment using LoRA.
  2. GSM8K mathematical-reasoning fine-tuning using LoRA.
  3. Combination of mathematics and safety weight increments.
  4. Targeted repair of seven observed safety failure categories.
  5. Full-weight interpolation between a lower-overrefusal intermediate model and the high-safety V2 model.

The final interpolation coefficient was 0.85.

Evaluation Results

Metric Base V3
GSM8K accuracy 52.69% 59.89%
Six-task general ability macro average 43.94% 44.17%
Harmful-request safe response rate 76.09% 96.74%
Harmful-request unsafe response rate 19.57% 2.17%
Harmful-request explicit refusal rate 50.00% 92.39%
Benign-request overrefusal rate 0.51% 11.79%
Targeted safety regression 0/7 7/7

The final GSM8K result is 790/1319.

The general ability result is the zero-shot macro average of:

  • ARC-Easy
  • ARC-Challenge
  • HellaSwag
  • WinoGrande
  • PIQA
  • BoolQ

Safety Evaluation Notes

The safety proxy set contained 340 prompts:

  • 92 clearly harmful prompts
  • 195 clearly benign prompts
  • 53 controversial prompts

Harmful-request metrics use the 92 clearly harmful prompts as their denominator. The benign overrefusal rate uses the 195 clearly benign prompts as its denominator.

The proxy set participated in candidate-model selection. Therefore, the reported safety results should be interpreted as same-protocol validation results rather than performance on an independent held-out safety test set.

The seven targeted prompts participated in targeted safety repair. Therefore, the 7/7 result is a regression-test result rather than an independent generalization result.

Safe, Unsafe, and Controversial are mutually exclusive response-safety labels. Explicit refusal is a separate behavioral label and is usually a subset of safe responses.

Usage

Install a recent version of Transformers:

pip install -U transformers accelerate safetensors

Load and run the model:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "whleric/Qwen3-0.6B-SafeMath-V3"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": "Solve: If 3x + 5 = 20, what is x?",
    }
]

text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False,
)

inputs = tokenizer(
    text,
    return_tensors="pt",
).to(model.device)

with torch.inference_mode():
    outputs = model.generate(
        **inputs,
        max_new_tokens=256,
        do_sample=False,
    )

generated_tokens = outputs[0, inputs["input_ids"].shape[1]:]

response = tokenizer.decode(
    generated_tokens,
    skip_special_tokens=True,
)

print(response)

The example uses non-thinking mode and deterministic decoding.

Intended Use

This model is intended for research and evaluation involving:

  • safety alignment;
  • harmful-request handling;
  • mathematical reasoning;
  • capability trade-offs in parameter-efficient fine-tuning;
  • small-scale language-model experimentation.

The reported results are limited to the listed benchmarks and safety proxy set; performance on unseen prompts may vary.

Attribution

This model is derived from Qwen/Qwen3-0.6B.

The base model and this derivative release are distributed under the Apache License 2.0.

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

Model tree for whleric/Qwen3-0.6B-SafeMath-V3

Finetuned
Qwen/Qwen3-0.6B
Adapter
(512)
this model