Views
No views yet
transformers.
Implemented twice: once in NumPy, once in CUDA/C++ (this checkpoint is from the CUDA trainer).d_model = 512d_head = 64)d_ff = 2026), with a learned Swish-gate β<|endoftext|>, is a real single-token end-of-turn signal - see Training below)kevinindustries/kevin, step 698,000) on
HuggingFaceTB/everyday-conversations-llama3.1-2k
(2,379 short everyday-conversation exchanges), chat/conversation format
(<|system|>/<|user|>/<|assistant|> turns, rendered as ordinary BPE text, not
registered special tokens)ckpt_step500.ckpt, ~2 passes over the corpus) is much closer to a single epoch and
generalizes better, at the cost of not yet reliably ending its turn (see next point) -
ask in the project repo if you want that checkpoint instead.<|endoftext|> end-of-turn training only covers the last ~17,000 of these 162,000
steps. Earlier SFT data rendering never appended an explicit end-of-turn token; the
model instead learned to signal "my turn is over" by spelling out the literal text of
the next role tag (e.g. <|user|>), which is fragile - one wrong token in that sequence
and generation runs on. <|endoftext|> is now appended after every assistant turn during
training (one of the tokenizer's previously-unused reserved special ids), giving the
model a single-token way to stop, but it's had comparatively little exposure to it so far
and turns don't always end cleanly.serve.py/utils/generate.py) also supports
a CTRL-style repetition penalty (penalize logits of tokens already in context) as a
mitigation for the verbatim-repeat behavior above; it's implemented but off by default
(repetition_penalty=1.0) since it can distort otherwise-coherent continuations, and it
doesn't address the root cause (memorization from over-sampling a tiny dataset).latest.ckpt is the CUDA trainer's native binary format (TFCKPT1 magic header), not a
PyTorch state_dict. It carries its own architecture header (step, vocab size, d_model,
heads, layers, d_ff, max_len) so it's self-describing. See the project repo for the
loader (utils/ckpt_convert.py, cuda/include/checkpoint.cuh) and inference code
(generate.py, serve.py).latest.ckpt — the checkpoint itself.tokenizer/tokenizer.bbpe (+ merges.txt, vocab.json) — the from-scratch byte-level
BPE tokenizer this checkpoint was trained with (same tokenizer as the base model). Must
match exactly; a different tokenizer/vocab size will silently produce garbage.hf download kevinindustries/kevin-chat --local-dir kevin-chat1./build/train_transformer_cuda \
2 --resume kevin-chat/latest.ckpt \
3 --corpus <your-chat-corpus.jsonl> --data-format chat \
4 --tokenizer bbpe --tokenizer-path kevin-chat/tokenizer/tokenizer.bbpe \
5 --batch-size 12 --lr 5e-5 --min-lr 5e-6 --steps 3000 --warmup-steps 100 \
6 --grad-clip 1.0 --label-smoothing 0.05 --dropout 0.1 \
7 --log-every 50 --checkpoint-every 500 \
8 --checkpoint-dir checkpoints --metrics-path checkpoints/metrics.csv