import{s as Wn,o as Yn,n as Gn}from"../chunks/scheduler.9bc65507.js";import{S as qn,i as Xn,g as r,s as l,r as f,A as zn,h as s,f as o,c as i,j as P,u as p,x as a,k as Sn,y as d,a as n,v as w,d as g,t as y,w as b}from"../chunks/index.707bf1b6.js";import{T as An}from"../chunks/Tip.c2ecdbf4.js";import{C as B}from"../chunks/CodeBlock.54a9f38d.js";import{H as U}from"../chunks/Heading.342b1fa6.js";function En(ze){let m,C="Are you unsure whether the model you wish to use already has a corresponding TensorFlow architecture?",v,_,M=" ",k,T,it=`Check the <code>model_type</code> field of the <code>config.json</code> of your model of choice
(<a href="https://huggingface.co/google-bert/bert-base-uncased/blob/main/config.json#L14" rel="nofollow">example</a>). If the corresponding model folder in
🤗 Transformers has a file whose name starts with “modeling_tf”, it means that it has a corresponding TensorFlow
architecture (<a href="https://github.com/huggingface/transformers/tree/main/src/transformers/models/bert" rel="nofollow">example</a>).`;return{c(){m=r("p"),m.textContent=C,v=l(),_=r("p"),_.textContent=M,k=l(),T=r("p"),T.innerHTML=it},l(c){m=s(c,"P",{"data-svelte-h":!0}),a(m)!=="svelte-bjpicv"&&(m.textContent=C),v=i(c),_=s(c,"P",{"data-svelte-h":!0}),a(_)!=="svelte-1cdgjs8"&&(_.textContent=M),k=i(c),T=s(c,"P",{"data-svelte-h":!0}),a(T)!=="svelte-3e85js"&&(T.innerHTML=it)},m(c,x){n(c,m,x),n(c,v,x),n(c,_,x),n(c,k,x),n(c,T,x)},p:Gn,d(c){c&&(o(m),o(v),o(_),o(k),o(T))}}}function On(ze){let m,C=`Before starting the work on a TensorFlow model architecture, double-check that there is no ongoing effort to do so.
You can search for <code>BrandNewBert</code> on the
<a href="https://github.com/huggingface/transformers/pulls?q=is%3Apr" rel="nofollow">pull request GitHub page</a> to confirm that there is no
TensorFlow-related pull request.`;return{c(){m=r("p"),m.innerHTML=C},l(v){m=s(v,"P",{"data-svelte-h":!0}),a(m)!=="svelte-1238l2j"&&(m.innerHTML=C)},m(v,_){n(v,m,_)},p:Gn,d(v){v&&o(m)}}}function Qn(ze){let m,C,v,_,M,k,T,it=`Having multiple frameworks available to use with 🤗 Transformers gives you flexibility to play their strengths when
designing your application, but it implies that compatibility must be added on a per-model basis. The good news is that
adding TensorFlow compatibility to an existing model is simpler than <a href="add_new_model">adding a new model from scratch</a>!
Whether you wish to have a deeper understanding of large TensorFlow models, make a major open-source contribution, or
enable TensorFlow for your model of choice, this guide is for you.`,c,x,Io=`This guide empowers you, a member of our community, to contribute TensorFlow model weights and/or
architectures to be used in 🤗 Transformers, with minimal supervision from the Hugging Face team. Writing a new model
is no small feat, but hopefully this guide will make it less of a rollercoaster 🎢 and more of a walk in the park 🚶.
Harnessing our collective experiences is absolutely critical to make this process increasingly easier, and thus we
highly encourage that you suggest improvements to this guide!`,st,I,Ro="Before you dive deeper, it is recommended that you check the following resources if you’re new to 🤗 Transformers:",at,R,Jo='<li><a href="add_new_model#general-overview-of-transformers">General overview of 🤗 Transformers</a></li> <li><a href="https://huggingface.co/blog/tensorflow-philosophy" rel="nofollow">Hugging Face’s TensorFlow Philosophy</a></li>',dt,J,No=`In the remainder of this guide, you will learn what’s needed to add a new TensorFlow model architecture, the
procedure to convert PyTorch into TensorFlow model weights, and how to efficiently debug mismatches across ML
frameworks. Let’s get started!`,mt,H,ht,N,ut,Z,Zo=`There are many ways to design a large model architecture, and multiple ways of implementing said design. However,
you might recall from our <a href="add_new_model#general-overview-of-transformers">general overview of 🤗 Transformers</a>
that we are an opinionated bunch - the ease of use of 🤗 Transformers relies on consistent design choices. From
experience, we can tell you a few important things about adding TensorFlow models:`,ct,j,jo=`<li>Don’t reinvent the wheel! More often than not, there are at least two reference implementations you should check: the
PyTorch equivalent of the model you are implementing and other TensorFlow models for the same class of problems.</li> <li>Great model implementations survive the test of time. This doesn’t happen because the code is pretty, but rather
because the code is clear, easy to debug and build upon. If you make the life of the maintainers easy with your
TensorFlow implementation, by replicating the same patterns as in other TensorFlow models and minimizing the mismatch
to the PyTorch implementation, you ensure your contribution will be long lived.</li> <li>Ask for help when you’re stuck! The 🤗 Transformers team is here to help, and we’ve probably found solutions to the same
problems you’re facing.</li>`,ft,S,So="Here’s an overview of the steps needed to add a TensorFlow model architecture:",pt,A,Ao="<li>Select the model you wish to convert</li> <li>Prepare transformers dev environment</li> <li>(Optional) Understand theoretical aspects and the existing implementation</li> <li>Implement the model architecture</li> <li>Implement model tests</li> <li>Submit the pull request</li> <li>(Optional) Build demos and share with the world</li>",wt,G,gt,W,Go="<strong>1. Select the model you wish to convert</strong>",yt,Y,Wo=`Let’s start off with the basics: the first thing you need to know is the architecture you want to convert. If you
don’t have your eyes set on a specific architecture, asking the 🤗 Transformers team for suggestions is a great way to
maximize your impact - we will guide you towards the most prominent architectures that are missing on the TensorFlow
side. If the specific model you want to use with TensorFlow already has a TensorFlow architecture implementation in
🤗 Transformers but is lacking weights, feel free to jump straight into the
<a href="#adding-tensorflow-weights-to--hub">weight conversion section</a>
of this page.`,bt,q,Yo=`For simplicity, the remainder of this guide assumes you’ve decided to contribute with the TensorFlow version of
<em>BrandNewBert</em> (the same example as in the <a href="add_new_model">guide</a> to add a new model from scratch).`,vt,F,Tt,X,qo="<strong>2. Prepare transformers dev environment</strong>",_t,z,Xo=`Having selected the model architecture, open a draft PR to signal your intention to work on it. Follow the
instructions below to set up your environment and open a draft PR.`,xt,h,Ee,zo=`<p>Fork the <a href="https://github.com/huggingface/transformers" rel="nofollow">repository</a> by clicking on the ‘Fork’ button on the
repository’s page. This creates a copy of the code under your GitHub user account.</p>`,yo,E,Oe,Eo="Clone your <code>transformers</code> fork to your local disk, and add the base repository as a remote:",bo,O,vo,$,Qe,Oo="Set up a development environment, for instance by running the following commands:",To,Q,_o,Ve,Qo=`Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
failure with this command. If that’s the case make sure to install TensorFlow then do:`,xo,V,$o,De,Vo="<strong>Note:</strong> You don’t need to have CUDA installed. Making the new model work on CPU is sufficient.",Co,D,Ke,Do="Create a branch with a descriptive name from your main branch:",Mo,K,Lo,ee,et,Ko="Fetch and rebase to current main:",ko,te,Ho,tt,en=`<p>Add an empty <code>.py</code> file in <code>transformers/src/models/brandnewbert/</code> named <code>modeling_tf_brandnewbert.py</code>. This will
be your TensorFlow model file.</p>`,Fo,oe,ot,tn="Push the changes to your account using:",Po,ne,Bo,nt,on=`<p>Once you are satisfied, go to the webpage of your fork on GitHub. Click on “Pull request”. Make sure to add the
GitHub handle of some members of the Hugging Face team as reviewers, so that the Hugging Face team gets notified for
future changes.</p>`,Uo,lt,nn="<p>Change the PR into a draft by clicking on “Convert to draft” on the right of the GitHub pull request web page.</p>",$t,le,ln="Now you have set up a development environment to port <em>BrandNewBert</em> to TensorFlow in 🤗 Transformers.",Ct,ie,rn="<strong>3. (Optional) Understand theoretical aspects and the existing implementation</strong>",Mt,re,sn=`You should take some time to read <em>BrandNewBert’s</em> paper, if such descriptive work exists. There might be large
sections of the paper that are difficult to understand. If this is the case, this is fine - don’t worry! The goal is
not to get a deep theoretical understanding of the paper, but to extract the necessary information required to
effectively re-implement the model in 🤗 Transformers using TensorFlow. That being said, you don’t have to spend too
much time on the theoretical aspects, but rather focus on the practical ones, namely the existing model documentation
page (e.g. <a href="model_doc/bert">model docs for BERT</a>).`,Lt,se,an=`After you’ve grasped the basics of the models you are about to implement, it’s important to understand the existing
implementation. This is a great chance to confirm that a working implementation matches your expectations for the
model, as well as to foresee technical challenges on the TensorFlow side.`,kt,ae,dn=`It’s perfectly natural that you feel overwhelmed with the amount of information that you’ve just absorbed. It is
definitely not a requirement that you understand all facets of the model at this stage. Nevertheless, we highly
encourage you to clear any pressing questions in our <a href="https://discuss.huggingface.co/" rel="nofollow">forum</a>.`,Ht,de,Ft,me,mn=`Now it’s time to finally start coding. Our suggested starting point is the PyTorch file itself: copy the contents of
<code>modeling_brand_new_bert.py</code> inside <code>src/transformers/models/brand_new_bert/</code> into
<code>modeling_tf_brand_new_bert.py</code>. The goal of this section is to modify the file and update the import structure of
🤗 Transformers such that you can import <code>TFBrandNewBert</code> and
<code>TFBrandNewBert.from_pretrained(model_repo, from_pt=True)</code> successfully loads a working TensorFlow <em>BrandNewBert</em> model.`,Pt,he,hn=`Sadly, there is no prescription to convert a PyTorch model into TensorFlow. You can, however, follow our selection of
tips to make the process as smooth as possible:`,Bt,ue,un=`<li>Prepend <code>TF</code> to the name of all classes (e.g. <code>BrandNewBert</code> becomes <code>TFBrandNewBert</code>).</li> <li>Most PyTorch operations have a direct TensorFlow replacement. For example, <code>torch.nn.Linear</code> corresponds to
<code>tf.keras.layers.Dense</code>, <code>torch.nn.Dropout</code> corresponds to <code>tf.keras.layers.Dropout</code>, etc. If you’re not sure
about a specific operation, you can use the <a href="https://www.tensorflow.org/api_docs/python/tf" rel="nofollow">TensorFlow documentation</a>
or the <a href="https://pytorch.org/docs/stable/" rel="nofollow">PyTorch documentation</a>.</li> <li>Look for patterns in the 🤗 Transformers codebase. If you come across a certain operation that doesn’t have a direct
replacement, the odds are that someone else already had the same problem.</li> <li>By default, keep the same variable names and structure as in PyTorch. This will make it easier to debug, track
issues, and add fixes down the line.</li> <li>Some layers have different default values in each framework. A notable example is the batch normalization layer’s
epsilon (<code>1e-5</code> in <a href="https://pytorch.org/docs/stable/generated/torch.nn.BatchNorm2d.html#torch.nn.BatchNorm2d" rel="nofollow">PyTorch</a>
and <code>1e-3</code> in <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/BatchNormalization" rel="nofollow">TensorFlow</a>).
Double-check the documentation!</li> <li>PyTorch’s <code>nn.Parameter</code> variables typically need to be initialized within TF Layer’s <code>build()</code>. See the following
example: <a href="https://github.com/huggingface/transformers/blob/655f72a6896c0533b1bdee519ed65a059c2425ac/src/transformers/models/vit_mae/modeling_vit_mae.py#L212" rel="nofollow">PyTorch</a> /
<a href="https://github.com/huggingface/transformers/blob/655f72a6896c0533b1bdee519ed65a059c2425ac/src/transformers/models/vit_mae/modeling_tf_vit_mae.py#L220" rel="nofollow">TensorFlow</a></li> <li>If the PyTorch model has a <code>#copied from ...</code> on top of a function, the odds are that your TensorFlow model can also
borrow that function from the architecture it was copied from, assuming it has a TensorFlow architecture.</li> <li>Assigning the <code>name</code> attribute correctly in TensorFlow functions is critical to do the <code>from_pt=True</code> weight
cross-loading. <code>name</code> is almost always the name of the corresponding variable in the PyTorch code. If <code>name</code> is not
properly set, you will see it in the error message when loading the model weights.</li> <li>The logic of the base model class, <code>BrandNewBertModel</code>, will actually reside in <code>TFBrandNewBertMainLayer</code>, a Keras
layer subclass (<a href="https://github.com/huggingface/transformers/blob/4fd32a1f499e45f009c2c0dea4d81c321cba7e02/src/transformers/models/bert/modeling_tf_bert.py#L719" rel="nofollow">example</a>).
<code>TFBrandNewBertModel</code> will simply be a wrapper around this layer.</li> <li>Keras models need to be built in order to load pretrained weights. For that reason, <code>TFBrandNewBertPreTrainedModel</code>
will need to hold an example of inputs to the model, the <code>dummy_inputs</code>
(<a href="https://github.com/huggingface/transformers/blob/4fd32a1f499e45f009c2c0dea4d81c321cba7e02/src/transformers/models/bert/modeling_tf_bert.py#L916" rel="nofollow">example</a>).</li> <li>If you get stuck, ask for help - we’re here to help you! 🤗</li>`,Ut,ce,cn=`In addition to the model file itself, you will also need to add the pointers to the model classes and related
documentation pages. You can complete this part entirely following the patterns in other PRs
(<a href="https://github.com/huggingface/transformers/pull/18020/files" rel="nofollow">example</a>). Here’s a list of the needed manual
changes:`,It,fe,fn="<li>Include all public classes of <em>BrandNewBert</em> in <code>src/transformers/__init__.py</code></li> <li>Add <em>BrandNewBert</em> classes to the corresponding Auto classes in <code>src/transformers/models/auto/modeling_tf_auto.py</code></li> <li>Add the lazy loading classes related to <em>BrandNewBert</em> in <code>src/transformers/utils/dummy_tf_objects.py</code></li> <li>Update the import structures for the public classes in <code>src/transformers/models/brand_new_bert/__init__.py</code></li> <li>Add the documentation pointers to the public methods of <em>BrandNewBert</em> in <code>docs/source/en/model_doc/brand_new_bert.md</code></li> <li>Add yourself to the list of contributors to <em>BrandNewBert</em> in <code>docs/source/en/model_doc/brand_new_bert.md</code></li> <li>Finally, add a green tick ✅ to the TensorFlow column of <em>BrandNewBert</em> in <code>docs/source/en/index.md</code></li>",Rt,pe,pn=`When you’re happy with your implementation, run the following checklist to confirm that your model architecture is
ready:`,Jt,we,wn=`<li>All layers that behave differently at train time (e.g. Dropout) are called with a <code>training</code> argument, which is
propagated all the way from the top-level classes</li> <li>You have used <code>#copied from ...</code> whenever possible</li> <li><code>TFBrandNewBertMainLayer</code> and all classes that use it have their <code>call</code> function decorated with <code>@unpack_inputs</code></li> <li><code>TFBrandNewBertMainLayer</code> is decorated with <code>@keras_serializable</code></li> <li>A TensorFlow model can be loaded from PyTorch weights using <code>TFBrandNewBert.from_pretrained(model_repo, from_pt=True)</code></li> <li>You can call the TensorFlow model using the expected input format</li>`,Nt,ge,Zt,ye,gn=`Hurray, you’ve implemented a TensorFlow model! Now it’s time to add tests to make sure that your model behaves as
expected. As in the previous section, we suggest you start by copying the <code>test_modeling_brand_new_bert.py</code> file in
<code>tests/models/brand_new_bert/</code> into <code>test_modeling_tf_brand_new_bert.py</code>, and continue by making the necessary
TensorFlow replacements. For now, in all <code>.from_pretrained()</code> calls, you should use the <code>from_pt=True</code> flag to load
the existing PyTorch weights.`,jt,be,yn="After you’re done, it’s time for the moment of truth: run the tests! 😬",St,ve,At,Te,bn=`The most likely outcome is that you’ll see a bunch of errors. Don’t worry, this is expected! Debugging ML models is
notoriously hard, and the key ingredient to success is patience (and <code>breakpoint()</code>). In our experience, the hardest
problems arise from subtle mismatches between ML frameworks, for which we have a few pointers at the end of this guide.
In other cases, a general test might not be directly applicable to your model, in which case we suggest an override
at the model test class level. Regardless of the issue, don’t hesitate to ask for help in your draft pull request if
you’re stuck.`,Gt,_e,vn="When all tests pass, congratulations, your model is nearly ready to be added to the 🤗 Transformers library! 🎉",Wt,xe,Yt,$e,Tn="<strong>6. Submit the pull request</strong>",qt,Ce,_n=`Once you’re done with the implementation and the tests, it’s time to submit a pull request. Before pushing your code,
run our code formatting utility, <code>make fixup</code> 🪄. This will automatically fix any formatting issues, which would cause
our automatic checks to fail.`,Xt,Me,xn=`It’s now time to convert your draft pull request into a real pull request. To do so, click on the “Ready for
review” button and add Joao (<code>@gante</code>) and Matt (<code>@Rocketknight1</code>) as reviewers. A model pull request will need
at least 3 reviewers, but they will take care of finding appropriate additional reviewers for your model.`,zt,Le,$n=`After all reviewers are happy with the state of your PR, the final action point is to remove the <code>from_pt=True</code> flag in
<code>.from_pretrained()</code> calls. Since there are no TensorFlow weights, you will have to add them! Check the section
below for instructions on how to do it.`,Et,ke,Cn=`Finally, when the TensorFlow weights get merged, you have at least 3 reviewer approvals, and all CI checks are
green, double-check the tests locally one last time`,Ot,He,Qt,Fe,Mn="and we will merge your PR! Congratulations on the milestone 🎉",Vt,Pe,Ln="<strong>7. (Optional) Build demos and share with the world</strong>",Dt,Be,kn=`One of the hardest parts about open-source is discovery. How can the other users learn about the existence of your
fabulous TensorFlow contribution? With proper communication, of course! 📣`,Kt,Ue,Hn="There are two main ways to share your model with the community:",eo,Ie,Fn=`<li>Build demos. These include Gradio demos, notebooks, and other fun ways to show off your model. We highly
encourage you to add a notebook to our <a href="https://huggingface.co/docs/transformers/community" rel="nofollow">community-driven demos</a>.</li> <li>Share stories on social media like Twitter and LinkedIn. You should be proud of your work and share
your achievement with the community - your model can now be used by thousands of engineers and researchers around
the world 🌍! We will be happy to retweet your posts and help you share your work with the community.</li>`,to,Re,oo,Je,Pn=`Assuming that the TensorFlow model architecture is available in 🤗 Transformers, converting PyTorch weights into
TensorFlow weights is a breeze!`,no,Ne,Bn="Here’s how to do it:",lo,Ze,Un=`<li>Make sure you are logged into your Hugging Face account in your terminal. You can log in using the command
<code>huggingface-cli login</code> (you can find your access tokens <a href="https://huggingface.co/settings/tokens" rel="nofollow">here</a>)</li> <li>Run <code>transformers-cli pt-to-tf --model-name foo/bar</code>, where <code>foo/bar</code> is the name of the model repository
containing the PyTorch weights you want to convert</li> <li>Tag <code>@joaogante</code> and <code>@Rocketknight1</code> in the 🤗 Hub PR the command above has just created</li>`,io,je,In="That’s it! 🎉",ro,Se,so,Ae,Rn=`At some point, when adding a new architecture or when creating TensorFlow weights for an existing architecture, you
might come across errors complaining about mismatches between PyTorch and TensorFlow. You might even decide to open the
model architecture code for the two frameworks, and find that they look identical. What’s going on? 🤔`,ao,Ge,Jn=`First of all, let’s talk about why understanding these mismatches matters. Many community members will use 🤗
Transformers models out of the box, and trust that our models behave as expected. When there is a large mismatch
between the two frameworks, it implies that the model is not following the reference implementation for at least one
of the frameworks. This might lead to silent failures, in which the model runs but has poor performance. This is
arguably worse than a model that fails to run at all! To that end, we aim at having a framework mismatch smaller than
<code>1e-5</code> at all stages of the model.`,mo,We,Nn=`As in other numerical problems, the devil is in the details. And as in any detail-oriented craft, the secret
ingredient here is patience. Here is our suggested workflow for when you come across this type of issues:`,ho,Ye,Zn=`<li>Locate the source of mismatches. The model you’re converting probably has near identical inner variables up to a
certain point. Place <code>breakpoint()</code> statements in the two frameworks’ architectures, and compare the values of the
numerical variables in a top-down fashion until you find the source of the problems.</li> <li>Now that you’ve pinpointed the source of the issue, get in touch with the 🤗 Transformers team. It is possible
that we’ve seen a similar problem before and can promptly provide a solution. As a fallback, scan popular pages
like StackOverflow and GitHub issues.</li> <li>If there is no solution in sight, it means you’ll have to go deeper. The good news is that you’ve located the
issue, so you can focus on the problematic instruction, abstracting away the rest of the model! The bad news is
that you’ll have to venture into the source implementation of said instruction. In some cases, you might find an
issue with a reference implementation - don’t abstain from opening an issue in the upstream repository.</li>`,uo,qe,jn=`In some cases, in discussion with the 🤗 Transformers team, we might find that fixing the mismatch is infeasible.
When the mismatch is very small in the output layers of the model (but potentially large in the hidden states), we
might decide to ignore it in favor of distributing the model. The <code>pt-to-tf</code> CLI mentioned above has a <code>--max-error</code>
flag to override the error message at weight conversion time.`,co,rt,fo;return M=new U({props:{title:"How to convert a 🤗 Transformers model to TensorFlow?",local:"how-to-convert-a--transformers-model-to-tensorflow",headingTag:"h1"}}),H=new An({props:{$$slots:{default:[En]},$$scope:{ctx:ze}}}),N=new U({props:{title:"Step-by-step guide to add TensorFlow model architecture code",local:"step-by-step-guide-to-add-tensorflow-model-architecture-code",headingTag:"h2"}}),G=new U({props:{title:"1.-3. Prepare your model contribution",local:"1-3-prepare-your-model-contribution",headingTag:"h3"}}),F=new An({props:{$$slots:{default:[On]},$$scope:{ctx:ze}}}),O=new B({props:{code:"Z2l0JTIwY2xvbmUlMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkYlNUJ5b3VyJTIwR2l0aHViJTIwaGFuZGxlJTVEJTJGdHJhbnNmb3JtZXJzLmdpdCUwQWNkJTIwdHJhbnNmb3JtZXJzJTBBZ2l0JTIwcmVtb3RlJTIwYWRkJTIwdXBzdHJlYW0lMjBodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZodWdnaW5nZmFjZSUyRnRyYW5zZm9ybWVycy5naXQ=",highlighted:`git <span class="hljs-built_in">clone</span> https://github.com/[your Github handle]/transformers.git
<span class="hljs-built_in">cd</span> transformers
git remote add upstream https://github.com/huggingface/transformers.git`,wrap:!1}}),Q=new B({props:{code:"cHl0aG9uJTIwLW0lMjB2ZW52JTIwLmVudiUwQXNvdXJjZSUyMC5lbnYlMkZiaW4lMkZhY3RpdmF0ZSUwQXBpcCUyMGluc3RhbGwlMjAtZSUyMCUyMi4lNUJkZXYlNUQlMjI=",highlighted:`python -m venv .<span class="hljs-built_in">env</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate
pip install -e <span class="hljs-string">&quot;.[dev]&quot;</span>`,wrap:!1}}),V=new B({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnF1YWxpdHklNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[quality]&quot;</span>',wrap:!1}}),K=new B({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjAtYiUyMGFkZF90Zl9icmFuZF9uZXdfYmVydA==",highlighted:"git checkout -b add_tf_brand_new_bert",wrap:!1}}),te=new B({props:{code:"Z2l0JTIwZmV0Y2glMjB1cHN0cmVhbSUwQWdpdCUyMHJlYmFzZSUyMHVwc3RyZWFtJTJGbWFpbg==",highlighted:`git fetch upstream
git rebase upstream/main`,wrap:!1}}),ne=new B({props:{code:"Z2l0JTIwYWRkJTIwLiUwQWdpdCUyMGNvbW1pdCUyMC1tJTIwJTIyaW5pdGlhbCUyMGNvbW1pdCUyMiUwQWdpdCUyMHB1c2glMjAtdSUyMG9yaWdpbiUyMGFkZF90Zl9icmFuZF9uZXdfYmVydA==",highlighted:`git add .
git commit -m <span class="hljs-string">&quot;initial commit&quot;</span>
git push -u origin add_tf_brand_new_bert`,wrap:!1}}),de=new U({props:{title:"4. Model implementation",local:"4-model-implementation",headingTag:"h3"}}),ge=new U({props:{title:"5. Add model tests",local:"5-add-model-tests",headingTag:"h3"}}),ve=new B({props:{code:"TlZJRElBX1RGMzJfT1ZFUlJJREUlM0QwJTIwUlVOX1NMT1clM0QxJTIwUlVOX1BUX1RGX0NST1NTX1RFU1RTJTNEMSUyMCU1QyUwQXB5LnRlc3QlMjAtdnYlMjB0ZXN0cyUyRm1vZGVscyUyRmJyYW5kX25ld19iZXJ0JTJGdGVzdF9tb2RlbGluZ190Zl9icmFuZF9uZXdfYmVydC5weQ==",highlighted:`NVIDIA_TF32_OVERRIDE=0 RUN_SLOW=1 RUN_PT_TF_CROSS_TESTS=1 \\
py.test -vv tests/models/brand_new_bert/test_modeling_tf_brand_new_bert.py`,wrap:!1}}),xe=new U({props:{title:"6.-7. Ensure everyone can use your model",local:"6-7-ensure-everyone-can-use-your-model",headingTag:"h3"}}),He=new B({props:{code:"TlZJRElBX1RGMzJfT1ZFUlJJREUlM0QwJTIwUlVOX1NMT1clM0QxJTIwUlVOX1BUX1RGX0NST1NTX1RFU1RTJTNEMSUyMCU1QyUwQXB5LnRlc3QlMjAtdnYlMjB0ZXN0cyUyRm1vZGVscyUyRmJyYW5kX25ld19iZXJ0JTJGdGVzdF9tb2RlbGluZ190Zl9icmFuZF9uZXdfYmVydC5weQ==",highlighted:`NVIDIA_TF32_OVERRIDE=0 RUN_SLOW=1 RUN_PT_TF_CROSS_TESTS=1 \\
py.test -vv tests/models/brand_new_bert/test_modeling_tf_brand_new_bert.py`,wrap:!1}}),Re=new U({props:{title:"Adding TensorFlow weights to 🤗 Hub",local:"adding-tensorflow-weights-to--hub",headingTag:"h2"}}),Se=new U({props:{title:"Debugging mismatches across ML frameworks 🐛",local:"debugging-mismatches-across-ml-frameworks-",headingTag:"h2"}}),{c(){m=r("meta"),C=l(),v=r("p"),_=l(),f(M.$$.fragment),k=l(),T=r("p"),T.innerHTML=it,c=l(),x=r("p"),x.textContent=Io,st=l(),I=r("p"),I.textContent=Ro,at=l(),R=r("ul"),R.innerHTML=Jo,dt=l(),J=r("p"),J.textContent=No,mt=l(),f(H.$$.fragment),ht=l(),f(N.$$.fragment),ut=l(),Z=r("p"),Z.innerHTML=Zo,ct=l(),j=r("ul"),j.innerHTML=jo,ft=l(),S=r("p"),S.textContent=So,pt=l(),A=r("ol"),A.innerHTML=Ao,wt=l(),f(G.$$.fragment),gt=l(),W=r("p"),W.innerHTML=Go,yt=l(),Y=r("p"),Y.innerHTML=Wo,bt=l(),q=r("p"),q.innerHTML=Yo,vt=l(),f(F.$$.fragment),Tt=l(),X=r("p"),X.innerHTML=qo,_t=l(),z=r("p"),z.textContent=Xo,xt=l(),h=r("ol"),Ee=r("li"),Ee.innerHTML=zo,yo=l(),E=r("li"),Oe=r("p"),Oe.innerHTML=Eo,bo=l(),f(O.$$.fragment),vo=l(),$=r("li"),Qe=r("p"),Qe.textContent=Oo,To=l(),f(Q.$$.fragment),_o=l(),Ve=r("p"),Ve.textContent=Qo,xo=l(),f(V.$$.fragment),$o=l(),De=r("p"),De.innerHTML=Vo,Co=l(),D=r("li"),Ke=r("p"),Ke.textContent=Do,Mo=l(),f(K.$$.fragment),Lo=l(),ee=r("li"),et=r("p"),et.textContent=Ko,ko=l(),f(te.$$.fragment),Ho=l(),tt=r("li"),tt.innerHTML=en,Fo=l(),oe=r("li"),ot=r("p"),ot.textContent=tn,Po=l(),f(ne.$$.fragment),Bo=l(),nt=r("li"),nt.innerHTML=on,Uo=l(),lt=r("li"),lt.innerHTML=nn,$t=l(),le=r("p"),le.innerHTML=ln,Ct=l(),ie=r("p"),ie.innerHTML=rn,Mt=l(),re=r("p"),re.innerHTML=sn,Lt=l(),se=r("p"),se.textContent=an,kt=l(),ae=r("p"),ae.innerHTML=dn,Ht=l(),f(de.$$.fragment),Ft=l(),me=r("p"),me.innerHTML=mn,Pt=l(),he=r("p"),he.textContent=hn,Bt=l(),ue=r("ul"),ue.innerHTML=un,Ut=l(),ce=r("p"),ce.innerHTML=cn,It=l(),fe=r("ul"),fe.innerHTML=fn,Rt=l(),pe=r("p"),pe.textContent=pn,Jt=l(),we=r("ol"),we.innerHTML=wn,Nt=l(),f(ge.$$.fragment),Zt=l(),ye=r("p"),ye.innerHTML=gn,jt=l(),be=r("p"),be.textContent=yn,St=l(),f(ve.$$.fragment),At=l(),Te=r("p"),Te.innerHTML=bn,Gt=l(),_e=r("p"),_e.textContent=vn,Wt=l(),f(xe.$$.fragment),Yt=l(),$e=r("p"),$e.innerHTML=Tn,qt=l(),Ce=r("p"),Ce.innerHTML=_n,Xt=l(),Me=r("p"),Me.innerHTML=xn,zt=l(),Le=r("p"),Le.innerHTML=$n,Et=l(),ke=r("p"),ke.textContent=Cn,Ot=l(),f(He.$$.fragment),Qt=l(),Fe=r("p"),Fe.textContent=Mn,Vt=l(),Pe=r("p"),Pe.innerHTML=Ln,Dt=l(),Be=r("p"),Be.textContent=kn,Kt=l(),Ue=r("p"),Ue.textContent=Hn,eo=l(),Ie=r("ul"),Ie.innerHTML=Fn,to=l(),f(Re.$$.fragment),oo=l(),Je=r("p"),Je.textContent=Pn,no=l(),Ne=r("p"),Ne.textContent=Bn,lo=l(),Ze=r("ol"),Ze.innerHTML=Un,io=l(),je=r("p"),je.textContent=In,ro=l(),f(Se.$$.fragment),so=l(),Ae=r("p"),Ae.textContent=Rn,ao=l(),Ge=r("p"),Ge.innerHTML=Jn,mo=l(),We=r("p"),We.textContent=Nn,ho=l(),Ye=r("ol"),Ye.innerHTML=Zn,uo=l(),qe=r("p"),qe.innerHTML=jn,co=l(),rt=r("p"),this.h()},l(e){const t=zn("svelte-u9bgzb",document.head);m=s(t,"META",{name:!0,content:!0}),t.forEach(o),C=i(e),v=s(e,"P",{}),P(v).forEach(o),_=i(e),p(M.$$.fragment,e),k=i(e),T=s(e,"P",{"data-svelte-h":!0}),a(T)!=="svelte-un598u"&&(T.innerHTML=it),c=i(e),x=s(e,"P",{"data-svelte-h":!0}),a(x)!=="svelte-1m7mnyo"&&(x.textContent=Io),st=i(e),I=s(e,"P",{"data-svelte-h":!0}),a(I)!=="svelte-1a30pti"&&(I.textContent=Ro),at=i(e),R=s(e,"UL",{"data-svelte-h":!0}),a(R)!=="svelte-1syo9f3"&&(R.innerHTML=Jo),dt=i(e),J=s(e,"P",{"data-svelte-h":!0}),a(J)!=="svelte-flc7p5"&&(J.textContent=No),mt=i(e),p(H.$$.fragment,e),ht=i(e),p(N.$$.fragment,e),ut=i(e),Z=s(e,"P",{"data-svelte-h":!0}),a(Z)!=="svelte-1nfvtxf"&&(Z.innerHTML=Zo),ct=i(e),j=s(e,"UL",{"data-svelte-h":!0}),a(j)!=="svelte-r4pwei"&&(j.innerHTML=jo),ft=i(e),S=s(e,"P",{"data-svelte-h":!0}),a(S)!=="svelte-12ug9wa"&&(S.textContent=So),pt=i(e),A=s(e,"OL",{"data-svelte-h":!0}),a(A)!=="svelte-b2inhb"&&(A.innerHTML=Ao),wt=i(e),p(G.$$.fragment,e),gt=i(e),W=s(e,"P",{"data-svelte-h":!0}),a(W)!=="svelte-rqidwu"&&(W.innerHTML=Go),yt=i(e),Y=s(e,"P",{"data-svelte-h":!0}),a(Y)!=="svelte-1rt3dcz"&&(Y.innerHTML=Wo),bt=i(e),q=s(e,"P",{"data-svelte-h":!0}),a(q)!=="svelte-mkqbuc"&&(q.innerHTML=Yo),vt=i(e),p(F.$$.fragment,e),Tt=i(e),X=s(e,"P",{"data-svelte-h":!0}),a(X)!=="svelte-w68cw6"&&(X.innerHTML=qo),_t=i(e),z=s(e,"P",{"data-svelte-h":!0}),a(z)!=="svelte-4rco38"&&(z.textContent=Xo),xt=i(e),h=s(e,"OL",{});var u=P(h);Ee=s(u,"LI",{"data-svelte-h":!0}),a(Ee)!=="svelte-4g2dtl"&&(Ee.innerHTML=zo),yo=i(u),E=s(u,"LI",{});var Xe=P(E);Oe=s(Xe,"P",{"data-svelte-h":!0}),a(Oe)!=="svelte-lgncv4"&&(Oe.innerHTML=Eo),bo=i(Xe),p(O.$$.fragment,Xe),Xe.forEach(o),vo=i(u),$=s(u,"LI",{});var L=P($);Qe=s(L,"P",{"data-svelte-h":!0}),a(Qe)!=="svelte-5wdf6a"&&(Qe.textContent=Oo),To=i(L),p(Q.$$.fragment,L),_o=i(L),Ve=s(L,"P",{"data-svelte-h":!0}),a(Ve)!=="svelte-23rgus"&&(Ve.textContent=Qo),xo=i(L),p(V.$$.fragment,L),$o=i(L),De=s(L,"P",{"data-svelte-h":!0}),a(De)!=="svelte-6bybv3"&&(De.innerHTML=Vo),L.forEach(o),Co=i(u),D=s(u,"LI",{});var po=P(D);Ke=s(po,"P",{"data-svelte-h":!0}),a(Ke)!=="svelte-1wd3vdn"&&(Ke.textContent=Do),Mo=i(po),p(K.$$.fragment,po),po.forEach(o),Lo=i(u),ee=s(u,"LI",{});var wo=P(ee);et=s(wo,"P",{"data-svelte-h":!0}),a(et)!=="svelte-1awho2g"&&(et.textContent=Ko),ko=i(wo),p(te.$$.fragment,wo),wo.forEach(o),Ho=i(u),tt=s(u,"LI",{"data-svelte-h":!0}),a(tt)!=="svelte-luy37q"&&(tt.innerHTML=en),Fo=i(u),oe=s(u,"LI",{});var go=P(oe);ot=s(go,"P",{"data-svelte-h":!0}),a(ot)!=="svelte-1adm7yl"&&(ot.textContent=tn),Po=i(go),p(ne.$$.fragment,go),go.forEach(o),Bo=i(u),nt=s(u,"LI",{"data-svelte-h":!0}),a(nt)!=="svelte-v52akd"&&(nt.innerHTML=on),Uo=i(u),lt=s(u,"LI",{"data-svelte-h":!0}),a(lt)!=="svelte-1jfczy2"&&(lt.innerHTML=nn),u.forEach(o),$t=i(e),le=s(e,"P",{"data-svelte-h":!0}),a(le)!=="svelte-beu7sg"&&(le.innerHTML=ln),Ct=i(e),ie=s(e,"P",{"data-svelte-h":!0}),a(ie)!=="svelte-1l0tpib"&&(ie.innerHTML=rn),Mt=i(e),re=s(e,"P",{"data-svelte-h":!0}),a(re)!=="svelte-1get462"&&(re.innerHTML=sn),Lt=i(e),se=s(e,"P",{"data-svelte-h":!0}),a(se)!=="svelte-16kl1f2"&&(se.textContent=an),kt=i(e),ae=s(e,"P",{"data-svelte-h":!0}),a(ae)!=="svelte-1skghto"&&(ae.innerHTML=dn),Ht=i(e),p(de.$$.fragment,e),Ft=i(e),me=s(e,"P",{"data-svelte-h":!0}),a(me)!=="svelte-94ipqa"&&(me.innerHTML=mn),Pt=i(e),he=s(e,"P",{"data-svelte-h":!0}),a(he)!=="svelte-55id0v"&&(he.textContent=hn),Bt=i(e),ue=s(e,"UL",{"data-svelte-h":!0}),a(ue)!=="svelte-p4ei59"&&(ue.innerHTML=un),Ut=i(e),ce=s(e,"P",{"data-svelte-h":!0}),a(ce)!=="svelte-q00s49"&&(ce.innerHTML=cn),It=i(e),fe=s(e,"UL",{"data-svelte-h":!0}),a(fe)!=="svelte-16283o5"&&(fe.innerHTML=fn),Rt=i(e),pe=s(e,"P",{"data-svelte-h":!0}),a(pe)!=="svelte-16z62s3"&&(pe.textContent=pn),Jt=i(e),we=s(e,"OL",{"data-svelte-h":!0}),a(we)!=="svelte-fev0iu"&&(we.innerHTML=wn),Nt=i(e),p(ge.$$.fragment,e),Zt=i(e),ye=s(e,"P",{"data-svelte-h":!0}),a(ye)!=="svelte-1y1b8z6"&&(ye.innerHTML=gn),jt=i(e),be=s(e,"P",{"data-svelte-h":!0}),a(be)!=="svelte-1iuoan0"&&(be.textContent=yn),St=i(e),p(ve.$$.fragment,e),At=i(e),Te=s(e,"P",{"data-svelte-h":!0}),a(Te)!=="svelte-1dqjbww"&&(Te.innerHTML=bn),Gt=i(e),_e=s(e,"P",{"data-svelte-h":!0}),a(_e)!=="svelte-uwxrp8"&&(_e.textContent=vn),Wt=i(e),p(xe.$$.fragment,e),Yt=i(e),$e=s(e,"P",{"data-svelte-h":!0}),a($e)!=="svelte-1xzf20w"&&($e.innerHTML=Tn),qt=i(e),Ce=s(e,"P",{"data-svelte-h":!0}),a(Ce)!=="svelte-11dmfnu"&&(Ce.innerHTML=_n),Xt=i(e),Me=s(e,"P",{"data-svelte-h":!0}),a(Me)!=="svelte-1ul6csg"&&(Me.innerHTML=xn),zt=i(e),Le=s(e,"P",{"data-svelte-h":!0}),a(Le)!=="svelte-cvn3sg"&&(Le.innerHTML=$n),Et=i(e),ke=s(e,"P",{"data-svelte-h":!0}),a(ke)!=="svelte-19emp5y"&&(ke.textContent=Cn),Ot=i(e),p(He.$$.fragment,e),Qt=i(e),Fe=s(e,"P",{"data-svelte-h":!0}),a(Fe)!=="svelte-fqsbir"&&(Fe.textContent=Mn),Vt=i(e),Pe=s(e,"P",{"data-svelte-h":!0}),a(Pe)!=="svelte-jtwtfe"&&(Pe.innerHTML=Ln),Dt=i(e),Be=s(e,"P",{"data-svelte-h":!0}),a(Be)!=="svelte-jr9wmb"&&(Be.textContent=kn),Kt=i(e),Ue=s(e,"P",{"data-svelte-h":!0}),a(Ue)!=="svelte-k5t6bl"&&(Ue.textContent=Hn),eo=i(e),Ie=s(e,"UL",{"data-svelte-h":!0}),a(Ie)!=="svelte-uzeeja"&&(Ie.innerHTML=Fn),to=i(e),p(Re.$$.fragment,e),oo=i(e),Je=s(e,"P",{"data-svelte-h":!0}),a(Je)!=="svelte-1gp1v2d"&&(Je.textContent=Pn),no=i(e),Ne=s(e,"P",{"data-svelte-h":!0}),a(Ne)!=="svelte-1g6cxz5"&&(Ne.textContent=Bn),lo=i(e),Ze=s(e,"OL",{"data-svelte-h":!0}),a(Ze)!=="svelte-o72q35"&&(Ze.innerHTML=Un),io=i(e),je=s(e,"P",{"data-svelte-h":!0}),a(je)!=="svelte-c3r53s"&&(je.textContent=In),ro=i(e),p(Se.$$.fragment,e),so=i(e),Ae=s(e,"P",{"data-svelte-h":!0}),a(Ae)!=="svelte-1u5xu5o"&&(Ae.textContent=Rn),ao=i(e),Ge=s(e,"P",{"data-svelte-h":!0}),a(Ge)!=="svelte-15riypa"&&(Ge.innerHTML=Jn),mo=i(e),We=s(e,"P",{"data-svelte-h":!0}),a(We)!=="svelte-gy3qi9"&&(We.textContent=Nn),ho=i(e),Ye=s(e,"OL",{"data-svelte-h":!0}),a(Ye)!=="svelte-1l2xrm5"&&(Ye.innerHTML=Zn),uo=i(e),qe=s(e,"P",{"data-svelte-h":!0}),a(qe)!=="svelte-1qzb4ip"&&(qe.innerHTML=jn),co=i(e),rt=s(e,"P",{}),P(rt).forEach(o),this.h()},h(){Sn(m,"name","hf:doc:metadata"),Sn(m,"content",Vn)},m(e,t){d(document.head,m),n(e,C,t),n(e,v,t),n(e,_,t),w(M,e,t),n(e,k,t),n(e,T,t),n(e,c,t),n(e,x,t),n(e,st,t),n(e,I,t),n(e,at,t),n(e,R,t),n(e,dt,t),n(e,J,t),n(e,mt,t),w(H,e,t),n(e,ht,t),w(N,e,t),n(e,ut,t),n(e,Z,t),n(e,ct,t),n(e,j,t),n(e,ft,t),n(e,S,t),n(e,pt,t),n(e,A,t),n(e,wt,t),w(G,e,t),n(e,gt,t),n(e,W,t),n(e,yt,t),n(e,Y,t),n(e,bt,t),n(e,q,t),n(e,vt,t),w(F,e,t),n(e,Tt,t),n(e,X,t),n(e,_t,t),n(e,z,t),n(e,xt,t),n(e,h,t),d(h,Ee),d(h,yo),d(h,E),d(E,Oe),d(E,bo),w(O,E,null),d(h,vo),d(h,$),d($,Qe),d($,To),w(Q,$,null),d($,_o),d($,Ve),d($,xo),w(V,$,null),d($,$o),d($,De),d(h,Co),d(h,D),d(D,Ke),d(D,Mo),w(K,D,null),d(h,Lo),d(h,ee),d(ee,et),d(ee,ko),w(te,ee,null),d(h,Ho),d(h,tt),d(h,Fo),d(h,oe),d(oe,ot),d(oe,Po),w(ne,oe,null),d(h,Bo),d(h,nt),d(h,Uo),d(h,lt),n(e,$t,t),n(e,le,t),n(e,Ct,t),n(e,ie,t),n(e,Mt,t),n(e,re,t),n(e,Lt,t),n(e,se,t),n(e,kt,t),n(e,ae,t),n(e,Ht,t),w(de,e,t),n(e,Ft,t),n(e,me,t),n(e,Pt,t),n(e,he,t),n(e,Bt,t),n(e,ue,t),n(e,Ut,t),n(e,ce,t),n(e,It,t),n(e,fe,t),n(e,Rt,t),n(e,pe,t),n(e,Jt,t),n(e,we,t),n(e,Nt,t),w(ge,e,t),n(e,Zt,t),n(e,ye,t),n(e,jt,t),n(e,be,t),n(e,St,t),w(ve,e,t),n(e,At,t),n(e,Te,t),n(e,Gt,t),n(e,_e,t),n(e,Wt,t),w(xe,e,t),n(e,Yt,t),n(e,$e,t),n(e,qt,t),n(e,Ce,t),n(e,Xt,t),n(e,Me,t),n(e,zt,t),n(e,Le,t),n(e,Et,t),n(e,ke,t),n(e,Ot,t),w(He,e,t),n(e,Qt,t),n(e,Fe,t),n(e,Vt,t),n(e,Pe,t),n(e,Dt,t),n(e,Be,t),n(e,Kt,t),n(e,Ue,t),n(e,eo,t),n(e,Ie,t),n(e,to,t),w(Re,e,t),n(e,oo,t),n(e,Je,t),n(e,no,t),n(e,Ne,t),n(e,lo,t),n(e,Ze,t),n(e,io,t),n(e,je,t),n(e,ro,t),w(Se,e,t),n(e,so,t),n(e,Ae,t),n(e,ao,t),n(e,Ge,t),n(e,mo,t),n(e,We,t),n(e,ho,t),n(e,Ye,t),n(e,uo,t),n(e,qe,t),n(e,co,t),n(e,rt,t),fo=!0},p(e,[t]){const u={};t&2&&(u.$$scope={dirty:t,ctx:e}),H.$set(u);const Xe={};t&2&&(Xe.$$scope={dirty:t,ctx:e}),F.$set(Xe)},i(e){fo||(g(M.$$.fragment,e),g(H.$$.fragment,e),g(N.$$.fragment,e),g(G.$$.fragment,e),g(F.$$.fragment,e),g(O.$$.fragment,e),g(Q.$$.fragment,e),g(V.$$.fragment,e),g(K.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(de.$$.fragment,e),g(ge.$$.fragment,e),g(ve.$$.fragment,e),g(xe.$$.fragment,e),g(He.$$.fragment,e),g(Re.$$.fragment,e),g(Se.$$.fragment,e),fo=!0)},o(e){y(M.$$.fragment,e),y(H.$$.fragment,e),y(N.$$.fragment,e),y(G.$$.fragment,e),y(F.$$.fragment,e),y(O.$$.fragment,e),y(Q.$$.fragment,e),y(V.$$.fragment,e),y(K.$$.fragment,e),y(te.$$.fragment,e),y(ne.$$.fragment,e),y(de.$$.fragment,e),y(ge.$$.fragment,e),y(ve.$$.fragment,e),y(xe.$$.fragment,e),y(He.$$.fragment,e),y(Re.$$.fragment,e),y(Se.$$.fragment,e),fo=!1},d(e){e&&(o(C),o(v),o(_),o(k),o(T),o(c),o(x),o(st),o(I),o(at),o(R),o(dt),o(J),o(mt),o(ht),o(ut),o(Z),o(ct),o(j),o(ft),o(S),o(pt),o(A),o(wt),o(gt),o(W),o(yt),o(Y),o(bt),o(q),o(vt),o(Tt),o(X),o(_t),o(z),o(xt),o(h),o($t),o(le),o(Ct),o(ie),o(Mt),o(re),o(Lt),o(se),o(kt),o(ae),o(Ht),o(Ft),o(me),o(Pt),o(he),o(Bt),o(ue),o(Ut),o(ce),o(It),o(fe),o(Rt),o(pe),o(Jt),o(we),o(Nt),o(Zt),o(ye),o(jt),o(be),o(St),o(At),o(Te),o(Gt),o(_e),o(Wt),o(Yt),o($e),o(qt),o(Ce),o(Xt),o(Me),o(zt),o(Le),o(Et),o(ke),o(Ot),o(Qt),o(Fe),o(Vt),o(Pe),o(Dt),o(Be),o(Kt),o(Ue),o(eo),o(Ie),o(to),o(oo),o(Je),o(no),o(Ne),o(lo),o(Ze),o(io),o(je),o(ro),o(so),o(Ae),o(ao),o(Ge),o(mo),o(We),o(ho),o(Ye),o(uo),o(qe),o(co),o(rt)),o(m),b(M,e),b(H,e),b(N,e),b(G,e),b(F,e),b(O),b(Q),b(V),b(K),b(te),b(ne),b(de,e),b(ge,e),b(ve,e),b(xe,e),b(He,e),b(Re,e),b(Se,e)}}}const Vn='{"title":"How to convert a 🤗 Transformers model to TensorFlow?","local":"how-to-convert-a--transformers-model-to-tensorflow","sections":[{"title":"Step-by-step guide to add TensorFlow model architecture code","local":"step-by-step-guide-to-add-tensorflow-model-architecture-code","sections":[{"title":"1.-3. Prepare your model contribution","local":"1-3-prepare-your-model-contribution","sections":[],"depth":3},{"title":"4. Model implementation","local":"4-model-implementation","sections":[],"depth":3},{"title":"5. Add model tests","local":"5-add-model-tests","sections":[],"depth":3},{"title":"6.-7. Ensure everyone can use your model","local":"6-7-ensure-everyone-can-use-your-model","sections":[],"depth":3}],"depth":2},{"title":"Adding TensorFlow weights to 🤗 Hub","local":"adding-tensorflow-weights-to--hub","sections":[],"depth":2},{"title":"Debugging mismatches across ML frameworks 🐛","local":"debugging-mismatches-across-ml-frameworks-","sections":[],"depth":2}],"depth":1}';function Dn(ze){return Yn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ll extends qn{constructor(m){super(),Xn(this,m,Dn,Qn,Wn,{})}}export{ll as component};
