Downloads · 30 days
11
41% of all-time downloads
sukrit-arora/qwen2.5-1.5b-dolly-lora
qwen2.5-1.5b-dolly-lora is a machine learning model from sukrit-arora. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter fine-tuning Qwen/Qwen2.5-1.5B for instruction following, trained on a curated, category-balanced subset of databricks-dolly-15k (4,000 examples, 500 per task category).
Downloads · 30 days
11
41% of all-time downloads
All-time downloads
27
Public
Repo size
233 MB
Likes
0
Public
Click a slice to open those files.
.pt148 MB · 46%
From the Hugging Face model README
LoRA adapter fine-tuning Qwen/Qwen2.5-1.5B for instruction following, trained on a curated, category-balanced subset of databricks-dolly-15k (4,000 examples, 500 per task category).
Trained locally on Apple Silicon (MPS) with peft + trl's SFTTrainer, using
prompt/completion loss masking so the model only learns to generate responses,
not to reproduce instructions.
See the curated training dataset and [training code](the training repo) for details.
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B")
model = PeftModel.from_pretrained(base_model, "sukrit-arora/qwen2.5-1.5b-dolly-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B")
prompt = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Explain what a LoRA adapter is in one paragraph.
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(output[0], skip_special_tokens=True))