import{s as $s,o as Us,n as Se}from"../chunks/scheduler.d586627e.js";import{S as Cs,i as vs,g as i,s as a,r as m,A as xs,h as r,f as l,c as o,j as ws,u as c,x as p,k as Js,y as Zs,a as s,v as u,d as M,t as f,w as j}from"../chunks/index.8589a59c.js";import{T as Pe}from"../chunks/Tip.84e2336e.js";import{C as g}from"../chunks/CodeBlock.47c46d2c.js";import{H as X,E as As}from"../chunks/EditOnGithub.073dfa26.js";function Xs(T){let n,b=`Uma vez exportado, um modelo pode ser otimizado para inferência por meio de técnicas como
quantização e poda. Se você estiver interessado em otimizar seus modelos para serem executados com
máxima eficiência, confira a biblioteca <a href="https://github.com/huggingface/optimum" rel="nofollow">🤗 Optimum
</a>.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-17ryloz"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function Ns(T){let n,b=`Os recursos que têm um sufixo <code>with-pass</code> (como <code>causal-lm-with-pass</code>) correspondem a
classes de modelo com estados ocultos pré-computados (chave e valores nos blocos de atenção)
que pode ser usado para decodificação autorregressiva rápida.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-frt6wh"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function Ws(T){let n,b=`Para modelos do tipo <code>VisionEncoderDecoder</code>, as partes do codificador e do decodificador são
exportados separadamente como dois arquivos ONNX chamados <code>encoder_model.onnx</code> e <code>decoder_model.onnx</code> respectivamente.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-7aqol8"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function ks(T){let n,b=`Uma boa maneira de implementar uma configuração ONNX personalizada é observar as
implementação no arquivo <code>configuration_&lt;model_name&gt;.py</code> de uma arquitetura semelhante.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-10qekhj"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function Bs(T){let n,b=`Notice that <code>inputs</code> property for <code>DistilBertOnnxConfig</code> returns an <code>OrderedDict</code>. This
ensures that the inputs are matched with their relative position within the
<code>PreTrainedModel.forward()</code> method when tracing the graph. We recommend using an
<code>OrderedDict</code> for the <code>inputs</code> and <code>outputs</code> properties when implementing custom ONNX
configurations.`,d,y,J=`Observe que a propriedade <code>inputs</code> para <code>DistilBertOnnxConfig</code> retorna um <code>OrderedDict</code>. Este
garante que as entradas sejam combinadas com sua posição relativa dentro do
método <code>PreTrainedModel.forward()</code> ao traçar o grafo. Recomendamos o uso de um
<code>OrderedDict</code> para as propriedades <code>inputs</code> e <code>outputs</code> ao implementar configurações personalizadas ONNX.`;return{c(){n=i("p"),n.innerHTML=b,d=a(),y=i("p"),y.innerHTML=J},l(h){n=r(h,"P",{"data-svelte-h":!0}),p(n)!=="svelte-14shdz8"&&(n.innerHTML=b),d=o(h),y=r(h,"P",{"data-svelte-h":!0}),p(y)!=="svelte-ts6haw"&&(y.innerHTML=J)},m(h,w){s(h,n,w),s(h,d,w),s(h,y,w)},p:Se,d(h){h&&(l(n),l(d),l(y))}}}function Is(T){let n,b=`Todas as propriedades e métodos básicos associados a <code>OnnxConfig</code> e
as outras classes de configuração podem ser substituídas se necessário. Confira <code>BartOnnxConfig</code>
para um exemplo avançado.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-js6ttx"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function _s(T){let n,b=`Se o seu modelo for maior que 2GB, você verá que muitos arquivos adicionais são criados
durante a exportação. Isso é <em>esperado</em> porque o ONNX usa <a href="https://developers.google.com/protocol-buffers/" rel="nofollow">Protocol
Buffers</a> para armazenar o modelo e estes
têm um limite de tamanho de 2GB. Veja a <a href="https://github.com/onnx/onnx/blob/master/docs/ExternalData.md" rel="nofollow">ONNX
documentação</a> para
instruções sobre como carregar modelos com dados externos.`;return{c(){n=i("p"),n.innerHTML=b},l(d){n=r(d,"P",{"data-svelte-h":!0}),p(n)!=="svelte-1iua1gz"&&(n.innerHTML=b)},m(d,y){s(d,n,y)},p:Se,d(d){d&&l(n)}}}function Rs(T){let n,b,d,y,J,h,w,Cl=`Se você precisar implantar modelos 🤗 Transformers em ambientes de produção, recomendamos
exporta-los para um formato serializado que pode ser carregado e executado em
tempos de execução e hardware. Neste guia, mostraremos como exportar modelos 🤗 Transformers
para <a href="http://onnx.ai" rel="nofollow">ONNX (Open Neural Network eXchange)</a>.`,Ke,$,et,N,vl=`ONNX é um padrão aberto que define um conjunto comum de operadores e um formato de arquivo comum
para representar modelos de aprendizado profundo em uma ampla variedade de estruturas, incluindo PyTorch e
TensorFlow. Quando um modelo é exportado para o formato ONNX, esses operadores são usados para
construir um grafo computacional (muitas vezes chamado de <em>representação intermediária</em>) que
representa o fluxo de dados através da rede neural.`,tt,W,xl=`Ao expor um grafo com operadores e tipos de dados padronizados, o ONNX facilita a
alternar entre os frameworks. Por exemplo, um modelo treinado em PyTorch pode ser exportado para
formato ONNX e depois importado no TensorFlow (e vice-versa).`,lt,k,Zl=`🤗 Transformers fornece um pacote <a href="main_classes/onnx"><code>transformers.onnx</code></a> que permite
que você converta os checkpoints do modelo em um grafo ONNX aproveitando os objetos de configuração.
Esses objetos de configuração vêm prontos para várias arquiteturas de modelo e são
projetado para ser facilmente extensível a outras arquiteturas.`,st,B,Al="As configurações prontas incluem as seguintes arquiteturas:",at,I,Xl="<li>ALBERT</li> <li>BART</li> <li>BEiT</li> <li>BERT</li> <li>BigBird</li> <li>BigBird-Pegasus</li> <li>Blenderbot</li> <li>BlenderbotSmall</li> <li>BLOOM</li> <li>CamemBERT</li> <li>CLIP</li> <li>CodeGen</li> <li>Conditional DETR</li> <li>ConvBERT</li> <li>ConvNeXT</li> <li>ConvNeXTV2</li> <li>Data2VecText</li> <li>Data2VecVision</li> <li>DeBERTa</li> <li>DeBERTa-v2</li> <li>DeiT</li> <li>DETR</li> <li>DistilBERT</li> <li>ELECTRA</li> <li>ERNIE</li> <li>FlauBERT</li> <li>GPT Neo</li> <li>GPT-J</li> <li>GroupViT</li> <li>I-BERT</li> <li>LayoutLM</li> <li>LayoutLMv3</li> <li>LeViT</li> <li>Longformer</li> <li>LongT5</li> <li>M2M100</li> <li>Marian</li> <li>mBART</li> <li>MobileBERT</li> <li>MobileViT</li> <li>MT5</li> <li>OpenAI GPT-2</li> <li>OWL-ViT</li> <li>Perceiver</li> <li>PLBart</li> <li>ResNet</li> <li>RoBERTa</li> <li>RoFormer</li> <li>SegFormer</li> <li>SqueezeBERT</li> <li>Swin Transformer</li> <li>T5</li> <li>Table Transformer</li> <li>Vision Encoder decoder</li> <li>ViT</li> <li>XLM</li> <li>XLM-RoBERTa</li> <li>XLM-RoBERTa-XL</li> <li>YOLOS</li>",ot,_,Nl="Nas próximas duas seções, mostraremos como:",nt,R,Wl="<li>Exportar um modelo suportado usando o pacote <code>transformers.onnx</code>.</li> <li>Exportar um modelo personalizado para uma arquitetura sem suporte.</li>",it,G,rt,V,kl=`Para exportar um modelo 🤗 Transformers para o ONNX, primeiro você precisa instalar algumas
dependências extras:`,pt,q,dt,E,Bl="O pacote <code>transformers.onnx</code> pode então ser usado como um módulo Python:",mt,H,ct,L,Il="A exportação de um checkpoint usando uma configuração pronta pode ser feita da seguinte forma:",ut,z,Mt,F,_l="Você deve ver os seguintes logs:",ft,Y,jt,Q,Rl=`Isso exporta um grafo ONNX do ponto de verificação definido pelo argumento <code>--model</code>. Nisso
Por exemplo, é <code>distilbert/distilbert-base-uncased</code>, mas pode ser qualquer checkpoint no Hugging
Face Hub ou um armazenado localmente.`,bt,O,Gl=`O arquivo <code>model.onnx</code> resultante pode ser executado em um dos <a href="https://onnx.ai/supported-tools.html#deployModel" rel="nofollow">muitos
aceleradores</a> que suportam o ONNX
padrão. Por exemplo, podemos carregar e executar o modelo com <a href="https://onnxruntime.ai/" rel="nofollow">ONNX
Tempo de execução</a> da seguinte forma:`,yt,P,gt,S,Vl=`Os nomes de saída necessários (como <code>[&quot;last_hidden_state&quot;]</code>) podem ser obtidos pegando uma
configuração ONNX de cada modelo. Por exemplo, para DistilBERT temos:`,Tt,D,ht,K,ql=`O processo é idêntico para os checkpoints do TensorFlow no Hub. Por exemplo, podemos
exportar um checkpoint TensorFlow puro do <a href="https://huggingface.co/keras-io" rel="nofollow">Keras</a> da seguinte forma:`,wt,ee,Jt,te,El=`Para exportar um modelo armazenado localmente, você precisará ter os pesos e
arquivos tokenizer armazenados em um diretório. Por exemplo, podemos carregar e salvar um checkpoint como:`,$t,le,Ut,se,Hl=`Uma vez que o checkpoint é salvo, podemos exportá-lo para o ONNX apontando o <code>--model</code>
argumento do pacote <code>transformers.onnx</code> para o diretório desejado:`,Ct,ae,vt,oe,xt,ne,Ll=`Uma vez que o checkpoint é salvo, podemos exportá-lo para o ONNX apontando o <code>--model</code>
argumento do pacote <code>transformers.onnx</code> para o diretório desejado:`,Zt,ie,At,re,Xt,pe,zl=`Cada configuração pronta vem com um conjunto de <em>features</em> que permitem exportar
modelos para diferentes tipos de tarefas. Conforme mostrado na tabela abaixo, cada recurso é
associado a uma <code>AutoClass</code> diferente:`,Nt,de,Fl="<thead><tr><th>Feature</th> <th>Auto Class</th></tr></thead> <tbody><tr><td><code>causal-lm</code>, <code>causal-lm-with-past</code></td> <td><code>AutoModelForCausalLM</code></td></tr> <tr><td><code>default</code>, <code>default-with-past</code></td> <td><code>AutoModel</code></td></tr> <tr><td><code>masked-lm</code></td> <td><code>AutoModelForMaskedLM</code></td></tr> <tr><td><code>question-answering</code></td> <td><code>AutoModelForQuestionAnswering</code></td></tr> <tr><td><code>seq2seq-lm</code>, <code>seq2seq-lm-with-past</code></td> <td><code>AutoModelForSeq2SeqLM</code></td></tr> <tr><td><code>sequence-classification</code></td> <td><code>AutoModelForSequenceClassification</code></td></tr> <tr><td><code>token-classification</code></td> <td><code>AutoModelForTokenClassification</code></td></tr></tbody>",Wt,me,Yl=`Para cada configuração, você pode encontrar a lista de recursos suportados por meio do
<code>FeaturesManager</code>. Por exemplo, para DistilBERT temos:`,kt,ce,Bt,ue,Ql=`Você pode então passar um desses recursos para o argumento <code>--feature</code> no
pacote <code>transformers.onnx</code>. Por exemplo, para exportar um modelo de classificação de texto, podemos
escolher um modelo ajustado no Hub e executar:`,It,Me,_t,fe,Ol="Isso exibe os seguintes logs:",Rt,je,Gt,be,Pl=`Observe que, neste caso, os nomes de saída do modelo ajustado são <code>logits</code>
em vez do <code>last_hidden_state</code> que vimos com o checkpoint <code>distilbert/distilbert-base-uncased</code>
mais cedo. Isso é esperado, pois o modelo ajustado (fine-tuned) possui uma cabeça de classificação de sequência.`,Vt,U,qt,C,Et,ye,Ht,ge,Sl=`Se você deseja exportar um modelo cuja arquitetura não é suportada nativamente pela
biblioteca, há três etapas principais a seguir:`,Lt,Te,Dl="<li>Implemente uma configuração ONNX personalizada.</li> <li>Exporte o modelo para o ONNX.</li> <li>Valide as saídas do PyTorch e dos modelos exportados.</li>",zt,he,Kl=`Nesta seção, veremos como o DistilBERT foi implementado para mostrar o que está envolvido
em cada passo.`,Ft,we,Yt,Je,es=`Vamos começar com o objeto de configuração ONNX. Fornecemos três classes abstratas que
você deve herdar, dependendo do tipo de arquitetura de modelo que deseja exportar:`,Qt,$e,ts="<li>Modelos baseados em codificador herdam de <code>OnnxConfig</code></li> <li>Modelos baseados em decodificador herdam de <code>OnnxConfigWithPast</code></li> <li>Os modelos codificador-decodificador herdam de <code>OnnxSeq2SeqConfigWithPast</code></li>",Ot,v,Pt,Ue,ls=`Como o DistilBERT é um modelo baseado em codificador, sua configuração é herdada de
<code>OnnxConfig</code>:`,St,Ce,Dt,ve,ss=`Todo objeto de configuração deve implementar a propriedade <code>inputs</code> e retornar um mapeamento,
onde cada chave corresponde a uma entrada esperada e cada valor indica o eixo
dessa entrada. Para o DistilBERT, podemos ver que duas entradas são necessárias: <code>input_ids</code> e
<code>attention_mask</code>. Essas entradas têm a mesma forma de <code>(batch_size, sequence_length)</code>
é por isso que vemos os mesmos eixos usados na configuração.`,Kt,x,el,xe,as=`Depois de implementar uma configuração ONNX, você pode instanciá-la fornecendo a
configuração do modelo base da seguinte forma:`,tl,Ze,ll,Ae,os=`O objeto resultante tem várias propriedades úteis. Por exemplo, você pode visualizar o conjunto de operadores ONNX
que será usado durante a exportação:`,sl,Xe,al,Ne,ns="Você também pode visualizar as saídas associadas ao modelo da seguinte forma:",ol,We,nl,ke,is=`Observe que a propriedade outputs segue a mesma estrutura das entradas; ele retorna um
<code>OrderedDict</code> de saídas nomeadas e suas formas. A estrutura de saída está ligada a
escolha do recurso com o qual a configuração é inicializada. Por padrão, a configuração do ONNX
é inicializada com o recurso <code>default</code> que corresponde à exportação de um
modelo carregado com a classe <code>AutoModel</code>. Se você deseja exportar um modelo para outra tarefa,
apenas forneça um recurso diferente para o argumento <code>task</code> quando você inicializar a configuração ONNX
. Por exemplo, se quisermos exportar o DistilBERT com uma sequência
de classificação, poderíamos usar:`,il,Be,rl,Z,pl,Ie,dl,_e,rs=`Depois de ter implementado a configuração do ONNX, o próximo passo é exportar o modelo.
Aqui podemos usar a função <code>export()</code> fornecida pelo pacote <code>transformers.onnx</code>.
Esta função espera a configuração do ONNX, juntamente com o modelo base e o tokenizer,
e o caminho para salvar o arquivo exportado:`,ml,Re,cl,Ge,ps=`Os <code>onnx_inputs</code> e <code>onnx_outputs</code> retornados pela função <code>export()</code> são listas de
chaves definidas nas propriedades <code>inputs</code> e <code>outputs</code> da configuração. Uma vez que o
modelo é exportado, você pode testar se o modelo está bem formado da seguinte forma:`,ul,Ve,Ml,A,fl,qe,jl,Ee,ds=`A etapa final é validar se as saídas do modelo base e exportado concordam
dentro de alguma tolerância absoluta. Aqui podemos usar a função <code>validate_model_outputs()</code>
fornecida pelo pacote <code>transformers.onnx</code> da seguinte forma:`,bl,He,yl,Le,ms=`Esta função usa o método <code>generate_dummy_inputs()</code> para
gerar entradas para o modelo base e o exportado, e a tolerância absoluta pode ser
definida na configuração. Geralmente encontramos concordância numérica em 1e-6 a 1e-4
de alcance, embora qualquer coisa menor que 1e-3 provavelmente esteja OK.`,gl,ze,Tl,Fe,cs=`Estamos procurando expandir o conjunto de configurações prontas e receber contribuições
da comunidade! Se você gostaria de contribuir para a biblioteca, você
precisará:`,hl,Ye,us=`<li>Implemente a configuração do ONNX no arquivo <code>configuration_&lt;model_name&gt;.py</code> correspondente
Arquivo</li> <li>Incluir a arquitetura do modelo e recursos correspondentes em
<code>~onnx.features.FeatureManager</code></li> <li>Adicione sua arquitetura de modelo aos testes em <code>test_onnx_v2.py</code></li>`,wl,Qe,Ms=`Confira como ficou a configuração do <a href="https://github.com/huggingface/transformers/pull/14868/files" rel="nofollow">IBERT</a> para obter uma
idéia do que está envolvido.`,Jl,Oe,$l,De,Ul;return J=new X({props:{title:"Exportando modelos para ONNX",local:"exportando-modelos-para-onnx",headingTag:"h1"}}),$=new Pe({props:{$$slots:{default:[Xs]},$$scope:{ctx:T}}}),G=new X({props:{title:"Exportando um modelo para ONNX",local:"exportando-um-modelo-para-onnx",headingTag:"h2"}}),q=new g({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRyYW5zZm9ybWVycyU1Qm9ubnglNUQ=",highlighted:"pip install transformers[onnx]",wrap:!1}}),H=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0taGVscCUwQSUwQXVzYWdlJTNBJTIwSHVnZ2luZyUyMEZhY2UlMjBUcmFuc2Zvcm1lcnMlMjBPTk5YJTIwZXhwb3J0ZXIlMjAlNUItaCU1RCUyMC1tJTIwTU9ERUwlMjAlNUItLWZlYXR1cmUlMjAlN0JjYXVzYWwtbG0lMkMlMjAuLi4lN0QlNUQlMjAlNUItLW9wc2V0JTIwT1BTRVQlNUQlMjAlNUItLWF0b2wlMjBBVE9MJTVEJTIwb3V0cHV0JTBBJTBBcG9zaXRpb25hbCUyMGFyZ3VtZW50cyUzQSUwQSUyMCUyMG91dHB1dCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFBhdGglMjBpbmRpY2F0aW5nJTIwd2hlcmUlMjB0byUyMHN0b3JlJTIwZ2VuZXJhdGVkJTIwT05OWCUyMG1vZGVsLiUwQSUwQW9wdGlvbmFsJTIwYXJndW1lbnRzJTNBJTBBJTIwJTIwLWglMkMlMjAtLWhlbHAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBzaG93JTIwdGhpcyUyMGhlbHAlMjBtZXNzYWdlJTIwYW5kJTIwZXhpdCUwQSUyMCUyMC1tJTIwTU9ERUwlMkMlMjAtLW1vZGVsJTIwTU9ERUwlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBNb2RlbCUyMElEJTIwb24lMjBodWdnaW5nZmFjZS5jbyUyMG9yJTIwcGF0aCUyMG9uJTIwZGlzayUyMHRvJTIwbG9hZCUyMG1vZGVsJTIwZnJvbS4lMEElMjAlMjAtLWZlYXR1cmUlMjAlN0JjYXVzYWwtbG0lMkMlMjAuLi4lN0QlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBUaGUlMjB0eXBlJTIwb2YlMjBmZWF0dXJlcyUyMHRvJTIwZXhwb3J0JTIwdGhlJTIwbW9kZWwlMjB3aXRoLiUwQSUyMCUyMC0tb3BzZXQlMjBPUFNFVCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyME9OTlglMjBvcHNldCUyMHZlcnNpb24lMjB0byUyMGV4cG9ydCUyMHRoZSUyMG1vZGVsJTIwd2l0aC4lMEElMjAlMjAtLWF0b2wlMjBBVE9MJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwQWJzb2x1dGUlMjBkaWZmZXJlbmNlJTIwdG9sZXJhbmNlJTIwd2hlbiUyMHZhbGlkYXRpbmclMjB0aGUlMjBtb2RlbC4=",highlighted:`python -m transformers.onnx --<span class="hljs-built_in">help</span>

usage: Hugging Face Transformers ONNX exporter [-h] -m MODEL [--feature {causal-lm, ...}] [--opset OPSET] [--atol ATOL] output

positional arguments:
  output                Path indicating <span class="hljs-built_in">where</span> to store generated ONNX model.

optional arguments:
  -h, --<span class="hljs-built_in">help</span>            show this <span class="hljs-built_in">help</span> message and <span class="hljs-built_in">exit</span>
  -m MODEL, --model MODEL
                        Model ID on huggingface.co or path on disk to load model from.
  --feature {causal-lm, ...}
                        The <span class="hljs-built_in">type</span> of features to <span class="hljs-built_in">export</span> the model with.
  --opset OPSET         ONNX opset version to <span class="hljs-built_in">export</span> the model with.
  --atol ATOL           Absolute difference tolerance when validating the model.`,wrap:!1}}),z=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjBvbm54JTJG",highlighted:"python -m transformers.onnx --model=distilbert/distilbert-base-uncased onnx/",wrap:!1}}),Y=new g({props:{code:"VmFsaWRhdGluZyUyME9OTlglMjBtb2RlbC4uLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBPTk5YJTIwbW9kZWwlMjBvdXRwdXQlMjBuYW1lcyUyMG1hdGNoJTIwcmVmZXJlbmNlJTIwbW9kZWwlMjAoJTdCJ2xhc3RfaGlkZGVuX3N0YXRlJyU3RCklMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTIwVmFsaWRhdGluZyUyME9OTlglMjBNb2RlbCUyMG91dHB1dCUyMCUyMmxhc3RfaGlkZGVuX3N0YXRlJTIyJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSU1QiVFMiU5QyU5MyU1RCUyMCgyJTJDJTIwOCUyQyUyMDc2OCklMjBtYXRjaGVzJTIwKDIlMkMlMjA4JTJDJTIwNzY4KSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBhbGwlMjB2YWx1ZXMlMjBjbG9zZSUyMChhdG9sJTNBJTIwMWUtMDUpJTBBQWxsJTIwZ29vZCUyQyUyMG1vZGVsJTIwc2F2ZWQlMjBhdCUzQSUyMG9ubnglMkZtb2RlbC5vbm54",highlighted:`Validating ONNX model...
        -[✓] ONNX model output names match reference model ({<span class="hljs-string">&#x27;last_hidden_state&#x27;</span>})
        - Validating ONNX Model output <span class="hljs-string">&quot;last_hidden_state&quot;</span>:
                -[✓] (2, 8, 768) matches (2, 8, 768)
                -[✓] all values close (atol: 1e-05)
All good, model saved at: onnx/model.onnx`,wrap:!1}}),P=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBJbmZlcmVuY2VTZXNzaW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQXNlc3Npb24lMjAlM0QlMjBJbmZlcmVuY2VTZXNzaW9uKCUyMm9ubnglMkZtb2RlbC5vbm54JTIyKSUwQSUyMyUyME9OTlglMjBSdW50aW1lJTIwZXhwZWN0cyUyME51bVB5JTIwYXJyYXlzJTIwYXMlMjBpbnB1dCUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJVc2luZyUyMERpc3RpbEJFUlQlMjB3aXRoJTIwT05OWCUyMFJ1bnRpbWUhJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwc2Vzc2lvbi5ydW4ob3V0cHV0X25hbWVzJTNEJTVCJTIybGFzdF9oaWRkZW5fc3RhdGUlMjIlNUQlMkMlMjBpbnB1dF9mZWVkJTNEZGljdChpbnB1dHMpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> onnxruntime <span class="hljs-keyword">import</span> InferenceSession

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>session = InferenceSession(<span class="hljs-string">&quot;onnx/model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># ONNX Runtime expects NumPy arrays as input</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Using DistilBERT with ONNX Runtime!&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = session.run(output_names=[<span class="hljs-string">&quot;last_hidden_state&quot;</span>], input_feed=<span class="hljs-built_in">dict</span>(inputs))`,wrap:!1}}),D=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5tb2RlbHMuZGlzdGlsYmVydCUyMGltcG9ydCUyMERpc3RpbEJlcnRDb25maWclMkMlMjBEaXN0aWxCZXJ0T25ueENvbmZpZyUwQSUwQWNvbmZpZyUyMCUzRCUyMERpc3RpbEJlcnRDb25maWcoKSUwQW9ubnhfY29uZmlnJTIwJTNEJTIwRGlzdGlsQmVydE9ubnhDb25maWcoY29uZmlnKSUwQXByaW50KGxpc3Qob25ueF9jb25maWcub3V0cHV0cy5rZXlzKCkpKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.models.distilbert <span class="hljs-keyword">import</span> DistilBertConfig, DistilBertOnnxConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = DistilBertConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config = DistilBertOnnxConfig(config)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-built_in">list</span>(onnx_config.outputs.keys()))
[<span class="hljs-string">&quot;last_hidden_state&quot;</span>]`,wrap:!1}}),ee=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RrZXJhcy1pbyUyRnRyYW5zZm9ybWVycy1xYSUyMG9ubnglMkY=",highlighted:"python -m transformers.onnx --model=keras-io/transformers-qa onnx/",wrap:!1}}),le=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBJTIzJTIwTG9hZCUyMHRva2VuaXplciUyMGFuZCUyMFB5VG9yY2glMjB3ZWlnaHRzJTIwZm9ybSUyMHRoZSUyMEh1YiUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFwdF9tb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMjMlMjBTYXZlJTIwdG8lMjBkaXNrJTBBdG9rZW5pemVyLnNhdmVfcHJldHJhaW5lZCglMjJsb2NhbC1wdC1jaGVja3BvaW50JTIyKSUwQXB0X21vZGVsLnNhdmVfcHJldHJhaW5lZCglMjJsb2NhbC1wdC1jaGVja3BvaW50JTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load tokenizer and PyTorch weights form the Hub</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Save to disk</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(<span class="hljs-string">&quot;local-pt-checkpoint&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model.save_pretrained(<span class="hljs-string">&quot;local-pt-checkpoint&quot;</span>)`,wrap:!1}}),ae=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0Rsb2NhbC1wdC1jaGVja3BvaW50JTIwb25ueCUyRg==",highlighted:"python -m transformers.onnx --model=local-pt-checkpoint onnx/",wrap:!1}}),oe=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEElMjMlMjBMb2FkJTIwdG9rZW5pemVyJTIwYW5kJTIwVGVuc29yRmxvdyUyMHdlaWdodHMlMjBmcm9tJTIwdGhlJTIwSHViJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGlzdGlsYmVydCUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQXRmX21vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTIzJTIwU2F2ZSUyMHRvJTIwZGlzayUwQXRva2VuaXplci5zYXZlX3ByZXRyYWluZWQoJTIybG9jYWwtdGYtY2hlY2twb2ludCUyMiklMEF0Zl9tb2RlbC5zYXZlX3ByZXRyYWluZWQoJTIybG9jYWwtdGYtY2hlY2twb2ludCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Load tokenizer and TensorFlow weights from the Hub</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Save to disk</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(<span class="hljs-string">&quot;local-tf-checkpoint&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model.save_pretrained(<span class="hljs-string">&quot;local-tf-checkpoint&quot;</span>)`,wrap:!1}}),ie=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0Rsb2NhbC10Zi1jaGVja3BvaW50JTIwb25ueCUyRg==",highlighted:"python -m transformers.onnx --model=local-tf-checkpoint onnx/",wrap:!1}}),re=new X({props:{title:"Selecionando features para diferentes tarefas do modelo",local:"selecionando-features-para-diferentes-tarefas-do-modelo",headingTag:"h2"}}),ce=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54LmZlYXR1cmVzJTIwaW1wb3J0JTIwRmVhdHVyZXNNYW5hZ2VyJTBBJTBBZGlzdGlsYmVydF9mZWF0dXJlcyUyMCUzRCUyMGxpc3QoRmVhdHVyZXNNYW5hZ2VyLmdldF9zdXBwb3J0ZWRfZmVhdHVyZXNfZm9yX21vZGVsX3R5cGUoJTIyZGlzdGlsYmVydCUyMikua2V5cygpKSUwQXByaW50KGRpc3RpbGJlcnRfZmVhdHVyZXMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx.features <span class="hljs-keyword">import</span> FeaturesManager

