Jaaiva Test1 β 503M from-scratch chatbot
Jaaiva Test1 is a decoder-only Transformer trained from scratch: no pretrained weights, no pretrained tokenizer, no distillation, and no API calls. Every weight and every BPE merge was learned by the training code that produced this checkpoint.
It is a small research artifact, not a production assistant. Read Limitations before using it for anything beyond experimentation.
Files
| File | Parameters | Description |
|---|---|---|
jaaiva-test1-503m-cont-sft.pt |
503,381,760 | Recommended. 503M model after pretraining, a second continued-pretraining pass, then identity / multi-turn / instruction tuning. |
jaaiva-test1-503m-sft3.pt |
503,381,760 | Previous revision (one pretraining pass). Superseded by the file above; kept for comparison. |
jaaiva-test1-6m-ft.pt |
6,851,840 | CPU-scale toy model included for comparison. Short, simple replies. |
Both files are weights-only checkpoints (the AdamW state was removed before
upload). They are PyTorch pickles and must be loaded with
torch.load(..., weights_only=False):
{"model": state_dict, "config": {...}, "step": int, "tokens_seen": int, "best_val": float}
config["model"] holds the architecture hyperparameters, so the model can be
rebuilt without guessing.
Architecture
| Property | 503M | 6.85M |
|---|---|---|
| Layers | 25 | 6 |
| Heads | 20 | 8 |
| Width | 1,280 | 256 |
| Context | 1,024 tokens | 128 tokens |
| Vocabulary | 8,192 | 8,192 |
| MLP | GELU | GELU |
Both use pre-LayerNorm blocks, fused QKV projections, PyTorch scaled dot-product causal attention, tied input/output embeddings, and GPT-2-style residual initialization. The 503M model was trained with gradient checkpointing.
Tokenizer: byte-level BPE with 8,192 merges, learned from the training corpus
(tokenizer/jaaiva_bpe.json). Special tokens: <|pad|>=0, <|bos|>=1,
<|eos|>=2, <|user|>=3, <|assistant|>=4.
Training format:
<|bos|><|user|> ... <|assistant|> ... <|eos|>
Loss is computed only on assistant tokens and the end-of-response token; user turns are context.
Usage
Python
import torch
from model import JaaivaModel, JaaivaConfig
ckpt = torch.load("jaaiva-test1-503m-cont-sft.pt", map_location="cpu", weights_only=False)
model = JaaivaModel(JaaivaConfig(**ckpt["config"]["model"]))
model.load_state_dict(ckpt["model"])
model.eval()
Then feed it [bos, user, ...tokens, assistant] and sample autoregressively until
<|eos|>.
Chat CLI
The repository includes chat.py and the tokenizer:
pip install torch tokenizers
python chat.py --checkpoint jaaiva-test1-503m-cont-sft.pt
chat.py samples with temperature 0.5, top-k 30, top-p 0.85, a repetition
penalty of 1.15, and keeps 6 messages of history. The penalty matters: at 1.05
the model falls into "the sky is blue because it is blue" loops on open prompts;
at 1.15 that repetition disappears in a 117-reply probe with no loss of
instruction following.
Training
Pretraining β 367,477,225 tokens, one epoch, 3,739 steps.
- Batch: 12 sequences Γ 1,024 tokens Γ 8 gradient accumulation = 98,304 tokens/step
- bf16 autocast, fused AdamW, linear warmup + cosine decay, gradient checkpointing
- Data: DailyDialog, PersonaChat, EmpatheticDialogues, BlendedSkillTalk, SODA, WikiText-103
- Hardware: AMD Radeon RX 9070 XT (gfx1201) through ROCm 7.2
- Throughput: ~16.1k tokens/s, 382 minutes, ~11 GiB peak VRAM
Continued pretraining β a second pass over the same 367.5M-token corpus with a fresh optimizer, 3,739 steps at a lower peak learning rate (1.5e-4), 384 minutes. This is the base the recommended checkpoint is fine-tuned from.
Instruction tuning β 2,500 steps at lr 4e-5 β 4e-6, mixing identity/small-talk pairs, multi-turn chains, general replay, UltraChat-200k, and Dolly-15k. The recommended checkpoint is the selected step from that run (389.3M tokens seen in total). A Dolly + Alpaca + UltraChat variant and a low-identity variant were also trained and not promoted: both were worse on the behavioral probe.
Base-model evaluation:
| Split | Loss | Perplexity |
|---|---|---|
| Validation, first pass | 1.4599 | 4.31 |
| Test, first pass | 1.4290 | 4.17 |
| Validation, continued pass | 1.3749 | 3.95 |
| Test, continued pass | 1.3429 | 3.83 |
Example conversation
Sampled from this checkpoint at the chat defaults:
you> hello
jaaiva> hello! i'm jaaiva test1. how can i help?
you> who are you?
jaaiva> i am jaaiva test1, a neural chatbot built from scratch.
you> i am feeling sad
jaaiva> i'm sorry you're feeling sad. i'm here if you want to talk.
you> tell me a joke
jaaiva> why did the computer go to the doctor? it had a virus!
you> what is a neural network?
jaaiva> a neural network is a model made of layers that learn from examples.
Limitations
- Undertrained. The recommended checkpoint sees two passes over 367M tokens, which is still very little by modern standards. The model is fluent but not knowledgeable.
- Instruction following is weak. On a 39-prompt probe outside the fine-tuning set (117 sampled replies), it answered with a memorized fine-tune line about 32% of the time, e.g. "recommend a movie" β a canned joke.
- Factually unreliable. It states wrong facts (it has claimed the capital of Germany is Paris) and sometimes leaks its own identity into unrelated answers.
- Some generated advice is unsafe or poor, such as listing alcohol among sleep tips. Do not use it for medical, legal, financial, or safety-critical questions.
- Bounded memory. The chat CLI keeps three exchanges; longer histories are truncated to the 1,024-token context.
- English only.
Licensing and data
The weights are released for research use only (license: other). The
pretraining corpus includes datasets with non-commercial terms (DailyDialog,
EmpatheticDialogues) and share-alike terms (WikiText-103). Check each source
dataset's license before any redistribution or commercial use of derived work.