/ Модель

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

Лицензия
Apache 2.0
Архитектура
sutra-moe · dense
Библиотека
pytorch
Опубликована
15 авг 2026

Sutra-1.3B-Chat

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

Sutra-1.3B-Chat — компактная разреженная языковая модель для генерации текста и диалоговых ответов на английском и хинди.

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

Бенчмарки

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

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

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

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

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

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

Sutra-1.3B-Chat — языковая модель на 1,32 млрд параметров, созданная Абхишеком Сингхом с нуля на PyTorch. Это разреженная модель типа Mixture-of-Experts: из 48 маршрутизируемых и одного общего эксперта активны 0,28 млрд параметров; в архитектуре также используется Multi-head Latent Attention. Модель прошла предобучение на 18 млрд токенов, затем дообучение на диалогах и предпочтениях. Для загрузки требуется trust_remote_code=True, поскольку архитектура поставляется вместе с весами.

Модель предназначена для генерации и продолжения текста, а чат-версия — для ответов на запросы и выполнения инструкций. Обучающие данные включали английский, хинди, код и математику; карточка также отмечает английский и хинди. В тестах модель показала базовые способности к здравому смыслу, но результаты на задачах рассуждения ограничены. Лицензия — Apache-2.0.

Модель может писать связный английский текст и соблюдать форматирование, однако ненадёжно вспоминает факты, может уверенно сообщать неверное, не справляется с многошаговыми рассуждениями и написанием работающего кода, а опечатки и краткие запросы могут сбивать её. Для задач, зависящих от фактов, в README рекомендуется использовать поиск по источникам.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Sutra-1.3B

downloads since launch model size trained from scratch

A 1.32B-parameter Mixture-of-Experts language model pretrained from scratch in pure PyTorch, with Multi-head Latent Attention (MLA) and DeepSeek-style auxiliary-loss-free expert routing — implemented from the papers, not adapted from an existing codebase.

Own BPE tokenizer, own streaming data pipeline, own training loop. No pretrained weights, no transformers Trainer, no reference implementation anywhere in the stack.

If you are here to learn how a MoE model is trained end to end, the code is the point: github.com/Abhisingh18/Sutra-1.3B-Model carries the tokenizer, data prep, pretraining, SFT, DPO, evaluation and serving — plus the six silent bugs that cost the most time, written up in full.

Try it without installing anything

sutra-1-3-b-model-15co.vercel.app — a live chat demo running these weights, with web search and document upload on top.

The inference widget on this page stays empty on purpose: Inference Providers serve standard transformers architectures, and this is a custom MoE with Multi-head Latent Attention. Same reason AutoModelForCausalLM does not work here — the architecture code ships with the weights, not with transformers.

Quick start

from transformers import AutoModelForCausalLM
from tokenizers import Tokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "Abhisingh-18/Sutra-1.3B-Chat", trust_remote_code=True,
    dtype=torch.bfloat16).eval()
tok = Tokenizer.from_file("tokenizer.json")

prompt = ("<|begin_of_text|><|user|>\nWhat is the capital of France?"
          "<|end_turn|>\n<|assistant|>\n")
ids = torch.tensor([tok.encode(prompt).ids])
out = model.generate(ids, max_new_tokens=64, min_new_tokens=12, do_sample=False)
print(tok.decode(out[0].tolist()[ids.shape[1]:]))

trust_remote_code=True is required: the architecture (MoE + Multi-head Latent Attention) ships with the weights rather than with transformers. The remote code is verified to produce logits identical to the reference implementation to 7e-06 in fp32.

Or without transformers at all:

pip install torch tokenizers huggingface_hub
wget https://huggingface.co/Abhisingh-18/Sutra-1.3B-Chat/resolve/main/inference.py
python inference.py "Explain photosynthesis in three sentences."

That downloads the weights (5.3 GB) and the architecture code and runs. It works on CPU — because only 0.28B parameters are active per token, CPU generation runs at about 10 tokens/second on 2 cores.

Interactive:

python inference.py

In Python:

from inference import build, generate
model, mcfg, tok, device = build()
print(generate(model, mcfg, tok, device, "What is machine learning?"))

Note: min_new_tokens matters. Left to itself this model often emits <|end_turn|> immediately and returns an empty string.

Repository layout