<span class="hljs-meta">&gt;&gt;&gt; </span>distilbert_features = <span class="hljs-built_in">list</span>(FeaturesManager.get_supported_features_for_model_type(<span class="hljs-string">&quot;distilbert&quot;</span>).keys())
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(distilbert_features)
[<span class="hljs-string">&quot;default&quot;</span>, <span class="hljs-string">&quot;masked-lm&quot;</span>, <span class="hljs-string">&quot;causal-lm&quot;</span>, <span class="hljs-string">&quot;sequence-classification&quot;</span>, <span class="hljs-string">&quot;token-classification&quot;</span>, <span class="hljs-string">&quot;question-answering&quot;</span>]`,wrap:!1}}),Me=new g({props:{code:"cHl0aG9uJTIwLW0lMjB0cmFuc2Zvcm1lcnMub25ueCUyMC0tbW9kZWwlM0RkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjAlNUMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtLWZlYXR1cmUlM0RzZXF1ZW5jZS1jbGFzc2lmaWNhdGlvbiUyMG9ubnglMkY=",highlighted:`python -m transformers.onnx --model=distilbert/distilbert-base-uncased-finetuned-sst-2-english \\
                            --feature=sequence-classification onnx/`,wrap:!1}}),je=new g({props:{code:"VmFsaWRhdGluZyUyME9OTlglMjBtb2RlbC4uLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC0lNUIlRTIlOUMlOTMlNUQlMjBPTk5YJTIwbW9kZWwlMjBvdXRwdXQlMjBuYW1lcyUyMG1hdGNoJTIwcmVmZXJlbmNlJTIwbW9kZWwlMjAoJTdCJ2xvZ2l0cyclN0QpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSUyMFZhbGlkYXRpbmclMjBPTk5YJTIwTW9kZWwlMjBvdXRwdXQlMjAlMjJsb2dpdHMlMjIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAtJTVCJUUyJTlDJTkzJTVEJTIwKDIlMkMlMjAyKSUyMG1hdGNoZXMlMjAoMiUyQyUyMDIpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLSU1QiVFMiU5QyU5MyU1RCUyMGFsbCUyMHZhbHVlcyUyMGNsb3NlJTIwKGF0b2wlM0ElMjAxZS0wNSklMEFBbGwlMjBnb29kJTJDJTIwbW9kZWwlMjBzYXZlZCUyMGF0JTNBJTIwb25ueCUyRm1vZGVsLm9ubng=",highlighted:`Validating ONNX model...
        -[✓] ONNX model output names match reference model ({<span class="hljs-string">&#x27;logits&#x27;</span>})
        - Validating ONNX Model output <span class="hljs-string">&quot;logits&quot;</span>:
                -[✓] (2, 2) matches (2, 2)
                -[✓] all values close (atol: 1e-05)
All good, model saved at: onnx/model.onnx`,wrap:!1}}),U=new Pe({props:{$$slots:{default:[Ns]},$$scope:{ctx:T}}}),C=new Pe({props:{$$slots:{default:[Ws]},$$scope:{ctx:T}}}),ye=new X({props:{title:"Exportando um modelo para uma arquitetura sem suporte",local:"exportando-um-modelo-para-uma-arquitetura-sem-suporte",headingTag:"h2"}}),we=new X({props:{title:"Implementando uma configuração ONNX personalizada",local:"implementando-uma-configuração-onnx-personalizada",headingTag:"h3"}}),v=new Pe({props:{$$slots:{default:[ks]},$$scope:{ctx:T}}}),Ce=new g({props:{code:"ZnJvbSUyMHR5cGluZyUyMGltcG9ydCUyME1hcHBpbmclMkMlMjBPcmRlcmVkRGljdCUwQWZyb20lMjB0cmFuc2Zvcm1lcnMub25ueCUyMGltcG9ydCUyME9ubnhDb25maWclMEElMEElMEFjbGFzcyUyMERpc3RpbEJlcnRPbm54Q29uZmlnKE9ubnhDb25maWcpJTNBJTBBJTIwJTIwJTIwJTIwJTQwcHJvcGVydHklMEElMjAlMjAlMjAlMjBkZWYlMjBpbnB1dHMoc2VsZiklMjAtJTNFJTIwTWFwcGluZyU1QnN0ciUyQyUyME1hcHBpbmclNUJpbnQlMkMlMjBzdHIlNUQlNUQlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBPcmRlcmVkRGljdCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAoJTIyaW5wdXRfaWRzJTIyJTJDJTIwJTdCMCUzQSUyMCUyMmJhdGNoJTIyJTJDJTIwMSUzQSUyMCUyMnNlcXVlbmNlJTIyJTdEKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCglMjJhdHRlbnRpb25fbWFzayUyMiUyQyUyMCU3QjAlM0ElMjAlMjJiYXRjaCUyMiUyQyUyMDElM0ElMjAlMjJzZXF1ZW5jZSUyMiU3RCklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> Mapping, OrderedDict
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> OnnxConfig


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">class</span> <span class="hljs-title class_">DistilBertOnnxConfig</span>(<span class="hljs-title class_ inherited__">OnnxConfig</span>):
<span class="hljs-meta">... </span>    @<span class="hljs-built_in">property</span>
<span class="hljs-meta">... </span>    <span class="hljs-keyword">def</span> <span class="hljs-title function_">inputs</span>(<span class="hljs-params">self</span>) -&gt; Mapping[<span class="hljs-built_in">str</span>, Mapping[<span class="hljs-built_in">int</span>, <span class="hljs-built_in">str</span>]]:
<span class="hljs-meta">... </span>        <span class="hljs-keyword">return</span> OrderedDict(
<span class="hljs-meta">... </span>            [
<span class="hljs-meta">... </span>                (<span class="hljs-string">&quot;input_ids&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>}),
<span class="hljs-meta">... </span>                (<span class="hljs-string">&quot;attention_mask&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>}),
<span class="hljs-meta">... </span>            ]
<span class="hljs-meta">... </span>        )`,wrap:!1}}),x=new Pe({props:{$$slots:{default:[Bs]},$$scope:{ctx:T}}}),Ze=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBb25ueF9jb25maWclMjAlM0QlMjBEaXN0aWxCZXJ0T25ueENvbmZpZyhjb25maWcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config = DistilBertOnnxConfig(config)`,wrap:!1}}),Xe=new g({props:{code:"cHJpbnQob25ueF9jb25maWcuZGVmYXVsdF9vbm54X29wc2V0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config.default_onnx_opset)
<span class="hljs-number">11</span>`,wrap:!1}}),We=new g({props:{code:"cHJpbnQob25ueF9jb25maWcub3V0cHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config.outputs)
OrderedDict([(<span class="hljs-string">&quot;last_hidden_state&quot;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&quot;batch&quot;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&quot;sequence&quot;</span>})])`,wrap:!1}}),Be=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBb25ueF9jb25maWdfZm9yX3NlcV9jbGYlMjAlM0QlMjBEaXN0aWxCZXJ0T25ueENvbmZpZyhjb25maWclMkMlMjB0YXNrJTNEJTIyc2VxdWVuY2UtY2xhc3NpZmljYXRpb24lMjIpJTBBcHJpbnQob25ueF9jb25maWdfZm9yX3NlcV9jbGYub3V0cHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_config_for_seq_clf = DistilBertOnnxConfig(config, task=<span class="hljs-string">&quot;sequence-classification&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(onnx_config_for_seq_clf.outputs)
OrderedDict([(<span class="hljs-string">&#x27;logits&#x27;</span>, {<span class="hljs-number">0</span>: <span class="hljs-string">&#x27;batch&#x27;</span>})])`,wrap:!1}}),Z=new Pe({props:{$$slots:{default:[Is]},$$scope:{ctx:T}}}),Ie=new X({props:{title:"Exportando um modelo",local:"exportando-um-modelo",headingTag:"h3"}}),Re=new g({props:{code:"ZnJvbSUyMHBhdGhsaWIlMjBpbXBvcnQlMjBQYXRoJTBBZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54JTIwaW1wb3J0JTIwZXhwb3J0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWwlMEElMEFvbm54X3BhdGglMjAlM0QlMjBQYXRoKCUyMm1vZGVsLm9ubnglMjIpJTBBbW9kZWxfY2twdCUyMCUzRCUyMCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiUwQWJhc2VfbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWwuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX2NrcHQpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfY2twdCklMEElMEFvbm54X2lucHV0cyUyQyUyMG9ubnhfb3V0cHV0cyUyMCUzRCUyMGV4cG9ydCh0b2tlbml6ZXIlMkMlMjBiYXNlX21vZGVsJTJDJTIwb25ueF9jb25maWclMkMlMjBvbm54X2NvbmZpZy5kZWZhdWx0X29ubnhfb3BzZXQlMkMlMjBvbm54X3BhdGgp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> pathlib <span class="hljs-keyword">import</span> Path
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> export
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_path = Path(<span class="hljs-string">&quot;model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model_ckpt = <span class="hljs-string">&quot;distilbert/distilbert-base-uncased&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>base_model = AutoModel.from_pretrained(model_ckpt)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_ckpt)

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_inputs, onnx_outputs = export(tokenizer, base_model, onnx_config, onnx_config.default_onnx_opset, onnx_path)`,wrap:!1}}),Ve=new g({props:{code:"aW1wb3J0JTIwb25ueCUwQSUwQW9ubnhfbW9kZWwlMjAlM0QlMjBvbm54LmxvYWQoJTIybW9kZWwub25ueCUyMiklMEFvbm54LmNoZWNrZXIuY2hlY2tfbW9kZWwob25ueF9tb2RlbCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> onnx

<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_model = onnx.load(<span class="hljs-string">&quot;model.onnx&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx.checker.check_model(onnx_model)`,wrap:!1}}),A=new Pe({props:{$$slots:{default:[_s]},$$scope:{ctx:T}}}),qe=new X({props:{title:"Validando a saída dos modelos",local:"validando-a-saída-dos-modelos",headingTag:"h3"}}),He=new g({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycy5vbm54JTIwaW1wb3J0JTIwdmFsaWRhdGVfbW9kZWxfb3V0cHV0cyUwQSUwQXZhbGlkYXRlX21vZGVsX291dHB1dHMoJTBBJTIwJTIwJTIwJTIwb25ueF9jb25maWclMkMlMjB0b2tlbml6ZXIlMkMlMjBiYXNlX21vZGVsJTJDJTIwb25ueF9wYXRoJTJDJTIwb25ueF9vdXRwdXRzJTJDJTIwb25ueF9jb25maWcuYXRvbF9mb3JfdmFsaWRhdGlvbiUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers.onnx <span class="hljs-keyword">import</span> validate_model_outputs

<span class="hljs-meta">&gt;&gt;&gt; </span>validate_model_outputs(
<span class="hljs-meta">... </span>    onnx_config, tokenizer, base_model, onnx_path, onnx_outputs, onnx_config.atol_for_validation
<span class="hljs-meta">... </span>)`,wrap:!1}}),ze=new X({props:{title:"Contribuindo com uma nova configuração para 🤗 Transformers",local:"contribuindo-com-uma-nova-configuração-para--transformers",headingTag:"h2"}}),Oe=new As({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/pt/serialization.md"}}),{c(){n=i("meta"),b=a(),d=i("p"),y=a(),m(J.$$.fragment),h=a(),w=i("p"),w.innerHTML=Cl,Ke=a(),m($.$$.fragment),et=a(),N=i("p"),N.innerHTML=vl,tt=a(),W=i("p"),W.textContent=xl,lt=a(),k=i("p"),k.innerHTML=Zl,st=a(),B=i("p"),B.textContent=Al,at=a(),I=i("ul"),I.innerHTML=Xl,ot=a(),_=i("p"),_.textContent=Nl,nt=a(),R=i("ul"),R.innerHTML=Wl,it=a(),m(G.$$.fragment),rt=a(),V=i("p"),V.textContent=kl,pt=a(),m(q.$$.fragment),dt=a(),E=i("p"),E.innerHTML=Bl,mt=a(),m(H.$$.fragment),ct=a(),L=i("p"),L.textContent=Il,ut=a(),m(z.$$.fragment),Mt=a(),F=i("p"),F.textContent=_l,ft=a(),m(Y.$$.fragment),jt=a(),Q=i("p"),Q.innerHTML=Rl,bt=a(),O=i("p"),O.innerHTML=Gl,yt=a(),m(P.$$.fragment),gt=a(),S=i("p"),S.innerHTML=Vl,Tt=a(),m(D.$$.fragment),ht=a(),K=i("p"),K.innerHTML=ql,wt=a(),m(ee.$$.fragment),Jt=a(),te=i("p"),te.textContent=El,$t=a(),m(le.$$.fragment),Ut=a(),se=i("p"),se.innerHTML=Hl,Ct=a(),m(ae.$$.fragment),vt=a(),m(oe.$$.fragment),xt=a(),ne=i("p"),ne.innerHTML=Ll,Zt=a(),m(ie.$$.fragment),At=a(),m(re.$$.fragment),Xt=a(),pe=i("p"),pe.innerHTML=zl,Nt=a(),de=i("table"),de.innerHTML=Fl,Wt=a(),me=i("p"),me.innerHTML=Yl,kt=a(),m(ce.$$.fragment),Bt=a(),ue=i("p"),ue.innerHTML=Ql,It=a(),m(Me.$$.fragment),_t=a(),fe=i("p"),fe.textContent=Ol,Rt=a(),m(je.$$.fragment),Gt=a(),be=i("p"),be.innerHTML=Pl,Vt=a(),m(U.$$.fragment),qt=a(),m(C.$$.fragment),Et=a(),m(ye.$$.fragment),Ht=a(),ge=i("p"),ge.textContent=Sl,Lt=a(),Te=i("ol"),Te.innerHTML=Dl,zt=a(),he=i("p"),he.textContent=Kl,Ft=a(),m(we.$$.fragment),Yt=a(),Je=i("p"),Je.textContent=es,Qt=a(),$e=i("ul"),$e.innerHTML=ts,Ot=a(),m(v.$$.fragment),Pt=a(),Ue=i("p"),Ue.innerHTML=ls,St=a(),m(Ce.$$.fragment),Dt=a(),ve=i("p"),ve.innerHTML=ss,Kt=a(),m(x.$$.fragment),el=a(),xe=i("p"),xe.textContent=as,tl=a(),m(Ze.$$.fragment),ll=a(),Ae=i("p"),Ae.textContent=os,sl=a(),m(Xe.$$.fragment),al=a(),Ne=i("p"),Ne.textContent=ns,ol=a(),m(We.$$.fragment),nl=a(),ke=i("p"),ke.innerHTML=is,il=a(),m(Be.$$.fragment),rl=a(),m(Z.$$.fragment),pl=a(),m(Ie.$$.fragment),dl=a(),_e=i("p"),_e.innerHTML=rs,ml=a(),m(Re.$$.fragment),cl=a(),Ge=i("p"),Ge.innerHTML=ps,ul=a(),m(Ve.$$.fragment),Ml=a(),m(A.$$.fragment),fl=a(),m(qe.$$.fragment),jl=a(),Ee=i("p"),Ee.innerHTML=ds,bl=a(),m(He.$$.fragment),yl=a(),Le=i("p"),Le.innerHTML=ms,gl=a(),m(ze.$$.fragment),Tl=a(),Fe=i("p"),Fe.textContent=cs,hl=a(),Ye=i("ul"),Ye.innerHTML=us,wl=a(),Qe=i("p"),Qe.innerHTML=Ms,Jl=a(),m(Oe.$$.fragment),$l=a(),De=i("p"),this.h()},l(e){const t=xs("svelte-u9bgzb",document.head);n=r(t,"META",{name:!0,content:!0}),t.forEach(l),b=o(e),d=r(e,"P",{}),ws(d).forEach(l),y=o(e),c(J.$$.fragment,e),h=o(e),w=r(e,"P",{"data-svelte-h":!0}),p(w)!=="svelte-780rag"&&(w.innerHTML=Cl),Ke=o(e),c($.$$.fragment,e),et=o(e),N=r(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-kzaz5b"&&(N.innerHTML=vl),tt=o(e),W=r(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-187fdkg"&&(W.textContent=xl),lt=o(e),k=r(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-18aznvk"&&(k.innerHTML=Zl),st=o(e),B=r(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-g9dkld"&&(B.textContent=Al),at=o(e),I=r(e,"UL",{"data-svelte-h":!0}),p(I)!=="svelte-hlbcru"&&(I.innerHTML=Xl),ot=o(e),_=r(e,"P",{"data-svelte-h":!0}),p(_)!=="svelte-1um2ugk"&&(_.textContent=Nl),nt=o(e),R=r(e,"UL",{"data-svelte-h":!0}),p(R)!=="svelte-8ygt46"&&(R.innerHTML=Wl),it=o(e),c(G.$$.fragment,e),rt=o(e),V=r(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-ldfupz"&&(V.textContent=kl),pt=o(e),c(q.$$.fragment,e),dt=o(e),E=r(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-unqqru"&&(E.innerHTML=Bl),mt=o(e),c(H.$$.fragment,e),ct=o(e),L=r(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-6uusn"&&(L.textContent=Il),ut=o(e),c(z.$$.fragment,e),Mt=o(e),F=r(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1urlk3h"&&(F.textContent=_l),ft=o(e),c(Y.$$.fragment,e),jt=o(e),Q=r(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-15ck6bq"&&(Q.innerHTML=Rl),bt=o(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-11ias89"&&(O.innerHTML=Gl),yt=o(e),c(P.$$.fragment,e),gt=o(e),S=r(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-ehimya"&&(S.innerHTML=Vl),Tt=o(e),c(D.$$.fragment,e),ht=o(e),K=r(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1iginlu"&&(K.innerHTML=ql),wt=o(e),c(ee.$$.fragment,e),Jt=o(e),te=r(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-12w4y7b"&&(te.textContent=El),$t=o(e),c(le.$$.fragment,e),Ut=o(e),se=r(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-1hwlhij"&&(se.innerHTML=Hl),Ct=o(e),c(ae.$$.fragment,e),vt=o(e),c(oe.$$.fragment,e),xt=o(e),ne=r(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1hwlhij"&&(ne.innerHTML=Ll),Zt=o(e),c(ie.$$.fragment,e),At=o(e),c(re.$$.fragment,e),Xt=o(e),pe=r(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-au9t2"&&(pe.innerHTML=zl),Nt=o(e),de=r(e,"TABLE",{"data-svelte-h":!0}),p(de)!=="svelte-19g4mid"&&(de.innerHTML=Fl),Wt=o(e),me=r(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-67rlav"&&(me.innerHTML=Yl),kt=o(e),c(ce.$$.fragment,e),Bt=o(e),ue=r(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-zfw7vl"&&(ue.innerHTML=Ql),It=o(e),c(Me.$$.fragment,e),_t=o(e),fe=r(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-1qh1xkx"&&(fe.textContent=Ol),Rt=o(e),c(je.$$.fragment,e),Gt=o(e),be=r(e,"P",{"data-svelte-h":!0}),p(be)!=="svelte-1sxlp9n"&&(be.innerHTML=Pl),Vt=o(e),c(U.$$.fragment,e),qt=o(e),c(C.$$.fragment,e),Et=o(e),c(ye.$$.fragment,e),Ht=o(e),ge=r(e,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-srdmc5"&&(ge.textContent=Sl),Lt=o(e),Te=r(e,"OL",{"data-svelte-h":!0}),p(Te)!=="svelte-119emik"&&(Te.innerHTML=Dl),zt=o(e),he=r(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-1tntr09"&&(he.textContent=Kl),Ft=o(e),c(we.$$.fragment,e),Yt=o(e),Je=r(e,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-1yke088"&&(Je.textContent=es),Qt=o(e),$e=r(e,"UL",{"data-svelte-h":!0}),p($e)!=="svelte-16srizl"&&($e.innerHTML=ts),Ot=o(e),c(v.$$.fragment,e),Pt=o(e),Ue=r(e,"P",{"data-svelte-h":!0}),p(Ue)!=="svelte-1w3ieqz"&&(Ue.innerHTML=ls),St=o(e),c(Ce.$$.fragment,e),Dt=o(e),ve=r(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-1dcv64l"&&(ve.innerHTML=ss),Kt=o(e),c(x.$$.fragment,e),el=o(e),xe=r(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-1xs5c3l"&&(xe.textContent=as),tl=o(e),c(Ze.$$.fragment,e),ll=o(e),Ae=r(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-conxji"&&(Ae.textContent=os),sl=o(e),c(Xe.$$.fragment,e),al=o(e),Ne=r(e,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-1gla57i"&&(Ne.textContent=ns),ol=o(e),c(We.$$.fragment,e),nl=o(e),ke=r(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-eqvgnl"&&(ke.innerHTML=is),il=o(e),c(Be.$$.fragment,e),rl=o(e),c(Z.$$.fragment,e),pl=o(e),c(Ie.$$.fragment,e),dl=o(e),_e=r(e,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-scf0rn"&&(_e.innerHTML=rs),ml=o(e),c(Re.$$.fragment,e),cl=o(e),Ge=r(e,"P",{"data-svelte-h":!0}),p(Ge)!=="svelte-1clqbx4"&&(Ge.innerHTML=ps),ul=o(e),c(Ve.$$.fragment,e),Ml=o(e),c(A.$$.fragment,e),fl=o(e),c(qe.$$.fragment,e),jl=o(e),Ee=r(e,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-1fom1t1"&&(Ee.innerHTML=ds),bl=o(e),c(He.$$.fragment,e),yl=o(e),Le=r(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1w48q5s"&&(Le.innerHTML=ms),gl=o(e),c(ze.$$.fragment,e),Tl=o(e),Fe=r(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-nik27b"&&(Fe.textContent=cs),hl=o(e),Ye=r(e,"UL",{"data-svelte-h":!0}),p(Ye)!=="svelte-aqybbn"&&(Ye.innerHTML=us),wl=o(e),Qe=r(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-1uvyz3f"&&(Qe.innerHTML=Ms),Jl=o(e),c(Oe.$$.fragment,e),$l=o(e),De=r(e,"P",{}),ws(De).forEach(l),this.h()},h(){Js(n,"name","hf:doc:metadata"),Js(n,"content",Gs)},m(e,t){Zs(document.head,n),s(e,b,t),s(e,d,t),s(e,y,t),u(J,e,t),s(e,h,t),s(e,w,t),s(e,Ke,t),u($,e,t),s(e,et,t),s(e,N,t),s(e,tt,t),s(e,W,t),s(e,lt,t),s(e,k,t),s(e,st,t),s(e,B,t),s(e,at,t),s(e,I,t),s(e,ot,t),s(e,_,t),s(e,nt,t),s(e,R,t),s(e,it,t),u(G,e,t),s(e,rt,t),s(e,V,t),s(e,pt,t),u(q,e,t),s(e,dt,t),s(e,E,t),s(e,mt,t),u(H,e,t),s(e,ct,t),s(e,L,t),s(e,ut,t),u(z,e,t),s(e,Mt,t),s(e,F,t),s(e,ft,t),u(Y,e,t),s(e,jt,t),s(e,Q,t),s(e,bt,t),s(e,O,t),s(e,yt,t),u(P,e,t),s(e,gt,t),s(e,S,t),s(e,Tt,t),u(D,e,t),s(e,ht,t),s(e,K,t),s(e,wt,t),u(ee,e,t),s(e,Jt,t),s(e,te,t),s(e,$t,t),u(le,e,t),s(e,Ut,t),s(e,se,t),s(e,Ct,t),u(ae,e,t),s(e,vt,t),u(oe,e,t),s(e,xt,t),s(e,ne,t),s(e,Zt,t),u(ie,e,t),s(e,At,t),u(re,e,t),s(e,Xt,t),s(e,pe,t),s(e,Nt,t),s(e,de,t),s(e,Wt,t),s(e,me,t),s(e,kt,t),u(ce,e,t),s(e,Bt,t),s(e,ue,t),s(e,It,t),u(Me,e,t),s(e,_t,t),s(e,fe,t),s(e,Rt,t),u(je,e,t),s(e,Gt,t),s(e,be,t),s(e,Vt,t),u(U,e,t),s(e,qt,t),u(C,e,t),s(e,Et,t),u(ye,e,t),s(e,Ht,t),s(e,ge,t),s(e,Lt,t),s(e,Te,t),s(e,zt,t),s(e,he,t),s(e,Ft,t),u(we,e,t),s(e,Yt,t),s(e,Je,t),s(e,Qt,t),s(e,$e,t),s(e,Ot,t),u(v,e,t),s(e,Pt,t),s(e,Ue,t),s(e,St,t),u(Ce,e,t),s(e,Dt,t),s(e,ve,t),s(e,Kt,t),u(x,e,t),s(e,el,t),s(e,xe,t),s(e,tl,t),u(Ze,e,t),s(e,ll,t),s(e,Ae,t),s(e,sl,t),u(Xe,e,t),s(e,al,t),s(e,Ne,t),s(e,ol,t),u(We,e,t),s(e,nl,t),s(e,ke,t),s(e,il,t),u(Be,e,t),s(e,rl,t),u(Z,e,t),s(e,pl,t),u(Ie,e,t),s(e,dl,t),s(e,_e,t),s(e,ml,t),u(Re,e,t),s(e,cl,t),s(e,Ge,t),s(e,ul,t),u(Ve,e,t),s(e,Ml,t),u(A,e,t),s(e,fl,t),u(qe,e,t),s(e,jl,t),s(e,Ee,t),s(e,bl,t),u(He,e,t),s(e,yl,t),s(e,Le,t),s(e,gl,t),u(ze,e,t),s(e,Tl,t),s(e,Fe,t),s(e,hl,t),s(e,Ye,t),s(e,wl,t),s(e,Qe,t),s(e,Jl,t),u(Oe,e,t),s(e,$l,t),s(e,De,t),Ul=!0},p(e,[t]){const fs={};t&2&&(fs.$$scope={dirty:t,ctx:e}),$.$set(fs);const js={};t&2&&(js.$$scope={dirty:t,ctx:e}),U.$set(js);const bs={};t&2&&(bs.$$scope={dirty:t,ctx:e}),C.$set(bs);const ys={};t&2&&(ys.$$scope={dirty:t,ctx:e}),v.$set(ys);const gs={};t&2&&(gs.$$scope={dirty:t,ctx:e}),x.$set(gs);const Ts={};t&2&&(Ts.$$scope={dirty:t,ctx:e}),Z.$set(Ts);const hs={};t&2&&(hs.$$scope={dirty:t,ctx:e}),A.$set(hs)},i(e){Ul||(M(J.$$.fragment,e),M($.$$.fragment,e),M(G.$$.fragment,e),M(q.$$.fragment,e),M(H.$$.fragment,e),M(z.$$.fragment,e),M(Y.$$.fragment,e),M(P.$$.fragment,e),M(D.$$.fragment,e),M(ee.$$.fragment,e),M(le.$$.fragment,e),M(ae.$$.fragment,e),M(oe.$$.fragment,e),M(ie.$$.fragment,e),M(re.$$.fragment,e),M(ce.$$.fragment,e),M(Me.$$.fragment,e),M(je.$$.fragment,e),M(U.$$.fragment,e),M(C.$$.fragment,e),M(ye.$$.fragment,e),M(we.$$.fragment,e),M(v.$$.fragment,e),M(Ce.$$.fragment,e),M(x.$$.fragment,e),M(Ze.$$.fragment,e),M(Xe.$$.fragment,e),M(We.$$.fragment,e),M(Be.$$.fragment,e),M(Z.$$.fragment,e),M(Ie.$$.fragment,e),M(Re.$$.fragment,e),M(Ve.$$.fragment,e),M(A.$$.fragment,e),M(qe.$$.fragment,e),M(He.$$.fragment,e),M(ze.$$.fragment,e),M(Oe.$$.fragment,e),Ul=!0)},o(e){f(J.$$.fragment,e),f($.$$.fragment,e),f(G.$$.fragment,e),f(q.$$.fragment,e),f(H.$$.fragment,e),f(z.$$.fragment,e),f(Y.$$.fragment,e),f(P.$$.fragment,e),f(D.$$.fragment,e),f(ee.$$.fragment,e),f(le.$$.fragment,e),f(ae.$$.fragment,e),f(oe.$$.fragment,e),f(ie.$$.fragment,e),f(re.$$.fragment,e),f(ce.$$.fragment,e),f(Me.$$.fragment,e),f(je.$$.fragment,e),f(U.$$.fragment,e),f(C.$$.fragment,e),f(ye.$$.fragment,e),f(we.$$.fragment,e),f(v.$$.fragment,e),f(Ce.$$.fragment,e),f(x.$$.fragment,e),f(Ze.$$.fragment,e),f(Xe.$$.fragment,e),f(We.$$.fragment,e),f(Be.$$.fragment,e),f(Z.$$.fragment,e),f(Ie.$$.fragment,e),f(Re.$$.fragment,e),f(Ve.$$.fragment,e),f(A.$$.fragment,e),f(qe.$$.fragment,e),f(He.$$.fragment,e),f(ze.$$.fragment,e),f(Oe.$$.fragment,e),Ul=!1},d(e){e&&(l(b),l(d),l(y),l(h),l(w),l(Ke),l(et),l(N),l(tt),l(W),l(lt),l(k),l(st),l(B),l(at),l(I),l(ot),l(_),l(nt),l(R),l(it),l(rt),l(V),l(pt),l(dt),l(E),l(mt),l(ct),l(L),l(ut),l(Mt),l(F),l(ft),l(jt),l(Q),l(bt),l(O),l(yt),l(gt),l(S),l(Tt),l(ht),l(K),l(wt),l(Jt),l(te),l($t),l(Ut),l(se),l(Ct),l(vt),l(xt),l(ne),l(Zt),l(At),l(Xt),l(pe),l(Nt),l(de),l(Wt),l(me),l(kt),l(Bt),l(ue),l(It),l(_t),l(fe),l(Rt),l(Gt),l(be),l(Vt),l(qt),l(Et),l(Ht),l(ge),l(Lt),l(Te),l(zt),l(he),l(Ft),l(Yt),l(Je),l(Qt),l($e),l(Ot),l(Pt),l(Ue),l(St),l(Dt),l(ve),l(Kt),l(el),l(xe),l(tl),l(ll),l(Ae),l(sl),l(al),l(Ne),l(ol),l(nl),l(ke),l(il),l(rl),l(pl),l(dl),l(_e),l(ml),l(cl),l(Ge),l(ul),l(Ml),l(fl),l(jl),l(Ee),l(bl),l(yl),l(Le),l(gl),l(Tl),l(Fe),l(hl),l(Ye),l(wl),l(Qe),l(Jl),l($l),l(De)),l(n),j(J,e),j($,e),j(G,e),j(q,e),j(H,e),j(z,e),j(Y,e),j(P,e),j(D,e),j(ee,e),j(le,e),j(ae,e),j(oe,e),j(ie,e),j(re,e),j(ce,e),j(Me,e),j(je,e),j(U,e),j(C,e),j(ye,e),j(we,e),j(v,e),j(Ce,e),j(x,e),j(Ze,e),j(Xe,e),j(We,e),j(Be,e),j(Z,e),j(Ie,e),j(Re,e),j(Ve,e),j(A,e),j(qe,e),j(He,e),j(ze,e),j(Oe,e)}}}const Gs='{"title":"Exportando modelos para ONNX","local":"exportando-modelos-para-onnx","sections":[{"title":"Exportando um modelo para ONNX","local":"exportando-um-modelo-para-onnx","sections":[],"depth":2},{"title":"Selecionando features para diferentes tarefas do modelo","local":"selecionando-features-para-diferentes-tarefas-do-modelo","sections":[],"depth":2},{"title":"Exportando um modelo para uma arquitetura sem suporte","local":"exportando-um-modelo-para-uma-arquitetura-sem-suporte","sections":[{"title":"Implementando uma configuração ONNX personalizada","local":"implementando-uma-configuração-onnx-personalizada","sections":[],"depth":3},{"title":"Exportando um modelo","local":"exportando-um-modelo","sections":[],"depth":3},{"title":"Validando a saída dos modelos","local":"validando-a-saída-dos-modelos","sections":[],"depth":3}],"depth":2},{"title":"Contribuindo com uma nova configuração para 🤗 Transformers","local":"contribuindo-com-uma-nova-configuração-para--transformers","sections":[],"depth":2}],"depth":1}';function Vs(T){return Us(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fs extends Cs{constructor(n){super(),vs(this,n,Vs,Rs,$s,{})}}export{Fs as component};
