/ Модель

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

Контекст
40 960 токенов
Параметры
1,7 млрд
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-1.7B
Опубликована
2 ноя 2026

qwen3-1.7b-gsm8k-grpo

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

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

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

Дообученная на GSM8K модель Qwen3-1.7B для решения текстовых математических задач и генерации кратких рассуждений с числовым ответом.

Qwen3-1.7B GRPO for GSM8K — дообученная на датасете OpenAI GSM8K компактная языковая модель семейства Qwen3, представленная felipedutrain. Она предназначена прежде всего для решения текстовых математических задач с кратким пошаговым рассуждением и выдачей числового ответа. Модель имеет плотную архитектуру Qwen3ForCausalLM, 1,7 млрд параметров и контекст до 40 960 токенов; принимает текст и генерирует текст. В репозитории есть адаптер LoRA, слитые веса в bf16 и варианты GGUF Q4_K_M и Q8_0.

В карточке сообщается о точности 75,8% по строгому критерию на полном тестовом наборе GSM8K для адаптера, применённого к базовой модели. Также описан запуск GGUF Q4_K_M на PlayStation 4 и использование модели для диалога на португальском, однако основная настройка и оценка ориентированы на английские задачи GSM8K. Лицензия — Apache-2.0.

Результаты следует интерпретировать с учётом ограничений: обучение выполнено с одним seed, тестовый набор многократно использовался при настройке, а ответы ограничивались 320 новыми токенами. В README отмечено, что слитые bf16-веса и конвертированные из них GGUF-файлы теряют значительную часть эффекта адаптера и не воспроизводят заявленную точность; измерения полного теста относятся к активному LoRA-адаптеру на базовой модели.

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

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

Ограничения

Обучение проведено с одним seed, а тест GSM8K многократно использовался при настройке, поэтому оценка может быть завышена для новых задач. Согласно README, слитые bf16-веса и GGUF-варианты из них теряют значительную часть эффекта адаптера; заявленная оценка относится к LoRA-адаптеру на базовой модели.

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

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

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

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

Источники: 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

Qwen3-1.7B GRPO for GSM8K, running on a PlayStation 4

On a PlayStation 4 GPU (Vulkan, Q4_K_M): 11.2 s per answer, 1.56× faster than the PS4 CPU (first 100 test questions), with the same accuracy as a CPU on the full test set (72.9% flexible, n = 1,319, p = 1.0).

