Fine tuning LLMs for Memorization

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 42

  • @bobg-abc123
    @bobg-abc123 5 месяцев назад +21

    You have the best AI content out there hands down. While other people are just out there parroting the obvious you are actually teaching how this stuff really works. I thank you!

  • @user-zh6zn4hk1k
    @user-zh6zn4hk1k 2 месяца назад +2

    This guy is a professor? excellent!!!!

  • @soccer2themax
    @soccer2themax 25 дней назад

    New to fine tuning and found this extremely helpful. Thank you for putting it together.

  • @HistoryIsAbsurd
    @HistoryIsAbsurd 5 месяцев назад +2

    Awesome, always a good day when you upload. Thanks again good sir!

  • @JulianHarris
    @JulianHarris 5 месяцев назад

    Wow I’d appreciated rephrasing for data augmentation in general but not specifically to handle the reversal curse. Brilliant insight!

  • @unsaturated8482
    @unsaturated8482 5 месяцев назад +1

    awesome, was waiting for this

  • @user-xn1ly6xt8o
    @user-xn1ly6xt8o Месяц назад

    amazing video guide. thank you man!

  • @abhisheksingh1510
    @abhisheksingh1510 5 месяцев назад +2

    Excellent

  • @felipeekeziarosa4270
    @felipeekeziarosa4270 2 месяца назад

    Awesome. Congrats 🎉

  • @alchemication
    @alchemication 5 месяцев назад +1

    This is very cool, and indeed similar to my recent approach to data generation for gpt3.5 fine tuning (needed milti-lingual support). It would be great to evaluate the diff in performance between FT and RAGs, as in theiry RAGs might be easier to manage when data changes more often, right?

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад +1

      Yes, definitely RAG generally the preferred option. I'm just separating here and focusing on fine-tuning, will be back fairly soon with more on the RAG front.

  • @francycharuto
    @francycharuto 5 месяцев назад

    Wow! Glad I found you

  • @loicbaconnier9150
    @loicbaconnier9150 5 месяцев назад +1

    Awasome video

  • @dontworry2605
    @dontworry2605 Месяц назад

    Hello, I was manually putting chat_template for Llama3 myself before I watched this video. I try messages format now storeing all messages as a string in huggingface dataset but my model dosen't learn well that way. It outputs system roles Instruction sometimes and mostly it converse with it self it thinks all roles is its role. How can I fix this if you can you recommend something I will be appriciate it thx for the video btw.

    • @TrelisResearch
      @TrelisResearch  Месяц назад

      howdy, yeah I'd recommend starting off with a really simple example with just a few rows of data and trying that on a small model. you can also check out the livestream videos on this channel, there is one where I cover chat templates

  • @realshyfox5374
    @realshyfox5374 Месяц назад

    Hy. What about teaching the model some definitions that must be given to the user as it is without changing the answer or generalised.

    • @TrelisResearch
      @TrelisResearch  Месяц назад

      hmm, can you clarify your question here?

  • @sergei202
    @sergei202 5 месяцев назад

    As always, great content! But why is the video quality limited to 720p?

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад +1

      hmm, thanks, I'm going to check that going forward and aim to upload higher.

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад +2

      ok, yeah, thanks, I realised my computer camera is 720p, I'm going to shoot with a better camera from now on.

    • @eric-theodore-cartman6151
      @eric-theodore-cartman6151 2 месяца назад +1

      ​@@TrelisResearch The camera quality might be 720p but the content quality is 4k!

  • @adidevbhattacharya9220
    @adidevbhattacharya9220 5 месяцев назад

    Can this same strategy of synthetic data be effective for fine-tuning gpt on openai platform?
    So basically consider this:
    I have a short story(around 10k tokens long). I have divided the entire story into list of situations and incidents(around 13). For each incidents I have the original text from the story. Now I create questions from different angles for each incidents.
    When a user asks query to my system, will the fine-tuned gpt be able to identify the incident in which this question lies?
    What I think is that fine-tuning and iverfitting on rugby rules is quite easier that on some story or novel. Becasue in case of rugby rules you have one word or one-liner answer. In case of stories their is context in the first paragraph as well as the ending paragraphs too and therefore it makes it more tough imo.
    For e.g. If you had to ask about the nature of Harry Porter, there is no one line answer, the model needs to know context from various paragraphs before answering it
    Correct me if I am wrong and if possible can you try memorization of novel or a story, I think its a more intelligent system that QnA on set of rules.
    Thanks!

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад

      Yes, I think the same concept can be used, and I agree you are right that it will take more (and longer) synthetic data to achieve the same effect. Starting with situations/incidents/plot-points makes good sense.

    • @adidevbhattacharya9220
      @adidevbhattacharya9220 4 месяца назад

      Can you maybe prepare a brief guide on the steps(or a video) for giving knowledge base of some novel or story.
      Thanks@@TrelisResearch

    • @TrelisResearch
      @TrelisResearch  4 месяца назад

      ​@@adidevbhattacharya9220 it's a good thought, but probably be a while before I come back around to the storytelling use case, as I've laid out the basic approach here and people can build on that.
      Probably it makes sense to do unsupervised fine-tuning on the novel and then additionally do this supervised fine-tuning approach with some plot points from each chapter.

  • @aasembakhshi
    @aasembakhshi 5 месяцев назад

    Great stuff, as always.
    How good would this approach be for text inviting higher order QA such as philosophy or sociology texts?
    Thanks.

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад

      Hmm, could you reframe your question, maybe with an example - to help me better respond

    • @aasembakhshi
      @aasembakhshi 5 месяцев назад

      In all the example implementations, may it be with embeddings or fine tuning, QA is usually posed to use cases with factual data like rule book or manuals or stuff like that.
      What about very complex and multilayered texts like history or philosophy? For example if we use GPT4 to chat with a book like History of Western Philosophy, it will reply that who is the author and other factual questions but won't be able to carry out a deep discussion keeping material of the book in context.
      So can we use LLMs as memory machines of Philosophy or History tomes?

  • @user-fw9yb4yx9c
    @user-fw9yb4yx9c 5 месяцев назад

    Thanks for this tutorial! How does this approach compare to something like MemGPT?

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад +1

      I'm not intimately familiar with MemGPT but it involves taking your conversation history and storing it in a database so it can be reused. By comparison, if you fine-tuning, you are actually updating the model weights to incorporate the info (which will be faster as an approach, but takes the effort and skill to actually do the fine-tuning).

    • @user-fw9yb4yx9c
      @user-fw9yb4yx9c 5 месяцев назад

      Thank you!@@TrelisResearch

  • @EminTemiz
    @EminTemiz 5 месяцев назад

    a noob question: why are you not training on the PDF itself but converting to chat and training on the chat?

    • @TrelisResearch
      @TrelisResearch  5 месяцев назад +2

      a) The LLM needs to see the knowledge from different angles (otherwise it will only be fine-tuned on those exact phrases and won't generalise as well
      b) if you just fine-tune on the pdf, the LLM will start losing the ability to respond in chat format (because the pdf is not chat format).

  • @divyagarh
    @divyagarh 5 месяцев назад

    Can I use this fine-tuning script for Llam2 models?

  • @AnoniChocolateMoose
    @AnoniChocolateMoose 5 месяцев назад

    batch size 0.o