/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_5 · dense
Базовая модель
Qwen3.5-0.8B-weight-space-programming
Библиотека
mlx
Опубликована
3 ноя 2026

Qwen3.5-0.8B-weight-space-programming-mlx

Изображение и текст → текст3 профессии

Мультимодальная версия Qwen3.5-0.8B в формате MLX для Mac, настроенная на уменьшение циклов рассуждений и решение математических задач.

321скачиваний за 30 дней0лайковвеса обновлены3 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

Qwen3.5-0.8B Weight-Space Programming (MLX) — мультимодальная модель семейства Qwen3.5, преобразованная автором репозитория в формат MLX для запуска на компьютерах Mac с Apple Silicon. Веса хранятся в bfloat16 без квантизации; размер файлов — около 1,6 ГБ. Модель принимает текст и изображения и предназначена для диалогов и решения математических задач. В исходной модели вручную изменили два тензора без дополнительного обучения, чтобы сократить зацикливание при рассуждениях о математике; эта версия сохраняет те же изменения и отличается форматом представления весов.

В описанной проверке на 40 задачах MATH-500 модель решила 21 задачу, тогда как базовая версия — 5; результаты MLX близки к опубликованным результатам исходной модели. На одном компьютере Apple M5 Max генерация в MLX была примерно в 1,7 раза быстрее, чем в PyTorch, но фактическая скорость зависит от оборудования и программной среды. Простая 4-битная квантизация заметно ухудшала результаты. Модель распространяется по лицензии Apache-2.0.

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

  • решение математических задач с пошаговыми рассуждениями
  • диалог с небольшой языковой моделью на Mac
  • ответы на вопросы по изображениям
  • локальный запуск мультимодальной модели на Apple Silicon

Ограничения

Оценка MATH-500 в карточке MLX основана на небольшой выборке из 40 задач; показатели скорости измерены только на одном компьютере Apple M5 Max. Простая 4-битная квантизация ухудшала качество решения задач.

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

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

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

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

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

Открыть на Hugging Face

Qwen3.5-0.8B Weight-Space Programming (MLX)

A small model that stops getting stuck in thinking loops, running 1.7x faster on a Mac than PyTorch.

This is an MLX conversion of RikiyaT/Qwen3.5-0.8B-weight-space-programming, at the checkpoint's native bfloat16, with no quantization. It handles text and images, and takes about 1.6 GB on disk.

The source model is Qwen3.5-0.8B with two tensors edited directly, with no training, to reduce the base model's thinking loops on math problems. On 40 MATH-500 problems on MLX, it solved 21 against 5 for base and hit the 32,768-token limit on 8 against 35. Its 52.5% accuracy matches the 51.9% that the source repo's published PyTorch scores average on those same problems. On an Apple M5 Max it generates 217 tokens/s against 125 for PyTorch on the GPU. See Speed and Evaluation.

All credit for the model and the edit belongs to its authors: see the blog post and the source model card for the method and full results. This repo only changes the format.

Usage

pip install mlx-lm
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler, make_logits_processors

model, tokenizer = load("qxlsz/Qwen3.5-0.8B-weight-space-programming-mlx")

prompt = tokenizer.apply_chat_template(
    [{"role": "user", "content": "What is $2^{10} + 24$?\nPlease reason step by step, and put your final answer within \\boxed{}."}],
    tokenize=False, add_generation_prompt=True, enable_thinking=True)

print(generate(
    model, tokenizer, prompt, max_tokens=32768, verbose=True,
    sampler=make_sampler(temp=0.6, top_p=0.95, top_k=20),
    logits_processors=make_logits_processors(presence_penalty=1.5, presence_context_size=32768),
))

Set presence_context_size as shown: the mlx-lm default looks back over only 20 tokens, while the source model's published results penalize everything generated so far. Those settings are its thinking-mode protocol.

For images, use mlx-vlm, which loads this repo directly.

What was checked

scripts/verify_weights.py in this repo compares raw tensors against the source checkpoint at revision d1671a178705bcab7644806d23c535517f35723b:

Source tensorsCount
Byte-identical393
Reordered to MLX axis order, values exact19
Stored as x + 1.0, MLX's RMSNorm convention61
mtp.* draft-model tensors, dropped15

The two edited tensors match the sha256 values published on the source model card, byte for byte:

