Downloads · 30 days
0
fchaubard/qwen3-14b-comedy-reward
qwen3-14b-comedy-reward is a machine learning model from fchaubard. 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 mit.
LoRA adapter from the Stanford humor-research project (April 2026).
Downloads · 30 days
0
Access
Public
Updated Apr 29, 2026
Repo size
2.7 GB
Likes
0
Public
Click a slice to open those files.
.pt2.7 GB · 100%
From the Hugging Face model README
LoRA adapter from the Stanford humor-research project (April 2026).
See https://github.com/Fchaubard/llm-humor-research for the full pipeline, training scripts, and evaluation. The headline result of that repo is that this adapter (sft_50k variant) beats Qwen2.5-14B-Instruct nucleus baseline 89 % of the time on a 15-prompt pairwise tournament judged by Gemini-Flash with symmetry probing.
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch
BASE = "Qwen/Qwen2.5-14B-Instruct"
ADAPTER = "fchaubard/qwen3-14b-comedy-reward"
tok = AutoTokenizer.from_pretrained(BASE)
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_quant_type="nf4", bnb_4bit_use_double_quant=True)
model = AutoModelForCausalLM.from_pretrained(BASE, quantization_config=bnb, device_map={"": 0})
model = PeftModel.from_pretrained(model, ADAPTER, autocast_adapter_dtype=False)
model.eval()
msgs = [{"role":"system", "content":"You are a sharp comedian."},
{"role":"user", "content":"Tell me a one-liner about midlife crises."}]
chat = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
inp = tok([chat], return_tensors="pt").to("cuda:0")
out = model.generate(**inp, do_sample=True, top_p=0.95, temperature=0.95, max_new_tokens=64)
print(tok.decode(out[0][inp["input_ids"].shape[1]:], skip_special_tokens=True))