Kasui Tanku 2B
A LoRA adapter for enhanced math and logic in Qwen3.5-2B
2 min read
Kasui Tanku 2B is an independent research LoRA (a small add-on for fine-tuning a base model) trained on math problem explanations. Built on the Qwen/Qwen3.5-2B model using a math example dataset, the adapter is optimized for solving English math competition problems. In practice, the model improves reasoning accuracy and logic responses compared to the base version. This new release will be useful for researchers and developers looking for a more powerful math engine in a compact format.
Key features
- Accuracy increase on the MATH-500 benchmark up to 42.6% compared to 11.6% for the base.
- BF16-based training using the peft library.
- Improved results on MMLU-Pro, MMLU-Redux, and SuperGPQA tests.
- Support for running on local hardware via PyTorch and Transformers.
What you can do
- Apply the model to solve English math competition problems.
- Test the quality of logical reasoning and response generation with tags.
- Compare the adapter performance metrics with the base Qwen3.5-2B version.
- Integrate the weights into custom text processing pipelines using peft.
Example
from transformers import AutoTokenizer, Qwen3_5ForCausalLM
from peft import PeftModel
import torch
base = "Qwen/Qwen3.5-2B"
revision = "15852e8c16360a2fea060d615a32b45270f8a8fc"
device = "xpu" if torch.xpu.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(base, revision=revision)
model = Qwen3_5ForCausalLM.from_pretrained(base, revision=revision, dtype=torch.bfloat16,
attn_implementation="eager").to(device)
model = PeftModel.from_pretrained(model, ".").eval()
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "What is the sum of the first ten squares?\nEnd with \\boxed{answer}."}],
tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.inference_mode():
tokens = model.generate(**inputs, do_sample=False, max_new_tokens=512)
print(tokenizer.decode(tokens[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))Read more
DetailsBenchmarks: MATH-500 — 42.6% (+18.8 percentage points over base); MMLU-Pro — 46.15% (+2.83 percentage points); SuperGPQA — 19.13% (+5.05 percentage points).
Requirements: a graphics card with BF16 support and PyTorch, Transformers, PEFT libraries.
Training: 71 examples, 54 optimizer steps, seed-42 BF16 LoRA.










Comments