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 Balanced

This model is a safety- and mathematics-oriented fine-tuned version of Qwen3-0.6B.

The released weights correspond to the merged V6 SFT checkpoint-500 model. It is intended for research on mathematical reasoning, safe responses, and general instruction following.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "ImReallyOK/qwen3-0.6b-safemath-balanced"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

messages = [
    {"role": "user", "content": "求方程 x^2 - 5x + 6 = 0 的解。"}
]

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=2048,
        do_sample=False,
    )

answer = tokenizer.decode(
    outputs[0, inputs.input_ids.shape[1]:],
    skip_special_tokens=True,
)

print(answer)
Downloads last month
-
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 ImReallyOK/qwen3-0.6b-safemath-balanced

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