/ Модель

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

Лицензия
Apache 2.0
Базовая модель
Qwen3.5-0.8B
Библиотека
coreml
Опубликована
8 сен 2026

Qwen3.5-ANE-CoreML

Генерация текстаТекст → текст3 профессии

Конверсия текстовых моделей Qwen3.5 в Core ML для генерации текста на Apple Silicon с использованием Apple Neural Engine.

1 403скачиваний за 30 дней2лайкавеса обновлены27 сен 2026

Бенчмарки

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

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

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

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

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

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

Это неофициальная конверсия семейства Qwen3.5 в формат Core ML от takanori-ishikawa для запуска текстовых моделей на компьютерах Apple Silicon с использованием Apple Neural Engine. В репозитории представлены варианты на 0,8, 2, 4 и 9 млрд параметров с контекстом от 2 048 до 16 384 токенов в зависимости от размера модели. Модель принимает текст и генерирует текст; доступны графы декодирования по одному токену и предварительной обработки групп по четыре токена.

Линейные веса сжаты до 6 бит методом k-means palettization с размером группы 32, а таблицы эмбеддингов квантизованы до int8 и хранятся отдельно на хосте. Проверки согласия выбора следующего токена с исходными BF16-моделями показали 93,75% для варианта 2B и 90,63% для 9B на коротких фиксированных последовательностях; эти показатели не измеряют качество решения задач. Для работы требуются Apple Silicon и Core ML; ёмкость контекста фиксирована выбранным пакетом. Лицензия — Apache-2.0.

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

  • генерация текста на Mac с Apple Silicon
  • локальный запуск Qwen3.5 через Core ML
  • автодополнение и продолжение текста
  • эксперименты с генерацией при разных параметрах семплирования

Ограничения

Требуются Apple Silicon и Apple Neural Engine, а длина контекста задаётся выбранным пакетом и не меняется во время работы. Квантизация может менять генерируемый текст; опубликованные проверки согласия следующего токена не являются оценкой качества задач.

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

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

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

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

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

Открыть на Hugging Face

Qwen3.5 ANE Core ML

Run Qwen3.5 text models on Apple Silicon with Core ML. These packages use 6-bit compressed linear weights and include a four-token prompt-prefill graph alongside the one-token decoder.

The repository contains nine model/context packages: 0.8B at 2,048 tokens; 2B at 2,048 and 16,384 tokens; and 4B and 9B at 2,048, 8,192, and 16,384 tokens. This is an unofficial conversion and is not affiliated with or endorsed by the Qwen team. It is based on the original Qwen3.5-0.8B, Qwen3.5-2B, Qwen3.5-4B, and Qwen3.5-9B models.

Highlights

  • Designed for Apple Neural Engine execution. Core ML packages split the model into chunks and keep the shared token embedding table on the host.
  • Compact weights. Linear layers use 6-bit k-means palettization with a group size of 32. Embeddings use row-wise symmetric int8 quantization.
  • Prompt prefill option. Each package contains a four-token graph for processing prompt tokens in four-token groups. Any remaining prompt tokens and all generated tokens use the one-token decoder.
  • Measured token agreement. In short teacher-forced checks, the 2B package matched the original Qwen3.5-2B BF16 model on 60 of 64 tokens (93.75%); the 9B package matched Qwen3.5-9B on 58 of 64 (90.63%).

These agreement scores compare next-token choices on fixed sequences. They are conversion checks, not measures of general task accuracy.

Available artifacts

