Downloads · 30 days
147
85% of all-time downloads
Jayi2424/HumorGen_DPO_7B
HumorGen_DPO_7B is a text generation model from Jayi2424. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Part of the HumorGen Collection · SaLT Lab, Carnegie Mellon University
Downloads · 30 days
147
85% of all-time downloads
All-time downloads
173
Public
Repo size
173 MB
Likes
0
Public
Click a slice to open those files.
.safetensors162 MB · 91%
From the Hugging Face model README
Part of the HumorGen Collection · SaLT Lab, Carnegie Mellon University
DPO fine-tune of HumorGen_SFT_7B. Preference pairs sourced from HumorRank Bradley-Terry pairwise evaluations.
Paper(s): arXiv:2604.09629
| Property | Value |
|---|---|
| Stage | Direct Preference Optimization (DPO) |
| Initialized from | HumorGen_SFT_7B |
| Backbone | Qwen2.5-7B-Instruct (QLoRA 4-bit) |
| Preference data | HumorRank pairwise tournament |
| Beta | 0.1 |
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_DPO_7B")
headline = "Economists agree that everything is fine and you should stop asking"
prompt = (
"<|im_start|>system\n"
"You are a comedy writer. Write one sharp, witty joke for the headline.\n<|im_end|>\n"
f"<|im_start|>user\n{headline}<|im_end|>\n"
"<|im_start|>assistant\n"
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=120, temperature=0.9, top_p=0.95)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@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}
}