/ Модель

Характеристики

Контекст
4 096 токенов
Параметры
1,5 млрд
Размер весов
3,1 ГБ
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-Math-1.5B
Библиотека
transformers
Опубликована
18 авг 2025

qwen2p5-math-1p5b-merged

Генерация текстаТекст → текст3 профессии
239скачиваний за 30 дней1лайквеса обновлены11 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Дообученная версия Qwen2.5-Math-1.5B для решения математических текстовых задач с генерацией краткого ответа или решения.

Kevinmastascusa/qwen2p5-math-1p5b-merged — дообученная на математических текстовых задачах модель на базе Qwen/Qwen2.5-Math-1.5B. Это причинная языковая модель семейства Qwen2 с 1,5 млрд параметров; LoRA-адаптер объединён с базовыми весами, поэтому модель загружается как обычная модель Transformers. Она предназначена для решения математических задач в формате короткого ответа или пошагового решения, в частности задач из GSM8K, SVAMP, MATH-500 и MathQA. Модель принимает текст и генерирует текст; основным языком карточки указан английский, а базовая модель ориентирована также на китайский. Контекст составляет 4096 токенов.

В тестах проекта точность exact match составила 62,5% на SVAMP, 32,5% на GSM8K и 16,0% на MATH-500; результаты получены на небольших выборках, без сопоставимого базового теста. Оценка MathQA некорректна из-за несовместимости формата ответа со скорером. Модель не предназначена для формальных доказательств, высокорисковых решений или математических соревнований; длинные решения могут обрезаться лимитом генерации. Лицензия — Apache-2.0.

Сценарии применения

  • решение арифметических текстовых задач на английском языке
  • генерация кратких ответов для задач в стиле GSM8K и SVAMP
  • получение черновых решений математических задач формата MATH
  • эксперименты с дообучением языковых моделей на математических данных

Ограничения

Результаты проверялись на небольших выборках без сопоставимого теста базовой модели; оценка MathQA некорректна из-за скорера, сравнивающего числовые ответы с буквами вариантов. Модель может ошибаться, выдавать неподходящий формат ответа и обрезать длинные решения.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

qwen2p5-math-1p5b-merged

Qwen2.5-Math-1.5B fine-tuned with LoRA on math word problems, with the adapter merged into the full weights so it loads like any Transformers model. The unmerged adapter is Kevinmastascusa/symbolic-math-qwen2p5-1p5b-lora. Training, merge and evaluation code is in kevinmastascusa/symbolic-math-ai, whose Streamlit app adds Tree-of-Thoughts search with SymPy-checked final answers on top of this model.

Model summary

  • Base: Qwen/Qwen2.5-Math-1.5B
  • Type: causal LM (decoder-only), about 1.5B parameters
  • Weights: LoRA adapter merged into the base weights (merge_lora_to_full.py)
  • Focus: math word problems with a final numeric or short text answer
  • Prompt formats:
    • GSM8K and SVAMP: Question: ...\nAnswer:
    • MATH-500: Problem: ...\nSolution:
    • MathQA: Problem: ...\nOptions: ...\nSolution:

Results

Exact match on the project's test splits, with greedy decoding and up to 64 new tokens. The scorer takes the last number in the model's output and compares it with the last number in the gold answer.

Test setProblemsCorrectExact match
SVAMP20012562.5%
GSM8K2006532.5%
MATH-5001001616.0%
Three scored sets50020641.2%
MathQA2000not scored (see below)
  • MathQA is not a real score yet. Its gold answers are option letters (a to e), and the scorer compares them with the last number in the output, so they can never match. MathQA needs an option-aware scorer before it can be reported. Counting MathQA's forced zeros, the scorer reports 29.4% over all 700 problems.
  • Each set uses the first problems of its test split (MATH-500: the project's 100-problem test split).
  • There is no base-model baseline under the same scorer yet, so these numbers show where the model stands, not how much fine-tuning added.
  • Scored as the run-2 LoRA adapter on the base model; this repo is that adapter merged into the base weights. Script: evaluate_model.py. Raw results: eval_all.json.

Training

  • Method: LoRA on a 4-bit NF4 quantized base with double quantization (QLoRA style), gradient checkpointing and mixed precision
  • LoRA: r=8, alpha=16, dropout=0.05 on the q, k, v, o, gate, up and down projections
  • Data: up to 200 examples each from GSM8K, MathQA, SVAMP and MATH-500, split 80/20 into 640 training and 160 validation examples
  • Schedule: 2 epochs (320 optimizer steps), batch size 1 with 4 gradient-accumulation steps, peak learning rate 5e-5 with 50 warmup steps and linear decay, weight decay 0.01, max length 256
  • Kept checkpoint: lowest validation loss, at step 200 (loss 0.727, perplexity 2.07)

Intended use

  • Math word problem solving and reasoning research
  • Not for high-stakes decisions, formal proofs, or competition-level math

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "Kevinmastascusa/qwen2p5-math-1p5b-merged"
tok = AutoTokenizer.from_pretrained(model_id)
if tok.pad_token is None:
    tok.pad_token = tok.eos_token

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
    device_map="auto" if torch.cuda.is_available() else None,
)

def solve(q, max_new_tokens=64):
    prompt = f"Question: {q}\nAnswer:"
    inputs = tok(prompt, return_tensors="pt").to(model.device)
    with torch.no_grad():
        out = model.generate(
            **inputs, max_new_tokens=max_new_tokens,
            do_sample=False, num_beams=1, pad_token_id=tok.eos_token_id
        )
    return tok.decode(out[0], skip_special_tokens=True)

Prompting tips

  • GSM8K and SVAMP: Question: ...\nAnswer:
  • MATH-500: Problem: ...\nSolution:
  • MathQA: Problem: ...\nOptions: ...\nSolution:

Limitations

  • Final-answer formatting affects scoring: the scorer reads the last number in the output
  • Small training set (640 examples) and small test sets (100 to 200 problems each)
  • A 64-token limit can cut off longer solutions
  • May hallucinate outside math tasks; use with caution

Hardware and latency

  • About 1.5B parameters; a GPU is recommended for interactive use
  • Typical decoding: 32 to 64 new tokens

License

Apache 2.0, inherited from the base model (Qwen/Qwen2.5-Math-1.5B).

Citation

If you use this model, please cite the base model:

@article{yang2024qwen25mathtechnicalreportmathematical,
  title={Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvement},
  author={An Yang and Beichen Zhang and Binyuan Hui and Bofei Gao and Bowen Yu and Chengpeng Li and Dayiheng Liu and Jianhong Tu and Jingren Zhou and Junyang Lin and Keming Lu and Mingfeng Xue and Runji Lin and Tianyu Liu and Xingzhang Ren and Zhenru Zhang},
  journal={arXiv preprint arXiv:2409.12122},
  year={2024}
}

Acknowledgements

  • The Qwen team at Alibaba for Qwen2.5-Math
  • The authors of GSM8K, MathQA, SVAMP and MATH-500
  • Contributors to the symbolic-math-ai project

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
efa1ad9

0 моделей