/ Модель

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

Лицензия
Apache 2.0
Базовая модель
SmolLM-135M
Библиотека
llama-cpp
Опубликована
24 ноя 2026

shapeq-q4lut-models

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

Экспериментальные Q4_LUT-квантования SmolLM-135M и Qwen2.5-0.5B для локальной генерации текста через специальный CPU-форк llama.cpp.

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

Бенчмарки

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

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

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

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

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

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

Это набор экспериментальных GGUF-квантований SHAPEQ Q4_LUT, подготовленный независимым исследователем Roman S. Pokora. В репозитории представлены варианты для SmolLM-135M и Qwen2.5-0.5B: веса линейных слоёв кодируются 4-битными индексами по подобранной неравномерной сетке из 16 уровней и масштабом fp16 на группу. Квантование выполняется детерминированно, без обучения и градиентов; метаданные связывают набор с HuggingFaceTB/SmolLM-135M и Qwen/Qwen2.5-0.5B.

Модели предназначены для локальной генерации текста на CPU через специальную ветку llama.cpp. README приводит результаты оценки perplexity и скорости на английском и русском продолжениях для Qwen2.5-0.5B, а также сравнение качества и производительности для SmolLM-135M. Это демонстрация экспериментального формата и LUT-ядра, а не оптимизация скорости.

Файлы требуют форка llama.cpp с веткой shapeq-q4lut: стандартный llama.cpp их не загружает, GPU-бэкенды не поддерживаются, а штатный инструмент llama-quantize не может создавать или экспортировать этот тип. README указывает лицензию Apache-2.0 в метаданных Hugging Face.

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

  • локальная генерация текста на CPU
  • эксперименты с неравномерным 4-битным квантованием весов
  • оценка perplexity квантованных языковых моделей
  • сравнение квантованных моделей с исходными весами
  • воспроизводимое исследование LUT-квантования

Ограничения

Нужна специальная ветка llama.cpp; стандартный llama.cpp не загружает эти файлы. Поддерживается только CPU, а декодирование медленнее оптимизированных upstream-ядер; GPU-бэкендов нет.

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

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

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

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

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

Открыть на Hugging Face

SHAPEQ / Q4_LUT model zoo — fitted 16-level grids

Author: Roman S. Pokora · Independent researcher. Paper: https://stiggigy-jpg.github.io/shapeq-paper/ · Code and paper repo: https://github.com/stiggigy-jpg/shapeq-paper · Runtime: https://github.com/stiggigy-jpg/shapeq-q4lut.

Two GGUF quantizations in Q4_LUT, the experimental weight-only format used by SHAPEQ (shape-adaptive quantization). Every linear tensor decodes its 4-bit codes through a fitted non-uniform 16-level grid (lookup table) plus an fp16 scale per group: group 96 → Q4_LUT, group 64 → Q4_LUT64. The fit is deterministic, rests on classical Lloyd–Max theory, needs no training or gradients, and changes only the alphabet, so it composes with GPTQ, AWQ, rotations, sparse corrections, and mixed-precision allocation.

Requires our llama.cpp fork. These are not standard GGUF quant types. Upstream llama.cpp cannot load them; upstream support is not planned because the type ids are private. Build the shapeq-q4lut branch and run as usual.

Files in this repository

filerole
smollm-135m-q4lut.gguf96-weight blocks, type Q4_LUT (44)
qwen2.5-0.5b-q4lut.gguf64-weight blocks, type Q4_LUT64 (45)
b4_smollm_shapeq.ptfitted pack: codes, scales, grids; hash in SHA256SUMS.txt
b4_qwen_shapeq.ptfitted pack for Qwen2.5-0.5B
b4_qwen_shapeq.pt.jsonperplexity and greedy-64 anchors for a rerun
pack_q4lut.pyrepacks a fitted .pt into GGUF
REPRODUCE.mdbaseline quants, fitting, packing, measurement
SHA256SUMS.txthashes of both GGUFs, both packs, and the anchor JSON

The pre-fitted packs mean the GGUFs can be rebuilt without rerunning the fitter. The fitter, its qb/ library, and all raw CSV/JSON results are in https://github.com/stiggigy-jpg/shapeq-paper.