Tensorsha256
language_model.model.layers.15.mlp.down_proj.weight82e2d733ea64feaeb4af93a1e065641d3df98b494a8b7576ef2f52e90fe2ee53
language_model.model.layers.19.mlp.down_proj.weight8ef3c61bc36af113ad58e89dbb0a4a14dcba5a45cb750c15ab515c82ddd12eb2

Compared with PyTorch at bfloat16 over 1,264 token positions from 4 prompts, the top prediction agrees at 99.37%, with mean KL divergence of 7.06e-4.

The tokenizer and chat template matched the source on a test prompt mixing math, CJK, emoji and special tokens.

Differences from a stock conversion and from the source

  • linear_attn.norm.weight stays float32. --dtype bfloat16 would narrow these 18 tensors, as scripts/restore_norm_precision.py explains. Restoring them has no measurable speed cost.
  • The 61 RMSNorm weights are slightly rounded. Storing x + 1.0 in bfloat16 rounds by up to 0.0156. Keeping them at float32 is closer to the source but ran about 4x slower, so they are left as is.

Speed on a Mac: MLX vs PyTorch

Same weights on one Apple M5 Max (36 GB), greedy decoding, each run in a fresh process, values are medians. PyTorch ran on the GPU through MPS with transformers at bfloat16.

MeasureMLXPyTorch (MPS)Change with MLX
Generation, 512 tokens220 tok/s129 tok/s1.71x faster
Generation, 4,096 tokens217 tok/s125 tok/s1.73x faster
Generation after a 3,772-token prompt214 tok/s123 tok/s1.74x faster
Time to first token, 48-token prompt34 ms113 ms3.3x faster
Time to first token, 3,772-token prompt178 ms556 ms3.1x faster
Total time, 4,096 tokens18.9 s32.8 s42% less
Model load0.62 s1.05 s1.7x faster
Peak memory, 512 tokens2.20 GB2.96 GB26% less
Peak memory, 3,772-token prompt3.40 GB2.99 GB14% more

PyTorch on CPU reached 0.35 tok/s in one run capped at 5 minutes, which is not a practical way to use this model.

Limits of this comparison:

  • It covers one machine and one model. Other Macs will differ.
  • PyTorch used its reference code paths for this model's linear attention. causal_conv1d did not build on this Mac, and transformers still fell back after flash-linear-attention was installed.
  • The machine was not fully idle, with a load average around 3 to 4, though backends alternated.
  • Outputs are not token-for-token identical. Greedy runs first differed at token 180 on the short prompt and token 30 on the long one, consistent with floating-point differences between frameworks. Accuracy is the comparison that matters here, and it matches.

Raw data is in eval/bench.jsonl, from scripts/run_bench.py and scripts/bench_latency.py.

Evaluation on MLX

The edit's behaviour reproduces on MLX. Evenly spaced MATH-500 problems, one sample each, on an Apple M5 Max, using the source card's thinking-mode protocol: temperature 0.6, top_p 0.95, top_k 20, presence penalty 1.5 over all generated tokens, 32,768 max tokens, last \boxed{} graded with math-verify.

ModelProblemsAccuracy (95% CI)Hit token limit (95% CI)Mean tokens
Base Qwen3.5-0.8B, MLX4012.5% (5.5-26.1)87.5% (73.9-94.5)30,009
This model4052.5% (37.5-67.1)20.0% (10.5-34.8)19,310

Both ran the same 40 problems. This model alone solved 16 and base alone solved none, an exact McNemar p of 0.00003. The test was fixed in advance in docs/ANALYSIS_PLAN.md.

MLX does not change accuracy, and should not, since these are the same weights: on these problems the source repo's published PyTorch scores average 51.9%, a difference of +0.6% (95% CI -10.0% to +10.6%). Its full MATH-500 figures are 51.0% accuracy and 31.6% hitting the limit. This subset is small and its limit rate is lower, so use the source card's numbers for the model's overall performance.

Raw outputs are in eval/, and scripts/eval_math.py, scripts/grade.py and scripts/compare_paired.py reproduce them.

Why there is no 4-bit version

Plain 4-bit quantization did not preserve quality. On the same 40 problems it hit the limit on 27.5%, so loops stayed reduced, but it solved 12 against 21 for this model. This model alone was right on 10 problems and the 4-bit build alone on 1. Its raw outputs are in eval/edited-4bit.jsonl.

License

Apache 2.0, inherited from the source model.

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

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

GPU в ailist

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

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Класс архитектуры
Qwen3_5ForConditionalGeneration
Ревизия весов
3e4bc8c

0 моделей