Text Generation
PEFT
Safetensors
English
humor
computational-humor
lora
qwen
cognitive-synergy-framework
headline-humor
conversational
Instructions to use Jayi2424/HumorGen_SFT_Think_7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Jayi2424/HumorGen_SFT_Think_7B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/qwen2.5-7b-instruct-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "Jayi2424/HumorGen_SFT_Think_7B") - Notebooks
- Google Colab
- Kaggle
metadata
language:
- en
license: apache-2.0
tags:
- text-generation
- humor
- computational-humor
- peft
- lora
- qwen
- cognitive-synergy-framework
- headline-humor
base_model: Qwen/Qwen2.5-7B-Instruct
pipeline_tag: text-generation
HumorGen SFT-Think — 7B
Part of the HumorGen Collection · SaLT Lab, Carnegie Mellon University
SFT with explicit Chain-of-Thought reasoning traces. The model reasons through its comedic strategy before generating output.
Paper(s): arXiv:2604.09629
Training
| Property | Value |
|---|---|
| Stage | SFT + Chain-of-Thought traces |
| Backbone | Qwen2.5-7B-Instruct (QLoRA 4-bit) |
| LoRA r / alpha | 16 / 16 |
| Data | SemEval-2026 MWAHAHA + CSF persona thinking traces |
Usage
This is a PEFT LoRA adapter. Load the base model and apply the adapter:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, "Jayi2424/HumorGen_SFT_Think_7B")
headline = "Local man invents app to tell you why you're sad"
prompt = (
"<|im_start|>system\n"
"Think carefully, then write the best joke you can.\n<|im_end|>\n"
f"<|im_start|>user\n{headline}<|im_end|>\n"
"<|im_start|>assistant\n<think>\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.7, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Citation
@misc{ajayi2026humorgen,
title = {HumorGen: Cognitive Synergy for Humor Generation in Large Language
Models via Persona-Based Distillation},
author = {Ajayi, Edward and others},
year = {2026},
eprint = {2604.09629},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2604.09629}
}