Buckets:
| <meta charset="utf-8" /><meta name="hf:doc:metadata" content="{"title":"面向学生的Open R1","local":"面向学生的open-r1","sections":[{"title":"你会学到什么","local":"你会学到什么","sections":[],"depth":2},{"title":"为什么这对学生来说很重要","local":"为什么这对学生来说很重要","sections":[],"depth":2},{"title":"章节概览","local":"章节概览","sections":[{"title":"1️⃣ 强化学习简介及其在大语言模型(LLMs)中的作用","local":"1-强化学习简介及其在大语言模型llms中的作用","sections":[],"depth":3},{"title":"解读DeepSeek R1论文","local":"解读deepseek-r1论文","sections":[],"depth":3},{"title":"3️⃣ 在TRL中实现GRPO算法","local":"3-在trl中实现grpo算法","sections":[],"depth":3},{"title":"4️⃣ 模型对齐实操案例","local":"4-模型对齐实操案例","sections":[],"depth":3}],"depth":2},{"title":"预备知识","local":"预备知识","sections":[],"depth":2},{"title":"如何使用本章","local":"如何使用本章","sections":[],"depth":2}],"depth":1}"> | |
| <link href="/docs/course/pr_1213/zh-CN/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/entry/start.e9a4ad0c.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/scheduler.893fe8c9.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/singletons.7c7a7de8.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/index.bce52c8a.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/paths.59f00eb6.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/entry/app.a615bcac.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/preload-helper.00a0cfc8.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/index.2d09ebb4.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/nodes/0.d5282dd8.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/each.e59479a4.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/nodes/13.0146ed01.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.fcdcb9db.js"> | |
| <link rel="modulepreload" href="/docs/course/pr_1213/zh-CN/_app/immutable/chunks/CodeBlock.7c992cde.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{"title":"面向学生的Open R1","local":"面向学生的open-r1","sections":[{"title":"你会学到什么","local":"你会学到什么","sections":[],"depth":2},{"title":"为什么这对学生来说很重要","local":"为什么这对学生来说很重要","sections":[],"depth":2},{"title":"章节概览","local":"章节概览","sections":[{"title":"1️⃣ 强化学习简介及其在大语言模型(LLMs)中的作用","local":"1-强化学习简介及其在大语言模型llms中的作用","sections":[],"depth":3},{"title":"解读DeepSeek R1论文","local":"解读deepseek-r1论文","sections":[],"depth":3},{"title":"3️⃣ 在TRL中实现GRPO算法","local":"3-在trl中实现grpo算法","sections":[],"depth":3},{"title":"4️⃣ 模型对齐实操案例","local":"4-模型对齐实操案例","sections":[],"depth":3}],"depth":2},{"title":"预备知识","local":"预备知识","sections":[],"depth":2},{"title":"如何使用本章","local":"如何使用本章","sections":[],"depth":2}],"depth":1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="面向学生的open-r1" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#面向学生的open-r1"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>面向学生的Open R1</span></h1> <p data-svelte-h="svelte-1qgrdc5">欢迎踏上这段激动人心的旅程,一起进入开源AI与强化学习的世界!这个篇章是为了帮助学生理解强化学习以及它在大语言模型(LLMs)中日益重要的作用。</p> <p data-svelte-h="svelte-ppavve">我们会一同探索这个突破性的社区开源项目<a href="https://github.com/huggingface/open-r1" rel="nofollow">Open R1</a>,让更多的人接触到先进的AI技术。具体而言,这个课程会帮助学生以及所有学习者使用并参与贡献<a href="https://github.com/huggingface/open-r1" rel="nofollow">Open R1</a>。</p> <h2 class="relative group"><a id="你会学到什么" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#你会学到什么"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>你会学到什么</span></h2> <p data-svelte-h="svelte-umbd3s">在这个章节中,我们会将复杂的概念拆解成通俗易懂的碎片,向你展示如何可以参与到这个令人激动的项目中,教会大语言模型在复杂的问题中推理。</p> <p data-svelte-h="svelte-1fo7mkh">大语言模型已经在很多生成任务上展示了优异的表现,但是,直到最近,他们仍然在需要推理的复杂问题上难以胜任。比如,他们难以处理需要多步骤推理的谜题或数学难题。</p> <p data-svelte-h="svelte-1n7o05l">Open R1 是一个致力于让大语言模型可以在复杂问题上推理的项目,通过使用强化学习鼓励大语言模型“思考”和推理。</p> <p data-svelte-h="svelte-185gqmj">简单来说,模型经过训练后,既能生成“思考过程”,也能生成“最终输出”,并将二者进行结构化处理,以便用户可以分开处理和利用。</p> <p data-svelte-h="svelte-1gy1jqs">让我们来一起看一下这个例子。当我们要解决下面这个问题时,我们可能会这样思考:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->问题: <span class="hljs-string">"我有3个苹果和2个橙子. 我总共有多少个水果?"</span> | |
| 思考: <span class="hljs-string">"我需要把苹果的数量和橙子的数量加起来,得到总共的水果数量。"</span> | |
| 答案: <span class="hljs-string">"5"</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ne27a3">我们接下来要结构化这个思考过程和答案,以便于被用户分别处理。对于需要推理的任务,大语言模型会被训练为按照以下格式生成思考过程和答案:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><思考>我需要把苹果的数量和橙子的数量加起来,得到总共的水果数量。</思考> | |
| 5<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-10631xy">作为用户,我们便可以从模型的最终输出中提取出“思考过程”和“答案”,用于解决实际问题。</p> <h2 class="relative group"><a id="为什么这对学生来说很重要" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#为什么这对学生来说很重要"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>为什么这对学生来说很重要</span></h2> <p data-svelte-h="svelte-1id2h9y">作为一名学生,理解Open R1以及强化学习在大语言模型中的作用至关重要,因为:</p> <ul data-svelte-h="svelte-h0332y"><li>它向你展示尖端前沿的AI技术的训练过程</li> <li>它为你提供亲身学习实践并做贡献的机会</li> <li>它有助于你洞察人工智能技术的发展方向</li> <li>它将为你打开AI领域未来职业发展的大门</li></ul> <h2 class="relative group"><a id="章节概览" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#章节概览"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>章节概览</span></h2> <p data-svelte-h="svelte-c41jmh">本章共包含四个章节,各部分将侧重于Open R1的一个不同的方面:</p> <h3 class="relative group"><a id="1-强化学习简介及其在大语言模型llms中的作用" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#1-强化学习简介及其在大语言模型llms中的作用"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>1️⃣ 强化学习简介及其在大语言模型(LLMs)中的作用</span></h3> <p data-svelte-h="svelte-skanep">我们将会剖析强化学习的基本概念,及其在训练大语言模型中的作用。</p> <ul data-svelte-h="svelte-1l03ffs"><li>什么是强化学习</li> <li>强化学习如何被应用于大语言模型中</li> <li>什么是DeepSeek R1</li> <li>DeepSeek R1中的关键创新</li></ul> <h3 class="relative group"><a id="解读deepseek-r1论文" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#解读deepseek-r1论文"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>解读DeepSeek R1论文</span></h3> <p data-svelte-h="svelte-1je21l9">我们将会对启发了<a href="https://huggingface.co/open-r1" rel="nofollow">Open R1</a>的这篇论文进行详细拆解:</p> <ul data-svelte-h="svelte-1sdtyyr"><li>核心创新和重大突破</li> <li>训练流程和模型架构</li> <li>实验结果和重要意义</li></ul> <h3 class="relative group"><a id="3-在trl中实现grpo算法" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#3-在trl中实现grpo算法"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>3️⃣ 在TRL中实现GRPO算法</span></h3> <p data-svelte-h="svelte-16wz2k6">我们会动手实操代码案例:</p> <ul data-svelte-h="svelte-b2uizp"><li>如何使用Transformer Reinforcement Learning (TRL)库</li> <li>GRPO训练环境配置</li></ul> <h3 class="relative group"><a id="4-模型对齐实操案例" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#4-模型对齐实操案例"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>4️⃣ 模型对齐实操案例</span></h3> <p data-svelte-h="svelte-1ph4l99">我们将使用Open R1具体展示一个对齐模型的实际应用案例:</p> <ul data-svelte-h="svelte-1jyytns"><li>如何在TRL库中使用GRPO算法训练模型</li> <li>分享你的模型到<a href="https://huggingface.co/models" rel="nofollow">Hugging Face 模型库</a>中</li></ul> <h2 class="relative group"><a id="预备知识" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#预备知识"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>预备知识</span></h2> <p data-svelte-h="svelte-10o49ye">拥有以下预备知识会帮助你更好掌握本章的大部分内容:</p> <ul data-svelte-h="svelte-1pugerr"><li>扎实的Python编程</li> <li>熟悉机器学习概念</li> <li>对人工智能和语言模型感兴趣</li></ul> <p data-svelte-h="svelte-jkyrvf">即使你缺少其中一些知识也无需担心 —— 随着课程的深入,我们会逐步解释所有关键概念!🚀</p> <blockquote class="tip" data-svelte-h="svelte-11utytm"><p>如果你完全不具备以上所有预备知识,可以查看本<a href="/course/chapter1/1">课程</a>的第1单元至第11单元进行学习</p></blockquote> <h2 class="relative group"><a id="如何使用本章" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#如何使用本章"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>如何使用本章</span></h2> <ol data-svelte-h="svelte-anr82x"><li><strong>按序阅读</strong>:各个章节的内容环环相扣,建议按顺序研读,才能收获更多噢!</li> <li><strong>分享笔记</strong>:记录下核心概念和问题,在我们的<a href="https://discord.gg/UrrTSsSyjb" rel="nofollow">Discord</a>社区里和大家一起探讨吧!</li> <li><strong>动手编程</strong>:当我们学到实践案例时,请务必动手亲自尝试噢!</li> <li><strong>加入社区</strong>:利用我们提供的资源和更多的学习者交流切磋吧!</li></ol> <p data-svelte-h="svelte-yrcz81">让我们一起开启Open R1的探索之旅,成为让所有人都能接触人工智能技术的一份子吧!🚀</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/course/blob/main/chapters/zh-CN/chapter12/1.mdx" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p> | |
| <script> | |
| { | |
| __sveltekit_k5k00v = { | |
| assets: "/docs/course/pr_1213/zh-CN", | |
| base: "/docs/course/pr_1213/zh-CN", | |
| env: {} | |
| }; | |
| const element = document.currentScript.parentElement; | |
| const data = [null,null]; | |
| Promise.all([ | |
| import("/docs/course/pr_1213/zh-CN/_app/immutable/entry/start.e9a4ad0c.js"), | |
| import("/docs/course/pr_1213/zh-CN/_app/immutable/entry/app.a615bcac.js") | |
| ]).then(([kit, app]) => { | |
| kit.start(app, element, { | |
| node_ids: [0, 13], | |
| data, | |
| form: null, | |
| error: null | |
| }); | |
| }); | |
| } | |
| </script> | |
Xet Storage Details
- Size:
- 27.1 kB
- Xet hash:
- 74f520a4d807dd932288b6d4427a88a2ab24564fdd5aba996903c4e82b393c2d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.