/ Модель

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

Контекст
4 096 токенов
Параметры
147 млн
Лицензия
MIT
Архитектура
speck · dense
Базовая модель
Speck2-140M
Библиотека
transformers
Опубликована
1 сен 2026

Speck2-140M-Instruct

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

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

489скачиваний за 30 дней3лайкавеса обновлены15 сен 2026

Бенчмарки

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

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

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

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

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

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

Speck2-140M-Instruct — компактная англоязычная языковая модель Speck Labs для диалогов и следования инструкциям. Она разработана на основе Speck2-140M: базовую модель дообучили за одну эпоху на смеси SpeckChat2 примерно из 499 тысяч диалогов. Модель содержит около 146,7 млн параметров и использует плотную гибридную архитектуру с глобальным вниманием и причинными свёртками; её нативный контекст — 4096 токенов.

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

Из-за небольшого размера её знания, рассуждения, навыки программирования и многоязычные возможности ограничены. Следование инструкциям непоследовательно, длинные ответы могут повторяться или терять связность; модель может выдумывать факты и ошибаться в коде и вычислениях. Проверка качества охватывала контекст до 2048 токенов, а штатный путь генерации в Transformers поддерживает только жадное декодирование одного запроса за раз.

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

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

Ограничения

Знания, рассуждения, программирование и многоязычные способности ограничены; ответы могут содержать галлюцинации, ошибки и повторы. Качество валидировано до 2048 токенов, а встроенная генерация поддерживает только жадное декодирование одного запроса.

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

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

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

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

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

Открыть на Hugging Face

SpeckLabs

Speck2-140M-Instruct

Speck2-140M-Instruct is a 140.7M parameter English instruction-tuned language model. It was initialized from Speck2-140M, a hybrid model pretrained from scratch on 20B tokens with a three-phase curriculum, then fully fine-tuned for one epoch on the 500,000-conversation SpeckChat2 mixture.

The Speck2 release updates the pretrained base while retaining the SpeckChat2 instruction-tuning data and one-epoch post-training recipe. The model uses a native chat template with optional system messages and was trained with assistant-only loss.

Summary

PropertyValue
Parameters140,654,208
Base pretraining tokens20.0B
SFT training conversations499,000
SFT validation conversations1,000
Supervised assistant tokens319,181,221
SFT context tokens processed (padded)559,284,224
Non-padding SFT context tokens385,422,209
SFT sequence lengths256, 512, 1,024, 2,048
Configured max context4,096 (unvalidated beyond 2,048)
Vocabulary32,003 (Mistral v0.1 SentencePiece + 3 role tokens)
Release formatBF16 Safetensors
Final SFT validation loss / perplexity1.1206 / 3.067
CPU decode, batch 155.1 tok/s (Speck2 architecture proxy)
RTX 3090 decode, batch 1245.4 tok/s

Architecture

The architecture is unchanged from Speck2-140M apart from 3 added role-token embeddings. It contains 18 residual blocks: 8 global attention + 10 gated causal convolution, each followed by a SwiGLU feed-forward.

ComponentValue
Hidden width768
Embedding width640
SwiGLU intermediate2,304
Attention heads (Q / KV)12 / 3
Head dimension64
Conv inner width384
Conv kernel sizes3, 5
RoPE theta10,000
RMSNorm epsilon1e-5

Input/output embeddings (640-wide) are tied and connect to the 768-wide residual stream through learned projections.

Chat template

Three special tokens were added to the base 32k vocabulary:

