<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr" -->

---
title: Fine-tuning Llama-3 with ORPO: A Deep Dive | daily.dev
description: This post provides a deep dive into fine-tuning Llama-3 with ORPO. It covers the code breakdown, customization, notebook login, defining tasks and preferences,...
canonical: https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Fine-tuning Llama-3 with ORPO: A Deep Dive | daily.dev
og:description: This post provides a deep dive into fine-tuning Llama-3 with ORPO. It covers the code breakdown, customization, notebook login, defining tasks and preferences,...
og:url: https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr
og:image: https://api.daily.dev/og/posts/vNvjoOURR.png
og:image:alt: Fine-tuning Llama-3 with ORPO: A Deep Dive
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Fine-tuning Llama-3 with ORPO: A Deep Dive

**[GoPenAI](https://daily.dev/sources/gopenai)** · 6 min read · 2 upvotes · 0 comments

## Summary

This post provides a deep dive into fine-tuning Llama-3 with ORPO. It covers the code breakdown, customization, notebook login, defining tasks and preferences, loading tokenizer and model, preparing ORPO trainer, training the model, and merging the QLoRA adapter with the base model. The post also mentions additional considerations such as evaluation and hardware requirements.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.gopenai.com/fine-tuning-llama-3-with-orpo-a-deep-dive-1452bc1b1838>

---

Tags: [#transformers](https://daily.dev/tags/transformers)

[View this post on daily.dev](https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Fine-tuning Llama-3 with ORPO: A Deep Dive","url":"https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr"},"datePublished":"2024-04-26T10:56:40.638Z","dateModified":"2024-05-09T09:27:15.675Z","description":"This post provides a deep dive into fine-tuning Llama-3 with ORPO. It covers the code breakdown, customization, notebook login, defining tasks and preferences,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/16f8ce12a30a955e7bad7ae114c2b3ae?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/16f8ce12a30a955e7bad7ae114c2b3ae?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"GoPenAI","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"GoPenAI","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/f34dfd0c312c4a59b897eb64ad28d895","url":"https://daily.dev/sources/gopenai"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/fine-tuning-llama-3-with-orpo-a-deep-dive-vnvjoourr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"transformers","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"GoPenAI","item":"https://daily.dev/sources/gopenai"},{"@type":"ListItem","position":3,"name":"Fine-tuning Llama-3 with ORPO: A Deep Dive"}]}
```