Qwen/Qwen3-1.7B fine-tuned with GRPO (LoRA) on the GSM8K train split to answer grade-school math problems in a fixed, machine-readable format (#### <number> on the last line), in non-thinking mode. This model is part of a project that runs it on a PlayStation 4 with llama.cpp, on the CPU and on the GPU through Vulkan.

Summary. GRPO taught the format: on the full GSM8K test set (n = 1,319, full precision) the model answers in the requested format 75.8% of the time, against 67.1% and 71.3% for the base model with the best prompts tested (McNemar p < 0.001 for both). It did so without losing accuracy (flexible 76.3% vs 76.6% for the base, p = 0.81). It did not improve reasoning: accuracy is unchanged.

Which weights reproduce the reported numbers. The GSM8K results on this card (75.8% strict, 76.3% flexible) were measured on Kaggle with the LoRA adapter active on the base model, before merging. The merged checkpoint at the root of this repository (model.safetensors) was saved in bf16, and rounding to bf16 discarded most of the adapter update: about 20% of it survives. On 120 test questions, the merged checkpoint reproduces the Kaggle outputs word for word in 28 (23%); the same adapter merged in fp32 does so in 110 (92%). The GGUF files in gguf/ were converted from the bf16 merge and inherit this loss. It affects the answer format, not the accuracy: on the PS4, Q4_K_M from the fp32 merge scores 71.7% strict against 66.8% for the published file, with the same flexible accuracy (73.0% vs 72.9%). To reproduce the reported numbers, load the base model with the adapter in lora/ (see Usage), or merge it yourself in fp32.

Results

Greedy decoding, non-thinking mode, at most 320 new tokens. Strict = the last #### <number> matches the reference. Flexible = the strict answer if present, otherwise the last number in the output (commas and $ ignored). Comparisons are paired on the same questions. p-values are exact McNemar tests, and intervals are 95% (Wilson for accuracies, Newcombe for paired differences).

Base vs this model (full GSM8K test, full precision, n = 1,319)

Same system prompt for both models (see Prompt).

ModelStrictFlexible (95% CI)Mean tokensTruncated
Qwen3-1.7B (base)2.9%76.6% (74.2–78.8)149.640 (3.0%)
This model75.8%76.3% (73.9–78.5)129.219 (1.4%)
  • Flexible: 79 questions fixed and 83 broken, p = 0.81.
  • Strict: 963 fixed and 1 broken, p < 10⁻²⁰⁰.

Prompt baselines (base model, full precision, n = 1,319)

The 2.9% above uses a prompt the base model handles poorly. The fair comparison is against the best prompts for the base model, which used this system prompt: "Solve the math problem step by step. Be concise. On the last line, write only the final answer in the format: #### <number>". The 2-shot prompt uses training questions 0 and 1. This model was regraded with the same grader as the baselines.

Strict (95% CI)Flexible (95% CI)Tokens per answer
This model (regraded)75.7%76.2%129
Base + instruction67.1% (64.5–69.6)75.2% (72.8–77.5)127.8
Base + 2-shot71.3% (68.8–73.6)72.0% (69.5–74.4)89.4
  • Format: +8.6 points vs instruction (186 vs 73 discordant questions, p < 0.0001) and +4.4 vs 2-shot (158 vs 100, p = 0.0004).
  • Accuracy: tied with the instruction prompt (96 vs 83, p = 0.37). The 2-shot prompt shortens answers by 30% but loses 4.2 points of flexible accuracy (153 vs 98, p = 0.0006).

Quantization (full GSM8K test, n = 1,319)

All quantized runs use llama.cpp commit dde879bc with this model's chat template and the same prompt. The laptop is an x86 CPU (Intel i5-10300H, 4 threads), used only to separate quantization from backend.

ConfigurationFlexible (95% CI)Strict (95% CI)TokensTruncated
Full precision (PyTorch)76.3% (73.9–78.5)75.8%129.219
Q5_K_M, laptop CPU74.8% (72.3–77.0)57.6% (54.9–60.3)135.025
Q4_K_M, laptop CPU72.9% (70.4–75.2)63.2% (60.5–65.7)132.217
Q4_K_M, PS4 GPU (Vulkan)72.9% (70.5–75.3)66.8% (64.2–69.3)131.224
Q8_0, PS4 GPU (Vulkan)76.1% (73.7–78.3)65.9% (63.3–68.4)139.733
ComparisonΔ flexible (95% CI)McNemar flexibleΔ strict (95% CI)McNemar strict
Q4_K_M PS4 GPU − full precision−3.3 (−5.5 to −1.2)86 vs 130, p = 0.003−9.0 (−11.4 to −6.6)78 vs 197, p < 0.001
Q4_K_M laptop − full precision−3.4 (−5.6 to −1.2)85 vs 130, p = 0.003−12.7 (−15.2 to −10.1)79 vs 246, p < 0.001
Q4_K_M laptop − Q4_K_M PS4 GPU−0.1 (−1.8 to +1.7)67 vs 68, p = 1.0−3.6 (−5.8 to −1.5)80 vs 128, p = 0.001
Q5_K_M − full precision−1.5 (−3.5 to +0.5)79 vs 99, p = 0.15−18.2 (−20.9 to −15.5)64 vs 304, p < 0.001
Q5_K_M − Q4_K_M (laptop)+1.9 (−0.3 to +4.1)120 vs 95, p = 0.10−5.5 (−8.4 to −2.6)158 vs 231, p < 0.001
Q8_0 PS4 GPU − Q4_K_M PS4 GPU+3.2 (+1.1 to +5.4)129 vs 87, p = 0.005−0.9p = 0.53
  • Q4_K_M loses about 3.4 points of flexible accuracy against full precision, the same on an x86 CPU and on the PS4 GPU.
  • Q8_0 recovers that loss: 76.1% flexible (1,004 of 1,319) on the PS4 GPU, +3.2 points over Q4_K_M (p = 0.005) and within two questions of full precision (1,006). This was measured on the published Q8_0 file, which was generated from the bf16 merge. The loss at 4 bits therefore comes from quantization, not from llama.cpp. Q8_0 is slower on the PS4 (13.1 s per answer against 11.6 s) and does not recover the format (65.9% strict; see the note at the top).
  • Q5_K_M sits in between: it is not significantly different from Q4_K_M (p = 0.10) or from full precision (p = 0.15). The Q5_K_M file is not in this repository.
  • The format is fragile to quantization: strict accuracy ranges from 57.6% to 66.8% across quantizations and backends, with no order by precision, while flexible accuracy stays within ~2 points.

GGUF files

In gguf/, converted with llama.cpp commit dde879bc (no imatrix):

FileSizeSHA-256
qwen3-1.7b-gsm8k-grpo-Q4_K_M.gguf1.11 GBd7771967dc6e5a69a8c676f8d0103763062d44b5b581aa9c707bc60a4684722b
qwen3-1.7b-gsm8k-grpo-Q8_0.gguf1.83 GB037c54e893afc4aa12280df84939aba2ae4acb213ef912a4bde133c7800eb36c
chat_template_treinado.jinja4.8 KB8428c815ac94d82064e35ff1e841dcbe260e7e53a8d0bd3b94afa2eefa9bccab
chat_template_neutro.jinja (general chat, see below)5.1 KB173bdefad00cbd11b4a853c30ec8869ce8ed379d3c89f3ceb8222f0bf8b5a2bd
  • Q4_K_M costs ~3.4 points of flexible accuracy against full precision (n = 1,319, p = 0.003; table above).
  • The format is fragile to quantization: strict accuracy is 57.6–66.8% on the quantized runs, against 75.8% in full precision. If you parse the #### line, expect more answers without it, and fall back to the last number.
  • Q8_0 recovers the accuracy, not the format: on the full test set on the PS4 GPU it scores 76.1% flexible and 65.9% strict (table above). F16 has not been evaluated on the full test set.
  • Both GGUF files were converted from the bf16 merge (see the note at the top).

Prompt

System prompt used in training and in all evaluations of this model:

Solve the math problem. Reason briefly, step by step. On the last line, write only the final answer as: #### <number>

Use the chat template with enable_thinking=False.

Usage

llama.cpp (llama-server)

This is the setup used in the evaluations: the model, the chat template from gguf/, -c 4096, -n 320, greedy decoding and thinking disabled per request.

hf download felipedutrain/qwen3-1.7b-gsm8k-grpo \
  gguf/qwen3-1.7b-gsm8k-grpo-Q4_K_M.gguf gguf/chat_template_treinado.jinja --local-dir .

llama-server -m gguf/qwen3-1.7b-gsm8k-grpo-Q4_K_M.gguf \
  --jinja --chat-template-file gguf/chat_template_treinado.jinja \
  -c 4096 -n 320 --host 127.0.0.1 --port 8080

curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
  "messages": [
    {"role": "system", "content": "Solve the math problem. Reason briefly, step by step. On the last line, write only the final answer as: #### <number>"},
    {"role": "user", "content": "Joana has 3 boxes with 12 pencils each and gives 7 pencils to her sister. How many pencils are left?"}
  ],
  "temperature": 0, "seed": 42, "max_tokens": 320,
  "chat_template_kwargs": {"enable_thinking": false}
}'