SmolLM-135M (smollm-135m-q4lut.gguf)

itemvalue
type idGGML_TYPE_Q4_LUT (= 44, fork-private)
block96 weights = 1 fp16 scale + 48 bytes of 4-bit codes (50 B/block)
payload rate4.167 bits/weight on linear layers
per tensor16 fp32 grid values in GGUF metadata (q4lut.* keys)
what is quantized210 linear tensors (55.3 MB); embeddings/output stay f16
filesmollm-135m-q4lut.gguf, 108.6 MB, 134.5 M params
packb4_smollm_shapeq.pt, 55.5 MB

Measured with the fork's CPU build, AVX2, i7-10850H, 6 threads; corpus = first 240 KB of WikiText-2, ctx 512:

quantfile, MBpplpp512 t/stg128 t/s
q4lut108.620.7322954
Q4_087.521.64533105
IQ4_NL87.820.4356598
Q4_K_M100.619.0626999

q4lut beats Q4_0 by about 0.9 ppl at a similar bit rate. It is slower to decode than the tuned upstream kernels (no repack-GEMM path), and IQ4_NL remains a stronger all-round point. These files demonstrate a fitted grid inside a real runtime, not a speed win. Full protocol: paper §6.11.

Qwen2.5-0.5B (qwen2.5-0.5b-q4lut.gguf)

Qwen2.5 hidden sizes are not divisible by 96, so this model uses the 64-weight block variant (GGML_TYPE_Q4_LUT64, type id 45, 4.25 bpw), fitted with the same Hessian-weighted procedure.

itemvalue
type idGGML_TYPE_Q4_LUT64 (= 45, fork-private)
block64 weights = 1 fp16 scale + 32 bytes of 4-bit codes (34 B/block)
payload rate4.25 bits/weight on linear layers
per tensor16 fp32 grid values in GGUF metadata (q4lut.* keys)
what is quantized168 linear tensors; embeddings/output stay f16
fileqwen2.5-0.5b-q4lut.gguf, 446.9 MiB, 494.0 M params
packb4_qwen_shapeq.pt, 190.3 MB

Measured with the same machine and settings (16-chunk ctx-512 slice):

runPPLpp512 t/stg128 t/s
stock f16 GGUF15.83210.012.8
f16 dequantized (same grid, no LUT kernel)17.13——
q4lut (this file)17.1367.113.2
Q4_0 (reference)17.65190.933.4

The q4lut kernel reproduces its own dequantized reference to 0.001 PPL; greedy 64-token continuations match the PyTorch fake-quant model token-for-token (EN and RU). The speed gap to Q4_0 is reported openly in paper §§6.9–6.11: this is a grid-shape study, not a kernel-speed study.

Loading

git clone -b shapeq-q4lut https://github.com/stiggigy-jpg/shapeq-q4lut llama.cpp && cd llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j
./build/bin/llama-cli -m smollm-135m-q4lut.gguf -p "Hello" -n 64

Not supported on purpose

  • llama-quantize cannot produce or re-export this type (no from_float/to_float).
  • GPU backends have no kernel; CPU only.
  • Upstream llama.cpp rejects the file as an unknown quant type.

Reproducibility

REPRODUCE.md rebuilds the baseline quants and the two Q4_LUT GGUFs from the shipped packs. SHA256SUMS.txt gates both packs and both GGUFs. The fitter and raw tables are in https://github.com/stiggigy-jpg/shapeq-paper; the two engines (legacy, hist) match the dates of the shipped packs. Absolute perplexity can shift in the last decimal with BLAS reduction order. Speeds are machine-specific. The LUT kernel is a reference implementation, not an optimized one (paper §8).

Provenance and license

Weights derived from SmolLM-135M and Qwen2.5-0.5B (both Apache-2.0 upstream); these derivatives are Apache-2.0 as well. Calibration used WikiText-2 train only. Model card, format spec, and kernel: paper https://stiggigy-jpg.github.io/shapeq-paper/, fork FORMAT.md.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
eecae0e

0 моделей