Use
from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("harsimran2004/Llama-whetstone-124m-assistant-sft")model = AutoModelForCausalLM.from_pretrained("harsimran2004/Llama-whetstone-124m-assistant-sft")messages = [{"role": "user", "content": "Can you explain how photosynthesis works?"}]prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)output = model.generate(**inputs, max_new_tokens=200, do_sample=False, repetition_penalty=1.1)print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
The chat format is ChatML-shaped (<|im_start|>role newline, text, <|im_end|>, messages joined by a newline); the model ends its turn with <|im_end|> (id 32004), which generation_config.json uses as an end token. The
template covers plain system / user / assistant messages only, not tool calls. Weights are standard LlamaForCausalLM (trust_remote_code is not needed). Context 2,048 tokens. Vocabulary 32,007.
Training
Table | |
|---|
| Base | Whetstone-124M continued pretraining, step 7,632 (checkpoint manifest sha256 80c0daf4…) |
| Method | full fine-tuning, bf16 autocast, AdamW (lr 5e-5, 80 warm-up steps, cosine to 10 %, betas 0.9/0.95), gradient clipping 1.0, loss on assistant tokens only |
| Data | 28,301 training conversations, 3 epochs, 102.8 M supervised tokens, 2,048-token limit, trailing turns trimmed where a conversation was longer |
| Steps | 2,652 optimizer steps of 32 sequences |
| Hardware | one NVIDIA L4, about 2.2 hours |
Data sources and licences. (1) English conversations from OpenAssistant/oasst2 (Apache-2.0; human-written; the best-ranked reply at each level of a message tree), 5,392
conversations before the split. (2) A seeded sample of 24,000 conversations from the Smol-Magpie-Ultra part of HuggingFaceTB/smoltalk (Apache-2.0 for that part),
which was generated with Llama-3.1-405B-Instruct. A 1 % split of each source is held out for validation.
Llama notice. Part of the fine-tuning data was generated with Llama 3.1, so the Llama 3.1 Community License applies to this model as far as it is derived from those outputs; the model name starts with "Llama" for that
reason (section 1.b.i of that licence). Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved. The Whetstone code and weights are otherwise released under Apache-2.0. This is a plain statement of what was done, not legal advice.
Evaluation (small and limited)
Table with columns: Measure, Base (before), This model| Measure | Base (before) | This model |
|---|
| Validation loss (all 436 held-out conversations) | 1.274 | 1.029 |
| Validation perplexity | 3.58 | 2.80 |
| Golden suite passed (25 scored of 27) | 1 | 2 |
| Golden-suite answers that end with `< | im_end | >` |
Validation loss fell steadily through the second epoch and then flattened (1.029 at the end, 1.028 at step 1,768); training loss ended at 0.74, so the last epoch mostly fitted the training set. The golden suite is 27
hand-written cases: one case of difference is noise. samples-base.json and samples-tuned.json hold the answers to 40 held-out prompts for both models. Reading them: the base model echoes the prompt and drifts into unrelated
code; this model answers in an assistant style with headings and lists, but the content is often wrong (for example, a photosynthesis answer that says plants and animals both do it and invents terms), loops, or runs on.
Limitations
English only. Frequent factual errors and hallucinations, repeated phrases, answers that do not stop. No safety tuning: it can produce false, biased or inappropriate text. No benchmark, no human evaluation, one run and
one seed. The training mixture is partly synthetic (generated by another model). Not suitable for any decision-making use.
Package contents
training_config.json (sanitized recipe), training_metrics.json (loss curves), evaluation.json, the two sample files, verification.json (native-to-Transformers parity checks), NOTICE, LICENSE.