ModelContextMultifunction artifactCore ML sizeShared embedding
0.8B2,048qwen3.5-0.8b_ctx2048_chunks6_multifunction_lut6_kvslice_gqagrouped0.54 GiB243 MiB
2B2,048qwen3.5-2b_ctx2048_chunks6_multifunction_lut6_kvslice_gqagrouped1.33 GiB485 MiB
2B16,384qwen3.5-2b_ctx16384_chunks6_multifunction_lut6_kvslice_gqagrouped1.35 GiB485 MiB
4B2,048qwen3.5-4b_ctx2048_chunks8_multifunction_lut6_kvslice_gqagrouped2.98 GiB607 MiB
4B8,192qwen3.5-4b_ctx8192_chunks8_multifunction_lut6_kvslice_gqagrouped2.99 GiB607 MiB
4B16,384qwen3.5-4b_ctx16384_chunks8_multifunction_lut6_kvslice_gqagrouped3.00 GiB607 MiB
9B2,048qwen3.5-9b_ctx2048_chunks8_multifunction_lut6_kvslice_gqagrouped5.59 GiB970 MiB
9B8,192qwen3.5-9b_ctx8192_chunks8_multifunction_lut6_kvslice_gqagrouped5.60 GiB970 MiB
9B16,384qwen3.5-9b_ctx16384_chunks8_multifunction_lut6_kvslice_gqagrouped5.61 GiB970 MiB

Download the selected artifact and the embedding table for its model size. The embedding table is shared across that model's context variants. This example downloads the 2B package with a 2,048-token context and the Python driver used below:

hf download takanori-ishikawa/Qwen3.5-ANE-CoreML \
  --include 'qwen3.5-2b_embed_tokens.int8.bin' \
  --include 'qwen3.5-2b_ctx2048_chunks6_multifunction_lut6_kvslice_gqagrouped/**' \
  --include 'examples/**' \
  --local-dir artifacts

Each package directory contains metadata.json and the .mlpackage chunks for that model and context. The metadata lists the chunks in execution order. On the Hub, each model/context package is a top-level directory, while its shared embedding table is stored at the repository root. This layout matches the paths recorded in metadata.json and lets a runtime select a package by pointing to its directory.

Four-token prefill

Every published artifact contains the standard one-token decoder and a four-token prefill graph. A compatible runtime can process each complete group of four input prompt tokens with the prefill graph. Any remaining prompt tokens and all generated tokens use the one-token decoder. All nine packages listed above include both graphs.

Some older packages predate conversion-signature metadata and mark their compatibility records as legacy_unverified. The 4B/8K, 4B/16K, 9B/8K, and 9B/16K packages include conversion-signature metadata. For 0.8B/2K, five runs confirmed that the prefill path produced the same token IDs as the one-token decoder.

Fidelity

The checks below compare each Core ML-generated token with the top-1 token from the original Hugging Face BF16 model when teacher-forced over the same sequence.

ModelSequenceTop-1 agreementResult
2B one-token decode, LUT664 tokens60 / 64 (93.75%)pass
9B one-token decode, LUT664 tokens58 / 64 (90.63%)pass

The 9B graph includes the numerically stable DeltaNet softplus conversion. On a separate fixed 138-token regression sequence, that change improved top-1 agreement from 111/138 (80.43%) to 127/138 (92.03%).

Quantization and Core ML execution can still change generated sequences, especially where the original model has near-tied logits. Validate the model on your own prompts and target OS/device.

Eight of the nine packages passed an end-to-end Swift/Core ML smoke test: the 0.8B/2K package, 2B/2K package, and all 4B and 9B packages. The test loaded each package and generated Qwen ANE ready. The 2B/16K package was not included. This checks integration, not task quality. Longer context changes the static state capacity, but no separate fidelity comparison is available for the longer-context packages.

Runtime status

examples/generate.py is a minimal Python reference driver built with coremltools and NumPy. It supports greedy decoding and configurable temperature, top-k, top-p, and repetition-penalty sampling, with a reproducible random seed. The example shows how to load packages, manage model state, look up host-side embeddings, and run the chunks.

Source code for a Swift runtime with chat templates, sampling, streaming, reset, multi-turn state reuse, and optional four-token prompt prefill is available in the local-llm repository.

Python example

Requirements: an Apple Silicon Mac, Python 3.12, and coremltools 9.

pip install "coremltools>=9,<10" numpy transformers