RoleTokenID
System`<system
User`<user
Assistant`<assistant

A rendered conversation has the following form:

<s><|system|>
{optional system message}</s>
<|user|>
{user message}</s>
<|assistant|>
{assistant response}</s>

The system message is optional and may appear only first. Remaining roles must alternate between user and assistant. No default system prompt is injected. During generation, the prompt ends after <|assistant|>\n, and </s> terminates the response.

Usage

Speck2-140M-Instruct works with the Transformers Auto classes through its bundled custom model and tokenizer code. Set trust_remote_code=True when loading it.

pip install "transformers==5.1.0" torch sentencepiece safetensors
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "specklabs/Speck2-140M-Instruct"
device = "cuda" if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else "cpu"
dtype = torch.bfloat16 if device == "cuda" else torch.float32

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    dtype=dtype,
).to(device)

messages = [
    {"role": "system", "content": "You are a concise assistant."},
    {"role": "user", "content": "What is the capital of France?"},
]

encoded = tokenizer.apply_chat_template(
    messages,
    tokenize=True,
    add_generation_prompt=True,
    return_tensors="pt",
)
input_ids = encoded["input_ids"] if hasattr(encoded, "keys") else encoded
input_ids = input_ids.to(device)

output = model.generate(
    input_ids=input_ids,
    attention_mask=torch.ones_like(input_ids),
    max_new_tokens=64,
    do_sample=False,
    pad_token_id=tokenizer.eos_token_id,
)
generated = output[0, input_ids.shape[1] :]
print(tokenizer.decode(generated, skip_special_tokens=True))

The bundled generation path is validated for single-prompt greedy decoding. Direct forward passes support right-padded batches when use_cache=False.

Evaluation

The quality columns combine the Open SLM Leaderboard at revision 2eafcfc647b667e67f3b0288e9b67da497a78052 and BananaMind Base Bench 1.1 at revision d4aade51312889e8580963e1ce960c6eaef1a450. No chat template or generation was used for the seven Speck evaluations.

Benchmarks and speed

ModelParamsTraining tokensOpen SLM Int IndexBananaMind Base Bench 1.1 EloCPU prefillCPU decodeRTX 3090 prefillRTX 3090 decodeBF16 memory @2KBF16 state @2K
BananaMind-2-Pro139M100B24.9611312,190 tok/s43.0 tok/s64,060 tok/s140.3 tok/s325.1 MiB60.0 MiB
SmolLM2-135M135M~2T27.1311192,201 tok/s47.4 tok/s64,814 tok/s157.7 tok/s301.6 MiB45.0 MiB
GPT-X2.5-135M135M75B25.1711062,042 tok/s47.2 tok/s55,346 tok/s125.0 tok/s302.6 MiB45.0 MiB
Supra2-100M-Base101M30B19.4110303,362 tok/s56.0 tok/s113,326 tok/s298.1 tok/s216.0 MiB24.0 MiB
Speck1-140M141M5B18.159652,252 tok/s55.1 tok/s74,323 tok/s247.3 tok/s281.3 MiB12.0 MiB
Speck1-140M-Instruct141M5B + 317M SFT17.7510012,285 tok/s55.3 tok/s73,398 tok/s246.7 tok/s280.3 MiB12.0 MiB
Speck1.1-140M-Instruct141M5B + 559M SFT17.9010022,315 tok/s56.9 tok/s74,941 tok/s243.6 tok/s280.3 MiB12.0 MiB
Speck1.5-140M141M5B16.619802,252 tok/s55.1 tok/s74,323 tok/s247.3 tok/s281.3 MiB12.0 MiB
Speck1.5-140M-Instruct141M5B + 559M SFT17.489962,394 tok/s56.6 tok/s75,424 tok/s242.7 tok/s280.3 MiB12.0 MiB
Speck2-140M141M20B20.019532,252 tok/s55.1 tok/s74,323 tok/s247.3 tok/s281.3 MiB12.0 MiB
Speck2-140M-Instruct141M20B + 559M SFT21.339732,252 tok/s*55.1 tok/s*73,284 tok/s245.4 tok/s280.3 MiB12.0 MiB

Open SLM Int Index means the chance-normalized Intelligence Index reported by the Open SLM Leaderboard. BananaMind Base Bench 1.1 Elo means the overall Elo reported by BananaMind Base Bench 1.1. Speed and memory values are local batch-1 measurements described below. Reference models saw 1.5-100x more pretraining tokens, so this is a parameter-adjacent comparison, not a compute-matched one. Asterisks mark architecture-equivalent Speck2 CPU measurements rather than new checkpoint-specific measurements.

Inference speed

Speed was measured locally at batch 1 with eager PyTorch, model-native caches, last-token logits, and tokenization excluded. Prefill uses 512 tokens. Decode measures 64 greedy cached steps after a 448-token prefix and includes argmax. CPU runs use FP32 with 16 threads; RTX 3090 runs use BF16. Reported throughput is calculated from the median duration.

The Speck2-140M-Instruct GPU measurements used PyTorch 2.9.1 and Transformers 5.1.0 on an NVIDIA GeForce RTX 3090. The run used 50 prefill warmups, 25 decode warmups, and 20 measurements. Across 12 CUDA probe rows at lengths 8, 448, and 512, the last-token projection preserved every full-logit greedy token selection with minimum cosine similarity 0.99951 and mean absolute difference below 0.075. CPU entries use the architecture-equivalent Speck2 measurements.

Memory is unique live BF16 model tensor storage plus cache/state tensor storage after a 2,048-token prefill at batch 1. Speck2-140M-Instruct uses 268.3 MiB for unique model tensors and 12.0 MiB for state, or 280.3 MiB combined. This excludes framework RSS, CUDA allocator reservations, and temporary operator workspace. FP32 CPU tensor memory is approximately twice the reported BF16 model-tensor memory. For another context length N, approximate memory as model tensor memory + State@2K x N / 2,048; Speck's small convolution history is fixed rather than context-scaled. The BF16 Safetensors weight file is 281.3 MB.

Limitations

  • At 140.7M parameters, the model has limited knowledge, reasoning, coding, and multilingual capacity.
  • Instruction following is inconsistent, especially for exact formatting, arithmetic, strict brevity, and system-prompt constraints.
  • Longer generations can become repetitive or incoherent.
  • It can hallucinate facts and produce incorrect code or calculations.
  • Mostly English: multilingual ability is weak and unvalidated.
  • No dedicated safety alignment, red-team evaluation, or misuse evaluation was performed.
  • Validated only up to 2,048 tokens despite a 4,096-token config.
  • Pretraining and instruction data are web-derived, user-authored, or synthetic and may contain bias, errors, unsafe content, personal information, or copyrighted text.
  • The bundled Transformers generation path currently supports single-prompt greedy decoding only.

Reproducibility

Full training and evaluation code: github.com/alkinun/speck

The released checkpoint is training step 8,534. The base model revision is 1201df613d9ee9d50909189f52e45c6fcefa3c01; the SpeckChat2 revision is 7b497b3e0c7f4653278cc67af27722b20a5c8d10.

Citation

@misc{alkinun2026speck2instruct,
  author       = {alkinun},
  title        = {Speck2-140M-Instruct: Instruction Tuning a Compact Hybrid Attention-Convolution Language Model},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/specklabs/Speck2-140M-Instruct}},
  url          = {https://github.com/alkinun/speck}
}

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
SpeckForCausalLM
Ревизия весов
16f943c

0 моделей