transformers (base model + LoRA adapter)

This is the artifact the reported numbers were measured on. It needs peft (tested with peft 0.21.3 and transformers 4.57.6).

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "felipedutrain/qwen3-1.7b-gsm8k-grpo"
tokenizer = AutoTokenizer.from_pretrained(repo)
base = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-1.7B", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, repo, subfolder="lora")

messages = [
    {"role": "system", "content": "Solve the math problem. Reason briefly, step by step. "
                                  "On the last line, write only the final answer as: #### <number>"},
    {"role": "user", "content": "Joana has 3 boxes with 12 pencils each and gives 7 pencils to her sister. "
                                "How many pencils are left?"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True,
                                     enable_thinking=False)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=320, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

The model.safetensors at the root of this repository is the same adapter merged into the base and saved in bf16. AutoModelForCausalLM.from_pretrained(repo) loads it without peft, but it does not reproduce the reported format accuracy (see the note at the top).

General chat use: configuration matters more than the tuning (added 2026-11-15)

This model was tuned for GSM8K, but the same Q4_K_M file is also used as a general chat assistant in Portuguese on the PS4. For that use, the settings changed the result far more than the weights did. The weights in this repository did not change; only the recommended way to run them for chat.

Evaluation. 120 items in Portuguese (the development split of a 360-item assistant evaluation: conversation, documents, instructions, reasoning, technical and tool-like questions, 20 each), graded by rules, run on a laptop CPU with llama.cpp.

Same Q4_K_M filePrevious chat setupNeutral configuration
Thinkingonoff
System promptnoneshort, in Portuguese, with date and time
Token limit320400
Sampling—temperature 0.7, top_p 0.8, top_k 20
Accuracy27.5% (33/120)59.2% (71/120)
Empty answers670
Truncated answers9011
Median time per answer28.3 s14.0 s
Generation speed11.5 tok/s10.5 tok/s
Category (20 items each)Previous chat setupNeutral configuration
Conversation55%75%
Documents45%75%
Instructions45%55%
Reasoning0%60%
Technical5%65%
Tool-like questions15%25%
  • +31.7 points (95% CI +20.8 to +42.5; 47 items gained, 9 lost; p < 0.001), paired on the same items.
  • Why: with thinking on and a 320-token limit, the model often spends the whole budget thinking and returns an empty or truncated answer.
  • Faster answers, same generation speed: the time halves because fewer tokens are generated.
  • The tuning itself does not help here: with the same neutral configuration, the untuned Qwen3-1.7B scores 58.3%, a tie. The gain of this model is the GSM8K answer format.

Caveats. Development split, one run per configuration (run-to-run noise is about 3–4 points); the items were written by an AI model and audited by a second one; the previous setup was reproduced on the laptop with the same settings, not measured on the console; on the PS4 the neutral configuration had a smoke test and hands-on use only (11.9 tokens/s on the GPU).

How to run it for chat (llama-server):

hf download felipedutrain/qwen3-1.7b-gsm8k-grpo \
  gguf/qwen3-1.7b-gsm8k-grpo-Q4_K_M.gguf gguf/chat_template_neutro.jinja --local-dir .

llama-server -m gguf/qwen3-1.7b-gsm8k-grpo-Q4_K_M.gguf \
  --jinja --chat-template-file gguf/chat_template_neutro.jinja \
  --reasoning off -c 4096 -n 400 --temp 0.7 --top-p 0.8 --top-k 20 --min-p 0 \
  --host 127.0.0.1 --port 8080

chat_template_neutro.jinja is the trained template plus one change: when the client sends no system message, it inserts a short Portuguese system prompt and the current date and time (llama.cpp's strftime_now). A system message from the client replaces it. For the GSM8K format, keep using chat_template_treinado.jinja and the prompt above.

Evaluation items, grader, per-item results and the PS4 chat setup: github.com/FelipeSales18/llm-ps4, assistente/.

Inference on a PlayStation 4

The Q4_K_M file runs on a 2013 PlayStation 4 running Linux (8-core AMD Jaguar, GCN 2 GPU, 8 GB shared GDDR5) with llama.cpp dde879bc.

Q4_K_M, first 100 test questionsPS4 CPU (8 threads)PS4 GPU (Vulkan)
Seconds per answer17.511.2 (1.56× faster)
Generation speed8.9 tokens/s11.9 tokens/s
Flexible / strict81 / 7477 / 70
  • Accuracy is the same as on a CPU. On these 100 questions the GPU and CPU are not significantly different (flexible 2 vs 6 discordant questions, p = 0.29). On all 1,319 questions the GPU scores exactly like the same Q4_K_M file on an x86 CPU (72.9% vs 72.9%, p = 1.0). The 1.56× speed-up was measured on the 100 questions.
  • GPU without installing anything: the system had no Vulkan driver. The RADV driver was extracted from a community-built Mesa package for the PS4 into the project folder, checked by SHA-256, and loaded with VK_DRIVER_FILES. llama.cpp was built with -DGGML_VULKAN=ON and runs with -ngl 99.

Scripts and per-question results: github.com/FelipeSales18/llm-ps4.

Training

  • Method: GRPO with LoRA (r = 16, alpha = 32, all attention and MLP projections), loss type dapo, beta = 0.0
  • Rewards: correctness 2.0 (flexible match), format 1.0 (last line is #### <number>), length penalty 0.0
  • 357 steps, 4 prompts per step, 8 completions per prompt (1428 prompts seen), learning rate 5e-06, cosine schedule, 10 warmup steps
  • Hardware: 1x Tesla T4 (Kaggle), 6.02 h of training
  • Software: unsloth 2026.10.11, trl 1.15.0, transformers 5.16.1, peft 0.20.0, datasets 4.8.5, torch 2.11.0+cu128

Limitations

  • One seed. A single training run with one seed. Differences of a few points can be noise; see the confidence intervals and the McNemar tests.
  • A heavily reused test set. The GSM8K test set was used for every decision in the project (prompts, token limit, quantization, GPU vs CPU), so the reported numbers may be optimistic for unseen data.
  • F16 not evaluated on the full test set. The attribution of the ~3.4-point loss of Q4_K_M to quantization rests on the Q8_0 run (76.1% flexible on the PS4 GPU).
  • The merged weights are not the evaluated artifact. The reported full-precision numbers come from the adapter active on the base model; the bf16 merge at the root, and the GGUF files converted from it, lost most of the adapter update (see the note at the top).
  • One GPU hang. On the PS4 GPU, generation stopped once (at one question of the full run) with no kernel message. After a reboot the same question ran normally, and the rest of the run finished with no hang. The cause is unknown.
  • GSM8K only, English only, greedy decoding with a 320-token limit; truncated answers count as wrong.

Repository

Merged weights (bf16) at the root, LoRA adapter in lora/, GGUF files in gguf/, per-question evaluation outputs and training logs in eval/. Code, scripts and benchmarks: https://github.com/FelipeSales18/llm-ps4

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей