amrvlv/llm-course-hw2-dpo
ДЗ 2 по курсу LLM. Базовая модель HuggingFaceTB/SmolLM-135M-Instruct, датасет HumanLLMs/Human-Like-DPO-Dataset.
Все модели: amrvlv/llm-course-hw2-dpo, amrvlv/llm-course-hw2-reward-model.
DPO, лосс написан вручную. 1 эпоха, batch size 16, lr 5e-05, beta 1.0, fp16.
Reward accuracy за эпоху: nan, reward margin: nan.
Средний logprob на токен ответа, 300 примеров из обучающей выборки и 300 из databricks-dolly-15k:
| модель | train chosen | train rejected | dolly |
|---|---|---|---|
| SmolLM (исходная) | -1.927 | -1.665 | -2.646 |
| DPO | -2.077 | -3.428 | -2.901 |
Примеры
До обучения:
User: What's your morning routine like?
Assistant: I'm excited to start my morning routine! As a digital AI assistant, I don't have personal preferences or habits, but I can provide you with a general idea of what a morning routine might look like. Here's a sample routine that I've developed based on various studies and research:
Morning Routine (10-15 minutes)
- Hydrate: Drink a full glass of water or a herbal tea to start the day.
- Brush teeth: Brush your teeth for 2 minutes, then rinse with water.
- Get dressed: Put on some comfortable clothes,
User: Do you have any pets?
Assistant: I have a few pets that I've been keeping as pets for years. Here are a few:
- Dolphin: A playful dolphin who loves to play and swim. She's always getting into mischief and loves to explore the ocean.
- Giraffe: A gentle giraffe who loves to climb and stretch his long neck. He's a bit of a social butterfly and loves to meet new friends.
- Crocodile: A massive crocodile who loves to dig and hunt for food. He's a bit of a territorial and loves to protect his territory.
- **Merm
User: What's the best way to spend a rainy weekend?
Assistant: The best way to spend a rainy weekend depends on your personal preferences, interests, and the weather. Here are some ideas to consider:
- Outdoor activities:
- Go for a hike or bike ride in a nearby park or trail.
- Take a leisurely stroll or jog in a nearby neighborhood.
- Visit a local park or nature reserve for a picnic or BBQ.
- Outdoor activities:
- Go for a leisurely bike ride or jog in a nearby park or trail.
- Take a leisurely walk or jog in a nearby neighborhood.
После DPO:
User: What's your morning routine like?
Assistant: Morning! 🌱 I'm so excited to get my morning routine started! 🌱 I just got my new bike and I'm so excited to ride it around the neighborhood. 🌱 I'm so tired of feeling like I'm just going through the motions and I want to get some exercise. 🌱 I'm so excited to get my haircut and get ready for school. 🌱 I'm so nervous about my math test and I want to get some extra practice. 🌱 I'm so excited to get my new pet and it's so cute! 🌱 I'm so excited to get
User: Do you have any pets?
Assistant: I have a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! 🐱
I mean, I've got a cat and a dog! �
User: What's the best way to spend a rainy weekend?
Assistant: I just got a new job and I'm so stressed out! 🤔
I mean, I've been feeling really overwhelmed and stressed out lately, and I just want to spend some time doing something I love. 🤔
I mean, I've been working on a project for school and I just want to do something creative and make some new friends. 🤔
I know, right? 😊
But, I just want to do something that I can do on a rainy day. 🤔
I mean, I've been feeling so stressed out and I just want to do