This model is a
DPO (Direct Preference Optimization) fine-tuned version of
marioparreno/emojify-sft for emojify conversion.
It has been optimized to prefer high-quality, semantically accurate emojifications.
This model further refines an SFT model by training on preference pairs. For each prompt, the model was shown a "chosen" (preferred) response and a "rejected" response, learning to align its outputs with human (or superior LLM) preferences for emojify conversion.
This model was trained on the
marioparreno/emojify-dpo DPO dataset.
1from unsloth import FastModel
2
3# Load the fine-tuned model
4model, tokenizer = FastModel.from_pretrained(
5 model_name="marioparreno/emojify-dpo",
6 max_seq_length=256,
7 load_in_4bit=True,
8)
9
10# Inference
11inputs = tokenizer.apply_chat_template(
12 [
13 {"role": "system", "content": "Translate this text to emoji:"},
14 {"role": "user", "content": "I love coding with AI!"},
15 ],
16 tokenize=True,
17 add_generation_prompt=True,
18 return_tensors="pt",
19).to("cuda")
20
21outputs = model.generate(input_ids=inputs, max_new_tokens=64)
22response = tokenizer.batch_decode(outputs)