import{S as Qn,i as Vn,s as Xn,e as o,k as h,w as d,t as n,M as Yn,c as s,d as t,m as f,a as l,x as m,h as a,b as c,G as r,g as p,y as u,q as _,o as v,B as E,v as Zn}from"../chunks/vendor-hf-doc-builder.js";import{T as ea}from"../chunks/Tip-hf-doc-builder.js";import{I as P}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ct}from"../chunks/CodeBlock-hf-doc-builder.js";function ta(rr){let $,R;return{c(){$=o("p"),R=n(`TorchScript\uB97C \uD65C\uC6A9\uD55C \uC2E4\uD5D8\uC740 \uC544\uC9C1 \uCD08\uAE30 \uB2E8\uACC4\uB85C, \uAC00\uBCC0\uC801\uC778 \uC785\uB825 \uD06C\uAE30 \uBAA8\uB378\uB4E4\uC744 \uD1B5\uD574 \uADF8 \uAE30\uB2A5\uC131\uC744 \uACC4\uC18D \uD0D0\uAD6C\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
\uC774 \uAE30\uB2A5\uC740 \uC800\uD76C\uAC00 \uAD00\uC2EC\uC744 \uB450\uACE0 \uC788\uB294 \uBD84\uC57C \uC911 \uD558\uB098\uC774\uBA70,
\uC55E\uC73C\uB85C \uCD9C\uC2DC\uB420 \uBC84\uC804\uC5D0\uC11C \uB354 \uB9CE\uC740 \uCF54\uB4DC \uC608\uC81C, \uB354 \uC720\uC5F0\uD55C \uAD6C\uD604, \uADF8\uB9AC\uACE0 Python \uAE30\uBC18 \uCF54\uB4DC\uC640 \uCEF4\uD30C\uC77C\uB41C TorchScript\uB97C \uBE44\uAD50\uD558\uB294 \uBCA4\uCE58\uB9C8\uD06C\uB97C \uB4F1\uC744 \uD1B5\uD574 \uBD84\uC11D\uC744 \uC2EC\uD654\uD560 \uC608\uC815\uC785\uB2C8\uB2E4.`)},l(w){$=s(w,"P",{});var S=l($);R=a(S,`TorchScript\uB97C \uD65C\uC6A9\uD55C \uC2E4\uD5D8\uC740 \uC544\uC9C1 \uCD08\uAE30 \uB2E8\uACC4\uB85C, \uAC00\uBCC0\uC801\uC778 \uC785\uB825 \uD06C\uAE30 \uBAA8\uB378\uB4E4\uC744 \uD1B5\uD574 \uADF8 \uAE30\uB2A5\uC131\uC744 \uACC4\uC18D \uD0D0\uAD6C\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
\uC774 \uAE30\uB2A5\uC740 \uC800\uD76C\uAC00 \uAD00\uC2EC\uC744 \uB450\uACE0 \uC788\uB294 \uBD84\uC57C \uC911 \uD558\uB098\uC774\uBA70,
\uC55E\uC73C\uB85C \uCD9C\uC2DC\uB420 \uBC84\uC804\uC5D0\uC11C \uB354 \uB9CE\uC740 \uCF54\uB4DC \uC608\uC81C, \uB354 \uC720\uC5F0\uD55C \uAD6C\uD604, \uADF8\uB9AC\uACE0 Python \uAE30\uBC18 \uCF54\uB4DC\uC640 \uCEF4\uD30C\uC77C\uB41C TorchScript\uB97C \uBE44\uAD50\uD558\uB294 \uBCA4\uCE58\uB9C8\uD06C\uB97C \uB4F1\uC744 \uD1B5\uD574 \uBD84\uC11D\uC744 \uC2EC\uD654\uD560 \uC608\uC815\uC785\uB2C8\uB2E4.`),S.forEach(t)},m(w,S){p(w,$,S),r($,R)},d(w){w&&t($)}}}function ra(rr){let $,R,w,S,ht,pe,po,ft,co,or,F,sr,ce,he,ho,fo,lr,Ge,dt,mo,nr,fe,de,uo,_o,ar,Qe,vo,ir,Ve,Eo,pr,J,Xe,mt,$o,wo,So,ut,yo,cr,Ye,ko,hr,B,U,_t,me,bo,vt,Ao,fr,A,Et,To,go,$t,Po,jo,wt,No,xo,dr,T,St,Bo,Do,yt,Co,Io,kt,Mo,zo,mr,G,Wo,bt,Oo,Ho,ur,D,Q,At,ue,Ko,Tt,qo,_r,V,Lo,gt,Ro,Fo,vr,Ze,Jo,Er,_e,$r,et,Uo,wr,tt,Go,Sr,C,X,Pt,ve,Qo,jt,Vo,yr,rt,Xo,kr,I,Y,Nt,Ee,Yo,xt,Zo,br,y,Bt,es,ts,Dt,rs,os,Ct,ss,ls,It,ns,as,Ar,$e,Tr,M,Z,Mt,we,is,zt,ps,gr,b,cs,Wt,hs,fs,Ot,ds,ms,Ht,us,_s,Pr,Se,jr,z,ee,Kt,ye,vs,qt,Es,Nr,ke,Lt,$s,ws,xr,be,Br,W,te,Rt,Ae,Ss,Ft,ys,Dr,j,ks,Te,bs,As,ge,Ts,gs,Cr,N,Jt,Ps,js,ot,Ns,Pe,xs,Bs,re,je,Ds,Cs,Ne,Is,Ms,Ir,O,oe,Ut,xe,zs,Gt,Ws,Mr,k,Be,Os,Hs,De,Ks,qs,Ce,Ls,Rs,Ie,Fs,Js,zr,se,Us,Me,Gs,Qs,Wr,H,le,Qt,ze,Vs,Vt,Xs,Or,x,Ys,We,Zs,el,Oe,tl,rl,Hr,K,ne,Xt,He,ol,Yt,sl,Kr,g,Zt,ll,nl,st,al,il,er,pl,cl,qr,Ke,Lr,lt,hl,Rr,qe,Fr,nt,fl,Jr,ae,dl,Le,ml,ul,Ur;return pe=new P({}),F=new ea({props:{$$slots:{default:[ta]},$$scope:{ctx:rr}}}),me=new P({}),ue=new P({}),_e=new ct({props:{code:"`The expanded size of the tensor (3) must match the existing size (7) at non-singleton dimension 2`",highlighted:'`The expanded <span class="hljs-built_in">size</span> of the tensor (<span class="hljs-number">3</span>) must match the existing <span class="hljs-built_in">size</span> (<span class="hljs-number">7</span>) at non-singleton <span class="hljs-keyword">dimension</span> <span class="hljs-number">2</span>`'}}),ve=new P({}),Ee=new P({}),$e=new ct({props:{code:`from transformers import BertModel, BertTokenizer, BertConfig
import torch

enc = BertTokenizer.from_pretrained("bert-base-uncased")

# \uC785\uB825 \uD14D\uC2A4\uD2B8 \uD1A0\uD070\uD654\uD558\uAE30
text = "[CLS] Who was Jim Henson ? [SEP] Jim Henson was a puppeteer [SEP]"
tokenized_text = enc.tokenize(text)

# \uC785\uB825 \uD1A0\uD070 \uC911 \uD558\uB098\uB97C \uB9C8\uC2A4\uD0B9\uD558\uAE30
masked_index = 8
tokenized_text[masked_index] = "[MASK]"
indexed_tokens = enc.convert_tokens_to_ids(tokenized_text)
segments_ids = [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]

# \uB354\uBBF8 \uC785\uB825 \uB9CC\uB4E4\uAE30
tokens_tensor = torch.tensor([indexed_tokens])
segments_tensors = torch.tensor([segments_ids])
dummy_input = [tokens_tensor, segments_tensors]

# torchscript \uD50C\uB798\uADF8\uB85C \uBAA8\uB378 \uCD08\uAE30\uD654\uD558\uAE30
# \uC774 \uBAA8\uB378\uC740 LM \uD5E4\uB4DC\uAC00 \uC5C6\uC73C\uBBC0\uB85C \uD544\uC694\uD558\uC9C0 \uC54A\uC9C0\uB9CC, \uD50C\uB798\uADF8\uB97C True\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.
config = BertConfig(
    vocab_size_or_config_json_file=32000,
    hidden_size=768,
    num_hidden_layers=12,
    num_attention_heads=12,
    intermediate_size=3072,
    torchscript=True,
)

# \uBAA8\uB378\uC744 \uC778\uC2A4\uD134\uD2B8\uD654\uD558\uAE30
model = BertModel(config)

# \uBAA8\uB378\uC744 \uD3C9\uAC00 \uBAA8\uB4DC\uB85C \uB450\uC5B4\uC57C \uD569\uB2C8\uB2E4.
model.eval()

# \uB9CC\uC57D *from_pretrained*\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uB294 \uACBD\uC6B0, TorchScript \uD50C\uB798\uADF8\uB97C \uC27D\uAC8C \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4
model = BertModel.from_pretrained("bert-base-uncased", torchscript=True)

# \uCD94\uC801 \uC0DD\uC131\uD558\uAE30
traced_model = torch.jit.trace(model, [tokens_tensor, segments_tensors])
torch.jit.save(traced_model, "traced_bert.pt")`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertModel, BertTokenizer, BertConfig
<span class="hljs-keyword">import</span> torch

enc = BertTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-comment"># \uC785\uB825 \uD14D\uC2A4\uD2B8 \uD1A0\uD070\uD654\uD558\uAE30</span>
text = <span class="hljs-string">&quot;[CLS] Who was Jim Henson ? [SEP] Jim Henson was a puppeteer [SEP]&quot;</span>
tokenized_text = enc.tokenize(text)

<span class="hljs-comment"># \uC785\uB825 \uD1A0\uD070 \uC911 \uD558\uB098\uB97C \uB9C8\uC2A4\uD0B9\uD558\uAE30</span>
masked_index = <span class="hljs-number">8</span>
tokenized_text[masked_index] = <span class="hljs-string">&quot;[MASK]&quot;</span>
indexed_tokens = enc.convert_tokens_to_ids(tokenized_text)
segments_ids = [<span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>]

<span class="hljs-comment"># \uB354\uBBF8 \uC785\uB825 \uB9CC\uB4E4\uAE30</span>
tokens_tensor = torch.tensor([indexed_tokens])
segments_tensors = torch.tensor([segments_ids])
dummy_input = [tokens_tensor, segments_tensors]

<span class="hljs-comment"># torchscript \uD50C\uB798\uADF8\uB85C \uBAA8\uB378 \uCD08\uAE30\uD654\uD558\uAE30</span>
<span class="hljs-comment"># \uC774 \uBAA8\uB378\uC740 LM \uD5E4\uB4DC\uAC00 \uC5C6\uC73C\uBBC0\uB85C \uD544\uC694\uD558\uC9C0 \uC54A\uC9C0\uB9CC, \uD50C\uB798\uADF8\uB97C True\uB85C \uC124\uC815\uD569\uB2C8\uB2E4.</span>
config = BertConfig(
    vocab_size_or_config_json_file=<span class="hljs-number">32000</span>,
    hidden_size=<span class="hljs-number">768</span>,
    num_hidden_layers=<span class="hljs-number">12</span>,
    num_attention_heads=<span class="hljs-number">12</span>,
    intermediate_size=<span class="hljs-number">3072</span>,
    torchscript=<span class="hljs-literal">True</span>,
)

<span class="hljs-comment"># \uBAA8\uB378\uC744 \uC778\uC2A4\uD134\uD2B8\uD654\uD558\uAE30</span>
model = BertModel(config)

<span class="hljs-comment"># \uBAA8\uB378\uC744 \uD3C9\uAC00 \uBAA8\uB4DC\uB85C \uB450\uC5B4\uC57C \uD569\uB2C8\uB2E4.</span>
model.<span class="hljs-built_in">eval</span>()

<span class="hljs-comment"># \uB9CC\uC57D *from_pretrained*\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD558\uB294 \uACBD\uC6B0, TorchScript \uD50C\uB798\uADF8\uB97C \uC27D\uAC8C \uC124\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4</span>
model = BertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>, torchscript=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># \uCD94\uC801 \uC0DD\uC131\uD558\uAE30</span>
traced_model = torch.jit.trace(model, [tokens_tensor, segments_tensors])
torch.jit.save(traced_model, <span class="hljs-string">&quot;traced_bert.pt&quot;</span>)`}}),we=new P({}),Se=new ct({props:{code:`loaded_model = torch.jit.load("traced_bert.pt")
loaded_model.eval()

all_encoder_layers, pooled_output = loaded_model(*dummy_input)`,highlighted:`loaded_model = torch.jit.load(<span class="hljs-string">&quot;traced_bert.pt&quot;</span>)
loaded_model.<span class="hljs-built_in">eval</span>()

all_encoder_layers, pooled_output = loaded_model(*dummy_input)`}}),ye=new P({}),be=new ct({props:{code:"traced_model(tokens_tensor, segments_tensors)",highlighted:"traced_model(tokens_tensor, segments_tensors)"}}),Ae=new P({}),xe=new P({}),ze=new P({}),He=new P({}),Ke=new ct({props:{code:`from transformers import BertModel, BertTokenizer, BertConfig
import torch
import torch.neuron`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertModel, BertTokenizer, BertConfig
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> torch.neuron`}}),qe=new ct({props:{code:`- torch.jit.trace(model, [tokens_tensor, segments_tensors])
+ torch.neuron.trace(model, [token_tensor, segments_tensors])`,highlighted:`<span class="hljs-deletion">- torch.jit.trace(model, [tokens_tensor, segments_tensors])</span>
<span class="hljs-addition">+ torch.neuron.trace(model, [token_tensor, segments_tensors])</span>`}}),{c(){$=o("meta"),R=h(),w=o("h1"),S=o("a"),ht=o("span"),d(pe.$$.fragment),po=h(),ft=o("span"),co=n("TorchScript\uB85C \uB0B4\uBCF4\uB0B4\uAE30"),or=h(),d(F.$$.fragment),sr=h(),ce=o("p"),he=o("a"),ho=n("TorchScript \uBB38\uC11C"),fo=n("\uC5D0\uC11C\uB294 \uC774\uB807\uAC8C \uB9D0\uD569\uB2C8\uB2E4."),lr=h(),Ge=o("blockquote"),dt=o("p"),mo=n("TorchScript\uB294 PyTorch \uCF54\uB4DC\uC5D0\uC11C \uC9C1\uB82C\uD654 \uBC0F \uCD5C\uC801\uD654 \uAC00\uB2A5\uD55C \uBAA8\uB378\uC744 \uC0DD\uC131\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4."),nr=h(),fe=o("p"),de=o("a"),uo=n("JIT\uACFC TRACE"),_o=n("\uB294 \uAC1C\uBC1C\uC790\uAC00 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uC11C \uD6A8\uC728 \uC9C0\uD5A5\uC801\uC778 C++ \uD504\uB85C\uADF8\uB7A8\uACFC \uAC19\uC740 \uB2E4\uB978 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 PyTorch \uBAA8\uB4C8\uC785\uB2C8\uB2E4."),ar=h(),Qe=o("p"),vo=n(`PyTorch \uAE30\uBC18 Python \uD504\uB85C\uADF8\uB7A8\uACFC \uB2E4\uB978 \uD658\uACBD\uC5D0\uC11C \uBAA8\uB378\uC744 \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D, \u{1F917} Transformers \uBAA8\uB378\uC744 TorchScript\uB85C \uB0B4\uBCF4\uB0BC \uC218 \uC788\uB294 \uC778\uD130\uD398\uC774\uC2A4\uB97C \uC81C\uACF5\uD569\uB2C8\uB2E4.
\uC774 \uBB38\uC11C\uC5D0\uC11C\uB294 TorchScript\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uACE0 \uC0AC\uC6A9\uD558\uB294 \uBC29\uBC95\uC744 \uC124\uBA85\uD569\uB2C8\uB2E4.`),ir=h(),Ve=o("p"),Eo=n("\uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uB824\uBA74 \uB450 \uAC00\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4:"),pr=h(),J=o("ul"),Xe=o("li"),mt=o("code"),$o=n("torchscript"),wo=n(" \uD50C\uB798\uADF8\uB85C \uBAA8\uB378 \uC778\uC2A4\uD134\uC2A4\uD654"),So=h(),ut=o("li"),yo=n("\uB354\uBBF8 \uC785\uB825\uC744 \uC0AC\uC6A9\uD55C \uC21C\uC804\uD30C(forward pass)"),cr=h(),Ye=o("p"),ko=n("\uC774 \uD544\uC218 \uC870\uAC74\uB4E4\uC740 \uC544\uB798\uC5D0 \uC790\uC138\uD788 \uC124\uBA85\uB41C \uAC83\uCC98\uB7FC \uAC1C\uBC1C\uC790\uB4E4\uC774 \uC8FC\uC758\uD574\uC57C \uD560 \uC5EC\uB7EC \uC0AC\uD56D\uB4E4\uC744 \uC758\uBBF8\uD569\uB2C8\uB2E4."),hr=h(),B=o("h2"),U=o("a"),_t=o("span"),d(me.$$.fragment),bo=h(),vt=o("span"),Ao=n("TorchScript \uD50C\uB798\uADF8\uC640 \uBB36\uC778 \uAC00\uC911\uCE58(tied weights)"),fr=h(),A=o("p"),Et=o("code"),To=n("torchscript"),go=n(" \uD50C\uB798\uADF8\uAC00 \uD544\uC694\uD55C \uC774\uC720\uB294 \uB300\uBD80\uBD84\uC758 \u{1F917} Transformers \uC5B8\uC5B4 \uBAA8\uB378\uC5D0\uC11C "),$t=o("code"),Po=n("Embedding"),jo=n(" \uB808\uC774\uC5B4\uC640 "),wt=o("code"),No=n("Decoding"),xo=n(` \uB808\uC774\uC5B4 \uAC04\uC758 \uBB36\uC778 \uAC00\uC911\uCE58(tied weights)\uAC00 \uC874\uC7AC\uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.
TorchScript\uB294 \uBB36\uC778 \uAC00\uC911\uCE58\uB97C \uAC00\uC9C4 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0BC \uC218 \uC5C6\uC73C\uBBC0\uB85C, \uBBF8\uB9AC \uAC00\uC911\uCE58\uB97C \uD480\uACE0 \uBCF5\uC81C\uD574\uC57C \uD569\uB2C8\uB2E4.`),dr=h(),T=o("p"),St=o("code"),Bo=n("torchscript"),Do=n(" \uD50C\uB798\uADF8\uB85C \uC778\uC2A4\uD134\uC2A4\uD654\uB41C \uBAA8\uB378\uC740 "),yt=o("code"),Co=n("Embedding"),Io=n(" \uB808\uC774\uC5B4\uC640 "),kt=o("code"),Mo=n("Decoding"),zo=n(` \uB808\uC774\uC5B4\uAC00 \uBD84\uB9AC\uB418\uC5B4 \uC788\uC73C\uBBC0\uB85C \uC774\uD6C4\uC5D0 \uD6C8\uB828\uD574\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4.
\uD6C8\uB828\uC744 \uD558\uAC8C \uB418\uBA74 \uB450 \uB808\uC774\uC5B4 \uAC04 \uB3D9\uAE30\uD654\uAC00 \uD574\uC81C\uB418\uC5B4 \uC608\uC0C1\uCE58 \uBABB\uD55C \uACB0\uACFC\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`),mr=h(),G=o("p"),Wo=n(`\uC5B8\uC5B4 \uBAA8\uB378 \uD5E4\uB4DC\uB97C \uAC16\uC9C0 \uC54A\uC740 \uBAA8\uB378\uC740 \uAC00\uC911\uCE58\uAC00 \uBB36\uC5EC \uC788\uC9C0 \uC54A\uC544\uC11C \uC774 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uBAA8\uB378\uB4E4\uC740 `),bt=o("code"),Oo=n("torchscript"),Ho=n(" \uD50C\uB798\uADF8 \uC5C6\uC774 \uC548\uC804\uD558\uAC8C \uB0B4\uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ur=h(),D=o("h2"),Q=o("a"),At=o("span"),d(ue.$$.fragment),Ko=h(),Tt=o("span"),qo=n("\uB354\uBBF8 \uC785\uB825\uACFC \uD45C\uC900 \uAE38\uC774"),_r=h(),V=o("p"),Lo=n(`\uB354\uBBF8 \uC785\uB825(dummy inputs)\uC740 \uBAA8\uB378\uC758 \uC21C\uC804\uD30C(forward pass)\uC5D0 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.
\uC785\uB825 \uAC12\uC774 \uB808\uC774\uC5B4\uB97C \uD1B5\uD574 \uC804\uD30C\uB418\uB294 \uB3D9\uC548, PyTorch\uB294 \uAC01 \uD150\uC11C\uC5D0\uC11C \uC2E4\uD589\uB41C \uB2E4\uB978 \uC5F0\uC0B0\uC744 \uCD94\uC801\uD569\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uAE30\uB85D\uB41C \uC5F0\uC0B0\uC740 \uBAA8\uB378\uC758 `),gt=o("em"),Ro=n("\uCD94\uC801(trace)"),Fo=n("\uC744 \uC0DD\uC131\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),vr=h(),Ze=o("p"),Jo=n(`\uCD94\uC801\uC740 \uC785\uB825\uC758 \uCC28\uC6D0\uC744 \uAE30\uC900\uC73C\uB85C \uC0DD\uC131\uB429\uB2C8\uB2E4.
\uB530\uB77C\uC11C \uB354\uBBF8 \uC785\uB825\uC758 \uCC28\uC6D0\uC5D0 \uC81C\uD55C\uB418\uC5B4, \uB2E4\uB978 \uC2DC\uD000\uC2A4 \uAE38\uC774\uB098 \uBC30\uCE58 \uD06C\uAE30\uC5D0\uC11C\uB294 \uC791\uB3D9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uB2E4\uB978 \uD06C\uAE30\uB85C \uC2DC\uB3C4\uD560 \uACBD\uC6B0 \uB2E4\uC74C\uACFC \uAC19\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD569\uB2C8\uB2E4:`),Er=h(),d(_e.$$.fragment),$r=h(),et=o("p"),Uo=n(`\uCD94\uB860 \uC911 \uBAA8\uB378\uC5D0 \uACF5\uAE09\uB420 \uAC00\uC7A5 \uD070 \uC785\uB825\uB9CC\uD07C \uD070 \uB354\uBBF8 \uC785\uB825 \uD06C\uAE30\uB85C \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.
\uD328\uB529\uC740 \uB204\uB77D\uB41C \uAC12\uC744 \uCC44\uC6B0\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uADF8\uB7EC\uB098 \uBAA8\uB378\uC774 \uB354 \uD070 \uC785\uB825 \uD06C\uAE30\uB85C \uCD94\uC801\uB418\uAE30 \uB54C\uBB38\uC5D0, \uD589\uB82C\uC758 \uCC28\uC6D0\uC774 \uCEE4\uC9C0\uACE0 \uACC4\uC0B0\uB7C9\uC774 \uB9CE\uC544\uC9D1\uB2C8\uB2E4.`),wr=h(),tt=o("p"),Go=n("\uB2E4\uC591\uD55C \uC2DC\uD000\uC2A4 \uAE38\uC774 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0BC \uB54C\uB294 \uAC01 \uC785\uB825\uC5D0 \uB300\uD574 \uC218\uD589\uB418\uB294 \uCD1D \uC5F0\uC0B0 \uD69F\uC218\uC5D0 \uC8FC\uC758\uD558\uACE0 \uC131\uB2A5\uC744 \uC8FC\uC758 \uAE4A\uAC8C \uD655\uC778\uD558\uC138\uC694."),Sr=h(),C=o("h2"),X=o("a"),Pt=o("span"),d(ve.$$.fragment),Qo=h(),jt=o("span"),Vo=n("Python\uC5D0\uC11C TorchScript \uC0AC\uC6A9\uD558\uAE30"),yr=h(),rt=o("p"),Xo=n("\uC774 \uC139\uC158\uC5D0\uC11C\uB294 \uBAA8\uB378\uC744 \uC800\uC7A5\uD558\uACE0 \uAC00\uC838\uC624\uB294 \uBC29\uBC95, \uCD94\uC801\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."),kr=h(),I=o("h3"),Y=o("a"),Nt=o("span"),d(Ee.$$.fragment),Yo=h(),xt=o("span"),Zo=n("\uBAA8\uB378 \uC800\uC7A5\uD558\uAE30"),br=h(),y=o("p"),Bt=o("code"),es=n("BertModel"),ts=n("\uC744 TorchScript\uB85C \uB0B4\uBCF4\uB0B4\uB824\uBA74 "),Dt=o("code"),rs=n("BertConfig"),os=n(" \uD074\uB798\uC2A4\uC5D0\uC11C "),Ct=o("code"),ss=n("BertModel"),ls=n("\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD55C \uB2E4\uC74C, "),It=o("code"),ns=n("traced_bert.pt"),as=n("\uB77C\uB294 \uD30C\uC77C\uBA85\uC73C\uB85C \uB514\uC2A4\uD06C\uC5D0 \uC800\uC7A5\uD558\uBA74 \uB429\uB2C8\uB2E4."),Ar=h(),d($e.$$.fragment),Tr=h(),M=o("h3"),Z=o("a"),Mt=o("span"),d(we.$$.fragment),is=h(),zt=o("span"),ps=n("\uBAA8\uB378 \uAC00\uC838\uC624\uAE30"),gr=h(),b=o("p"),cs=n("\uC774\uC81C \uC774\uC804\uC5D0 \uC800\uC7A5\uD55C "),Wt=o("code"),hs=n("BertModel"),fs=n(", \uC989 "),Ot=o("code"),ds=n("traced_bert.pt"),ms=n("\uB97C \uB514\uC2A4\uD06C\uC5D0\uC11C \uAC00\uC838\uC624\uACE0, \uC774\uC804\uC5D0 \uCD08\uAE30\uD654\uD55C "),Ht=o("code"),us=n("dummy_input"),_s=n("\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Pr=h(),d(Se.$$.fragment),jr=h(),z=o("h3"),ee=o("a"),Kt=o("span"),d(ye.$$.fragment),vs=h(),qt=o("span"),Es=n("\uCD94\uC801\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD558\uAE30"),Nr=h(),ke=o("p"),Lt=o("code"),$s=n("__call__"),ws=n(" \uC774\uC911 \uC5B8\uB354\uC2A4\uCF54\uC5B4(dunder) \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uC5D0 \uCD94\uC801\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC138\uC694:"),xr=h(),d(be.$$.fragment),Br=h(),W=o("h2"),te=o("a"),Rt=o("span"),d(Ae.$$.fragment),Ss=h(),Ft=o("span"),ys=n("Neuron SDK\uB85C Hugging Face TorchScript \uBAA8\uB378\uC744 AWS\uC5D0 \uBC30\uD3EC\uD558\uAE30"),Dr=h(),j=o("p"),ks=n("AWS\uAC00 \uD074\uB77C\uC6B0\uB4DC\uC5D0\uC11C \uC800\uBE44\uC6A9, \uACE0\uC131\uB2A5 \uBA38\uC2E0 \uB7EC\uB2DD \uCD94\uB860\uC744 \uC704\uD55C "),Te=o("a"),bs=n("Amazon EC2 Inf1"),As=n(` \uC778\uC2A4\uD134\uC2A4 \uC81C\uD488\uAD70\uC744 \uCD9C\uC2DC\uD588\uC2B5\uB2C8\uB2E4.
Inf1 \uC778\uC2A4\uD134\uC2A4\uB294 \uB525\uB7EC\uB2DD \uCD94\uB860 \uC6CC\uD06C\uB85C\uB4DC\uC5D0 \uD2B9\uD654\uB41C \uB9DE\uCDA4 \uD558\uB4DC\uC6E8\uC5B4 \uAC00\uC18D\uAE30\uC778 AWS Inferentia \uCE69\uC73C\uB85C \uAD6C\uB3D9\uB429\uB2C8\uB2E4.
`),ge=o("a"),Ts=n("AWS Neuron"),gs=n(`\uC740 Inferentia\uB97C \uC704\uD55C SDK\uB85C, Inf1\uC5D0 \uBC30\uD3EC\uD558\uAE30 \uC704\uD55C transformers \uBAA8\uB378 \uCD94\uC801 \uBC0F \uCD5C\uC801\uD654\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4.
Neuron SDK\uB294 \uB2E4\uC74C\uACFC \uAC19\uC740 \uAE30\uB2A5\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4:`),Cr=h(),N=o("ol"),Jt=o("li"),Ps=n("\uCF54\uB4DC \uD55C \uC904\uB9CC \uBCC0\uACBD\uD558\uBA74 \uD074\uB77C\uC6B0\uB4DC \uCD94\uB860\uB97C \uC704\uD574 TorchScript \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uACE0 \uCD5C\uC801\uD654\uD560 \uC218 \uC788\uB294 \uC26C\uC6B4 API"),js=h(),ot=o("li"),Ns=n("\uC989\uC2DC \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC131\uB2A5 \uCD5C\uC801\uD654\uB85C "),Pe=o("a"),xs=n("\uBE44\uC6A9 \uD6A8\uC728 \uD5A5\uC0C1"),Bs=h(),re=o("li"),je=o("a"),Ds=n("PyTorch"),Cs=n(" \uB610\uB294 "),Ne=o("a"),Is=n("TensorFlow"),Ms=n("\uB85C \uAD6C\uCD95\uB41C Hugging Face transformers \uBAA8\uB378 \uC9C0\uC6D0"),Ir=h(),O=o("h3"),oe=o("a"),Ut=o("span"),d(xe.$$.fragment),zs=h(),Gt=o("span"),Ws=n("\uC2DC\uC0AC\uC810"),Mr=h(),k=o("p"),Be=o("a"),Os=n("BERT (Bidirectional Encoder Representations from Transformers)"),Hs=n(" \uC544\uD0A4\uD14D\uCC98 \uB610\uB294 \uADF8 \uBCC0\uD615\uC778 "),De=o("a"),Ks=n("distilBERT"),qs=n(" \uBC0F "),Ce=o("a"),Ls=n("roBERTa"),Rs=n(`\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C Transformers \uBAA8\uB378\uC740 \uCD94\uCD9C \uAE30\uBC18 \uC9C8\uC758\uC751\uB2F5, \uC2DC\uD000\uC2A4 \uBD84\uB958 \uBC0F \uD1A0\uD070 \uBD84\uB958\uC640 \uAC19\uC740 \uBE44\uC0DD\uC131 \uC791\uC5C5 \uC2DC Inf1\uC5D0\uC11C \uCD5C\uC0C1\uC758 \uC131\uB2A5\uC744 \uBCF4\uC785\uB2C8\uB2E4.
\uADF8\uB7EC\uB098 \uD14D\uC2A4\uD2B8 \uC0DD\uC131 \uC791\uC5C5\uB3C4 `),Ie=o("a"),Fs=n("AWS Neuron MarianMT \uD29C\uD1A0\uB9AC\uC5BC"),Js=n("\uC744 \uB530\uB77C Inf1\uC5D0\uC11C \uC2E4\uD589\uB418\uB3C4\uB85D \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),zr=h(),se=o("p"),Us=n("Inferentia\uC5D0\uC11C \uBC14\uB85C \uBCC0\uD658\uD560 \uC218 \uC788\uB294 \uBAA8\uB378\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uC815\uBCF4\uB294 Neuron \uBB38\uC11C\uC758 "),Me=o("a"),Gs=n("Model Architecture Fit"),Qs=n(" \uC139\uC158\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Wr=h(),H=o("h3"),le=o("a"),Qt=o("span"),d(ze.$$.fragment),Vs=h(),Vt=o("span"),Xs=n("\uC885\uC18D\uC131"),Or=h(),x=o("p"),Ys=n("AWS Neuron\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uBCC0\uD658\uD558\uB824\uBA74 "),We=o("a"),Zs=n("Neuron SDK \uD658\uACBD"),el=n(`\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
\uC774\uB294 `),Oe=o("a"),tl=n("AWS Deep Learning AMI"),rl=n("\uC5D0 \uBBF8\uB9AC \uAD6C\uC131\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),Hr=h(),K=o("h3"),ne=o("a"),Xt=o("span"),d(He.$$.fragment),ol=h(),Yt=o("span"),sl=n("AWS Neuron\uC73C\uB85C \uBAA8\uB378 \uBCC0\uD658\uD558\uAE30"),Kr=h(),g=o("p"),Zt=o("code"),ll=n("BertModel"),nl=n("\uC744 \uCD94\uC801\uD558\uB824\uBA74, "),st=o("a"),al=n("Python\uC5D0\uC11C TorchScript \uC0AC\uC6A9\uD558\uAE30"),il=n(`\uC5D0\uC11C\uC640 \uB3D9\uC77C\uD55C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD574\uC11C AWS NEURON\uC6A9 \uBAA8\uB378\uC744 \uBCC0\uD658\uD569\uB2C8\uB2E4.
`),er=o("code"),pl=n("torch.neuron"),cl=n(" \uD504\uB808\uC784\uC6CC\uD06C \uC775\uC2A4\uD150\uC158\uC744 \uAC00\uC838\uC640 Python API\uB97C \uD1B5\uD574 Neuron SDK\uC758 \uAD6C\uC131 \uC694\uC18C\uC5D0 \uC811\uADFC\uD569\uB2C8\uB2E4:"),qr=h(),d(Ke.$$.fragment),Lr=h(),lt=o("p"),hl=n("\uB2E4\uC74C \uC904\uB9CC \uC218\uC815\uD558\uBA74 \uB429\uB2C8\uB2E4:"),Rr=h(),d(qe.$$.fragment),Fr=h(),nt=o("p"),fl=n("\uC774\uB85C\uC368 Neuron SDK\uAC00 \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uACE0 Inf1 \uC778\uC2A4\uD134\uC2A4\uC5D0 \uCD5C\uC801\uD654\uD560 \uC218 \uC788\uAC8C \uB429\uB2C8\uB2E4."),Jr=h(),ae=o("p"),dl=n("AWS Neuron SDK\uC758 \uAE30\uB2A5, \uB3C4\uAD6C, \uC608\uC81C \uD29C\uD1A0\uB9AC\uC5BC \uBC0F \uCD5C\uC2E0 \uC5C5\uB370\uC774\uD2B8\uC5D0 \uB300\uD574 \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uB824\uBA74 "),Le=o("a"),ml=n("AWS NeuronSDK \uBB38\uC11C"),ul=n("\uB97C \uCC38\uC870\uD558\uC138\uC694."),this.h()},l(e){const i=Yn('[data-svelte="svelte-1phssyn"]',document.head);$=s(i,"META",{name:!0,content:!0}),i.forEach(t),R=f(e),w=s(e,"H1",{class:!0});var Re=l(w);S=s(Re,"A",{id:!0,class:!0,href:!0});var Sl=l(S);ht=s(Sl,"SPAN",{});var yl=l(ht);m(pe.$$.fragment,yl),yl.forEach(t),Sl.forEach(t),po=f(Re),ft=s(Re,"SPAN",{});var kl=l(ft);co=a(kl,"TorchScript\uB85C \uB0B4\uBCF4\uB0B4\uAE30"),kl.forEach(t),Re.forEach(t),or=f(e),m(F.$$.fragment,e),sr=f(e),ce=s(e,"P",{});var _l=l(ce);he=s(_l,"A",{href:!0,rel:!0});var bl=l(he);ho=a(bl,"TorchScript \uBB38\uC11C"),bl.forEach(t),fo=a(_l,"\uC5D0\uC11C\uB294 \uC774\uB807\uAC8C \uB9D0\uD569\uB2C8\uB2E4."),_l.forEach(t),lr=f(e),Ge=s(e,"BLOCKQUOTE",{});var Al=l(Ge);dt=s(Al,"P",{});var Tl=l(dt);mo=a(Tl,"TorchScript\uB294 PyTorch \uCF54\uB4DC\uC5D0\uC11C \uC9C1\uB82C\uD654 \uBC0F \uCD5C\uC801\uD654 \uAC00\uB2A5\uD55C \uBAA8\uB378\uC744 \uC0DD\uC131\uD558\uB294 \uBC29\uBC95\uC785\uB2C8\uB2E4."),Tl.forEach(t),Al.forEach(t),nr=f(e),fe=s(e,"P",{});var vl=l(fe);de=s(vl,"A",{href:!0,rel:!0});var gl=l(de);uo=a(gl,"JIT\uACFC TRACE"),gl.forEach(t),_o=a(vl,"\uB294 \uAC1C\uBC1C\uC790\uAC00 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uC11C \uD6A8\uC728 \uC9C0\uD5A5\uC801\uC778 C++ \uD504\uB85C\uADF8\uB7A8\uACFC \uAC19\uC740 \uB2E4\uB978 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 PyTorch \uBAA8\uB4C8\uC785\uB2C8\uB2E4."),vl.forEach(t),ar=f(e),Qe=s(e,"P",{});var Pl=l(Qe);vo=a(Pl,`PyTorch \uAE30\uBC18 Python \uD504\uB85C\uADF8\uB7A8\uACFC \uB2E4\uB978 \uD658\uACBD\uC5D0\uC11C \uBAA8\uB378\uC744 \uC7AC\uC0AC\uC6A9\uD560 \uC218 \uC788\uB3C4\uB85D, \u{1F917} Transformers \uBAA8\uB378\uC744 TorchScript\uB85C \uB0B4\uBCF4\uB0BC \uC218 \uC788\uB294 \uC778\uD130\uD398\uC774\uC2A4\uB97C \uC81C\uACF5\uD569\uB2C8\uB2E4.
\uC774 \uBB38\uC11C\uC5D0\uC11C\uB294 TorchScript\uB97C \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uACE0 \uC0AC\uC6A9\uD558\uB294 \uBC29\uBC95\uC744 \uC124\uBA85\uD569\uB2C8\uB2E4.`),Pl.forEach(t),ir=f(e),Ve=s(e,"P",{});var jl=l(Ve);Eo=a(jl,"\uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0B4\uB824\uBA74 \uB450 \uAC00\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4:"),jl.forEach(t),pr=f(e),J=s(e,"UL",{});var Gr=l(J);Xe=s(Gr,"LI",{});var El=l(Xe);mt=s(El,"CODE",{});var Nl=l(mt);$o=a(Nl,"torchscript"),Nl.forEach(t),wo=a(El," \uD50C\uB798\uADF8\uB85C \uBAA8\uB378 \uC778\uC2A4\uD134\uC2A4\uD654"),El.forEach(t),So=f(Gr),ut=s(Gr,"LI",{});var xl=l(ut);yo=a(xl,"\uB354\uBBF8 \uC785\uB825\uC744 \uC0AC\uC6A9\uD55C \uC21C\uC804\uD30C(forward pass)"),xl.forEach(t),Gr.forEach(t),cr=f(e),Ye=s(e,"P",{});var Bl=l(Ye);ko=a(Bl,"\uC774 \uD544\uC218 \uC870\uAC74\uB4E4\uC740 \uC544\uB798\uC5D0 \uC790\uC138\uD788 \uC124\uBA85\uB41C \uAC83\uCC98\uB7FC \uAC1C\uBC1C\uC790\uB4E4\uC774 \uC8FC\uC758\uD574\uC57C \uD560 \uC5EC\uB7EC \uC0AC\uD56D\uB4E4\uC744 \uC758\uBBF8\uD569\uB2C8\uB2E4."),Bl.forEach(t),hr=f(e),B=s(e,"H2",{class:!0});var Qr=l(B);U=s(Qr,"A",{id:!0,class:!0,href:!0});var Dl=l(U);_t=s(Dl,"SPAN",{});var Cl=l(_t);m(me.$$.fragment,Cl),Cl.forEach(t),Dl.forEach(t),bo=f(Qr),vt=s(Qr,"SPAN",{});var Il=l(vt);Ao=a(Il,"TorchScript \uD50C\uB798\uADF8\uC640 \uBB36\uC778 \uAC00\uC911\uCE58(tied weights)"),Il.forEach(t),Qr.forEach(t),fr=f(e),A=s(e,"P",{});var Fe=l(A);Et=s(Fe,"CODE",{});var Ml=l(Et);To=a(Ml,"torchscript"),Ml.forEach(t),go=a(Fe," \uD50C\uB798\uADF8\uAC00 \uD544\uC694\uD55C \uC774\uC720\uB294 \uB300\uBD80\uBD84\uC758 \u{1F917} Transformers \uC5B8\uC5B4 \uBAA8\uB378\uC5D0\uC11C "),$t=s(Fe,"CODE",{});var zl=l($t);Po=a(zl,"Embedding"),zl.forEach(t),jo=a(Fe," \uB808\uC774\uC5B4\uC640 "),wt=s(Fe,"CODE",{});var Wl=l(wt);No=a(Wl,"Decoding"),Wl.forEach(t),xo=a(Fe,` \uB808\uC774\uC5B4 \uAC04\uC758 \uBB36\uC778 \uAC00\uC911\uCE58(tied weights)\uAC00 \uC874\uC7AC\uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.
TorchScript\uB294 \uBB36\uC778 \uAC00\uC911\uCE58\uB97C \uAC00\uC9C4 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0BC \uC218 \uC5C6\uC73C\uBBC0\uB85C, \uBBF8\uB9AC \uAC00\uC911\uCE58\uB97C \uD480\uACE0 \uBCF5\uC81C\uD574\uC57C \uD569\uB2C8\uB2E4.`),Fe.forEach(t),dr=f(e),T=s(e,"P",{});var Je=l(T);St=s(Je,"CODE",{});var Ol=l(St);Bo=a(Ol,"torchscript"),Ol.forEach(t),Do=a(Je," \uD50C\uB798\uADF8\uB85C \uC778\uC2A4\uD134\uC2A4\uD654\uB41C \uBAA8\uB378\uC740 "),yt=s(Je,"CODE",{});var Hl=l(yt);Co=a(Hl,"Embedding"),Hl.forEach(t),Io=a(Je," \uB808\uC774\uC5B4\uC640 "),kt=s(Je,"CODE",{});var Kl=l(kt);Mo=a(Kl,"Decoding"),Kl.forEach(t),zo=a(Je,` \uB808\uC774\uC5B4\uAC00 \uBD84\uB9AC\uB418\uC5B4 \uC788\uC73C\uBBC0\uB85C \uC774\uD6C4\uC5D0 \uD6C8\uB828\uD574\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4.
\uD6C8\uB828\uC744 \uD558\uAC8C \uB418\uBA74 \uB450 \uB808\uC774\uC5B4 \uAC04 \uB3D9\uAE30\uD654\uAC00 \uD574\uC81C\uB418\uC5B4 \uC608\uC0C1\uCE58 \uBABB\uD55C \uACB0\uACFC\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`),Je.forEach(t),mr=f(e),G=s(e,"P",{});var Vr=l(G);Wo=a(Vr,`\uC5B8\uC5B4 \uBAA8\uB378 \uD5E4\uB4DC\uB97C \uAC16\uC9C0 \uC54A\uC740 \uBAA8\uB378\uC740 \uAC00\uC911\uCE58\uAC00 \uBB36\uC5EC \uC788\uC9C0 \uC54A\uC544\uC11C \uC774 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uBAA8\uB378\uB4E4\uC740 `),bt=s(Vr,"CODE",{});var ql=l(bt);Oo=a(ql,"torchscript"),ql.forEach(t),Ho=a(Vr," \uD50C\uB798\uADF8 \uC5C6\uC774 \uC548\uC804\uD558\uAC8C \uB0B4\uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Vr.forEach(t),ur=f(e),D=s(e,"H2",{class:!0});var Xr=l(D);Q=s(Xr,"A",{id:!0,class:!0,href:!0});var Ll=l(Q);At=s(Ll,"SPAN",{});var Rl=l(At);m(ue.$$.fragment,Rl),Rl.forEach(t),Ll.forEach(t),Ko=f(Xr),Tt=s(Xr,"SPAN",{});var Fl=l(Tt);qo=a(Fl,"\uB354\uBBF8 \uC785\uB825\uACFC \uD45C\uC900 \uAE38\uC774"),Fl.forEach(t),Xr.forEach(t),_r=f(e),V=s(e,"P",{});var Yr=l(V);Lo=a(Yr,`\uB354\uBBF8 \uC785\uB825(dummy inputs)\uC740 \uBAA8\uB378\uC758 \uC21C\uC804\uD30C(forward pass)\uC5D0 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.
\uC785\uB825 \uAC12\uC774 \uB808\uC774\uC5B4\uB97C \uD1B5\uD574 \uC804\uD30C\uB418\uB294 \uB3D9\uC548, PyTorch\uB294 \uAC01 \uD150\uC11C\uC5D0\uC11C \uC2E4\uD589\uB41C \uB2E4\uB978 \uC5F0\uC0B0\uC744 \uCD94\uC801\uD569\uB2C8\uB2E4.
\uC774\uB7EC\uD55C \uAE30\uB85D\uB41C \uC5F0\uC0B0\uC740 \uBAA8\uB378\uC758 `),gt=s(Yr,"EM",{});var Jl=l(gt);Ro=a(Jl,"\uCD94\uC801(trace)"),Jl.forEach(t),Fo=a(Yr,"\uC744 \uC0DD\uC131\uD558\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),Yr.forEach(t),vr=f(e),Ze=s(e,"P",{});var Ul=l(Ze);Jo=a(Ul,`\uCD94\uC801\uC740 \uC785\uB825\uC758 \uCC28\uC6D0\uC744 \uAE30\uC900\uC73C\uB85C \uC0DD\uC131\uB429\uB2C8\uB2E4.
\uB530\uB77C\uC11C \uB354\uBBF8 \uC785\uB825\uC758 \uCC28\uC6D0\uC5D0 \uC81C\uD55C\uB418\uC5B4, \uB2E4\uB978 \uC2DC\uD000\uC2A4 \uAE38\uC774\uB098 \uBC30\uCE58 \uD06C\uAE30\uC5D0\uC11C\uB294 \uC791\uB3D9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
\uB2E4\uB978 \uD06C\uAE30\uB85C \uC2DC\uB3C4\uD560 \uACBD\uC6B0 \uB2E4\uC74C\uACFC \uAC19\uC740 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD569\uB2C8\uB2E4:`),Ul.forEach(t),Er=f(e),m(_e.$$.fragment,e),$r=f(e),et=s(e,"P",{});var Gl=l(et);Uo=a(Gl,`\uCD94\uB860 \uC911 \uBAA8\uB378\uC5D0 \uACF5\uAE09\uB420 \uAC00\uC7A5 \uD070 \uC785\uB825\uB9CC\uD07C \uD070 \uB354\uBBF8 \uC785\uB825 \uD06C\uAE30\uB85C \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.
\uD328\uB529\uC740 \uB204\uB77D\uB41C \uAC12\uC744 \uCC44\uC6B0\uB294 \uB370 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
\uADF8\uB7EC\uB098 \uBAA8\uB378\uC774 \uB354 \uD070 \uC785\uB825 \uD06C\uAE30\uB85C \uCD94\uC801\uB418\uAE30 \uB54C\uBB38\uC5D0, \uD589\uB82C\uC758 \uCC28\uC6D0\uC774 \uCEE4\uC9C0\uACE0 \uACC4\uC0B0\uB7C9\uC774 \uB9CE\uC544\uC9D1\uB2C8\uB2E4.`),Gl.forEach(t),wr=f(e),tt=s(e,"P",{});var Ql=l(tt);Go=a(Ql,"\uB2E4\uC591\uD55C \uC2DC\uD000\uC2A4 \uAE38\uC774 \uBAA8\uB378\uC744 \uB0B4\uBCF4\uB0BC \uB54C\uB294 \uAC01 \uC785\uB825\uC5D0 \uB300\uD574 \uC218\uD589\uB418\uB294 \uCD1D \uC5F0\uC0B0 \uD69F\uC218\uC5D0 \uC8FC\uC758\uD558\uACE0 \uC131\uB2A5\uC744 \uC8FC\uC758 \uAE4A\uAC8C \uD655\uC778\uD558\uC138\uC694."),Ql.forEach(t),Sr=f(e),C=s(e,"H2",{class:!0});var Zr=l(C);X=s(Zr,"A",{id:!0,class:!0,href:!0});var Vl=l(X);Pt=s(Vl,"SPAN",{});var Xl=l(Pt);m(ve.$$.fragment,Xl),Xl.forEach(t),Vl.forEach(t),Qo=f(Zr),jt=s(Zr,"SPAN",{});var Yl=l(jt);Vo=a(Yl,"Python\uC5D0\uC11C TorchScript \uC0AC\uC6A9\uD558\uAE30"),Yl.forEach(t),Zr.forEach(t),yr=f(e),rt=s(e,"P",{});var Zl=l(rt);Xo=a(Zl,"\uC774 \uC139\uC158\uC5D0\uC11C\uB294 \uBAA8\uB378\uC744 \uC800\uC7A5\uD558\uACE0 \uAC00\uC838\uC624\uB294 \uBC29\uBC95, \uCD94\uC801\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD558\uB294 \uBC29\uBC95\uC744 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4."),Zl.forEach(t),kr=f(e),I=s(e,"H3",{class:!0});var eo=l(I);Y=s(eo,"A",{id:!0,class:!0,href:!0});var en=l(Y);Nt=s(en,"SPAN",{});var tn=l(Nt);m(Ee.$$.fragment,tn),tn.forEach(t),en.forEach(t),Yo=f(eo),xt=s(eo,"SPAN",{});var rn=l(xt);Zo=a(rn,"\uBAA8\uB378 \uC800\uC7A5\uD558\uAE30"),rn.forEach(t),eo.forEach(t),br=f(e),y=s(e,"P",{});var q=l(y);Bt=s(q,"CODE",{});var on=l(Bt);es=a(on,"BertModel"),on.forEach(t),ts=a(q,"\uC744 TorchScript\uB85C \uB0B4\uBCF4\uB0B4\uB824\uBA74 "),Dt=s(q,"CODE",{});var sn=l(Dt);rs=a(sn,"BertConfig"),sn.forEach(t),os=a(q," \uD074\uB798\uC2A4\uC5D0\uC11C "),Ct=s(q,"CODE",{});var ln=l(Ct);ss=a(ln,"BertModel"),ln.forEach(t),ls=a(q,"\uC744 \uC778\uC2A4\uD134\uC2A4\uD654\uD55C \uB2E4\uC74C, "),It=s(q,"CODE",{});var nn=l(It);ns=a(nn,"traced_bert.pt"),nn.forEach(t),as=a(q,"\uB77C\uB294 \uD30C\uC77C\uBA85\uC73C\uB85C \uB514\uC2A4\uD06C\uC5D0 \uC800\uC7A5\uD558\uBA74 \uB429\uB2C8\uB2E4."),q.forEach(t),Ar=f(e),m($e.$$.fragment,e),Tr=f(e),M=s(e,"H3",{class:!0});var to=l(M);Z=s(to,"A",{id:!0,class:!0,href:!0});var an=l(Z);Mt=s(an,"SPAN",{});var pn=l(Mt);m(we.$$.fragment,pn),pn.forEach(t),an.forEach(t),is=f(to),zt=s(to,"SPAN",{});var cn=l(zt);ps=a(cn,"\uBAA8\uB378 \uAC00\uC838\uC624\uAE30"),cn.forEach(t),to.forEach(t),gr=f(e),b=s(e,"P",{});var ie=l(b);cs=a(ie,"\uC774\uC81C \uC774\uC804\uC5D0 \uC800\uC7A5\uD55C "),Wt=s(ie,"CODE",{});var hn=l(Wt);hs=a(hn,"BertModel"),hn.forEach(t),fs=a(ie,", \uC989 "),Ot=s(ie,"CODE",{});var fn=l(Ot);ds=a(fn,"traced_bert.pt"),fn.forEach(t),ms=a(ie,"\uB97C \uB514\uC2A4\uD06C\uC5D0\uC11C \uAC00\uC838\uC624\uACE0, \uC774\uC804\uC5D0 \uCD08\uAE30\uD654\uD55C "),Ht=s(ie,"CODE",{});var dn=l(Ht);us=a(dn,"dummy_input"),dn.forEach(t),_s=a(ie,"\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),ie.forEach(t),Pr=f(e),m(Se.$$.fragment,e),jr=f(e),z=s(e,"H3",{class:!0});var ro=l(z);ee=s(ro,"A",{id:!0,class:!0,href:!0});var mn=l(ee);Kt=s(mn,"SPAN",{});var un=l(Kt);m(ye.$$.fragment,un),un.forEach(t),mn.forEach(t),vs=f(ro),qt=s(ro,"SPAN",{});var _n=l(qt);Es=a(_n,"\uCD94\uC801\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD558\uAE30"),_n.forEach(t),ro.forEach(t),Nr=f(e),ke=s(e,"P",{});var $l=l(ke);Lt=s($l,"CODE",{});var vn=l(Lt);$s=a(vn,"__call__"),vn.forEach(t),ws=a($l," \uC774\uC911 \uC5B8\uB354\uC2A4\uCF54\uC5B4(dunder) \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uC5D0 \uCD94\uC801\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC138\uC694:"),$l.forEach(t),xr=f(e),m(be.$$.fragment,e),Br=f(e),W=s(e,"H2",{class:!0});var oo=l(W);te=s(oo,"A",{id:!0,class:!0,href:!0});var En=l(te);Rt=s(En,"SPAN",{});var $n=l(Rt);m(Ae.$$.fragment,$n),$n.forEach(t),En.forEach(t),Ss=f(oo),Ft=s(oo,"SPAN",{});var wn=l(Ft);ys=a(wn,"Neuron SDK\uB85C Hugging Face TorchScript \uBAA8\uB378\uC744 AWS\uC5D0 \uBC30\uD3EC\uD558\uAE30"),wn.forEach(t),oo.forEach(t),Dr=f(e),j=s(e,"P",{});var at=l(j);ks=a(at,"AWS\uAC00 \uD074\uB77C\uC6B0\uB4DC\uC5D0\uC11C \uC800\uBE44\uC6A9, \uACE0\uC131\uB2A5 \uBA38\uC2E0 \uB7EC\uB2DD \uCD94\uB860\uC744 \uC704\uD55C "),Te=s(at,"A",{href:!0,rel:!0});var Sn=l(Te);bs=a(Sn,"Amazon EC2 Inf1"),Sn.forEach(t),As=a(at,` \uC778\uC2A4\uD134\uC2A4 \uC81C\uD488\uAD70\uC744 \uCD9C\uC2DC\uD588\uC2B5\uB2C8\uB2E4.
Inf1 \uC778\uC2A4\uD134\uC2A4\uB294 \uB525\uB7EC\uB2DD \uCD94\uB860 \uC6CC\uD06C\uB85C\uB4DC\uC5D0 \uD2B9\uD654\uB41C \uB9DE\uCDA4 \uD558\uB4DC\uC6E8\uC5B4 \uAC00\uC18D\uAE30\uC778 AWS Inferentia \uCE69\uC73C\uB85C \uAD6C\uB3D9\uB429\uB2C8\uB2E4.
`),ge=s(at,"A",{href:!0,rel:!0});var yn=l(ge);Ts=a(yn,"AWS Neuron"),yn.forEach(t),gs=a(at,`\uC740 Inferentia\uB97C \uC704\uD55C SDK\uB85C, Inf1\uC5D0 \uBC30\uD3EC\uD558\uAE30 \uC704\uD55C transformers \uBAA8\uB378 \uCD94\uC801 \uBC0F \uCD5C\uC801\uD654\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4.
Neuron SDK\uB294 \uB2E4\uC74C\uACFC \uAC19\uC740 \uAE30\uB2A5\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4:`),at.forEach(t),Cr=f(e),N=s(e,"OL",{});var it=l(N);Jt=s(it,"LI",{});var kn=l(Jt);Ps=a(kn,"\uCF54\uB4DC \uD55C \uC904\uB9CC \uBCC0\uACBD\uD558\uBA74 \uD074\uB77C\uC6B0\uB4DC \uCD94\uB860\uB97C \uC704\uD574 TorchScript \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uACE0 \uCD5C\uC801\uD654\uD560 \uC218 \uC788\uB294 \uC26C\uC6B4 API"),kn.forEach(t),js=f(it),ot=s(it,"LI",{});var wl=l(ot);Ns=a(wl,"\uC989\uC2DC \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC131\uB2A5 \uCD5C\uC801\uD654\uB85C "),Pe=s(wl,"A",{href:!0,rel:!0});var bn=l(Pe);xs=a(bn,"\uBE44\uC6A9 \uD6A8\uC728 \uD5A5\uC0C1"),bn.forEach(t),wl.forEach(t),Bs=f(it),re=s(it,"LI",{});var tr=l(re);je=s(tr,"A",{href:!0,rel:!0});var An=l(je);Ds=a(An,"PyTorch"),An.forEach(t),Cs=a(tr," \uB610\uB294 "),Ne=s(tr,"A",{href:!0,rel:!0});var Tn=l(Ne);Is=a(Tn,"TensorFlow"),Tn.forEach(t),Ms=a(tr,"\uB85C \uAD6C\uCD95\uB41C Hugging Face transformers \uBAA8\uB378 \uC9C0\uC6D0"),tr.forEach(t),it.forEach(t),Ir=f(e),O=s(e,"H3",{class:!0});var so=l(O);oe=s(so,"A",{id:!0,class:!0,href:!0});var gn=l(oe);Ut=s(gn,"SPAN",{});var Pn=l(Ut);m(xe.$$.fragment,Pn),Pn.forEach(t),gn.forEach(t),zs=f(so),Gt=s(so,"SPAN",{});var jn=l(Gt);Ws=a(jn,"\uC2DC\uC0AC\uC810"),jn.forEach(t),so.forEach(t),Mr=f(e),k=s(e,"P",{});var L=l(k);Be=s(L,"A",{href:!0,rel:!0});var Nn=l(Be);Os=a(Nn,"BERT (Bidirectional Encoder Representations from Transformers)"),Nn.forEach(t),Hs=a(L," \uC544\uD0A4\uD14D\uCC98 \uB610\uB294 \uADF8 \uBCC0\uD615\uC778 "),De=s(L,"A",{href:!0,rel:!0});var xn=l(De);Ks=a(xn,"distilBERT"),xn.forEach(t),qs=a(L," \uBC0F "),Ce=s(L,"A",{href:!0,rel:!0});var Bn=l(Ce);Ls=a(Bn,"roBERTa"),Bn.forEach(t),Rs=a(L,`\uB97C \uAE30\uBC18\uC73C\uB85C \uD55C Transformers \uBAA8\uB378\uC740 \uCD94\uCD9C \uAE30\uBC18 \uC9C8\uC758\uC751\uB2F5, \uC2DC\uD000\uC2A4 \uBD84\uB958 \uBC0F \uD1A0\uD070 \uBD84\uB958\uC640 \uAC19\uC740 \uBE44\uC0DD\uC131 \uC791\uC5C5 \uC2DC Inf1\uC5D0\uC11C \uCD5C\uC0C1\uC758 \uC131\uB2A5\uC744 \uBCF4\uC785\uB2C8\uB2E4.
\uADF8\uB7EC\uB098 \uD14D\uC2A4\uD2B8 \uC0DD\uC131 \uC791\uC5C5\uB3C4 `),Ie=s(L,"A",{href:!0,rel:!0});var Dn=l(Ie);Fs=a(Dn,"AWS Neuron MarianMT \uD29C\uD1A0\uB9AC\uC5BC"),Dn.forEach(t),Js=a(L,"\uC744 \uB530\uB77C Inf1\uC5D0\uC11C \uC2E4\uD589\uB418\uB3C4\uB85D \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),L.forEach(t),zr=f(e),se=s(e,"P",{});var lo=l(se);Us=a(lo,"Inferentia\uC5D0\uC11C \uBC14\uB85C \uBCC0\uD658\uD560 \uC218 \uC788\uB294 \uBAA8\uB378\uC5D0 \uB300\uD55C \uC790\uC138\uD55C \uC815\uBCF4\uB294 Neuron \uBB38\uC11C\uC758 "),Me=s(lo,"A",{href:!0,rel:!0});var Cn=l(Me);Gs=a(Cn,"Model Architecture Fit"),Cn.forEach(t),Qs=a(lo," \uC139\uC158\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),lo.forEach(t),Wr=f(e),H=s(e,"H3",{class:!0});var no=l(H);le=s(no,"A",{id:!0,class:!0,href:!0});var In=l(le);Qt=s(In,"SPAN",{});var Mn=l(Qt);m(ze.$$.fragment,Mn),Mn.forEach(t),In.forEach(t),Vs=f(no),Vt=s(no,"SPAN",{});var zn=l(Vt);Xs=a(zn,"\uC885\uC18D\uC131"),zn.forEach(t),no.forEach(t),Or=f(e),x=s(e,"P",{});var pt=l(x);Ys=a(pt,"AWS Neuron\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBAA8\uB378\uC744 \uBCC0\uD658\uD558\uB824\uBA74 "),We=s(pt,"A",{href:!0,rel:!0});var Wn=l(We);Zs=a(Wn,"Neuron SDK \uD658\uACBD"),Wn.forEach(t),el=a(pt,`\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
\uC774\uB294 `),Oe=s(pt,"A",{href:!0,rel:!0});var On=l(Oe);tl=a(On,"AWS Deep Learning AMI"),On.forEach(t),rl=a(pt,"\uC5D0 \uBBF8\uB9AC \uAD6C\uC131\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),pt.forEach(t),Hr=f(e),K=s(e,"H3",{class:!0});var ao=l(K);ne=s(ao,"A",{id:!0,class:!0,href:!0});var Hn=l(ne);Xt=s(Hn,"SPAN",{});var Kn=l(Xt);m(He.$$.fragment,Kn),Kn.forEach(t),Hn.forEach(t),ol=f(ao),Yt=s(ao,"SPAN",{});var qn=l(Yt);sl=a(qn,"AWS Neuron\uC73C\uB85C \uBAA8\uB378 \uBCC0\uD658\uD558\uAE30"),qn.forEach(t),ao.forEach(t),Kr=f(e),g=s(e,"P",{});var Ue=l(g);Zt=s(Ue,"CODE",{});var Ln=l(Zt);ll=a(Ln,"BertModel"),Ln.forEach(t),nl=a(Ue,"\uC744 \uCD94\uC801\uD558\uB824\uBA74, "),st=s(Ue,"A",{href:!0});var Rn=l(st);al=a(Rn,"Python\uC5D0\uC11C TorchScript \uC0AC\uC6A9\uD558\uAE30"),Rn.forEach(t),il=a(Ue,`\uC5D0\uC11C\uC640 \uB3D9\uC77C\uD55C \uCF54\uB4DC\uB97C \uC0AC\uC6A9\uD574\uC11C AWS NEURON\uC6A9 \uBAA8\uB378\uC744 \uBCC0\uD658\uD569\uB2C8\uB2E4.
`),er=s(Ue,"CODE",{});var Fn=l(er);pl=a(Fn,"torch.neuron"),Fn.forEach(t),cl=a(Ue," \uD504\uB808\uC784\uC6CC\uD06C \uC775\uC2A4\uD150\uC158\uC744 \uAC00\uC838\uC640 Python API\uB97C \uD1B5\uD574 Neuron SDK\uC758 \uAD6C\uC131 \uC694\uC18C\uC5D0 \uC811\uADFC\uD569\uB2C8\uB2E4:"),Ue.forEach(t),qr=f(e),m(Ke.$$.fragment,e),Lr=f(e),lt=s(e,"P",{});var Jn=l(lt);hl=a(Jn,"\uB2E4\uC74C \uC904\uB9CC \uC218\uC815\uD558\uBA74 \uB429\uB2C8\uB2E4:"),Jn.forEach(t),Rr=f(e),m(qe.$$.fragment,e),Fr=f(e),nt=s(e,"P",{});var Un=l(nt);fl=a(Un,"\uC774\uB85C\uC368 Neuron SDK\uAC00 \uBAA8\uB378\uC744 \uCD94\uC801\uD558\uACE0 Inf1 \uC778\uC2A4\uD134\uC2A4\uC5D0 \uCD5C\uC801\uD654\uD560 \uC218 \uC788\uAC8C \uB429\uB2C8\uB2E4."),Un.forEach(t),Jr=f(e),ae=s(e,"P",{});var io=l(ae);dl=a(io,"AWS Neuron SDK\uC758 \uAE30\uB2A5, \uB3C4\uAD6C, \uC608\uC81C \uD29C\uD1A0\uB9AC\uC5BC \uBC0F \uCD5C\uC2E0 \uC5C5\uB370\uC774\uD2B8\uC5D0 \uB300\uD574 \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uB824\uBA74 "),Le=s(io,"A",{href:!0,rel:!0});var Gn=l(Le);ml=a(Gn,"AWS NeuronSDK \uBB38\uC11C"),Gn.forEach(t),ul=a(io,"\uB97C \uCC38\uC870\uD558\uC138\uC694."),io.forEach(t),this.h()},h(){c($,"name","hf:doc:metadata"),c($,"content",JSON.stringify(oa)),c(S,"id","export-to-torchscript"),c(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(S,"href","#export-to-torchscript"),c(w,"class","relative group"),c(he,"href","https://pytorch.org/docs/stable/jit.html"),c(he,"rel","nofollow"),c(de,"href","https://pytorch.org/docs/stable/jit.html"),c(de,"rel","nofollow"),c(U,"id","torchscript-flag-and-tied-weights"),c(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(U,"href","#torchscript-flag-and-tied-weights"),c(B,"class","relative group"),c(Q,"id","dummy-inputs-and-standard-lengths"),c(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Q,"href","#dummy-inputs-and-standard-lengths"),c(D,"class","relative group"),c(X,"id","using-torchscript-in-python"),c(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(X,"href","#using-torchscript-in-python"),c(C,"class","relative group"),c(Y,"id","saving-a-model"),c(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Y,"href","#saving-a-model"),c(I,"class","relative group"),c(Z,"id","loading-a-model"),c(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Z,"href","#loading-a-model"),c(M,"class","relative group"),c(ee,"id","using-a-traced-model-for-inference"),c(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ee,"href","#using-a-traced-model-for-inference"),c(z,"class","relative group"),c(te,"id","deploy-hugging-face-torchscript-models-to-aws-with-the-neuron-sdk"),c(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(te,"href","#deploy-hugging-face-torchscript-models-to-aws-with-the-neuron-sdk"),c(W,"class","relative group"),c(Te,"href","https://aws.amazon.com/ec2/instance-types/inf1/"),c(Te,"rel","nofollow"),c(ge,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/#"),c(ge,"rel","nofollow"),c(Pe,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/neuron-guide/benchmark/%3E"),c(Pe,"rel","nofollow"),c(je,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/src/examples/pytorch/bert_tutorial/tutorial_pretrained_bert.html"),c(je,"rel","nofollow"),c(Ne,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/src/examples/tensorflow/huggingface_bert/huggingface_bert.html"),c(Ne,"rel","nofollow"),c(oe,"id","implications"),c(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(oe,"href","#implications"),c(O,"class","relative group"),c(Be,"href","https://huggingface.co/docs/transformers/main/model_doc/bert"),c(Be,"rel","nofollow"),c(De,"href","https://huggingface.co/docs/transformers/main/model_doc/distilbert"),c(De,"rel","nofollow"),c(Ce,"href","https://huggingface.co/docs/transformers/main/model_doc/roberta"),c(Ce,"rel","nofollow"),c(Ie,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/src/examples/pytorch/transformers-marianmt.html"),c(Ie,"rel","nofollow"),c(Me,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/neuron-guide/models/models-inferentia.html#models-inferentia"),c(Me,"rel","nofollow"),c(le,"id","dependencies"),c(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(le,"href","#dependencies"),c(H,"class","relative group"),c(We,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/neuron-guide/neuron-frameworks/pytorch-neuron/index.html#installation-guide"),c(We,"rel","nofollow"),c(Oe,"href","https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-inferentia-launching.html"),c(Oe,"rel","nofollow"),c(ne,"id","converting-a-model-for-aws-neuron"),c(ne,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ne,"href","#converting-a-model-for-aws-neuron"),c(K,"class","relative group"),c(st,"href","torchscript#using-torchscript-in-python"),c(Le,"href","https://awsdocs-neuron.readthedocs-hosted.com/en/latest/index.html"),c(Le,"rel","nofollow")},m(e,i){r(document.head,$),p(e,R,i),p(e,w,i),r(w,S),r(S,ht),u(pe,ht,null),r(w,po),r(w,ft),r(ft,co),p(e,or,i),u(F,e,i),p(e,sr,i),p(e,ce,i),r(ce,he),r(he,ho),r(ce,fo),p(e,lr,i),p(e,Ge,i),r(Ge,dt),r(dt,mo),p(e,nr,i),p(e,fe,i),r(fe,de),r(de,uo),r(fe,_o),p(e,ar,i),p(e,Qe,i),r(Qe,vo),p(e,ir,i),p(e,Ve,i),r(Ve,Eo),p(e,pr,i),p(e,J,i),r(J,Xe),r(Xe,mt),r(mt,$o),r(Xe,wo),r(J,So),r(J,ut),r(ut,yo),p(e,cr,i),p(e,Ye,i),r(Ye,ko),p(e,hr,i),p(e,B,i),r(B,U),r(U,_t),u(me,_t,null),r(B,bo),r(B,vt),r(vt,Ao),p(e,fr,i),p(e,A,i),r(A,Et),r(Et,To),r(A,go),r(A,$t),r($t,Po),r(A,jo),r(A,wt),r(wt,No),r(A,xo),p(e,dr,i),p(e,T,i),r(T,St),r(St,Bo),r(T,Do),r(T,yt),r(yt,Co),r(T,Io),r(T,kt),r(kt,Mo),r(T,zo),p(e,mr,i),p(e,G,i),r(G,Wo),r(G,bt),r(bt,Oo),r(G,Ho),p(e,ur,i),p(e,D,i),r(D,Q),r(Q,At),u(ue,At,null),r(D,Ko),r(D,Tt),r(Tt,qo),p(e,_r,i),p(e,V,i),r(V,Lo),r(V,gt),r(gt,Ro),r(V,Fo),p(e,vr,i),p(e,Ze,i),r(Ze,Jo),p(e,Er,i),u(_e,e,i),p(e,$r,i),p(e,et,i),r(et,Uo),p(e,wr,i),p(e,tt,i),r(tt,Go),p(e,Sr,i),p(e,C,i),r(C,X),r(X,Pt),u(ve,Pt,null),r(C,Qo),r(C,jt),r(jt,Vo),p(e,yr,i),p(e,rt,i),r(rt,Xo),p(e,kr,i),p(e,I,i),r(I,Y),r(Y,Nt),u(Ee,Nt,null),r(I,Yo),r(I,xt),r(xt,Zo),p(e,br,i),p(e,y,i),r(y,Bt),r(Bt,es),r(y,ts),r(y,Dt),r(Dt,rs),r(y,os),r(y,Ct),r(Ct,ss),r(y,ls),r(y,It),r(It,ns),r(y,as),p(e,Ar,i),u($e,e,i),p(e,Tr,i),p(e,M,i),r(M,Z),r(Z,Mt),u(we,Mt,null),r(M,is),r(M,zt),r(zt,ps),p(e,gr,i),p(e,b,i),r(b,cs),r(b,Wt),r(Wt,hs),r(b,fs),r(b,Ot),r(Ot,ds),r(b,ms),r(b,Ht),r(Ht,us),r(b,_s),p(e,Pr,i),u(Se,e,i),p(e,jr,i),p(e,z,i),r(z,ee),r(ee,Kt),u(ye,Kt,null),r(z,vs),r(z,qt),r(qt,Es),p(e,Nr,i),p(e,ke,i),r(ke,Lt),r(Lt,$s),r(ke,ws),p(e,xr,i),u(be,e,i),p(e,Br,i),p(e,W,i),r(W,te),r(te,Rt),u(Ae,Rt,null),r(W,Ss),r(W,Ft),r(Ft,ys),p(e,Dr,i),p(e,j,i),r(j,ks),r(j,Te),r(Te,bs),r(j,As),r(j,ge),r(ge,Ts),r(j,gs),p(e,Cr,i),p(e,N,i),r(N,Jt),r(Jt,Ps),r(N,js),r(N,ot),r(ot,Ns),r(ot,Pe),r(Pe,xs),r(N,Bs),r(N,re),r(re,je),r(je,Ds),r(re,Cs),r(re,Ne),r(Ne,Is),r(re,Ms),p(e,Ir,i),p(e,O,i),r(O,oe),r(oe,Ut),u(xe,Ut,null),r(O,zs),r(O,Gt),r(Gt,Ws),p(e,Mr,i),p(e,k,i),r(k,Be),r(Be,Os),r(k,Hs),r(k,De),r(De,Ks),r(k,qs),r(k,Ce),r(Ce,Ls),r(k,Rs),r(k,Ie),r(Ie,Fs),r(k,Js),p(e,zr,i),p(e,se,i),r(se,Us),r(se,Me),r(Me,Gs),r(se,Qs),p(e,Wr,i),p(e,H,i),r(H,le),r(le,Qt),u(ze,Qt,null),r(H,Vs),r(H,Vt),r(Vt,Xs),p(e,Or,i),p(e,x,i),r(x,Ys),r(x,We),r(We,Zs),r(x,el),r(x,Oe),r(Oe,tl),r(x,rl),p(e,Hr,i),p(e,K,i),r(K,ne),r(ne,Xt),u(He,Xt,null),r(K,ol),r(K,Yt),r(Yt,sl),p(e,Kr,i),p(e,g,i),r(g,Zt),r(Zt,ll),r(g,nl),r(g,st),r(st,al),r(g,il),r(g,er),r(er,pl),r(g,cl),p(e,qr,i),u(Ke,e,i),p(e,Lr,i),p(e,lt,i),r(lt,hl),p(e,Rr,i),u(qe,e,i),p(e,Fr,i),p(e,nt,i),r(nt,fl),p(e,Jr,i),p(e,ae,i),r(ae,dl),r(ae,Le),r(Le,ml),r(ae,ul),Ur=!0},p(e,[i]){const Re={};i&2&&(Re.$$scope={dirty:i,ctx:e}),F.$set(Re)},i(e){Ur||(_(pe.$$.fragment,e),_(F.$$.fragment,e),_(me.$$.fragment,e),_(ue.$$.fragment,e),_(_e.$$.fragment,e),_(ve.$$.fragment,e),_(Ee.$$.fragment,e),_($e.$$.fragment,e),_(we.$$.fragment,e),_(Se.$$.fragment,e),_(ye.$$.fragment,e),_(be.$$.fragment,e),_(Ae.$$.fragment,e),_(xe.$$.fragment,e),_(ze.$$.fragment,e),_(He.$$.fragment,e),_(Ke.$$.fragment,e),_(qe.$$.fragment,e),Ur=!0)},o(e){v(pe.$$.fragment,e),v(F.$$.fragment,e),v(me.$$.fragment,e),v(ue.$$.fragment,e),v(_e.$$.fragment,e),v(ve.$$.fragment,e),v(Ee.$$.fragment,e),v($e.$$.fragment,e),v(we.$$.fragment,e),v(Se.$$.fragment,e),v(ye.$$.fragment,e),v(be.$$.fragment,e),v(Ae.$$.fragment,e),v(xe.$$.fragment,e),v(ze.$$.fragment,e),v(He.$$.fragment,e),v(Ke.$$.fragment,e),v(qe.$$.fragment,e),Ur=!1},d(e){t($),e&&t(R),e&&t(w),E(pe),e&&t(or),E(F,e),e&&t(sr),e&&t(ce),e&&t(lr),e&&t(Ge),e&&t(nr),e&&t(fe),e&&t(ar),e&&t(Qe),e&&t(ir),e&&t(Ve),e&&t(pr),e&&t(J),e&&t(cr),e&&t(Ye),e&&t(hr),e&&t(B),E(me),e&&t(fr),e&&t(A),e&&t(dr),e&&t(T),e&&t(mr),e&&t(G),e&&t(ur),e&&t(D),E(ue),e&&t(_r),e&&t(V),e&&t(vr),e&&t(Ze),e&&t(Er),E(_e,e),e&&t($r),e&&t(et),e&&t(wr),e&&t(tt),e&&t(Sr),e&&t(C),E(ve),e&&t(yr),e&&t(rt),e&&t(kr),e&&t(I),E(Ee),e&&t(br),e&&t(y),e&&t(Ar),E($e,e),e&&t(Tr),e&&t(M),E(we),e&&t(gr),e&&t(b),e&&t(Pr),E(Se,e),e&&t(jr),e&&t(z),E(ye),e&&t(Nr),e&&t(ke),e&&t(xr),E(be,e),e&&t(Br),e&&t(W),E(Ae),e&&t(Dr),e&&t(j),e&&t(Cr),e&&t(N),e&&t(Ir),e&&t(O),E(xe),e&&t(Mr),e&&t(k),e&&t(zr),e&&t(se),e&&t(Wr),e&&t(H),E(ze),e&&t(Or),e&&t(x),e&&t(Hr),e&&t(K),E(He),e&&t(Kr),e&&t(g),e&&t(qr),E(Ke,e),e&&t(Lr),e&&t(lt),e&&t(Rr),E(qe,e),e&&t(Fr),e&&t(nt),e&&t(Jr),e&&t(ae)}}}const oa={local:"export-to-torchscript",sections:[{local:"torchscript-flag-and-tied-weights",title:"TorchScript \uD50C\uB798\uADF8\uC640 \uBB36\uC778 \uAC00\uC911\uCE58(tied weights)"},{local:"dummy-inputs-and-standard-lengths",title:"\uB354\uBBF8 \uC785\uB825\uACFC \uD45C\uC900 \uAE38\uC774"},{local:"using-torchscript-in-python",sections:[{local:"saving-a-model",title:"\uBAA8\uB378 \uC800\uC7A5\uD558\uAE30"},{local:"loading-a-model",title:"\uBAA8\uB378 \uAC00\uC838\uC624\uAE30"},{local:"using-a-traced-model-for-inference",title:"\uCD94\uC801\uB41C \uBAA8\uB378\uC744 \uC0AC\uC6A9\uD558\uC5EC \uCD94\uB860\uD558\uAE30"}],title:"Python\uC5D0\uC11C TorchScript \uC0AC\uC6A9\uD558\uAE30"},{local:"deploy-hugging-face-torchscript-models-to-aws-with-the-neuron-sdk",sections:[{local:"implications",title:"\uC2DC\uC0AC\uC810"},{local:"dependencies",title:"\uC885\uC18D\uC131"},{local:"converting-a-model-for-aws-neuron",title:"AWS Neuron\uC73C\uB85C \uBAA8\uB378 \uBCC0\uD658\uD558\uAE30"}],title:"Neuron SDK\uB85C Hugging Face TorchScript \uBAA8\uB378\uC744 AWS\uC5D0 \uBC30\uD3EC\uD558\uAE30"}],title:"TorchScript\uB85C \uB0B4\uBCF4\uB0B4\uAE30"};function sa(rr){return Zn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pa extends Qn{constructor($){super();Vn(this,$,sa,ra,Xn,{})}}export{pa as default,oa as metadata};
