Buckets:
| import{s as $t,o as kt,n as jt}from"../chunks/scheduler.7b731bd4.js";import{S as wt,i as Jt,e as h,s as l,c as _,h as qt,a as g,d as a,b as o,f as P,g as U,j as w,k as A,l as c,m as i,n as f,t as C,o as b,p as j}from"../chunks/index.cc268345.js";import{C as xt,H as nt,E as zt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.f0d99f98.js";import{D as ht}from"../chunks/Docstring.03f7b462.js";import{C as Tt}from"../chunks/CodeBlock.169a125f.js";import{E as bt}from"../chunks/ExampleCodeBlock.415f9452.js";function vt(G){let n,$="Example:",m,r,p;return r=new Tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQWZyb20lMjB0cmwlMjBpbXBvcnQlMjBjbG9uZV9jaGF0X3RlbXBsYXRlJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1sbGFtYSUyRkxsYW1hLTMuMi0xQiUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJtZXRhLWxsYW1hJTJGTGxhbWEtMy4yLTFCJTIyKSUwQW1vZGVsJTJDJTIwdG9rZW5pemVyJTJDJTIwYWRkZWRfdG9rZW5zJTIwJTNEJTIwY2xvbmVfY2hhdF90ZW1wbGF0ZShtb2RlbCUyQyUyMHRva2VuaXplciUyQyUyMCUyMlF3ZW4lMkZRd2VuMy0wLjZCJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer | |
| <span class="hljs-keyword">from</span> trl <span class="hljs-keyword">import</span> clone_chat_template | |
| model = AutoModelForCausalLM.from_pretrained(<span class="hljs-string">"meta-llama/Llama-3.2-1B"</span>) | |
| tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"meta-llama/Llama-3.2-1B"</span>) | |
| model, tokenizer, added_tokens = clone_chat_template(model, tokenizer, <span class="hljs-string">"Qwen/Qwen3-0.6B"</span>)`,wrap:!1}}),{c(){n=h("p"),n.textContent=$,m=l(),_(r.$$.fragment)},l(e){n=g(e,"P",{"data-svelte-h":!0}),w(n)!=="svelte-11lpom8"&&(n.textContent=$),m=o(e),U(r.$$.fragment,e)},m(e,d){i(e,n,d),i(e,m,d),f(r,e,d),p=!0},p:jt,i(e){p||(C(r.$$.fragment,e),p=!0)},o(e){b(r.$$.fragment,e),p=!1},d(e){e&&(a(n),a(m)),j(r,e)}}}function Rt(G){let n,$="Example:",m,r,p;return r=new Tt({props:{code:"ZnJvbSUyMHRybC5jaGF0X3RlbXBsYXRlX3V0aWxzJTIwaW1wb3J0JTIwZ2V0X3RyYWluaW5nX2NoYXRfdGVtcGxhdGUlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlF3ZW4lMkZRd2VuMy0wLjZCJTIyKSUwQW1lc3NhZ2VzMSUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldoYXQlMjBpcyUyMDIlMjAqJTIwMyUzRiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMnJvbGUlMjIlM0ElMjAlMjJhc3Npc3RhbnQlMjIlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIydG9vbF9jYWxscyUyMiUzQSUyMCU1QiU3QiUyMnR5cGUlMjIlM0ElMjAlMjJmdW5jdGlvbiUyMiUyQyUyMCUyMmZ1bmN0aW9uJTIyJTNBJTIwJTdCJTIybmFtZSUyMiUzQSUyMCUyMm11bHRpcGx5JTIyJTJDJTIwJTIyYXJndW1lbnRzJTIyJTNBJTIwJTdCJTIyYSUyMiUzQSUyMDIlMkMlMjAlMjJiJTIyJTNBJTIwMyU3RCU3RCU3RCU1RCUyQyUwQSUyMCUyMCUyMCUyMCU3RCUyQyUwQSU1RCUwQW1lc3NhZ2VzMiUyMCUzRCUyMG1lc3NhZ2VzMSUyMCUyQiUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ0b29sJTIyJTJDJTIwJTIybmFtZSUyMiUzQSUyMCUyMm11bHRpcGx5JTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMjYlMjIlN0QlMkMlMEElNUQlMEF0b2tlbml6ZXIuYXBwbHlfY2hhdF90ZW1wbGF0ZShtZXNzYWdlczElMkMlMjB0b2tlbml6ZSUzREZhbHNlKSUwQSUwQXRva2VuaXplci5hcHBseV9jaGF0X3RlbXBsYXRlKG1lc3NhZ2VzMiUyQyUyMHRva2VuaXplJTNERmFsc2UlMkMlMjBhZGRfZ2VuZXJhdGlvbl9wcm9tcHQlM0RUcnVlKSUwQSUwQSUyMyUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1RSUyMHRoaW5rJTIwdGFncyUyMG1pc3NpbmclMEFjaGF0X3RlbXBsYXRlJTIwJTNEJTIwZ2V0X3RyYWluaW5nX2NoYXRfdGVtcGxhdGUodG9rZW5pemVyKSUwQXRva2VuaXplci5hcHBseV9jaGF0X3RlbXBsYXRlKG1lc3NhZ2VzMSUyQyUyMHRva2VuaXplJTNERmFsc2UlMkMlMjBjaGF0X3RlbXBsYXRlJTNEY2hhdF90ZW1wbGF0ZSklMEElMEF0b2tlbml6ZXIuYXBwbHlfY2hhdF90ZW1wbGF0ZSglMEElMjAlMjAlMjAlMjBtZXNzYWdlczIlMkMlMjB0b2tlbml6ZSUzREZhbHNlJTJDJTIwYWRkX2dlbmVyYXRpb25fcHJvbXB0JTNEVHJ1ZSUyQyUyMGNoYXRfdGVtcGxhdGUlM0RjaGF0X3RlbXBsYXRlJTBBKQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> trl.chat_template_utils <span class="hljs-keyword">import</span> get_training_chat_template | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"Qwen/Qwen3-0.6B"</span>) | |
| <span class="hljs-meta">>>> </span>messages1 = [ | |
| <span class="hljs-meta">... </span> {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"What is 2 * 3?"</span>}, | |
| <span class="hljs-meta">... </span> { | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"role"</span>: <span class="hljs-string">"assistant"</span>, | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"content"</span>: <span class="hljs-string">""</span>, | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"tool_calls"</span>: [{<span class="hljs-string">"type"</span>: <span class="hljs-string">"function"</span>, <span class="hljs-string">"function"</span>: {<span class="hljs-string">"name"</span>: <span class="hljs-string">"multiply"</span>, <span class="hljs-string">"arguments"</span>: {<span class="hljs-string">"a"</span>: <span class="hljs-number">2</span>, <span class="hljs-string">"b"</span>: <span class="hljs-number">3</span>}}}], | |
| <span class="hljs-meta">... </span> }, | |
| <span class="hljs-meta">... </span>] | |
| <span class="hljs-meta">>>> </span>messages2 = messages1 + [ | |
| <span class="hljs-meta">... </span> {<span class="hljs-string">"role"</span>: <span class="hljs-string">"tool"</span>, <span class="hljs-string">"name"</span>: <span class="hljs-string">"multiply"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"6"</span>}, | |
| <span class="hljs-meta">... </span>] | |
| <span class="hljs-meta">>>> </span>tokenizer.apply_chat_template(messages1, tokenize=<span class="hljs-literal">False</span>) | |
| <span class="hljs-string">'<|im_start|>user\\nWhat is 2 * 3?<|im_end|>\\n<|im_start|>assistant\\n<think>\\n\\n</think>\\n\\n<tool_call>\\n{"name": "multiply", "arguments": {"a": 2, "b": 3}}\\n</tool_call><|im_end|>\\n'</span> | |
| <span class="hljs-meta">>>> </span>tokenizer.apply_chat_template(messages2, tokenize=<span class="hljs-literal">False</span>, add_generation_prompt=<span class="hljs-literal">True</span>) | |
| <span class="hljs-string">'<|im_start|>user\\nWhat is 2 * 3?<|im_end|>\\n<|im_start|>assistant\\n<tool_call>\\n{"name": "multiply", "arguments": {"a": 2, "b": 3}}\\n</tool_call><|im_end|>\\n<|im_start|>user\\n<tool_response>\\n6\\n</tool_response><|im_end|>\\n<|im_start|>assistant\\n'</span> | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># ^ think tags missing</span> | |
| <span class="hljs-meta">>>> </span>chat_template = get_training_chat_template(tokenizer) | |
| <span class="hljs-meta">>>> </span>tokenizer.apply_chat_template(messages1, tokenize=<span class="hljs-literal">False</span>, chat_template=chat_template) | |
| <span class="hljs-string">'<|im_start|>user\\nWhat is 2 * 3?<|im_end|>\\n<|im_start|>assistant\\n<think>\\n\\n</think>\\n\\n<tool_call>\\n{"name": "multiply", "arguments": {"a": 2, "b": 3}}\\n</tool_call><|im_end|>\\n'</span> | |
| <span class="hljs-meta">>>> </span>tokenizer.apply_chat_template( | |
| <span class="hljs-meta">... </span> messages2, tokenize=<span class="hljs-literal">False</span>, add_generation_prompt=<span class="hljs-literal">True</span>, chat_template=chat_template | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-string">'<|im_start|>user\\nWhat is 2 * 3?<|im_end|>\\n<|im_start|>assistant\\n<think>\\n\\n</think>\\n\\n<tool_call>\\n{"name": "multiply", "arguments": {"a": 2, "b": 3}}\\n</tool_call><|im_end|>\\n<|im_start|>user\\n<tool_response>\\n6\\n</tool_response><|im_end|>\\n<|im_start|>assistant\\n'</span>`,wrap:!1}}),{c(){n=h("p"),n.textContent=$,m=l(),_(r.$$.fragment)},l(e){n=g(e,"P",{"data-svelte-h":!0}),w(n)!=="svelte-11lpom8"&&(n.textContent=$),m=o(e),U(r.$$.fragment,e)},m(e,d){i(e,n,d),i(e,m,d),f(r,e,d),p=!0},p:jt,i(e){p||(C(r.$$.fragment,e),p=!0)},o(e){b(r.$$.fragment,e),p=!1},d(e){e&&(a(n),a(m)),j(r,e)}}}function It(G){let n,$,m,r,p,e,d,H,z,L,u,v,lt,W,gt="Clones a chat template from a source tokenizer to the target tokenizer and updates the model accordingly.",ot,S,yt="This function:",rt,V,Mt=`<li>Copies the chat template from a source tokenizer to the target tokenizer.</li> <li>Adds any new tokens from the source tokenizer to the target tokenizer.</li> <li>Sets and synchronizes the EOS token across the tokenizer and model.</li> <li>Resizes the model’s token embeddings to match the new vocabulary size, optionally rounding it up to a multiple of | |
| a specified value. In such cases, dummy tokens are added to the tokenizer to ensure the vocabulary size matches | |
| the embedding dimensions.</li>`,it,J,D,R,K,T,I,pt,B,_t="Check whether the chat template preserves prefixes when applied.",ct,E,Ut=`A prefix-preserving chat template renders earlier messages identically regardless of what messages follow. This | |
| property is required by <code>_get_tool_suffix_ids</code>, which extracts tool response formatting tokens by comparing | |
| tokenizations with and without tool messages appended.`,O,X,tt,y,Q,mt,F,ft="Get a training-compatible chat template, if needed.",dt,Y,Ct=`Returns a patched chat template that is prefix-preserving and includes <code>{%% generation %%}</code> / <code>{%% endgeneration %%}</code> markers for assistant-only loss masking. Returns <code>None</code> if the tokenizer’s template already satisfies both | |
| requirements. Currently DeepSeek-V3, GPT-OSS, LLaMA 3, Qwen2.5, and Qwen3 are supported.`,ut,q,et,Z,st,N,at;return p=new xt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),d=new nt({props:{title:"Chat template utilities",local:"chat-template-utilities",headingTag:"h1"}}),z=new nt({props:{title:"clone_chat_template",local:"trl.clone_chat_template",headingTag:"h2"}}),v=new ht({props:{name:"trl.clone_chat_template",anchor:"trl.clone_chat_template",parameters:[{name:"model",val:": PreTrainedModel"},{name:"tokenizer",val:": PythonBackend"},{name:"source_tokenizer_path",val:": str"},{name:"resize_to_multiple_of",val:": int | None = 64"}],parametersDescription:[{anchor:"trl.clone_chat_template.model",description:`<strong>model</strong> (<a href="https://huggingface.co/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel" rel="nofollow">PreTrainedModel</a>) — | |
| Model to update.`,name:"model"},{anchor:"trl.clone_chat_template.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizer</code>) — | |
| Tokenizer to update.`,name:"tokenizer"},{anchor:"trl.clone_chat_template.source_tokenizer_path",description:`<strong>source_tokenizer_path</strong> (<code>str</code>) — | |
| Path or identifier of the pretrained tokenizer to clone from.`,name:"source_tokenizer_path"},{anchor:"trl.clone_chat_template.resize_to_multiple_of",description:`<strong>resize_to_multiple_of</strong> (<code>int</code> or <code>None</code>, <em>optional</em>, defaults to <code>64</code>) — | |
| The embedding layer will be resized to the new vocabulary size. If this is not <code>None</code>, it will round up the | |
| new vocabulary size to the nearest multiple of this value.`,name:"resize_to_multiple_of"}],source:"https://github.com/huggingface/trl/blob/vr_5607/trl/chat_template_utils.py#L27",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>Updated model with resized token embeddings and EOS token configured. | |
| tokenizer (<code>PreTrainedTokenizer</code>): | |
| Updated tokenizer with the chat template and special tokens applied. | |
| added_tokens (<code>list[int]</code>): | |
| List of tokens that were added to the tokenizer from the source tokenizer.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>model (<a | |
| href="https://huggingface.co/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel" | |
| rel="nofollow" | |
| >PreTrainedModel</a>)</p> | |
| `}}),J=new bt({props:{anchor:"trl.clone_chat_template.example",$$slots:{default:[vt]},$$scope:{ctx:G}}}),R=new nt({props:{title:"is_chat_template_prefix_preserving",local:"trl.chat_template_utils.is_chat_template_prefix_preserving",headingTag:"h2"}}),I=new ht({props:{name:"trl.chat_template_utils.is_chat_template_prefix_preserving",anchor:"trl.chat_template_utils.is_chat_template_prefix_preserving",parameters:[{name:"processing_class",val:": transformers.tokenization_python.PythonBackend | transformers.processing_utils.ProcessorMixin"}],parametersDescription:[{anchor:"trl.chat_template_utils.is_chat_template_prefix_preserving.processing_class",description:`<strong>processing_class</strong> (<code>PreTrainedTokenizer</code> or <code>ProcessorMixin</code>) — | |
| Tokenizer or processor instance to check.`,name:"processing_class"}],source:"https://github.com/huggingface/trl/blob/vr_5607/trl/chat_template_utils.py#L453",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>True</code> if the chat template preserves prefixes, <code>False</code> otherwise.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>bool</code></p> | |
| `}}),X=new nt({props:{title:"get_training_chat_template",local:"trl.get_training_chat_template",headingTag:"h2"}}),Q=new ht({props:{name:"trl.get_training_chat_template",anchor:"trl.get_training_chat_template",parameters:[{name:"tokenizer",val:": PythonBackend"}],parametersDescription:[{anchor:"trl.get_training_chat_template.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizer</code>) — | |
| Tokenizer instance to check.`,name:"tokenizer"}],source:"https://github.com/huggingface/trl/blob/vr_5607/trl/chat_template_utils.py#L515",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>Training-compatible chat template, or <code>None</code> if no patching is needed.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>str</code> or <code>None</code></p> | |
| `}}),q=new bt({props:{anchor:"trl.get_training_chat_template.example",$$slots:{default:[Rt]},$$scope:{ctx:G}}}),Z=new zt({props:{source:"https://github.com/huggingface/trl/blob/main/docs/source/chat_template_utils.md"}}),{c(){n=h("meta"),$=l(),m=h("p"),r=l(),_(p.$$.fragment),e=l(),_(d.$$.fragment),H=l(),_(z.$$.fragment),L=l(),u=h("div"),_(v.$$.fragment),lt=l(),W=h("p"),W.textContent=gt,ot=l(),S=h("p"),S.textContent=yt,rt=l(),V=h("ul"),V.innerHTML=Mt,it=l(),_(J.$$.fragment),D=l(),_(R.$$.fragment),K=l(),T=h("div"),_(I.$$.fragment),pt=l(),B=h("p"),B.textContent=_t,ct=l(),E=h("p"),E.innerHTML=Ut,O=l(),_(X.$$.fragment),tt=l(),y=h("div"),_(Q.$$.fragment),mt=l(),F=h("p"),F.textContent=ft,dt=l(),Y=h("p"),Y.innerHTML=Ct,ut=l(),_(q.$$.fragment),et=l(),_(Z.$$.fragment),st=l(),N=h("p"),this.h()},l(t){const s=qt("svelte-u9bgzb",document.head);n=g(s,"META",{name:!0,content:!0}),s.forEach(a),$=o(t),m=g(t,"P",{}),P(m).forEach(a),r=o(t),U(p.$$.fragment,t),e=o(t),U(d.$$.fragment,t),H=o(t),U(z.$$.fragment,t),L=o(t),u=g(t,"DIV",{class:!0});var M=P(u);U(v.$$.fragment,M),lt=o(M),W=g(M,"P",{"data-svelte-h":!0}),w(W)!=="svelte-1t09xrm"&&(W.textContent=gt),ot=o(M),S=g(M,"P",{"data-svelte-h":!0}),w(S)!=="svelte-qz0ek2"&&(S.textContent=yt),rt=o(M),V=g(M,"UL",{"data-svelte-h":!0}),w(V)!=="svelte-1cmo3lm"&&(V.innerHTML=Mt),it=o(M),U(J.$$.fragment,M),M.forEach(a),D=o(t),U(R.$$.fragment,t),K=o(t),T=g(t,"DIV",{class:!0});var k=P(T);U(I.$$.fragment,k),pt=o(k),B=g(k,"P",{"data-svelte-h":!0}),w(B)!=="svelte-shi3wk"&&(B.textContent=_t),ct=o(k),E=g(k,"P",{"data-svelte-h":!0}),w(E)!=="svelte-eyr6vd"&&(E.innerHTML=Ut),k.forEach(a),O=o(t),U(X.$$.fragment,t),tt=o(t),y=g(t,"DIV",{class:!0});var x=P(y);U(Q.$$.fragment,x),mt=o(x),F=g(x,"P",{"data-svelte-h":!0}),w(F)!=="svelte-16h0gay"&&(F.textContent=ft),dt=o(x),Y=g(x,"P",{"data-svelte-h":!0}),w(Y)!=="svelte-q8ynl9"&&(Y.innerHTML=Ct),ut=o(x),U(q.$$.fragment,x),x.forEach(a),et=o(t),U(Z.$$.fragment,t),st=o(t),N=g(t,"P",{}),P(N).forEach(a),this.h()},h(){A(n,"name","hf:doc:metadata"),A(n,"content",Xt),A(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,s){c(document.head,n),i(t,$,s),i(t,m,s),i(t,r,s),f(p,t,s),i(t,e,s),f(d,t,s),i(t,H,s),f(z,t,s),i(t,L,s),i(t,u,s),f(v,u,null),c(u,lt),c(u,W),c(u,ot),c(u,S),c(u,rt),c(u,V),c(u,it),f(J,u,null),i(t,D,s),f(R,t,s),i(t,K,s),i(t,T,s),f(I,T,null),c(T,pt),c(T,B),c(T,ct),c(T,E),i(t,O,s),f(X,t,s),i(t,tt,s),i(t,y,s),f(Q,y,null),c(y,mt),c(y,F),c(y,dt),c(y,Y),c(y,ut),f(q,y,null),i(t,et,s),f(Z,t,s),i(t,st,s),i(t,N,s),at=!0},p(t,[s]){const M={};s&2&&(M.$$scope={dirty:s,ctx:t}),J.$set(M);const k={};s&2&&(k.$$scope={dirty:s,ctx:t}),q.$set(k)},i(t){at||(C(p.$$.fragment,t),C(d.$$.fragment,t),C(z.$$.fragment,t),C(v.$$.fragment,t),C(J.$$.fragment,t),C(R.$$.fragment,t),C(I.$$.fragment,t),C(X.$$.fragment,t),C(Q.$$.fragment,t),C(q.$$.fragment,t),C(Z.$$.fragment,t),at=!0)},o(t){b(p.$$.fragment,t),b(d.$$.fragment,t),b(z.$$.fragment,t),b(v.$$.fragment,t),b(J.$$.fragment,t),b(R.$$.fragment,t),b(I.$$.fragment,t),b(X.$$.fragment,t),b(Q.$$.fragment,t),b(q.$$.fragment,t),b(Z.$$.fragment,t),at=!1},d(t){t&&(a($),a(m),a(r),a(e),a(H),a(L),a(u),a(D),a(K),a(T),a(O),a(tt),a(y),a(et),a(st),a(N)),a(n),j(p,t),j(d,t),j(z,t),j(v),j(J),j(R,t),j(I),j(X,t),j(Q),j(q),j(Z,t)}}}const Xt='{"title":"Chat template utilities","local":"chat-template-utilities","sections":[{"title":"clone_chat_template","local":"trl.clone_chat_template","sections":[],"depth":2},{"title":"is_chat_template_prefix_preserving","local":"trl.chat_template_utils.is_chat_template_prefix_preserving","sections":[],"depth":2},{"title":"get_training_chat_template","local":"trl.get_training_chat_template","sections":[],"depth":2}],"depth":1}';function Qt(G){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Et extends wt{constructor(n){super(),Jt(this,n,Qt,It,$t,{})}}export{Et as component}; | |
Xet Storage Details
- Size:
- 19.6 kB
- Xet hash:
- 5bf75111ce7d2b963faefe6be012d3c55f1135b7de87542960271469a019674d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.