Dijital-Twin / model

0 stars 0 forks source link

feat: Finetune Blenderbot 1B / 400M #5

Closed MGurcan closed 6 months ago

MGurcan commented 6 months ago

Model Overview

The Blender chatbot model was proposed in Recipes for building an open-domain chatbot Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.

Model URL

https://huggingface.co/docs/transformers/model_doc/blenderbot

MGurcan commented 6 months ago

Blenderbot Finetune

CommitURL

Introduction

In this part of the project, language models on Huggingface were researched, and models that could be used for the project were identified. This identification process took into account the purposes of use of the models, the number of parameters, the outputs they produce, the languages they were trained on, and the languages they can produce outputs in. This issue covers the work to be done on the Huggingface - Blenderbot model, which is one of the models to be tried in the fine-tuning process. There are evaluations for 2 different versions of this model, which have been fine-tuned with different parameters below.

Goal of This Issue

As a result of this fine tuning, it is expected that the model will learn the personality of the fine tuned character sufficiently and make us feel this in the outputs it produces.


Finetune Blenderbot-1B-distill

The 227-episode dialogues of Rachel, who starred in the TV series Friends, were used in the model fine tune process. This model has been fine tuned with the parameter values ​​given below and the output values ​​it produces for various inputs are shown.

Model Huggingface URL

https://huggingface.co/facebook/blenderbot-1B-distill

Parameters and Information(1)

Outputs for Some Example Input Sentences

  1. Come on Rach, you don't have what, ten minutes?
    • I don't think I have ten minutes!! I think I'm gonna take a nap!
  2. Rach, are you okay?
    • Uh-hmm. I’m just thinking about how my baby and I are gonna be all alone.
  3. Hey uh, Rach, funny story. I ah, bumped into Joanna on the street yesterday.
    • My maid of honor, Joey? Wow, that must’ve been awkward.
  4. Rachel always cries!
    • It's not like she's gonna hear! I'm just saying that y'know, someday Ross is gonna meet somebody and…he's gonna have his own life! Right?
  5. We were on a break!
    • Pheebs, I don’t get it! I mean, I was so sure this was what I wanted.
  6. Oh, Rachel, actually, y'know what, forget it.
    • Well, I’ll ask him for you, if you don't want to go with me.
  7. Do you remember the day we had dessert?
    • Do you mean y'know when we were having sex in the car? I'm thinking about that when you're playing the scene?

Parameters and Information(2)

Outputs for Some Example Input Sentences

  1. Come on Rach, you don't have what, ten minutes?

    • No, I have ten minutes. Okay, fine. I have to go pee. Apparently this baby thinks that my bladder is a shaped like a bunny.
  2. Rach, are you okay?

    • I'm fine, but that's not important. What's important is I'm gonna be fine.
  3. Hey uh, Rach, funny story. I ah, bumped into Joanna on the street yesterday.

    • Oh, Ross, that's so sweet. You know, I don't think I'm ever gonna be okay with this.
  4. Rachel always cries!

    • No! Phoebe, that's not true! Last week we were watching TV and she said her first words!!
  5. We were on a break!

    • Y’know Ross, I don’t want you to be alone! I should go to the hospital!
  6. Oh, Rachel, actually, y'know what, forget it.

    • Well, I can't do this. I don't know which one of you guys to pick.
  7. Do you remember the day we had dessert?

    • Well, I remember that I had a dream last night that I wanted to kiss Joey.

Finetune Blenderbot-400M-distill

The 227-episode dialogues of Rachel, who starred in the TV series Friends, were used in the model fine tune process. This model has been fine tuned with the parameter values ​​given below and the output values ​​it produces for various inputs are shown.

Model Huggingface URL

https://huggingface.co/facebook/blenderbot-400M-distill

Parameters and Information(1)

Outputs for Some Example Input Sentences

  1. Come on Rach, you don't have what, ten minutes?
    • yeah, I told you, it's about the fact that I don't have ten minutes left.
  2. Rach, are you okay?
    • I’m fine, but could you please make sure that she’s wearing her own?
  3. Hey uh, Rach, funny story. I ah, bumped into Joanna on the street yesterday.
    • y'know I had a dream last night, and I can't get it out of my head!
  4. Rachel always cries!
    • Thanks, but y’know what? I don’t want to be known as a pushover.
  5. We were on a break!
    • ’s not funny, Monica! This is about me! I washing the dishes!
  6. Oh, Rachel, actually, y'know what, forget it.
    • wait, Chandler, this is in the hallway. I mean, that’s about seven seconds.
  7. Do you remember the day we had dessert?
    • because you remember the day you had a dessert with... a bird just grabbed it, and then tried to fly away with it and, and then just dropped it on the street?

Parameters and Information(2)

Outputs for Some Example Input Sentences

  1. Come on Rach, you don't have what, ten minutes?
    • do I have ten minutes?!! Fasten your seat, pass me the seat, give me ten minutes!!
  2. Rach, are you okay?
    • yeah, it’s just that I’m a little bummed that my sweater’s ruined.
  3. Hey uh, Rach, funny story. I ah, bumped into Joanna on the street yesterday.
    • That was so awkward, I can’t believe you didn’t say, Joanna?
  4. Rachel always cries!
    • Don’t cry! I’m sorry, but Phoebe, that’s not true!
  5. We were on a break!
    • And y’know Ross why don’t you put that on your answering machine?!
  6. Oh, Rachel, actually, y'know what, forget it.
    • I’ll ask him for you, if you give me your phone, I will call you right now.
  7. Do you remember the day we had dessert?
    • you mean the dessert that we had? I remember how we had ice cream on the first date.

Evaluation

Two versions of the fine-tuned blenderbot were examined, but it was decided not to use it as the main model in the project because the other models produced more positive results in terms of personalization and the blenderbot fell below the expected output quality.