/ Модель

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

Контекст
1 048 576 токенов
Параметры
3,8 млрд
Лицензия
Apache 2.0
Архитектура
spark2_5 · dense
Базовая модель
Spark-X2.6-4B
Библиотека
transformers
Опубликована
5 ноя 2026

Spark-x2.6-4B-HTML

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

Дообученная Spark-X2.6-4B генерирует ответы в виде оформленных HTML-страниц с карточками, таблицами и другими визуальными блоками.

1 005скачиваний за 30 дней2лайкавеса обновлены6 ноя 2026

Бенчмарки

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

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

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

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

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

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

Spark-X2.6-4B · HTML — дообученная модель wesjos на базе XHToken/Spark-X2.6-4B, предназначенная для генерации ответов в виде визуально структурированного HTML: карточек, таблиц, блоков с показателями, списков и выносок. Веса содержат настройку на HTML-ответы и шаблон диалога с персоной Mario-html. Модель имеет архитектуру Spark2_5ForCausalLM с 3,8 млрд параметров; в репозитории размещён чекпойнт bf16. Заявленная длина контекста — 1 048 576 токенов.

Модель подходит для создания оформленных информационных страниц, учебных планов и визуальных представлений объяснений или справочных ответов. Для отображения результата README рекомендует использовать контейнер с theme.css: без него HTML-классы оформления могут выглядеть как обычная разметка. В репозитории также есть WebUI, который отображает сгенерированный HTML; для токенизатора требуется transformers версии 5.0.0 или выше. Указанная лицензия — Apache-2.0. Использование инструментов унаследовано от базовой модели и, по README, не проверено.

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

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

Ограничения

Для корректного оформления результатов требуется применять theme.css; без него стили модели могут отображаться как обычная HTML-разметка. Использование инструментов унаследовано от базовой модели и не проверено; для загрузки токенизатора требуется transformers>=5.0.0.

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

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

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

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

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

Открыть на Hugging Face

💾 Want the same model at 2.4 GB? → Spark-x2.6-4B-HTML-GGUF

The identical fine-tune, quantized: Q4_K_M at 2.42 GiB, Q8_0 at 4.07 GiB. This repo is the full bf16 checkpoint (7.66 GiB) plus the WebUI.

🖼 Demo

Both shots are the bundled WebUI (webui/, theme_preset: notion) with the CoT toggle on — the Chain of Thought panel above each answer is the raw <think> stream, and the page below it is the unmodified render.

can u show me what ReLU looks like?

A definition card, a two-column grid with a plotted ReLU curve next to a domain/output/slope table, and a "Why It Matters in ML" bullet card. 30.09 s · 129 tok/s · 3882 tokens.

how to learn C++

A study-plan page: a "Why Start Here?" callout, four feature-list bullets, then a "Key Libraries" card with inline code chips.


📐 Specs

BaseXHToken/Spark-X2.6-4B (Apache-2.0)
ArchitectureSpark2_5ForCausalLM · 36 layers — 9 full-attention + 27 sliding-attention (window 512) · hidden 2560
Attention16 heads / 4 KV heads · head_dim 256 · partial RoPE 0.25 on full-attention layers
Parameters4,112,079,360 (bf16, measured from the safetensors header) · 335.5 M embedding / 3.78 B non-embedding
On disk1 shard, 7.66 GiB
Context1,048,576 native (max_position_embeddings) · tokenizer advertises 131,072
Vocab131,072
Default system promptYou are Mario-html. You are a helpful assistant who generates nice visual content.

🚀 Quickstart

[!IMPORTANT] This repo's tokenizer_config.json declares tokenizer_class: "TokenizersBackend", which needs transformers>=5.0.0. On transformers==4.57.1 (the version upstream pins) AutoTokenizer raises ValueError: Tokenizer class TokenizersBackend does not exist or is not currently imported.

