Views
No views yet

| Parameter | Value |
|---|---|
| LoRA rank | 32 |
| LoRA alpha | 32 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable params | ~9.7M / 135M (6.77%) |
| Quantization | 4-bit (QLoRA via Unsloth) |
| Batch size | 32 |
| Gradient accumulation | 2 (effective batch: 64) |
| Learning rate | 2e-4 (linear decay) |
| Warmup steps | 100 |
| Epochs | 10 |
| Sequence length | 512 tokens |
| Chunking | 256-word chunks, 20% overlap, packed |
| Hardware | NVIDIA RTX 4090 |
| Training time | ~14 min |
| Metric | Base Model | This Model | Δ |
|---|---|---|---|
| Perplexity | 22.97 | 18.36 | -20.1% |
| Cross-Entropy | 3.134 | 2.910 | -7.1% |
| ROUGE-1 | 0.178 | 0.213 | +19.7% |
| ROUGE-L | 0.114 | 0.143 | +25.4% |
| BERTScore F1 | 0.736 | 0.753 | +2.3% |
| BLEU | 0.016 | 0.022 | +37.5% |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4base_model_id = "HuggingFaceTB/SmolLM-135M"
5adapter_id = "JaydeepR/SmolLM-135M-CPT-LoRA-r32"
6
7tokenizer = AutoTokenizer.from_pretrained(base_model_id)
8model = AutoModelForCausalLM.from_pretrained(base_model_id)
9model = PeftModel.from_pretrained(model, adapter_id)
10
11prompt = "We propose a novel attention mechanism that"
12inputs = tokenizer(prompt, return_tensors="pt")
13outputs = model.generate(**inputs, max_new_tokens=100, repetition_penalty=1.2)
14print(tokenizer.decode(outputs[0], skip_special_tokens=True))@misc{smollm135m-cpt-lora,
author = {Jaydeep Raijada},
title = {SmolLM-135M CPT LoRA r=32 — Continued Pre-Training on arXiv ML Papers},
year = {2026},
url = {https://huggingface.co/JaydeepR/SmolLM-135M-CPT-LoRA-r32}
}