import{s as _i,o as $i,n as vi}from"../chunks/scheduler.9bc65507.js";import{S as xi,i as Mi,g as r,s as l,r as u,A as Ci,h as s,f as o,c as n,j as bi,u as h,x as a,k as qe,y as ki,a as i,v as c,d as f,t as p,w}from"../chunks/index.707bf1b6.js";import{T as Ti}from"../chunks/Tip.c2ecdbf4.js";import{C as P}from"../chunks/CodeBlock.54a9f38d.js";import{H as B}from"../chunks/Heading.342b1fa6.js";function Li(Ye){let d,v="Are you unsure whether the model you wish to use already has a corresponding TensorFlow architecture?",y,b,_=" ",$,g,Xe=`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(){d=r("p"),d.textContent=v,y=l(),b=r("p"),b.textContent=_,$=l(),g=r("p"),g.innerHTML=Xe},l(m){d=s(m,"P",{"data-svelte-h":!0}),a(d)!=="svelte-bjpicv"&&(d.textContent=v),y=n(m),b=s(m,"P",{"data-svelte-h":!0}),a(b)!=="svelte-1cdgjs8"&&(b.textContent=_),$=n(m),g=s(m,"P",{"data-svelte-h":!0}),a(g)!=="svelte-3e85js"&&(g.innerHTML=Xe)},m(m,T){i(m,d,T),i(m,y,T),i(m,b,T),i(m,$,T),i(m,g,T)},p:vi,d(m){m&&(o(d),o(y),o(b),o($),o(g))}}}function Hi(Ye){let d,v=`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(){d=r("p"),d.innerHTML=v},l(y){d=s(y,"P",{"data-svelte-h":!0}),a(d)!=="svelte-1238l2j"&&(d.innerHTML=v)},m(y,b){i(y,d,b)},p:vi,d(y){y&&o(d)}}}function Fi(Ye){let d,v,y,b,_,$,g,Xe=`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.`,m,T,po=`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!`,ze,U,wo="Before you dive deeper, it is recommended that you check the following resources if you’re new to 🤗 Transformers:",Qe,R,yo='<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>',Ve,I,go=`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!`,Ee,x,De,J,Ke,N,bo=`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:`,et,Z,To=`<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>`,tt,j,vo="Here’s an overview of the steps needed to add a TensorFlow model architecture:",ot,S,_o="<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>",it,A,lt,G,$o="<strong>1. Select the model you wish to convert</strong>",nt,W,xo=`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.`,rt,q,Mo=`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).`,st,M,at,Y,Co="<strong>2. Prepare transformers dev environment</strong>",dt,X,ko=`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.`,mt,O,Lo=`<li><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></li> <li><p>Clone your <code>transformers</code> fork to your local disk, and add the base repository as a remote:</p></li>`,ut,z,ht,C,Ho="<li>Set up a development environment, for instance by running the following command:</li>",ct,Q,ft,V,Fo=`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:`,pt,E,wt,D,Po="<strong>Note:</strong> You don’t need to have CUDA installed. Making the new model work on CPU is sufficient.",yt,k,Bo="<li>Create a branch with a descriptive name from your main branch</li>",gt,K,bt,L,Uo="<li>Fetch and rebase to current main</li>",Tt,ee,vt,H,Ro=`<li><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></li> <li><p>Push the changes to your account using:</p></li>`,_t,te,$t,F,Io=`<li><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></li> <li><p>Change the PR into a draft by clicking on “Convert to draft” on the right of the GitHub pull request web page.</p></li>`,xt,oe,Jo="Now you have set up a development environment to port <em>BrandNewBert</em> to TensorFlow in 🤗 Transformers.",Mt,ie,No="<strong>3. (Optional) Understand theoretical aspects and the existing implementation</strong>",Ct,le,Zo=`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>).`,kt,ne,jo=`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.`,Lt,re,So=`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,se,Ft,ae,Ao=`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,de,Go=`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,me,Wo=`<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,ue,qo=`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:`,Rt,he,Yo="<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>",It,ce,Xo=`When you’re happy with your implementation, run the following checklist to confirm that your model architecture is
ready:`,Jt,fe,Oo=`<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,pe,Zt,we,zo=`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,ye,Qo="After you’re done, it’s time for the moment of truth: run the tests! 😬",St,ge,At,be,Vo=`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,Te,Eo="When all tests pass, congratulations, your model is nearly ready to be added to the 🤗 Transformers library! 🎉",Wt,ve,qt,_e,Do="<strong>6. Submit the pull request</strong>",Yt,$e,Ko=`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,xe,ei=`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.`,Ot,Me,ti=`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.`,zt,Ce,oi=`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`,Qt,ke,Vt,Le,ii="and we will merge your PR! Congratulations on the milestone 🎉",Et,He,li="<strong>7. (Optional) Build demos and share with the world</strong>",Dt,Fe,ni=`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,Pe,ri="There are two main ways to share your model with the community:",eo,Be,si=`<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,Ue,oo,Re,ai=`Assuming that the TensorFlow model architecture is available in 🤗 Transformers, converting PyTorch weights into
TensorFlow weights is a breeze!`,io,Ie,di="Here’s how to do it:",lo,Je,mi=`<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>`,no,Ne,ui="That’s it! 🎉",ro,Ze,so,je,hi=`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,Se,ci=`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,Ae,fi=`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:`,uo,Ge,pi=`<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>`,ho,We,wi=`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,Oe,fo;return _=new B({props:{title:"How to convert a 🤗 Transformers model to TensorFlow?",local:"how-to-convert-a--transformers-model-to-tensorflow",headingTag:"h1"}}),x=new Ti({props:{$$slots:{default:[Li]},$$scope:{ctx:Ye}}}),J=new B({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"}}),A=new B({props:{title:"1.-3. Prepare your model contribution",local:"1-3-prepare-your-model-contribution",headingTag:"h3"}}),M=new Ti({props:{$$slots:{default:[Hi]},$$scope:{ctx:Ye}}}),z=new P({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 P({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}}),E=new P({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1lJTIwJTIyLiU1QnF1YWxpdHklNUQlMjI=",highlighted:'pip install -e <span class="hljs-string">&quot;.[quality]&quot;</span>',wrap:!1}}),K=new P({props:{code:"Z2l0JTIwY2hlY2tvdXQlMjAtYiUyMGFkZF90Zl9icmFuZF9uZXdfYmVydA==",highlighted:"git checkout -b add_tf_brand_new_bert",wrap:!1}}),ee=new P({props:{code:"Z2l0JTIwZmV0Y2glMjB1cHN0cmVhbSUwQWdpdCUyMHJlYmFzZSUyMHVwc3RyZWFtJTJGbWFpbg==",highlighted:`git fetch upstream
git rebase upstream/main`,wrap:!1}}),te=new P({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}}),se=new B({props:{title:"4. Model implementation",local:"4-model-implementation",headingTag:"h3"}}),pe=new B({props:{title:"5. Add model tests",local:"5-add-model-tests",headingTag:"h3"}}),ge=new P({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}}),ve=new B({props:{title:"6.-7. Ensure everyone can use your model",local:"6-7-ensure-everyone-can-use-your-model",headingTag:"h3"}}),ke=new P({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}}),Ue=new B({props:{title:"Adding TensorFlow weights to 🤗 Hub",local:"adding-tensorflow-weights-to--hub",headingTag:"h2"}}),Ze=new B({props:{title:"Debugging mismatches across ML frameworks 🐛",local:"debugging-mismatches-across-ml-frameworks-",headingTag:"h2"}}),{c(){d=r("meta"),v=l(),y=r("p"),b=l(),u(_.$$.fragment),$=l(),g=r("p"),g.innerHTML=Xe,m=l(),T=r("p"),T.textContent=po,ze=l(),U=r("p"),U.textContent=wo,Qe=l(),R=r("ul"),R.innerHTML=yo,Ve=l(),I=r("p"),I.textContent=go,Ee=l(),u(x.$$.fragment),De=l(),u(J.$$.fragment),Ke=l(),N=r("p"),N.innerHTML=bo,et=l(),Z=r("ul"),Z.innerHTML=To,tt=l(),j=r("p"),j.textContent=vo,ot=l(),S=r("ol"),S.innerHTML=_o,it=l(),u(A.$$.fragment),lt=l(),G=r("p"),G.innerHTML=$o,nt=l(),W=r("p"),W.innerHTML=xo,rt=l(),q=r("p"),q.innerHTML=Mo,st=l(),u(M.$$.fragment),at=l(),Y=r("p"),Y.innerHTML=Co,dt=l(),X=r("p"),X.textContent=ko,mt=l(),O=r("ol"),O.innerHTML=Lo,ut=l(),u(z.$$.fragment),ht=l(),C=r("ol"),C.innerHTML=Ho,ct=l(),u(Q.$$.fragment),ft=l(),V=r("p"),V.textContent=Fo,pt=l(),u(E.$$.fragment),wt=l(),D=r("p"),D.innerHTML=Po,yt=l(),k=r("ol"),k.innerHTML=Bo,gt=l(),u(K.$$.fragment),bt=l(),L=r("ol"),L.innerHTML=Uo,Tt=l(),u(ee.$$.fragment),vt=l(),H=r("ol"),H.innerHTML=Ro,_t=l(),u(te.$$.fragment),$t=l(),F=r("ol"),F.innerHTML=Io,xt=l(),oe=r("p"),oe.innerHTML=Jo,Mt=l(),ie=r("p"),ie.innerHTML=No,Ct=l(),le=r("p"),le.innerHTML=Zo,kt=l(),ne=r("p"),ne.textContent=jo,Lt=l(),re=r("p"),re.innerHTML=So,Ht=l(),u(se.$$.fragment),Ft=l(),ae=r("p"),ae.innerHTML=Ao,Pt=l(),de=r("p"),de.textContent=Go,Bt=l(),me=r("ul"),me.innerHTML=Wo,Ut=l(),ue=r("p"),ue.innerHTML=qo,Rt=l(),he=r("ul"),he.innerHTML=Yo,It=l(),ce=r("p"),ce.textContent=Xo,Jt=l(),fe=r("ol"),fe.innerHTML=Oo,Nt=l(),u(pe.$$.fragment),Zt=l(),we=r("p"),we.innerHTML=zo,jt=l(),ye=r("p"),ye.textContent=Qo,St=l(),u(ge.$$.fragment),At=l(),be=r("p"),be.innerHTML=Vo,Gt=l(),Te=r("p"),Te.textContent=Eo,Wt=l(),u(ve.$$.fragment),qt=l(),_e=r("p"),_e.innerHTML=Do,Yt=l(),$e=r("p"),$e.innerHTML=Ko,Xt=l(),xe=r("p"),xe.innerHTML=ei,Ot=l(),Me=r("p"),Me.innerHTML=ti,zt=l(),Ce=r("p"),Ce.textContent=oi,Qt=l(),u(ke.$$.fragment),Vt=l(),Le=r("p"),Le.textContent=ii,Et=l(),He=r("p"),He.innerHTML=li,Dt=l(),Fe=r("p"),Fe.textContent=ni,Kt=l(),Pe=r("p"),Pe.textContent=ri,eo=l(),Be=r("ul"),Be.innerHTML=si,to=l(),u(Ue.$$.fragment),oo=l(),Re=r("p"),Re.textContent=ai,io=l(),Ie=r("p"),Ie.textContent=di,lo=l(),Je=r("ol"),Je.innerHTML=mi,no=l(),Ne=r("p"),Ne.textContent=ui,ro=l(),u(Ze.$$.fragment),so=l(),je=r("p"),je.textContent=hi,ao=l(),Se=r("p"),Se.innerHTML=ci,mo=l(),Ae=r("p"),Ae.textContent=fi,uo=l(),Ge=r("ol"),Ge.innerHTML=pi,ho=l(),We=r("p"),We.innerHTML=wi,co=l(),Oe=r("p"),this.h()},l(e){const t=Ci("svelte-u9bgzb",document.head);d=s(t,"META",{name:!0,content:!0}),t.forEach(o),v=n(e),y=s(e,"P",{}),bi(y).forEach(o),b=n(e),h(_.$$.fragment,e),$=n(e),g=s(e,"P",{"data-svelte-h":!0}),a(g)!=="svelte-un598u"&&(g.innerHTML=Xe),m=n(e),T=s(e,"P",{"data-svelte-h":!0}),a(T)!=="svelte-1m7mnyo"&&(T.textContent=po),ze=n(e),U=s(e,"P",{"data-svelte-h":!0}),a(U)!=="svelte-1a30pti"&&(U.textContent=wo),Qe=n(e),R=s(e,"UL",{"data-svelte-h":!0}),a(R)!=="svelte-1syo9f3"&&(R.innerHTML=yo),Ve=n(e),I=s(e,"P",{"data-svelte-h":!0}),a(I)!=="svelte-flc7p5"&&(I.textContent=go),Ee=n(e),h(x.$$.fragment,e),De=n(e),h(J.$$.fragment,e),Ke=n(e),N=s(e,"P",{"data-svelte-h":!0}),a(N)!=="svelte-1nfvtxf"&&(N.innerHTML=bo),et=n(e),Z=s(e,"UL",{"data-svelte-h":!0}),a(Z)!=="svelte-r4pwei"&&(Z.innerHTML=To),tt=n(e),j=s(e,"P",{"data-svelte-h":!0}),a(j)!=="svelte-12ug9wa"&&(j.textContent=vo),ot=n(e),S=s(e,"OL",{"data-svelte-h":!0}),a(S)!=="svelte-b2inhb"&&(S.innerHTML=_o),it=n(e),h(A.$$.fragment,e),lt=n(e),G=s(e,"P",{"data-svelte-h":!0}),a(G)!=="svelte-rqidwu"&&(G.innerHTML=$o),nt=n(e),W=s(e,"P",{"data-svelte-h":!0}),a(W)!=="svelte-1rt3dcz"&&(W.innerHTML=xo),rt=n(e),q=s(e,"P",{"data-svelte-h":!0}),a(q)!=="svelte-mkqbuc"&&(q.innerHTML=Mo),st=n(e),h(M.$$.fragment,e),at=n(e),Y=s(e,"P",{"data-svelte-h":!0}),a(Y)!=="svelte-w68cw6"&&(Y.innerHTML=Co),dt=n(e),X=s(e,"P",{"data-svelte-h":!0}),a(X)!=="svelte-4rco38"&&(X.textContent=ko),mt=n(e),O=s(e,"OL",{"data-svelte-h":!0}),a(O)!=="svelte-klt7ii"&&(O.innerHTML=Lo),ut=n(e),h(z.$$.fragment,e),ht=n(e),C=s(e,"OL",{start:!0,"data-svelte-h":!0}),a(C)!=="svelte-9h285g"&&(C.innerHTML=Ho),ct=n(e),h(Q.$$.fragment,e),ft=n(e),V=s(e,"P",{"data-svelte-h":!0}),a(V)!=="svelte-23rgus"&&(V.textContent=Fo),pt=n(e),h(E.$$.fragment,e),wt=n(e),D=s(e,"P",{"data-svelte-h":!0}),a(D)!=="svelte-6bybv3"&&(D.innerHTML=Po),yt=n(e),k=s(e,"OL",{start:!0,"data-svelte-h":!0}),a(k)!=="svelte-1v0vz83"&&(k.innerHTML=Bo),gt=n(e),h(K.$$.fragment,e),bt=n(e),L=s(e,"OL",{start:!0,"data-svelte-h":!0}),a(L)!=="svelte-kgyer5"&&(L.innerHTML=Uo),Tt=n(e),h(ee.$$.fragment,e),vt=n(e),H=s(e,"OL",{start:!0,"data-svelte-h":!0}),a(H)!=="svelte-1pq71wn"&&(H.innerHTML=Ro),_t=n(e),h(te.$$.fragment,e),$t=n(e),F=s(e,"OL",{start:!0,"data-svelte-h":!0}),a(F)!=="svelte-1ekq61w"&&(F.innerHTML=Io),xt=n(e),oe=s(e,"P",{"data-svelte-h":!0}),a(oe)!=="svelte-beu7sg"&&(oe.innerHTML=Jo),Mt=n(e),ie=s(e,"P",{"data-svelte-h":!0}),a(ie)!=="svelte-1l0tpib"&&(ie.innerHTML=No),Ct=n(e),le=s(e,"P",{"data-svelte-h":!0}),a(le)!=="svelte-1get462"&&(le.innerHTML=Zo),kt=n(e),ne=s(e,"P",{"data-svelte-h":!0}),a(ne)!=="svelte-16kl1f2"&&(ne.textContent=jo),Lt=n(e),re=s(e,"P",{"data-svelte-h":!0}),a(re)!=="svelte-1skghto"&&(re.innerHTML=So),Ht=n(e),h(se.$$.fragment,e),Ft=n(e),ae=s(e,"P",{"data-svelte-h":!0}),a(ae)!=="svelte-94ipqa"&&(ae.innerHTML=Ao),Pt=n(e),de=s(e,"P",{"data-svelte-h":!0}),a(de)!=="svelte-55id0v"&&(de.textContent=Go),Bt=n(e),me=s(e,"UL",{"data-svelte-h":!0}),a(me)!=="svelte-p4ei59"&&(me.innerHTML=Wo),Ut=n(e),ue=s(e,"P",{"data-svelte-h":!0}),a(ue)!=="svelte-q00s49"&&(ue.innerHTML=qo),Rt=n(e),he=s(e,"UL",{"data-svelte-h":!0}),a(he)!=="svelte-16283o5"&&(he.innerHTML=Yo),It=n(e),ce=s(e,"P",{"data-svelte-h":!0}),a(ce)!=="svelte-16z62s3"&&(ce.textContent=Xo),Jt=n(e),fe=s(e,"OL",{"data-svelte-h":!0}),a(fe)!=="svelte-fev0iu"&&(fe.innerHTML=Oo),Nt=n(e),h(pe.$$.fragment,e),Zt=n(e),we=s(e,"P",{"data-svelte-h":!0}),a(we)!=="svelte-1y1b8z6"&&(we.innerHTML=zo),jt=n(e),ye=s(e,"P",{"data-svelte-h":!0}),a(ye)!=="svelte-1iuoan0"&&(ye.textContent=Qo),St=n(e),h(ge.$$.fragment,e),At=n(e),be=s(e,"P",{"data-svelte-h":!0}),a(be)!=="svelte-1dqjbww"&&(be.innerHTML=Vo),Gt=n(e),Te=s(e,"P",{"data-svelte-h":!0}),a(Te)!=="svelte-uwxrp8"&&(Te.textContent=Eo),Wt=n(e),h(ve.$$.fragment,e),qt=n(e),_e=s(e,"P",{"data-svelte-h":!0}),a(_e)!=="svelte-1xzf20w"&&(_e.innerHTML=Do),Yt=n(e),$e=s(e,"P",{"data-svelte-h":!0}),a($e)!=="svelte-11dmfnu"&&($e.innerHTML=Ko),Xt=n(e),xe=s(e,"P",{"data-svelte-h":!0}),a(xe)!=="svelte-1ul6csg"&&(xe.innerHTML=ei),Ot=n(e),Me=s(e,"P",{"data-svelte-h":!0}),a(Me)!=="svelte-cvn3sg"&&(Me.innerHTML=ti),zt=n(e),Ce=s(e,"P",{"data-svelte-h":!0}),a(Ce)!=="svelte-19emp5y"&&(Ce.textContent=oi),Qt=n(e),h(ke.$$.fragment,e),Vt=n(e),Le=s(e,"P",{"data-svelte-h":!0}),a(Le)!=="svelte-fqsbir"&&(Le.textContent=ii),Et=n(e),He=s(e,"P",{"data-svelte-h":!0}),a(He)!=="svelte-jtwtfe"&&(He.innerHTML=li),Dt=n(e),Fe=s(e,"P",{"data-svelte-h":!0}),a(Fe)!=="svelte-jr9wmb"&&(Fe.textContent=ni),Kt=n(e),Pe=s(e,"P",{"data-svelte-h":!0}),a(Pe)!=="svelte-k5t6bl"&&(Pe.textContent=ri),eo=n(e),Be=s(e,"UL",{"data-svelte-h":!0}),a(Be)!=="svelte-uzeeja"&&(Be.innerHTML=si),to=n(e),h(Ue.$$.fragment,e),oo=n(e),Re=s(e,"P",{"data-svelte-h":!0}),a(Re)!=="svelte-1gp1v2d"&&(Re.textContent=ai),io=n(e),Ie=s(e,"P",{"data-svelte-h":!0}),a(Ie)!=="svelte-1g6cxz5"&&(Ie.textContent=di),lo=n(e),Je=s(e,"OL",{"data-svelte-h":!0}),a(Je)!=="svelte-o72q35"&&(Je.innerHTML=mi),no=n(e),Ne=s(e,"P",{"data-svelte-h":!0}),a(Ne)!=="svelte-c3r53s"&&(Ne.textContent=ui),ro=n(e),h(Ze.$$.fragment,e),so=n(e),je=s(e,"P",{"data-svelte-h":!0}),a(je)!=="svelte-1u5xu5o"&&(je.textContent=hi),ao=n(e),Se=s(e,"P",{"data-svelte-h":!0}),a(Se)!=="svelte-15riypa"&&(Se.innerHTML=ci),mo=n(e),Ae=s(e,"P",{"data-svelte-h":!0}),a(Ae)!=="svelte-gy3qi9"&&(Ae.textContent=fi),uo=n(e),Ge=s(e,"OL",{"data-svelte-h":!0}),a(Ge)!=="svelte-1l2xrm5"&&(Ge.innerHTML=pi),ho=n(e),We=s(e,"P",{"data-svelte-h":!0}),a(We)!=="svelte-1qzb4ip"&&(We.innerHTML=wi),co=n(e),Oe=s(e,"P",{}),bi(Oe).forEach(o),this.h()},h(){qe(d,"name","hf:doc:metadata"),qe(d,"content",Pi),qe(C,"start","3"),qe(k,"start","4"),qe(L,"start","5"),qe(H,"start","6"),qe(F,"start","8")},m(e,t){ki(document.head,d),i(e,v,t),i(e,y,t),i(e,b,t),c(_,e,t),i(e,$,t),i(e,g,t),i(e,m,t),i(e,T,t),i(e,ze,t),i(e,U,t),i(e,Qe,t),i(e,R,t),i(e,Ve,t),i(e,I,t),i(e,Ee,t),c(x,e,t),i(e,De,t),c(J,e,t),i(e,Ke,t),i(e,N,t),i(e,et,t),i(e,Z,t),i(e,tt,t),i(e,j,t),i(e,ot,t),i(e,S,t),i(e,it,t),c(A,e,t),i(e,lt,t),i(e,G,t),i(e,nt,t),i(e,W,t),i(e,rt,t),i(e,q,t),i(e,st,t),c(M,e,t),i(e,at,t),i(e,Y,t),i(e,dt,t),i(e,X,t),i(e,mt,t),i(e,O,t),i(e,ut,t),c(z,e,t),i(e,ht,t),i(e,C,t),i(e,ct,t),c(Q,e,t),i(e,ft,t),i(e,V,t),i(e,pt,t),c(E,e,t),i(e,wt,t),i(e,D,t),i(e,yt,t),i(e,k,t),i(e,gt,t),c(K,e,t),i(e,bt,t),i(e,L,t),i(e,Tt,t),c(ee,e,t),i(e,vt,t),i(e,H,t),i(e,_t,t),c(te,e,t),i(e,$t,t),i(e,F,t),i(e,xt,t),i(e,oe,t),i(e,Mt,t),i(e,ie,t),i(e,Ct,t),i(e,le,t),i(e,kt,t),i(e,ne,t),i(e,Lt,t),i(e,re,t),i(e,Ht,t),c(se,e,t),i(e,Ft,t),i(e,ae,t),i(e,Pt,t),i(e,de,t),i(e,Bt,t),i(e,me,t),i(e,Ut,t),i(e,ue,t),i(e,Rt,t),i(e,he,t),i(e,It,t),i(e,ce,t),i(e,Jt,t),i(e,fe,t),i(e,Nt,t),c(pe,e,t),i(e,Zt,t),i(e,we,t),i(e,jt,t),i(e,ye,t),i(e,St,t),c(ge,e,t),i(e,At,t),i(e,be,t),i(e,Gt,t),i(e,Te,t),i(e,Wt,t),c(ve,e,t),i(e,qt,t),i(e,_e,t),i(e,Yt,t),i(e,$e,t),i(e,Xt,t),i(e,xe,t),i(e,Ot,t),i(e,Me,t),i(e,zt,t),i(e,Ce,t),i(e,Qt,t),c(ke,e,t),i(e,Vt,t),i(e,Le,t),i(e,Et,t),i(e,He,t),i(e,Dt,t),i(e,Fe,t),i(e,Kt,t),i(e,Pe,t),i(e,eo,t),i(e,Be,t),i(e,to,t),c(Ue,e,t),i(e,oo,t),i(e,Re,t),i(e,io,t),i(e,Ie,t),i(e,lo,t),i(e,Je,t),i(e,no,t),i(e,Ne,t),i(e,ro,t),c(Ze,e,t),i(e,so,t),i(e,je,t),i(e,ao,t),i(e,Se,t),i(e,mo,t),i(e,Ae,t),i(e,uo,t),i(e,Ge,t),i(e,ho,t),i(e,We,t),i(e,co,t),i(e,Oe,t),fo=!0},p(e,[t]){const yi={};t&2&&(yi.$$scope={dirty:t,ctx:e}),x.$set(yi);const gi={};t&2&&(gi.$$scope={dirty:t,ctx:e}),M.$set(gi)},i(e){fo||(f(_.$$.fragment,e),f(x.$$.fragment,e),f(J.$$.fragment,e),f(A.$$.fragment,e),f(M.$$.fragment,e),f(z.$$.fragment,e),f(Q.$$.fragment,e),f(E.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(se.$$.fragment,e),f(pe.$$.fragment,e),f(ge.$$.fragment,e),f(ve.$$.fragment,e),f(ke.$$.fragment,e),f(Ue.$$.fragment,e),f(Ze.$$.fragment,e),fo=!0)},o(e){p(_.$$.fragment,e),p(x.$$.fragment,e),p(J.$$.fragment,e),p(A.$$.fragment,e),p(M.$$.fragment,e),p(z.$$.fragment,e),p(Q.$$.fragment,e),p(E.$$.fragment,e),p(K.$$.fragment,e),p(ee.$$.fragment,e),p(te.$$.fragment,e),p(se.$$.fragment,e),p(pe.$$.fragment,e),p(ge.$$.fragment,e),p(ve.$$.fragment,e),p(ke.$$.fragment,e),p(Ue.$$.fragment,e),p(Ze.$$.fragment,e),fo=!1},d(e){e&&(o(v),o(y),o(b),o($),o(g),o(m),o(T),o(ze),o(U),o(Qe),o(R),o(Ve),o(I),o(Ee),o(De),o(Ke),o(N),o(et),o(Z),o(tt),o(j),o(ot),o(S),o(it),o(lt),o(G),o(nt),o(W),o(rt),o(q),o(st),o(at),o(Y),o(dt),o(X),o(mt),o(O),o(ut),o(ht),o(C),o(ct),o(ft),o(V),o(pt),o(wt),o(D),o(yt),o(k),o(gt),o(bt),o(L),o(Tt),o(vt),o(H),o(_t),o($t),o(F),o(xt),o(oe),o(Mt),o(ie),o(Ct),o(le),o(kt),o(ne),o(Lt),o(re),o(Ht),o(Ft),o(ae),o(Pt),o(de),o(Bt),o(me),o(Ut),o(ue),o(Rt),o(he),o(It),o(ce),o(Jt),o(fe),o(Nt),o(Zt),o(we),o(jt),o(ye),o(St),o(At),o(be),o(Gt),o(Te),o(Wt),o(qt),o(_e),o(Yt),o($e),o(Xt),o(xe),o(Ot),o(Me),o(zt),o(Ce),o(Qt),o(Vt),o(Le),o(Et),o(He),o(Dt),o(Fe),o(Kt),o(Pe),o(eo),o(Be),o(to),o(oo),o(Re),o(io),o(Ie),o(lo),o(Je),o(no),o(Ne),o(ro),o(so),o(je),o(ao),o(Se),o(mo),o(Ae),o(uo),o(Ge),o(ho),o(We),o(co),o(Oe)),o(d),w(_,e),w(x,e),w(J,e),w(A,e),w(M,e),w(z,e),w(Q,e),w(E,e),w(K,e),w(ee,e),w(te,e),w(se,e),w(pe,e),w(ge,e),w(ve,e),w(ke,e),w(Ue,e),w(Ze,e)}}}const Pi='{"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 Bi(Ye){return $i(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zi extends xi{constructor(d){super(),Mi(this,d,Bi,Fi,_i,{})}}export{Zi as component};
