Repository navigation
jarvis v1.0.0
Overview
The first public release of jarvis: a compact, GPT-style causal language model focused primarily on Russian, implemented from scratch in PyTorch. This release brings together the model, custom tokenizer, data-preparation and training pipeline, local inference tools, an optional Telegram bot, and a small held-out BPC benchmark.
Highlights
- 112M-class decoder-only Transformer with 14 layers, 12 attention heads, a 768-token context, RoPE, RMSNorm, SwiGLU and tied embeddings.
- Custom byte-level BPE tokenizer with a 16,384-token vocabulary and role tokens for dialogue.
- Two-stage training recipe: pretraining followed by supervised fine-tuning. The checked-in defaults target 1.2B pretraining tokens and 150M SFT tokens.
- Training utilities: mixed-precision training, multi-GPU DDP, resumable sessions, periodic checkpoints, validation and sample generation.
- Local inference: KV-cache generation, interactive console chat and an optional Telegram bot.
- Evaluation tools: held-out bits-per-character (BPC) benchmark and checkpoint sample comparison.
Model checkpoint
The GitHub source archive does not include model weights. Download the fine-tuned checkpoint and matching tokenizer from Eragon1/jarvis-112m on Hugging Face. The model card documents intended use, data sources, evaluation and limitations.
After cloning this repository and installing requirements.txt, download the two files with huggingface_hub and start a chat:
python - <<'PY'
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="Eragon1/jarvis-112m",
local_dir="checkpoints/hf-jarvis-112m",
allow_patterns=["jarvis-112m-sft-fp16.pt", "tokenizer.json"],
)
PY
python chat.py \
--ckpt checkpoints/hf-jarvis-112m/jarvis-112m-sft-fp16.pt \
--tokenizer checkpoints/hf-jarvis-112m/tokenizer.jsonSee README.md for setup, training, bot configuration and the full project layout.
Evaluation snapshot
BPC (bits per character; lower is better) on a 600,000-character held-out sample from each source:
| Model | web_ru |
texts_ru |
chat_ru |
|---|---|---|---|
| jarvis pretraining checkpoint | 1.18 | 1.02 | 0.92 |
| jarvis SFT checkpoint | 1.22 | 1.07 | 0.91 |
ai-forever/rugpt3small_based_on_gpt2 |
1.07 | 0.93 | 0.98 |
This is a small, domain-specific language-modeling check, not a comprehensive evaluation of dialogue quality, factuality or safety. The baseline uses a different tokenizer and context length, so the comparison is approximate. Full measurements are in results/bpc.json.
Known limitations
jarvis is an experimental, relatively small model. It can produce incorrect, repetitive, biased or unsafe text and has not been comprehensively evaluated for factuality, reasoning or safety. It is intended primarily for Russian and should not be used for high-stakes decisions. The training datasets have separate licenses and terms; review the linked dataset cards before use or redistribution.
License
The source code is licensed under Apache-2.0; see LICENSE. The model checkpoint is published separately on Hugging Face. Upstream dataset terms remain applicable.
🇷🇺 По-русски
Первый публичный релиз jarvis — экспериментальной GPT-подобной модели для русского языка примерно на 112 млн параметров. В релиз входят реализация Transformer, собственный BPE-токенизатор, подготовка корпусов, двухэтапное обучение pretrain → SFT, локальная генерация, консольный чат, Telegram-бот и инструменты оценки BPC.
Веса и совместимый токенизатор находятся на Hugging Face; в GitHub-архив исходный код входит без весов. Модель небольшая и экспериментальная: возможны ошибки, повторы, предвзятые или небезопасные ответы. Метрика BPC не является полноценной оценкой качества диалога. Лицензии датасетов нужно проверять отдельно.