Text Generation
PEFT
Safetensors
English
lora
qlora
qwen2.5
adapter
semiconductor
technical-writing
conversational
Instructions to use Shankarblr/Qwen2.5-1.5B-TechWriter-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Shankarblr/Qwen2.5-1.5B-TechWriter-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "Shankarblr/Qwen2.5-1.5B-TechWriter-LoRA") - Notebooks
- Google Colab
- Kaggle
Qwen2.5-1.5B TechWriter LoRA adapter
This is not a standalone model.
It is the PEFT LoRA adapter trained with QLoRA on Qwen/Qwen2.5-1.5B-Instruct for semiconductor / data-center interconnect technical writing.
For drop-in inference, use the merged repo:
Shankarblr/Qwen2.5-1.5B-TechWriter-Instruct
Use this repo to resume training, attach the adapter on the frozen 4-bit base, or keep a small artifact.
Load the adapter
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
BASE = "Qwen/Qwen2.5-1.5B-Instruct"
ADAPTER = "Shankarblr/Qwen2.5-1.5B-TechWriter-LoRA"
tok = AutoTokenizer.from_pretrained(ADAPTER)
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.float16,
)
base = AutoModelForCausalLM.from_pretrained(BASE, quantization_config=bnb, device_map="auto")
model = PeftModel.from_pretrained(base, ADAPTER)
model.eval()
Merge if you want a single folder like the inference repo:
merged = model.merge_and_unload()
merged.save_pretrained("./qwen-techwriter-merged")
tok.save_pretrained("./qwen-techwriter-merged")
Training recap
Same run as the merged card:
- Data: private semiconductor technical-writing ChatML mix (6,765 rows, 90/10)
- LoRA r=16, alpha=32 on
q/k/v/o/gate/up/down_proj - 3 epochs, 1,143 steps, ~1 h 30 min
- Eval epoch 3: loss 0.1404, mean token accuracy 0.9488
Upload only adapter_config.json, adapter_model.safetensors, tokenizer files, and this README. Leave out checkpoint-* and optimizer states.
License
Apache 2.0. Unofficial style model; not affiliated with any semiconductor vendor.
- Downloads last month
- 6