import{s as ws,o as Js,n as Pe}from"../chunks/scheduler.d586627e.js";import{S as Us,i as $s,g as i,s as a,r as m,A as Cs,h as r,f as l,c as o,j as Ts,u as c,x as p,k as hs,y as vs,a as s,v as u,d as M,t as f,w as j}from"../chunks/index.8589a59c.js";import{T as Oe}from"../chunks/Tip.84e2336e.js";import{C as g}from"../chunks/CodeBlock.47c46d2c.js";import{H as X}from"../chunks/Heading.a70e045b.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:Pe,d(d){d&&l(n)}}}function Zs(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:Pe,d(d){d&&l(n)}}}function As(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:Pe,d(d){d&&l(n)}}}function Xs(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:Pe,d(d){d&&l(n)}}}function Ns(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:Pe,d(h){h&&(l(n),l(d),l(y))}}}function Ws(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:Pe,d(d){d&&l(n)}}}function ks(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:Pe,d(d){d&&l(n)}}}function Bs(T){let n,b,d,y,J,h,w,Ul=`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>.`,De,U,Ke,N,$l=`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.`,et,W,Cl=`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).`,tt,k,vl=`🤗 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.`,lt,B,xl="As configurações prontas incluem as seguintes arquiteturas:",st,I,Zl="<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>",at,_,Al="Nas próximas duas seções, mostraremos como:",ot,R,Xl="<li>Exportar um modelo suportado usando o pacote <code>transformers.onnx</code>.</li> <li>Exportar um modelo personalizado para uma arquitetura sem suporte.</li>",nt,G,it,V,Nl=`Para exportar um modelo 🤗 Transformers para o ONNX, primeiro você precisa instalar algumas
dependências extras:`,rt,q,pt,E,Wl="O pacote <code>transformers.onnx</code> pode então ser usado como um módulo Python:",dt,H,mt,L,kl="A exportação de um checkpoint usando uma configuração pronta pode ser feita da seguinte forma:",ct,z,ut,F,Bl="Você deve ver os seguintes logs:",Mt,Y,ft,Q,Il=`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.`,jt,O,_l=`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:`,bt,P,yt,S,Rl=`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:`,gt,D,Tt,K,Gl=`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:`,ht,ee,wt,te,Vl=`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:`,Jt,le,Ut,se,ql=`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:`,$t,ae,Ct,oe,vt,ne,El=`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:`,xt,ie,Zt,re,At,pe,Hl=`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:`,Xt,de,Ll="<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>",Nt,me,zl=`Para cada configuração, você pode encontrar a lista de recursos suportados por meio do
<code>FeaturesManager</code>. Por exemplo, para DistilBERT temos:`,Wt,ce,kt,ue,Fl=`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:`,Bt,Me,It,fe,Yl="Isso exibe os seguintes logs:",_t,je,Rt,be,Ql=`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.`,Gt,$,Vt,C,qt,ye,Et,ge,Ol=`Se você deseja exportar um modelo cuja arquitetura não é suportada nativamente pela
biblioteca, há três etapas principais a seguir:`,Ht,Te,Pl="<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>",Lt,he,Sl=`Nesta seção, veremos como o DistilBERT foi implementado para mostrar o que está envolvido
em cada passo.`,zt,we,Ft,Je,Dl=`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:`,Yt,Ue,Kl="<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>",Qt,v,Ot,$e,es=`Como o DistilBERT é um modelo baseado em codificador, sua configuração é herdada de
<code>OnnxConfig</code>:`,Pt,Ce,St,ve,ts=`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.`,Dt,x,Kt,xe,ls=`Depois de implementar uma configuração ONNX, você pode instanciá-la fornecendo a
configuração do modelo base da seguinte forma:`,el,Ze,tl,Ae,ss=`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:`,ll,Xe,sl,Ne,as="Você também pode visualizar as saídas associadas ao modelo da seguinte forma:",al,We,ol,ke,os=`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:`,nl,Be,il,Z,rl,Ie,pl,_e,ns=`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:`,dl,Re,ml,Ge,is=`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:`,cl,Ve,ul,A,Ml,qe,fl,Ee,rs=`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:`,jl,He,bl,Le,ps=`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.`,yl,ze,gl,Fe,ds=`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á:`,Tl,Ye,ms=`<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>`,hl,Qe,cs=`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.`,wl,Se,Jl;return J=new X({props:{title:"Exportando modelos para ONNX",local:"exportando-modelos-para-onnx",headingTag:"h1"}}),U=new Oe({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}}),$=new Oe({props:{$$slots:{default:[Zs]},$$scope:{ctx:T}}}),C=new Oe({props:{$$slots:{default:[As]},$$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 Oe({props:{$$slots:{default:[Xs]},$$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 Oe({props:{$$slots:{default:[Ns]},$$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 Oe({props:{$$slots:{default:[Ws]},$$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 Oe({props:{$$slots:{default:[ks]},$$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"}}),{c(){n=i("meta"),b=a(),d=i("p"),y=a(),m(J.$$.fragment),h=a(),w=i("p"),w.innerHTML=Ul,De=a(),m(U.$$.fragment),Ke=a(),N=i("p"),N.innerHTML=$l,et=a(),W=i("p"),W.textContent=Cl,tt=a(),k=i("p"),k.innerHTML=vl,lt=a(),B=i("p"),B.textContent=xl,st=a(),I=i("ul"),I.innerHTML=Zl,at=a(),_=i("p"),_.textContent=Al,ot=a(),R=i("ul"),R.innerHTML=Xl,nt=a(),m(G.$$.fragment),it=a(),V=i("p"),V.textContent=Nl,rt=a(),m(q.$$.fragment),pt=a(),E=i("p"),E.innerHTML=Wl,dt=a(),m(H.$$.fragment),mt=a(),L=i("p"),L.textContent=kl,ct=a(),m(z.$$.fragment),ut=a(),F=i("p"),F.textContent=Bl,Mt=a(),m(Y.$$.fragment),ft=a(),Q=i("p"),Q.innerHTML=Il,jt=a(),O=i("p"),O.innerHTML=_l,bt=a(),m(P.$$.fragment),yt=a(),S=i("p"),S.innerHTML=Rl,gt=a(),m(D.$$.fragment),Tt=a(),K=i("p"),K.innerHTML=Gl,ht=a(),m(ee.$$.fragment),wt=a(),te=i("p"),te.textContent=Vl,Jt=a(),m(le.$$.fragment),Ut=a(),se=i("p"),se.innerHTML=ql,$t=a(),m(ae.$$.fragment),Ct=a(),m(oe.$$.fragment),vt=a(),ne=i("p"),ne.innerHTML=El,xt=a(),m(ie.$$.fragment),Zt=a(),m(re.$$.fragment),At=a(),pe=i("p"),pe.innerHTML=Hl,Xt=a(),de=i("table"),de.innerHTML=Ll,Nt=a(),me=i("p"),me.innerHTML=zl,Wt=a(),m(ce.$$.fragment),kt=a(),ue=i("p"),ue.innerHTML=Fl,Bt=a(),m(Me.$$.fragment),It=a(),fe=i("p"),fe.textContent=Yl,_t=a(),m(je.$$.fragment),Rt=a(),be=i("p"),be.innerHTML=Ql,Gt=a(),m($.$$.fragment),Vt=a(),m(C.$$.fragment),qt=a(),m(ye.$$.fragment),Et=a(),ge=i("p"),ge.textContent=Ol,Ht=a(),Te=i("ol"),Te.innerHTML=Pl,Lt=a(),he=i("p"),he.textContent=Sl,zt=a(),m(we.$$.fragment),Ft=a(),Je=i("p"),Je.textContent=Dl,Yt=a(),Ue=i("ul"),Ue.innerHTML=Kl,Qt=a(),m(v.$$.fragment),Ot=a(),$e=i("p"),$e.innerHTML=es,Pt=a(),m(Ce.$$.fragment),St=a(),ve=i("p"),ve.innerHTML=ts,Dt=a(),m(x.$$.fragment),Kt=a(),xe=i("p"),xe.textContent=ls,el=a(),m(Ze.$$.fragment),tl=a(),Ae=i("p"),Ae.textContent=ss,ll=a(),m(Xe.$$.fragment),sl=a(),Ne=i("p"),Ne.textContent=as,al=a(),m(We.$$.fragment),ol=a(),ke=i("p"),ke.innerHTML=os,nl=a(),m(Be.$$.fragment),il=a(),m(Z.$$.fragment),rl=a(),m(Ie.$$.fragment),pl=a(),_e=i("p"),_e.innerHTML=ns,dl=a(),m(Re.$$.fragment),ml=a(),Ge=i("p"),Ge.innerHTML=is,cl=a(),m(Ve.$$.fragment),ul=a(),m(A.$$.fragment),Ml=a(),m(qe.$$.fragment),fl=a(),Ee=i("p"),Ee.innerHTML=rs,jl=a(),m(He.$$.fragment),bl=a(),Le=i("p"),Le.innerHTML=ps,yl=a(),m(ze.$$.fragment),gl=a(),Fe=i("p"),Fe.textContent=ds,Tl=a(),Ye=i("ul"),Ye.innerHTML=ms,hl=a(),Qe=i("p"),Qe.innerHTML=cs,wl=a(),Se=i("p"),this.h()},l(e){const t=Cs("svelte-u9bgzb",document.head);n=r(t,"META",{name:!0,content:!0}),t.forEach(l),b=o(e),d=r(e,"P",{}),Ts(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=Ul),De=o(e),c(U.$$.fragment,e),Ke=o(e),N=r(e,"P",{"data-svelte-h":!0}),p(N)!=="svelte-kzaz5b"&&(N.innerHTML=$l),et=o(e),W=r(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-187fdkg"&&(W.textContent=Cl),tt=o(e),k=r(e,"P",{"data-svelte-h":!0}),p(k)!=="svelte-18aznvk"&&(k.innerHTML=vl),lt=o(e),B=r(e,"P",{"data-svelte-h":!0}),p(B)!=="svelte-g9dkld"&&(B.textContent=xl),st=o(e),I=r(e,"UL",{"data-svelte-h":!0}),p(I)!=="svelte-hlbcru"&&(I.innerHTML=Zl),at=o(e),_=r(e,"P",{"data-svelte-h":!0}),p(_)!=="svelte-1um2ugk"&&(_.textContent=Al),ot=o(e),R=r(e,"UL",{"data-svelte-h":!0}),p(R)!=="svelte-8ygt46"&&(R.innerHTML=Xl),nt=o(e),c(G.$$.fragment,e),it=o(e),V=r(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-ldfupz"&&(V.textContent=Nl),rt=o(e),c(q.$$.fragment,e),pt=o(e),E=r(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-unqqru"&&(E.innerHTML=Wl),dt=o(e),c(H.$$.fragment,e),mt=o(e),L=r(e,"P",{"data-svelte-h":!0}),p(L)!=="svelte-6uusn"&&(L.textContent=kl),ct=o(e),c(z.$$.fragment,e),ut=o(e),F=r(e,"P",{"data-svelte-h":!0}),p(F)!=="svelte-1urlk3h"&&(F.textContent=Bl),Mt=o(e),c(Y.$$.fragment,e),ft=o(e),Q=r(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-15ck6bq"&&(Q.innerHTML=Il),jt=o(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-11ias89"&&(O.innerHTML=_l),bt=o(e),c(P.$$.fragment,e),yt=o(e),S=r(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-ehimya"&&(S.innerHTML=Rl),gt=o(e),c(D.$$.fragment,e),Tt=o(e),K=r(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1iginlu"&&(K.innerHTML=Gl),ht=o(e),c(ee.$$.fragment,e),wt=o(e),te=r(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-12w4y7b"&&(te.textContent=Vl),Jt=o(e),c(le.$$.fragment,e),Ut=o(e),se=r(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-1hwlhij"&&(se.innerHTML=ql),$t=o(e),c(ae.$$.fragment,e),Ct=o(e),c(oe.$$.fragment,e),vt=o(e),ne=r(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-1hwlhij"&&(ne.innerHTML=El),xt=o(e),c(ie.$$.fragment,e),Zt=o(e),c(re.$$.fragment,e),At=o(e),pe=r(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-au9t2"&&(pe.innerHTML=Hl),Xt=o(e),de=r(e,"TABLE",{"data-svelte-h":!0}),p(de)!=="svelte-19g4mid"&&(de.innerHTML=Ll),Nt=o(e),me=r(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-67rlav"&&(me.innerHTML=zl),Wt=o(e),c(ce.$$.fragment,e),kt=o(e),ue=r(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-zfw7vl"&&(ue.innerHTML=Fl),Bt=o(e),c(Me.$$.fragment,e),It=o(e),fe=r(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-1qh1xkx"&&(fe.textContent=Yl),_t=o(e),c(je.$$.fragment,e),Rt=o(e),be=r(e,"P",{"data-svelte-h":!0}),p(be)!=="svelte-1sxlp9n"&&(be.innerHTML=Ql),Gt=o(e),c($.$$.fragment,e),Vt=o(e),c(C.$$.fragment,e),qt=o(e),c(ye.$$.fragment,e),Et=o(e),ge=r(e,"P",{"data-svelte-h":!0}),p(ge)!=="svelte-srdmc5"&&(ge.textContent=Ol),Ht=o(e),Te=r(e,"OL",{"data-svelte-h":!0}),p(Te)!=="svelte-119emik"&&(Te.innerHTML=Pl),Lt=o(e),he=r(e,"P",{"data-svelte-h":!0}),p(he)!=="svelte-1tntr09"&&(he.textContent=Sl),zt=o(e),c(we.$$.fragment,e),Ft=o(e),Je=r(e,"P",{"data-svelte-h":!0}),p(Je)!=="svelte-1yke088"&&(Je.textContent=Dl),Yt=o(e),Ue=r(e,"UL",{"data-svelte-h":!0}),p(Ue)!=="svelte-16srizl"&&(Ue.innerHTML=Kl),Qt=o(e),c(v.$$.fragment,e),Ot=o(e),$e=r(e,"P",{"data-svelte-h":!0}),p($e)!=="svelte-1w3ieqz"&&($e.innerHTML=es),Pt=o(e),c(Ce.$$.fragment,e),St=o(e),ve=r(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-1dcv64l"&&(ve.innerHTML=ts),Dt=o(e),c(x.$$.fragment,e),Kt=o(e),xe=r(e,"P",{"data-svelte-h":!0}),p(xe)!=="svelte-1xs5c3l"&&(xe.textContent=ls),el=o(e),c(Ze.$$.fragment,e),tl=o(e),Ae=r(e,"P",{"data-svelte-h":!0}),p(Ae)!=="svelte-conxji"&&(Ae.textContent=ss),ll=o(e),c(Xe.$$.fragment,e),sl=o(e),Ne=r(e,"P",{"data-svelte-h":!0}),p(Ne)!=="svelte-1gla57i"&&(Ne.textContent=as),al=o(e),c(We.$$.fragment,e),ol=o(e),ke=r(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-eqvgnl"&&(ke.innerHTML=os),nl=o(e),c(Be.$$.fragment,e),il=o(e),c(Z.$$.fragment,e),rl=o(e),c(Ie.$$.fragment,e),pl=o(e),_e=r(e,"P",{"data-svelte-h":!0}),p(_e)!=="svelte-scf0rn"&&(_e.innerHTML=ns),dl=o(e),c(Re.$$.fragment,e),ml=o(e),Ge=r(e,"P",{"data-svelte-h":!0}),p(Ge)!=="svelte-1clqbx4"&&(Ge.innerHTML=is),cl=o(e),c(Ve.$$.fragment,e),ul=o(e),c(A.$$.fragment,e),Ml=o(e),c(qe.$$.fragment,e),fl=o(e),Ee=r(e,"P",{"data-svelte-h":!0}),p(Ee)!=="svelte-1fom1t1"&&(Ee.innerHTML=rs),jl=o(e),c(He.$$.fragment,e),bl=o(e),Le=r(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1w48q5s"&&(Le.innerHTML=ps),yl=o(e),c(ze.$$.fragment,e),gl=o(e),Fe=r(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-nik27b"&&(Fe.textContent=ds),Tl=o(e),Ye=r(e,"UL",{"data-svelte-h":!0}),p(Ye)!=="svelte-aqybbn"&&(Ye.innerHTML=ms),hl=o(e),Qe=r(e,"P",{"data-svelte-h":!0}),p(Qe)!=="svelte-1uvyz3f"&&(Qe.innerHTML=cs),wl=o(e),Se=r(e,"P",{}),Ts(Se).forEach(l),this.h()},h(){hs(n,"name","hf:doc:metadata"),hs(n,"content",Is)},m(e,t){vs(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,De,t),u(U,e,t),s(e,Ke,t),s(e,N,t),s(e,et,t),s(e,W,t),s(e,tt,t),s(e,k,t),s(e,lt,t),s(e,B,t),s(e,st,t),s(e,I,t),s(e,at,t),s(e,_,t),s(e,ot,t),s(e,R,t),s(e,nt,t),u(G,e,t),s(e,it,t),s(e,V,t),s(e,rt,t),u(q,e,t),s(e,pt,t),s(e,E,t),s(e,dt,t),u(H,e,t),s(e,mt,t),s(e,L,t),s(e,ct,t),u(z,e,t),s(e,ut,t),s(e,F,t),s(e,Mt,t),u(Y,e,t),s(e,ft,t),s(e,Q,t),s(e,jt,t),s(e,O,t),s(e,bt,t),u(P,e,t),s(e,yt,t),s(e,S,t),s(e,gt,t),u(D,e,t),s(e,Tt,t),s(e,K,t),s(e,ht,t),u(ee,e,t),s(e,wt,t),s(e,te,t),s(e,Jt,t),u(le,e,t),s(e,Ut,t),s(e,se,t),s(e,$t,t),u(ae,e,t),s(e,Ct,t),u(oe,e,t),s(e,vt,t),s(e,ne,t),s(e,xt,t),u(ie,e,t),s(e,Zt,t),u(re,e,t),s(e,At,t),s(e,pe,t),s(e,Xt,t),s(e,de,t),s(e,Nt,t),s(e,me,t),s(e,Wt,t),u(ce,e,t),s(e,kt,t),s(e,ue,t),s(e,Bt,t),u(Me,e,t),s(e,It,t),s(e,fe,t),s(e,_t,t),u(je,e,t),s(e,Rt,t),s(e,be,t),s(e,Gt,t),u($,e,t),s(e,Vt,t),u(C,e,t),s(e,qt,t),u(ye,e,t),s(e,Et,t),s(e,ge,t),s(e,Ht,t),s(e,Te,t),s(e,Lt,t),s(e,he,t),s(e,zt,t),u(we,e,t),s(e,Ft,t),s(e,Je,t),s(e,Yt,t),s(e,Ue,t),s(e,Qt,t),u(v,e,t),s(e,Ot,t),s(e,$e,t),s(e,Pt,t),u(Ce,e,t),s(e,St,t),s(e,ve,t),s(e,Dt,t),u(x,e,t),s(e,Kt,t),s(e,xe,t),s(e,el,t),u(Ze,e,t),s(e,tl,t),s(e,Ae,t),s(e,ll,t),u(Xe,e,t),s(e,sl,t),s(e,Ne,t),s(e,al,t),u(We,e,t),s(e,ol,t),s(e,ke,t),s(e,nl,t),u(Be,e,t),s(e,il,t),u(Z,e,t),s(e,rl,t),u(Ie,e,t),s(e,pl,t),s(e,_e,t),s(e,dl,t),u(Re,e,t),s(e,ml,t),s(e,Ge,t),s(e,cl,t),u(Ve,e,t),s(e,ul,t),u(A,e,t),s(e,Ml,t),u(qe,e,t),s(e,fl,t),s(e,Ee,t),s(e,jl,t),u(He,e,t),s(e,bl,t),s(e,Le,t),s(e,yl,t),u(ze,e,t),s(e,gl,t),s(e,Fe,t),s(e,Tl,t),s(e,Ye,t),s(e,hl,t),s(e,Qe,t),s(e,wl,t),s(e,Se,t),Jl=!0},p(e,[t]){const us={};t&2&&(us.$$scope={dirty:t,ctx:e}),U.$set(us);const Ms={};t&2&&(Ms.$$scope={dirty:t,ctx:e}),$.$set(Ms);const fs={};t&2&&(fs.$$scope={dirty:t,ctx:e}),C.$set(fs);const js={};t&2&&(js.$$scope={dirty:t,ctx:e}),v.$set(js);const bs={};t&2&&(bs.$$scope={dirty:t,ctx:e}),x.$set(bs);const ys={};t&2&&(ys.$$scope={dirty:t,ctx:e}),Z.$set(ys);const gs={};t&2&&(gs.$$scope={dirty:t,ctx:e}),A.$set(gs)},i(e){Jl||(M(J.$$.fragment,e),M(U.$$.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($.$$.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),Jl=!0)},o(e){f(J.$$.fragment,e),f(U.$$.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($.$$.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),Jl=!1},d(e){e&&(l(b),l(d),l(y),l(h),l(w),l(De),l(Ke),l(N),l(et),l(W),l(tt),l(k),l(lt),l(B),l(st),l(I),l(at),l(_),l(ot),l(R),l(nt),l(it),l(V),l(rt),l(pt),l(E),l(dt),l(mt),l(L),l(ct),l(ut),l(F),l(Mt),l(ft),l(Q),l(jt),l(O),l(bt),l(yt),l(S),l(gt),l(Tt),l(K),l(ht),l(wt),l(te),l(Jt),l(Ut),l(se),l($t),l(Ct),l(vt),l(ne),l(xt),l(Zt),l(At),l(pe),l(Xt),l(de),l(Nt),l(me),l(Wt),l(kt),l(ue),l(Bt),l(It),l(fe),l(_t),l(Rt),l(be),l(Gt),l(Vt),l(qt),l(Et),l(ge),l(Ht),l(Te),l(Lt),l(he),l(zt),l(Ft),l(Je),l(Yt),l(Ue),l(Qt),l(Ot),l($e),l(Pt),l(St),l(ve),l(Dt),l(Kt),l(xe),l(el),l(tl),l(Ae),l(ll),l(sl),l(Ne),l(al),l(ol),l(ke),l(nl),l(il),l(rl),l(pl),l(_e),l(dl),l(ml),l(Ge),l(cl),l(ul),l(Ml),l(fl),l(Ee),l(jl),l(bl),l(Le),l(yl),l(gl),l(Fe),l(Tl),l(Ye),l(hl),l(Qe),l(wl),l(Se)),l(n),j(J,e),j(U,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($,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)}}}const Is='{"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 _s(T){return Js(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Hs extends Us{constructor(n){super(),$s(this,n,_s,Bs,ws,{})}}export{Hs as component};
