--- license: apache-2.0 base_model: Qwen/Qwen2.5-1.5B-Instruct library_name: peft pipeline_tag: text-generation tags: - roast - comedy - humor - lora - peft - qwen2.5 - fine-tuned --- # 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](https://huggingface.co/Qwen/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](https://huggingface.co/Qwen/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 ```python 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.