Views
No views yet
Weights are not up yet. This repo currently holds the full recipe: corpus builder, training script, ONNX export, and a Colab notebook that runs all of it. I will add weights and measured numbers when the training run finishes. There are no benchmark claims below because I have not measured anything yet.
common-pile
(openly licensed only) plus 117k arXiv cs.LG titles and abstracts, packed into
dense 1024-token blocks so no compute goes to padding. LR 5e-5, cosine, one epoch.
The LR is low on purpose. The goal is to absorb the domain without wrecking the
base model's general ability.--cpt_tokens budget and pushes checkpoints to the Hub. Passing
--resume picks up where a dropped session stopped.smoltalk2: science reasoning, instruction following, and general chat.
LR 1e-5, two epochs, loss masked so only assistant turns count.smoltalk2 stay in the SFT
mixture to stop that. It costs a little domain sharpness and keeps the model usable.<think>\n\n</think> block to the last assistant
turn. If you tokenise message by message, that block disappears, and you end up
training on a format the model never sees at inference. The encoder here is checked
against apply_chat_template(...) and round-trips to it exactly. If you fork this,
keep that check. It is easy to get wrong and it fails silently.1python build_corpus.py # builds and pushes vigneshwar234/vashtra-ml-corpus
2python train_vashtra.py # stage A, stage B, push
3python export_onnx.py # ONNX + quantisation for the browser demoVashtra_training.ipynb in Colab, set the runtime
to T4, and run all. About two to three hours on the free tier.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model = AutoModelForCausalLM.from_pretrained(
5 "vigneshwar234/Vashtra-0.6B", dtype=torch.bfloat16)
6tok = AutoTokenizer.from_pretrained("vigneshwar234/Vashtra-0.6B")
7
8msgs = [{"role": "user", "content": "When should I use focal loss instead of cross-entropy?"}]
9ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
10out = model.generate(ids, max_new_tokens=256)
11print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))common-pile/arxiv_papers_filtered, abstracts are
AFL-3.0 through CShorten/ML-ArXiv-Papers, StackExchange content is CC-BY-SA-4.0,
and smoltalk2 is Apache-2.0. Anything derived from StackExchange stays CC-BY-SA-4.0.