├── model.safetensors        default weights — the DPO stage, 5.3 GB
├── config.json              architecture
├── tokenizer.json           48k BPE, English + Devanagari
├── inference.py             run the model
├── src/                     model code (custom arch — see note above)
└── checkpoints/             every training stage, for comparison
    ├── base_pretrained.pt
    ├── sft_epoch_0.pt
    ├── sft_epoch_1.pt
    ├── sft_epoch_2.pt
    ├── dpo_epoch_0.pt
    └── dpo_epoch_0.int8.pt   quantized — 1.42 GB

The root holds what you need to run the model. checkpoints/ is the archive of each stage, so you can hear the difference each one made instead of taking it on faith.

CheckpointStageWorth loading for
base_pretrained.pt18B tokens, no fine-tuningText continuation. It continues your prompt rather than answering it — the clearest demonstration of what SFT actually does
sft_epoch_0.ptSFT, 1 epochComparison
sft_epoch_1.ptSFT, 2 epochsComparison
sft_epoch_2.ptSFT, 3 epochsBest held-out loss of the three (1.7033) — no overfitting
dpo_epoch_0.ptDPO on top of SFTSame weights as model.safetensors
dpo_epoch_0.int8.ptINT8 quantized DPOHalf the memory at no measurable cost — see below

Optimizer state is stripped from all of them, so each is 5.3 GB rather than 15.8 GB. They are for inference, not for resuming training.

To load a different stage:

SUTRA_CKPT=checkpoints/base_pretrained.pt python inference.py "The capital of France is"

Architecture

Parameters1.32B total / 0.28B active (4.7x sparsity)
Experts48 routed + 1 shared, top-4
Routingsigmoid scoring, bias-based load balancing
AttentionMLA (Multi-head Latent Attention), kv_lora_rank 256
Layers16 (layer 0 dense, 1-15 MoE)
d_model1024
Context4096
Vocab48,000 (English + Devanagari)

Training

StageDataCompute
Pretraining18B tokens (English, Hindi, code, math)4x RTX 6000 Ada, 4d 9h
SFT200K conversations18h
DPO100K preference pairs6h

Pretraining held-out perplexity 15.00; SFT held-out perplexity 5.49.

Every dataset behind all three stages — with its exact config, split, text field and token share, plus the prep script — is published as Sutra-1.3B-Data, so the corpus can be rebuilt from the original sources.

Evaluation

Log-likelihood scoring, 500 examples per task, length-normalised accuracy.

TaskRandomBaseSFTDPO
HellaSwag25.038.439.840.4
ARC-easy25.045.044.845.0
PIQA50.062.665.465.6
WinoGrande50.050.649.049.0

Two things worth reading honestly here. ARC-easy and PIQA sit well above chance, so the model learned real commonsense and not just fluent grammar. WinoGrande sits at chance, which is the clearest signal of what 0.28B active parameters cannot buy: the pronoun-resolution reasoning that task measures never appeared.

DPO's held-out preference accuracy came out at 47.5% against a 50% baseline, so the alignment stage did not generalise — the 66% reported during training was measured on training batches. The SFT and DPO checkpoints perform about equally.

INT8 quantized weights

checkpoints/dpo_epoch_0.int8.pt is the same model at 1.42 GB instead of 2.64 GB (1.62 GB resident on GPU). Measured on all four tasks, 500 examples each:

Taskbf16INT8Δ
HellaSwag40.440.2−0.2
ARC-easy45.045.00.0
PIQA65.665.2−0.4
WinoGrande49.048.8−0.2

At 500 examples, 0.2 points is a single example — the difference is noise.

Weight-only, symmetric, per-output-channel: each row of each weight matrix carries its own scale, because rows differ in range by orders of magnitude. Activations stay bf16, and lm_head is left unquantized. This saves memory, not time — the weight is dequantized before the matmul, so arithmetic runs at the same speed.

SUTRA_CKPT=checkpoints/dpo_epoch_0.int8.pt python inference.py "Explain gravity."

Not to be confused with DeepSeek's FP8 work, which is a training technique. This is post-training quantization, applied to finished weights.

Limitations

Trained on 18B tokens — roughly 500x less than comparable 1B models such as Llama 3.2 1B (9T tokens). Concretely:

  • Writes fluent English and follows formatting instructions well
  • Does not reliably recall facts, and states wrong ones confidently
  • Does not do multi-step reasoning or write working code
  • Sensitive to phrasing — a typo or a terse prompt derails it, where a larger model would recover

Pair it with retrieval for anything knowledge-dependent.

License

Apache 2.0.

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

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

GPU в ailist

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

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

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

Класс архитектуры
SutraForCausalLM
Ревизия весов
73146c7

0 моделей