pip install "transformers>=5.0.0" jinja2
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL = "wesjos/Spark-x2.6-4B-HTML"

tokenizer = AutoTokenizer.from_pretrained(MODEL, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    MODEL, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
)

messages = [{"role": "user", "content": "can u show me what ReLU looks like?"}]
inputs = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt",
    enable_thinking=True, reasoning_effort="low",
).to(model.device)

out = model.generate(**inputs, max_new_tokens=8192, do_sample=True,
                     temperature=0.7, top_p=0.8, top_k=40, repetition_penalty=1.05)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

llama.cpp — native spark2_5 support landed in b10828; v0.9.0 has it too. The GGUF carries its own chat template, so no --chat-template-file is needed.

llama-cli -m Spark-x2.6-4B-HTML.Q4_K_M.gguf -p "can u show me what ReLU looks like?" -n 8192

🎨 WebUI

The repo ships a self-contained WebUI (webui/) that renders the model's HTML output live, with a collapsible <think> panel, a raw-source view and a copy-HTML button per message, plus five theme presets (default · apple · notion · cyber · editorial).

cd webui
pip install -r requirements.txt
python server.py --port 8798

Open http://localhost:8798. The UI talks to an OpenAI-compatible backend over webui/config.json — by default http://127.0.0.1:18080 serving the alias Spark-x2.6-4B-HTML — and falls back to whatever the backend actually serves if the alias has drifted.

[!NOTE] webui/config.json ships model_path: "/mnt/sdb/models/Spark-x2.6-4B-HTML/Spark-x2.6-4B-HTML-Q8_0.gguf" — a path from the training host that does not exist on any reader's machine. Point it at your own quant, or set backend_mode: "direct" and let the UI manage the llama.cpp server for you.

Output contract

Class list verified against the shipped webui/static/theme.css:

ComponentMarkup
Root<div class="ai-view">
Summary<div class="summary"> · <div class="summary-card"> · <p class="lead">
Card<div class="card">
Grid<div class="grid grid-2"> · <div class="grid grid-3">
Metrics<div class="metric-group"><div class="metric-card"><span class="metric-label">…</span><span class="metric-value">…</span><span class="metric-sub">…</span></div></div>
Stepper<div class="stepper"><div class="step-item">…</div></div>
Callout<div class="callout callout-info|warning|success|danger"><div class="callout-header">…</div></div>
Badge<span class="badge badge-info|success|warning|danger|accent">
Table<div class="table-container"><table class="modern-table">…</table></div>
Feature list<div class="feature-list"><div class="feature-item">…</div></div>
Code block<div class="code-box"><div class="code-header"><span class="code-title">…</span></div>…</div>

💡 Notes

  • The output is HTML, not Markdown. Render it in a container with theme.css, or the classes fall back to browser defaults.
  • The persona is in the weights, and so is the system prompt. This repo's chat_template.jinja overrides the upstream default with "You are Mario-html. You are a helpful assistant who generates nice visual content." — unlike the CuteHuman sibling, it is a template edit, not just a weight edit.
  • Its generation_config.json is also its own: temperature 0.7 / top_p 0.8 / top_k 40 / repetition_penalty 1.05 / max_new_tokens 8192, where upstream ships 1.0 / 0.95 / -1 / 1.0. The WebUI config agrees.
  • reasoning_effort has three levels here, not two. The WebUI offers 低 / 中 / 高 and the server maps low and medium to low, high and xhigh to high — because the template only understands low and high.

⚠️ Limitations

  • The screenshots were taken under this repo's WebUI, but the crops shipped here were re-taken from the originals and the thinking dropdown reads 思考: 中(标准推演) — i.e. medium, which the server maps down to reasoning_effort: low.
  • No training metadata ships with this repo — no data size, no steps, no rank.
  • Tool use is inherited and unaudited.

📄 License

Apache-2.0, inherited from the Spark-X2.6 model series.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

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

0 моделей