Instructions to use AakashakaAkku/roastbot-qwen2.5-1.5b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AakashakaAkku/roastbot-qwen2.5-1.5b-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, "AakashakaAkku/roastbot-qwen2.5-1.5b-lora") - Notebooks
- Google Colab
- Kaggle
RoastBot β a Qwen2.5-1.5B roast-comedian fine-tune
RoastBot is a playful, PG-13 stand-up "roast comedian" chatbot. It was created by fine-tuning Qwen2.5-1.5B-Instruct (by Alibaba Cloud) with a LoRA adapter on a small, hand-crafted roast dataset.
This repository contains the LoRA adapter (my contribution). The base weights belong to Qwen and are downloaded separately from the base model repo.
π Attribution
- Base model: Qwen2.5-1.5B-Instruct β Β© Alibaba Cloud, licensed under Apache-2.0.
- Fine-tune: LoRA adapter (rank 16) trained by the author to give the model a roast-comedian persona.
- This work is released under Apache-2.0, inheriting and preserving the base model's license and attribution.
What was done
- Authored a clean, PG-13 roast dataset (job / habit / day roasts + safety refusals that decline to roast protected traits).
- Trained a LoRA adapter with PEFT + TRL for a consistent roast persona.
- Added inference guardrails: English-only decoding and safety filters.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_id = "Qwen/Qwen2.5-1.5B-Instruct"
tok = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype=torch.float16)
model = PeftModel.from_pretrained(base, "AakashakaAkku/roastbot-qwen2.5-1.5b-lora")
msgs = [
{"role": "system", "content": "You are RoastBot, a sharp stand-up roast comedian. Roast the user, PG-13, never cruel about things they can't change."},
{"role": "user", "content": "I'm a product manager. Roast me."},
]
text = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
inp = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inp, max_new_tokens=110, do_sample=False, repetition_penalty=1.3)
print(tok.decode(out[0][inp.input_ids.shape[1]:], skip_special_tokens=True))
Intended use & limitations
For entertainment. It's a small (1.5B) model, so humor is hit-or-miss and it can be factually wrong. Roaster mode refuses to mock protected traits (race, gender, body, disability, etc.).
License
Apache-2.0 β please retain attribution to the Qwen base model.
- Downloads last month
- 3
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, "AakashakaAkku/roastbot-qwen2.5-1.5b-lora")