A LoRA adapter (rank 16, fp32, about 70 MB of weights) for Qwen/Qwen3-1.7B-Base (pinned commit ea980cb0a6c2ae4b936e82123acc929f1cec04c1), trained to answer in a chat format on a small general-assistant
conversation mixture. It is a research artifact of the Whetstone project: a partial-epoch fine-tune with a small evaluation, not a benchmarked or safety-tuned assistant. The answers are fluent and structured, but their
content can be wrong or invented.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen3-1.7B-Base"
tokenizer = AutoTokenizer.from_pretrained(base_id, revision="ea980cb0a6c2ae4b936e82123acc929f1cec04c1")
base = AutoModelForCausalLM.from_pretrained(base_id, revision="ea980cb0a6c2ae4b936e82123acc929f1cec04c1", dtype=torch.float32)
model = PeftModel.from_pretrained(base, "harsimran2004/Llama-qwen3-1.7b-assistant-lora").eval()
messages = [{"role": "user", "content": "Can you explain how photosynthesis works?"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
output = model.generate(**inputs, max_new_tokens=400, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Training used the base model's own chat template with enable_thinking=False, and the loss was on assistant tokens only; the model ends its turn with <|im_end|>. It was trained and evaluated in fp32 (other
precisions are untested). The adapter targets all linear layers (q/k/v/o_proj, gate/up/down_proj).
| Base | Qwen/Qwen3-1.7B-Base @ ea980cb0a6c2ae4b936e82123acc929f1cec04c1 (Apache-2.0) |
| Method | PEFT LoRA, rank 16, alpha 32, dropout 0.05, all linear layers, fp32, AdamW lr 2e-4 (18 warm-up steps, cosine to 10 %), gradient clipping 1.0 |
| Data | 27,830 conversations of at most 1,024 tokens (trailing turns trimmed where longer) |
| Length | 600 optimizer steps of 32 sequences = 19,200 sequences, 0.69 epoch, 11.6 M supervised tokens |
| Hardware | one NVIDIA L4, about 4.5 hours of training |
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). (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 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 adapter as far as it is derived from those outputs; the 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 adapter and Whetstone code are otherwise released under Apache-2.0. This is a plain statement of what was done, not legal advice.
| Measure | Base model | With this adapter |
|---|---|---|
| Validation loss (all 430 held-out conversations) | 1.154 | 0.974 |
| Validation perplexity | 3.17 | 2.65 |
| Golden suite passed (25 scored of 27 hand-written cases) | 3 | 4 |
Validation loss is on held-out conversations of the same distribution as the training data (0.987 at step 200, 0.977 at step 400, 0.974 at step 600). The golden suite is too small to show a difference: one case is noise,
and it does not measure assistant quality. samples-base.json and samples-tuned.json hold the answers to 40 held-out prompts (greedy, at most 256 new tokens, so long answers are cut off). Reading them: the base model,
asked in chat format, degenerates into repeated junk tokens on most prompts; with the adapter the answers are fluent and on topic, but the facts are unreliable (for example an apples-versus-oranges answer cites an
invented survey with precise percentages). No public benchmark, no human evaluation, one run, one seed.
English only. Factual errors, invented citations and numbers, no safety tuning: it can produce false, biased or inappropriate text. Trained on partly synthetic data. A partial epoch. Not suitable for any decision-making use.
adapter_config.json, adapter_model.safetensors, training_config.json (sanitized recipe), training_metrics.json (loss curves), evaluation.json, the two sample files, verification.json, NOTICE, LICENSE.
Qwen/Qwen3-1.7B-Base