python artifacts/examples/generate.py \
  --artifact-dir artifacts/qwen3.5-2b_ctx2048_chunks6_multifunction_lut6_kvslice_gqagrouped \
  --prompt "What is the capital of Japan?" \
  --max-new-tokens 64 \
  --temperature 0.7 \
  --top-p 0.8 \
  --top-k 20 \
  --repetition-penalty 1.05 \
  --seed 42

The example loads its tokenizer and chat template from the original Qwen repository. By default, --tokenizer is Qwen/Qwen3.5-2B; set this option to the matching model repository when using another model size. The default --temperature 0 preserves greedy decoding; pass a positive temperature to enable sampling.

Package design

Each artifact contains one metadata.json and a sequence of .mlpackage directories. Run the chunks in metadata order for every token:

  1. The host restores one token embedding from the shared int8 table.
  2. Chunk 0 receives the fp16 embedding and current_pos.
  3. Intermediate chunks exchange fp32 hidden states.
  4. Every chunk updates its Core ML K/V and recurrent state.
  5. The final chunk returns fp32 logits over the full vocabulary.

metadata.json records graph revision, tensor names, chunk order, state layout, embedding checksum, quantization format, and conversion signature. The 9B final vocabulary projection is split into four outputs to keep the last Core ML package below the package-size limit.

Key format details:

  • linear weights: LUT6, k-means, per grouped channel, group size 32
  • embeddings: row-wise symmetric int8 values plus one fp16 scale per row
  • attention cache: split K/V Core ML state with grouped GQA updates
  • DeltaNet: recurrent and convolution state stored in Core ML state
  • position input: graph-generated RoPE and causal mask from current_pos

Observed performance

Measured on a MacBook Pro (Mac14,7, Apple M2, 16 GB) running macOS 15.7.9. Each variant used the same fixed 128-token prompt ID array, greedy decoding, seed 1, two warmup generations, and five measured generations of 64 tokens each. The multifunction artifact's four-token graph handled prompt prefill. Prefill and decode rates are medians across the five runs. Cold load used an empty compiled-model cache; cached load reused that cache in a new process. Each load duration is one observation. Results vary with hardware, OS, cache, context length, and system load.

ModelContextCold loadCached loadPrefill medianDecode median
0.8B2,04849.96 s1.85 s127.6 tok/s50.1 tok/s
2B2,04876.77 s1.96 s75.4 tok/s26.0 tok/s
4B2,048159.33 s2.28 s39.4 tok/s11.5 tok/s
4B8,192163.97 s2.38 s19.9 tok/s10.1 tok/s
4B16,384161.41 s2.38 s14.3 tok/s6.5 tok/s
9B2,048355.09 s3.21 s27.9 tok/s8.2 tok/s
9B8,192343.69 s5.45 s21.5 tok/s7.4 tok/s
9B16,384358.66 s5.57 s11.7 tok/s5.1 tok/s

Prompt ID SHA-256: e263916a82c9374465881fbc50252f47a72b46f40ccfe27438d7bd1244e96e43.

Limitations

  • Apple Silicon and Apple Neural Engine execution are required. CPU-only execution is not supported by these packages.
  • Context capacity is static. Choose the 2,048-, 8,192-, or 16,384-token artifact before loading; a loaded package cannot be resized at runtime.
  • Only 4B and 9B are published with 8,192- and 16,384-token contexts. The 0.8B release is limited to 2,048 tokens; 2B is available at 2,048 and 16,384.
  • The Python driver is a minimal text-generation example, not a complete chat application. Swift runtime source is maintained in the linked repository.
  • Top-1 agreement is not a claim of benchmark accuracy or exact output identity.

Source and license

Conversion code and technical notes are maintained in ishikawa/local-llm.

Apache 2.0, the same as the original Qwen3.5 models. The license text is included in LICENSE; the original models are by the Qwen team at Alibaba Cloud.

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

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

GPU в ailist

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

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

CoreML-модели работают только на устройствах Apple.

Ревизия весов
9c2eeba

0 моделей