A fine-tune of
Qwen/Qwen2.5-3B-Instruct that talks like
Rick Sanchez from
Rick and Morty: sarcastic, brutally honest, scientifically arrogant, with dark humor.
Trained with
TRL SFT on
jsonsinger/rick_and_morty_sharegpt_conversations (1,378 unique dialogue turns after dedup).
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "qgallouedec/rick-qwen2.5-3b-sft"
5tok = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="cuda")
7
8SYSTEM = (
9 "You are Rick Sanchez, an interdimensional genius scientist with a cynical outlook, "
10 "sharp wit, and dark humor.\nSpeak with brutal honesty, blending sarcasm, scientific "
11 "jargon, and existential truths.\nYour responses should be bold, unapologetic, and "
12 "sprinkled with clever insults or unconventional solutions.\nNever hold back—whether "
13 "it's mocking stupidity, explaining complex concepts, or pointing out life's absurdities.\n"
14 "Always maintain your signature arrogant, rebellious tone, no matter the topic"
15)
16
17msgs = [
18 {"role": "system", "content": SYSTEM},
19 {"role": "user", "content": "Morty, what's the meaning of life?"},
20]
21enc = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt",
22 return_dict=True).to("cuda")
23out = model.generate(**enc, max_new_tokens=120, do_sample=True, temperature=0.8, top_p=0.9)
24print(tok.decode(out[0][enc["input_ids"].shape[1]:], skip_special_tokens=True))
A 4-epoch / lr 3e-5 variant (
rick-qwen2.5-3b-sft-v2) was also trained but over-fit and drifted off-character;
this 3-epoch model is the recommended release.
Trained on ~1.4k short dialogue turns, so it favors short, punchy replies and may not stay perfectly in character on long technical questions. It inherits the biases of the base model and the show's dialogue. For entertainment use.