import{s as Il,o as yl,n as $e}from"../chunks/scheduler.36a0863c.js";import{S as Ul,i as fl,g as p,s as n,r as c,A as Cl,h as i,f as l,c as t,j as Jl,u as m,x as r,k as hl,y as Zl,a,v as M,d as j,t as d,w}from"../chunks/index.9c13489a.js";import{T as Re}from"../chunks/Tip.3b06990e.js";import{C as T}from"../chunks/CodeBlock.05d8ec32.js";import{H as Be}from"../chunks/Heading.7a254a62.js";function Al(h){let u,b="Questa funzionalità al momento è disponibile solo per PyTorch.";return{c(){u=p("p"),u.textContent=b},l(o){u=i(o,"P",{"data-svelte-h":!0}),r(u)!=="svelte-ecm9v3"&&(u.textContent=b)},m(o,J){a(o,u,J)},p:$e,d(o){o&&l(u)}}}function vl(h){let u,b="Per addestramento multi-GPU richiede DDP (<code>torch.distributed.launch</code>).";return{c(){u=p("p"),u.innerHTML=b},l(o){u=i(o,"P",{"data-svelte-h":!0}),r(u)!=="svelte-o96oxl"&&(u.innerHTML=b)},m(o,J){a(o,u,J)},p:$e,d(o){o&&l(u)}}}function Gl(h){let u,b="Questa funzionalità può essere usata con modelli basati su <code>nn.Module</code>.";return{c(){u=p("p"),u.innerHTML=b},l(o){u=i(o,"P",{"data-svelte-h":!0}),r(u)!=="svelte-9uk85f"&&(u.innerHTML=b)},m(o,J){a(o,u,J)},p:$e,d(o){o&&l(u)}}}function Vl(h){let u,b,o,J,f,Zs,C,As,Z,ge="Quando addestri o fai inferenza con <code>DistributedDataParallel</code> e GPU multiple, se si verificano problemi di intercomunicazione tra processi e/o nodi, puoi utilizzare il seguente script per diagnosticare i problemi della rete.",vs,A,Gs,v,ke="Per esempio per testare come 2 GPU interagiscono fai:",Vs,G,Bs,V,_e="Se entrambi i processi sono in grado di comunicare tra loro e di allocare la memoria della GPU, ciascuno di essi stamperà lo stato OK.",Rs,B,Le="Per più GPU o nodi adatta gli argumenti nello script.",$s,R,Ne="All’interno dello script di diagnostica troverai molti altri dettagli e anche una guida per eseguirlo in ambiente SLURM.",gs,$,We="Un livello di debug superiore è aggiungere la variabile d’ambiente <code>NCCL_DEBUG=INFO</code> come di seguito:",ks,g,_s,k,xe="In questo modo si scaricano molte informazioni di debug relative a NCCL, che puoi cercare online in caso di problemi. Oppure, se non hai la sicurezza di come interpretare l’output, puoi condividere il file di log in una Issue.",Ls,_,Ns,I,Ws,y,xs,U,Es,L,Ee=`Se inizi a ottenere <code>loss=NaN</code> o il modello presenta qualche altro comportamento anomalo a causa di valori <code>inf</code> o <code>nan</code> in
attivazioni o nei pesi, è necessario scoprire dove si verifica il primo underflow o overflow e cosa lo ha determinato. Fortunatamente
è possibile farlo facilmente attivando un modulo speciale che effettuerà il rilevamento automaticamente.`,Qs,N,Qe="Se stai usando <code>Trainer</code>, hai bisogno di aggiungere solo:",Xs,W,zs,x,Xe=`ai normali argomenti della riga di comando, o passa <code>debug=&quot;underflow_overflow&quot;</code> quando viene creato l’oggetto
<code>TrainingArguments</code>.`,Ds,E,ze="Se stai usando il tuo ciclo di allenamento o un altro trainer, puoi ottenere lo stesso risultato con:",Ss,Q,Hs,X,De=`<code>DebugUnderflowOverflow</code> inserisce dei ganci nel modello che dopo ogni chiamata
testeranno le variabili di ingresso e di uscita e anche i pesi del modulo corrispondente. Non appena viene rilevato <code>inf</code> o
o <code>nan</code> in almeno un elemento delle attivazioni o dei pesi, il programma lo notifica e stampa un rapporto come il seguente (questo è stato rilevato con <code>google/mt5-small</code> sotto fp16 mixed precision):`,Ys,z,Fs,D,Se="L’output di esempio è stato tagliato al centro per brevità.",Ps,S,He=`La seconda colonna mostra il valore dell’elemento più grande in assoluto,così se osserviamo da vicino gli ultimi istanti,
input e output sono nel range di <code>1e4</code>. Questo addestramento è stato eseguito con una mixed precision fp16 e l’ultimo passo usciva fuori (sotto <code>fp16</code> il valore più grande prima di <code>inf</code> è <code>64e3</code>). Per evitare overflows sotto <code>fp16</code> le attivazionioni devono rimanere molto al di sotto di <code>1e4</code>, perché <code>1e4 * 1e4 = 1e8</code> quindi qualsiasi moltiplicazione di matrice con grandi attivazioni porterà a una condizione di overflow numerico.`,qs,H,Ye="All’inizio della traccia è possibile scoprire a quale lotto si è verificato il problema (questo <code>Detected inf/nan during batch_number=0</code> significa che il problema si è verificato nel primo lotto).",Ks,Y,Fe=`Ogni frame segnalato inizia dichiarando la voce completamente qualificata per il modulo corrispondente per il quale il frame è stato segnalato.
Se osserviamo il seguente frame:`,Os,F,se,P,Pe="Questo, <code>encoder.block.2.layer.1.layer_norm</code> indica che si tratta di un layer norm nel primo layer, del secondo blocco dell’encoder. E le chiamata specifica di <code>forward</code> è <code>T5LayerNorm</code>.",ee,q,qe="Osserviamo gli ultimi frame del report:",le,K,ae,O,Ke="L’ultimo frame report per la funzione <code>Dropout.forward</code> con la prima voce per l’unico input e la seconda per l’unico output. Si può notare che è stato richiamato da un attibuto <code>dropout</code> dentro la classe <code>DenseReluDense</code>. Si può notare che ciò è avvenuto durante il primo strato, del 2° blocco, durante il primissimo lotto. Infine, gli elementi di input più grandi in assoluto sono stati <code>6.27e+04</code> e l’equivalente per l’output era <code>inf</code>.",ne,ss,Oe="Puoi vedere qui, che <code>T5DenseGatedGeluDense.forward</code> risulta in output activations, il cui valore massimo assoluto era circa 62,7K, che è molto vicino al limite massimo di 64K di fp16. Nel prossimo frame abbiamo <code>Dropout</code> che rinormalizza i pesi, dopo aver azzerato alcuni elementi, il che spinge il valore massimo assoluto a più di 64K e si verifica un overflow.(<code>inf</code>).",te,es,sl="Come puoi notare, è nei frames precedenti che occorre esaminare quando i numeri iniziano a diventare molto grandi per i valori fp16.",pe,ls,el="Confrontiamo il report al codice <code>models/t5/modeling_t5.py</code>:",ie,as,re,ns,ll="Ora è facile vedere la chiamata <code>dropout</code>, e tutte le chiamate precedenti.",ue,ts,al="Poiché il rilevamento avviene in un avanzamento (forward hook in eng.), i rapporti vengono creati immeditamente dopo ogni rientro da <code>forward</code> (forward returns in eng.).",oe,ps,nl="Tornando al rapporto completo, per agire e risolvere il problema, dobbiamo andare qualche frame più in alto, dove i numeri hanno iniziato a salire, e probabilmente passare alla modalità <code>fp32</code>, in modo che i numeri non trabocchino quando vengono moltiplicati o sommati. Naturalmente, potrebbero esserci altre soluzioni. Per esempio, potremmo spegnere temporanemante <code>amp</code> se è abilitato, successivamente spostare <code>forward</code> in un helper wrapper, come:",ce,is,me,rs,tl=`Poiché il rilevatore automatico riporta solo gli ingressi e le uscite di fotogrammi completi, una volta che si sa dove cercare, si può
analizzare anche le fasi intermedie di una specifica funzione <code>forward</code>. In alcuni casi puoi usare la funzione di supporto <code>detect_overflow</code> per indirizzare il rilevatore dove preferisci, ad esempio:`,Me,us,je,os,pl=`Si può vedere che abbiamo aggiunto 2 di questi e ora teniamo traccia se <code>inf</code> o <code>nan</code> per <code>forwarded_states</code> è stato rilevato
da qualche parte.`,de,cs,il=`In realtà, il rilevatore li riporta già, perché ciascuna delle chiamate nell’esempio precedente è un <code>nn.Module</code>, ma
diciamo che se avessimo dei calcoli diretti locali, questo è il modo in cui lo faremmo.`,we,ms,rl=`Inoltre, se si istanzia il debugger nel proprio codice, è possibile modificare il numero di fotogrammi stampati rispetto a
predefinito, ad esempio.:`,Te,Ms,be,js,Je,ds,ul="La stessa classe di debug può essere utilizzata per il tracciamento per-batch con la funzione di rilevamento di underflow/overflow disattivata.",he,ws,ol=`Supponiamo di voler osservare i valori minimi e massimi assoluti per tutti gli ingredienti di ogni chiamata <code>forward</code> di un dato lotto.
lotto, e che lo si voglia fare solo per i lotti 1 e 3. Si istanzia questa classe come:`,Ie,Ts,ye,bs,cl="Ora i batch completi 1 e 3 saranno tracciati utilizzando lo stesso formato del rilevatore di underflow/overflow.",Ue,Js,ml="I batches sono 0-indexed.",fe,hs,Ml=`Questo è utile se si sa che il programma inizia a comportarsi male dopo un certo numero di batch, in modo da poter avanzare velocemente fino a quell’area.
direttamente a quell’area. Ecco un esempio di output troncato per questa configurazione:`,Ce,Is,Ze,ys,jl="Qui verrà scaricato un numero enorme di fotogrammi, tanti quanti sono le chiamate in avanti nel modello, quindi può essere o non essere quello che volete, ma a volte può essere più utile usarlo di un classico debugger. Per esempio, se il problema inizia a verificarsi a partire dal lotto numero 150. Quindi è possibile scaricare le tracce dei lotti 149 e 150 e confrontare i punti in cui i numeri hanno iniziato a divergere.",Ae,Us,dl="È inoltre possibile specificare il numero di batch dopo il quale interrompere l’addestramento, con:",ve,fs,Ge,Cs,Ve;return f=new Be({props:{title:"Debugging",local:"debugging",headingTag:"h1"}}),C=new Be({props:{title:"Debug dei problemi di rete multi-GPU",local:"debug-dei-problemi-di-rete-multi-gpu",headingTag:"h2"}}),A=new T({props:{code:"d2dldCUyMGh0dHBzJTNBJTJGJTJGcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSUyRmh1Z2dpbmdmYWNlJTJGdHJhbnNmb3JtZXJzJTJGbWFpbiUyRnNjcmlwdHMlMkZkaXN0cmlidXRlZCUyRnRvcmNoLWRpc3RyaWJ1dGVkLWdwdS10ZXN0LnB5",highlighted:"wget https://raw.githubusercontent.com/huggingface/transformers/main/scripts/distributed/torch-distributed-gpu-test.py",wrap:!1}}),G=new T({props:{code:"cHl0aG9uJTIwLW0lMjB0b3JjaC5kaXN0cmlidXRlZC5ydW4lMjAtLW5wcm9jX3Blcl9ub2RlJTIwMiUyMC0tbm5vZGVzJTIwMSUyMHRvcmNoLWRpc3RyaWJ1dGVkLWdwdS10ZXN0LnB5",highlighted:"python -m torch.distributed.run --nproc_per_node 2 --nnodes 1 torch-distributed-gpu-test.py",wrap:!1}}),g=new T({props:{code:"TkNDTF9ERUJVRyUzRElORk8lMjBweXRob24lMjAtbSUyMHRvcmNoLmRpc3RyaWJ1dGVkLnJ1biUyMC0tbnByb2NfcGVyX25vZGUlMjAyJTIwLS1ubm9kZXMlMjAxJTIwdG9yY2gtZGlzdHJpYnV0ZWQtZ3B1LXRlc3QucHk=",highlighted:"NCCL_DEBUG=INFO python -m torch.distributed.run --nproc_per_node 2 --nnodes 1 torch-distributed-gpu-test.py",wrap:!1}}),_=new Be({props:{title:"Rilevamento di Underflow e Overflow",local:"rilevamento-di-underflow-e-overflow",headingTag:"h2"}}),I=new Re({props:{$$slots:{default:[Al]},$$scope:{ctx:h}}}),y=new Re({props:{$$slots:{default:[vl]},$$scope:{ctx:h}}}),U=new Re({props:{$$slots:{default:[Gl]},$$scope:{ctx:h}}}),W=new T({props:{code:"LS1kZWJ1ZyUyMHVuZGVyZmxvd19vdmVyZmxvdw==",highlighted:"--debug underflow_overflow",wrap:!1}}),Q=new T({props:{code:"ZnJvbSUyMC5kZWJ1Z191dGlscyUyMGltcG9ydCUyMERlYnVnVW5kZXJmbG93T3ZlcmZsb3clMEElMEFkZWJ1Z19vdmVyZmxvdyUyMCUzRCUyMERlYnVnVW5kZXJmbG93T3ZlcmZsb3cobW9kZWwp",highlighted:`<span class="hljs-keyword">from</span> .debug_utils <span class="hljs-keyword">import</span> DebugUnderflowOverflow

debug_overflow = DebugUnderflowOverflow(model)`,wrap:!1}}),z=new T({props:{code:"RGV0ZWN0ZWQlMjBpbmYlMkZuYW4lMjBkdXJpbmclMjBiYXRjaF9udW1iZXIlM0QwJTBBTGFzdCUyMDIxJTIwZm9yd2FyZCUyMGZyYW1lcyUzQSUwQWFicyUyMG1pbiUyMCUyMGFicyUyMG1heCUyMCUyMG1ldGFkYXRhJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZW5jb2Rlci5ibG9jay4xLmxheWVyLjEuRGVuc2VSZWx1RGVuc2UuZHJvcG91dCUyMERyb3BvdXQlMEEwLjAwZSUyQjAwJTIwMi41N2UlMkIwMiUyMGlucHV0JTVCMCU1RCUwQTAuMDBlJTJCMDAlMjAyLjg1ZSUyQjAyJTIwb3V0cHV0JTBBJTVCLi4uJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZW5jb2Rlci5ibG9jay4yLmxheWVyLjA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TVCMCU1RCUwQTAuMDBlJTJCMDAlMjAlMjAlMjAlMjAlMjAlMjBpbmYlMjBvdXRwdXQ=",highlighted:`<span class="hljs-attribute">Detected</span> inf/nan during batch_number=<span class="hljs-number">0</span>
<span class="hljs-attribute">Last</span> <span class="hljs-number">21</span> forward frames:
<span class="hljs-attribute">abs</span> min  abs max  metadata
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">1</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.dropout Dropout
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">2</span>.<span class="hljs-number">57</span>e+<span class="hljs-number">02</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">2</span>.<span class="hljs-number">85</span>e+<span class="hljs-number">02</span> output<span class="hljs-meta">
[...]</span>
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">0</span> T5LayerSelfAttention
<span class="hljs-attribute">6</span>.<span class="hljs-number">78</span>e-<span class="hljs-number">04</span> <span class="hljs-number">3</span>.<span class="hljs-number">15</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">2</span>.<span class="hljs-number">65</span>e-<span class="hljs-number">04</span> <span class="hljs-number">3</span>.<span class="hljs-number">42</span>e+<span class="hljs-number">03</span> output[<span class="hljs-number">0</span>]
             <span class="hljs-attribute">None</span> output[<span class="hljs-number">1</span>]
<span class="hljs-attribute">2</span>.<span class="hljs-number">25</span>e-<span class="hljs-number">01</span> <span class="hljs-number">1</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">04</span> output[<span class="hljs-number">2</span>]
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.layer_norm T5LayerNorm
<span class="hljs-attribute">8</span>.<span class="hljs-number">69</span>e-<span class="hljs-number">02</span> <span class="hljs-number">4</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">01</span> weight
<span class="hljs-attribute">2</span>.<span class="hljs-number">65</span>e-<span class="hljs-number">04</span> <span class="hljs-number">3</span>.<span class="hljs-number">42</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_0 Linear
<span class="hljs-attribute">2</span>.<span class="hljs-number">17</span>e-<span class="hljs-number">07</span> <span class="hljs-number">4</span>.<span class="hljs-number">50</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">2</span>.<span class="hljs-number">68</span>e-<span class="hljs-number">06</span> <span class="hljs-number">3</span>.<span class="hljs-number">70</span>e+<span class="hljs-number">01</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_1 Linear
<span class="hljs-attribute">8</span>.<span class="hljs-number">08</span>e-<span class="hljs-number">07</span> <span class="hljs-number">2</span>.<span class="hljs-number">66</span>e+<span class="hljs-number">01</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">1</span>.<span class="hljs-number">27</span>e-<span class="hljs-number">04</span> <span class="hljs-number">2</span>.<span class="hljs-number">37</span>e+<span class="hljs-number">02</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.dropout Dropout
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">8</span>.<span class="hljs-number">76</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">9</span>.<span class="hljs-number">74</span>e+<span class="hljs-number">03</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wo Linear
<span class="hljs-attribute">1</span>.<span class="hljs-number">01</span>e-<span class="hljs-number">06</span> <span class="hljs-number">6</span>.<span class="hljs-number">44</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">9</span>.<span class="hljs-number">74</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense T5DenseGatedGeluDense
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.dropout Dropout
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span>      inf output`,wrap:!1}}),F=new T({props:{code:"JTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZW5jb2Rlci5ibG9jay4yLmxheWVyLjEubGF5ZXJfbm9ybSUyMFQ1TGF5ZXJOb3JtJTBBOC42OWUtMDIlMjA0LjE4ZS0wMSUyMHdlaWdodCUwQTIuNjVlLTA0JTIwMy40MmUlMkIwMyUyMGlucHV0JTVCMCU1RCUwQTEuNzllLTA2JTIwNC42NWUlMkIwMCUyMG91dHB1dA==",highlighted:`                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.layer_norm T5LayerNorm
<span class="hljs-attribute">8</span>.<span class="hljs-number">69</span>e-<span class="hljs-number">02</span> <span class="hljs-number">4</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">01</span> weight
<span class="hljs-attribute">2</span>.<span class="hljs-number">65</span>e-<span class="hljs-number">04</span> <span class="hljs-number">3</span>.<span class="hljs-number">42</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> output`,wrap:!1}}),K=new T({props:{code:"RGV0ZWN0ZWQlMjBpbmYlMkZuYW4lMjBkdXJpbmclMjBiYXRjaF9udW1iZXIlM0QwJTBBTGFzdCUyMDIxJTIwZm9yd2FyZCUyMGZyYW1lcyUzQSUwQWFicyUyMG1pbiUyMCUyMGFicyUyMG1heCUyMCUyMG1ldGFkYXRhJTBBJTVCLi4uJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJT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dXRwdXQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbmNvZGVyLmJsb2NrLjIubGF5ZXIuMS5kcm9wb3V0JTIwRHJvcG91dCUwQTMuMThlLTA0JTIwNi4yN2UlMkIwNCUyMGlucHV0JTVCMCU1RCUwQTAuMDBlJTJCMDAlMjAlMjAlMjAlMjAlMjAlMjBpbmYlMjBvdXRwdXQ=",highlighted:`<span class="hljs-attribute">Detected</span> inf/nan during batch_number=<span class="hljs-number">0</span>
<span class="hljs-attribute">Last</span> <span class="hljs-number">21</span> forward frames:
<span class="hljs-attribute">abs</span> min  abs max  metadata<span class="hljs-meta">
[...]</span>
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_0 Linear
<span class="hljs-attribute">2</span>.<span class="hljs-number">17</span>e-<span class="hljs-number">07</span> <span class="hljs-number">4</span>.<span class="hljs-number">50</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">2</span>.<span class="hljs-number">68</span>e-<span class="hljs-number">06</span> <span class="hljs-number">3</span>.<span class="hljs-number">70</span>e+<span class="hljs-number">01</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wi_1 Linear
<span class="hljs-attribute">8</span>.<span class="hljs-number">08</span>e-<span class="hljs-number">07</span> <span class="hljs-number">2</span>.<span class="hljs-number">66</span>e+<span class="hljs-number">01</span> weight
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">1</span>.<span class="hljs-number">27</span>e-<span class="hljs-number">04</span> <span class="hljs-number">2</span>.<span class="hljs-number">37</span>e+<span class="hljs-number">02</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense.wo Linear
<span class="hljs-attribute">1</span>.<span class="hljs-number">01</span>e-<span class="hljs-number">06</span> <span class="hljs-number">6</span>.<span class="hljs-number">44</span>e+<span class="hljs-number">00</span> weight
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span> <span class="hljs-number">9</span>.<span class="hljs-number">74</span>e+<span class="hljs-number">03</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.DenseReluDense T5DenseGatedGeluDense
<span class="hljs-attribute">1</span>.<span class="hljs-number">79</span>e-<span class="hljs-number">06</span> <span class="hljs-number">4</span>.<span class="hljs-number">65</span>e+<span class="hljs-number">00</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> output
                  <span class="hljs-attribute">encoder</span>.block.<span class="hljs-number">2</span>.layer.<span class="hljs-number">1</span>.dropout Dropout
<span class="hljs-attribute">3</span>.<span class="hljs-number">18</span>e-<span class="hljs-number">04</span> <span class="hljs-number">6</span>.<span class="hljs-number">27</span>e+<span class="hljs-number">04</span> input[<span class="hljs-number">0</span>]
<span class="hljs-attribute">0</span>.<span class="hljs-number">00</span>e+<span class="hljs-number">00</span>      inf output`,wrap:!1}}),as=new T({props:{code:"Y2xhc3MlMjBUNURlbnNlR2F0ZWRH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W5fc3RhdGVzKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGhpZGRlbl9zdGF0ZXMlMjAlM0QlMjBoaWRkZW5fZ2VsdSUyMColMjBoaWRkZW5fbGluZWFyJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwaGlkZGVuX3N0YXRlcyUyMCUzRCUyMHNlbGYuZHJvcG91dChoaWRkZW5fc3RhdGVzKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGhpZGRlbl9zdGF0ZXMlMjAlM0QlMjBzZWxmLndvKGhpZGRlbl9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuJTIwaGlkZGVuX3N0YXRlcw==",highlighted:`<span class="hljs-keyword">class</span> <span class="hljs-title class_">T5DenseGatedGeluDense</span>(nn.Module):
    <span class="hljs-keyword">def</span> <span class="hljs-title function_">__init__</span>(<span class="hljs-params">self, config</span>):
        <span class="hljs-built_in">super</span>().__init__()
        self.wi_0 = nn.Linear(config.d_model, config.d_ff, bias=<span class="hljs-literal">False</span>)
        self.wi_1 = nn.Linear(config.d_model, config.d_ff, bias=<span class="hljs-literal">False</span>)
        self.wo = nn.Linear(config.d_ff, config.d_model, bias=<span class="hljs-literal">False</span>)
        self.dropout = nn.Dropout(config.dropout_rate)
        self.gelu_act = ACT2FN[<span class="hljs-string">&quot;gelu_new&quot;</span>]

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, hidden_states</span>):
        hidden_gelu = self.gelu_act(self.wi_0(hidden_states))
        hidden_linear = self.wi_1(hidden_states)
        hidden_states = hidden_gelu * hidden_linear
        hidden_states = self.dropout(hidden_states)
        hidden_states = self.wo(hidden_states)
        <span class="hljs-keyword">return</span> hidden_states`,wrap:!1}}),is=new T({props:{code:"ZGVmJTIwX2ZvcndhcmQoc2VsZiUyQyUyMGhpZGRlbl9zdGF0ZXMpJTNBJTBBJTIwJTIwJTIwJTIwaGlkZGVuX2dlbHUlMjAlM0QlMjBzZWxmLmdlbHVfYWN0KHNlbGYud2lfMChoaWRkZW5fc3RhdGVzKSklMEElMjAlMjAlMjAlMjBoaWRkZW5fbGluZWFyJTIwJTNEJTIwc2VsZi53aV8xKGhpZGRlbl9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwaGlkZGVuX3N0YXRlcyUyMCUzRCUyMGhpZGRlbl9nZWx1JTIwKiUyMGhpZGRlbl9saW5lYXIlMEElMjAlMjAlMjAlMjBoaWRkZW5fc3RhdGVzJTIwJTNEJTIwc2VsZi5kcm9wb3V0KGhpZGRlbl9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwaGlkZGVuX3N0YXRlcyUyMCUzRCUyMHNlbGYud28oaGlkZGVuX3N0YXRlcyklMEElMjAlMjAlMjAlMjByZXR1cm4lMjBoaWRkZW5fc3RhdGVzJTBBJTBBJTBBaW1wb3J0JTIwdG9yY2glMEElMEElMEFkZWYlMjBmb3J3YXJkKHNlbGYlMkMlMjBoaWRkZW5fc3RhdGVzKSUzQSUwQSUyMCUyMCUyMCUyMGlmJTIwdG9yY2guaXNfYXV0b2Nhc3RfZW5hYmxlZCgpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwd2l0aCUyMHRvcmNoLmN1ZGEuYW1wLmF1dG9jYXN0KGVuYWJsZWQlM0RGYWxzZSklM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjByZXR1cm4lMjBzZWxmLl9mb3J3YXJkKGhpZGRlbl9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwZWxzZSUzQSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMHNlbGYuX2ZvcndhcmQoaGlkZGVuX3N0YXRlcyk=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">_forward</span>(<span class="hljs-params">self, hidden_states</span>):
    hidden_gelu = self.gelu_act(self.wi_0(hidden_states))
    hidden_linear = self.wi_1(hidden_states)
    hidden_states = hidden_gelu * hidden_linear
    hidden_states = self.dropout(hidden_states)
    hidden_states = self.wo(hidden_states)
    <span class="hljs-keyword">return</span> hidden_states


<span class="hljs-keyword">import</span> torch


<span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, hidden_states</span>):
    <span class="hljs-keyword">if</span> torch.is_autocast_enabled():
        <span class="hljs-keyword">with</span> torch.cuda.amp.autocast(enabled=<span class="hljs-literal">False</span>):
            <span class="hljs-keyword">return</span> self._forward(hidden_states)
    <span class="hljs-keyword">else</span>:
        <span class="hljs-keyword">return</span> self._forward(hidden_states)`,wrap:!1}}),us=new T({props:{code:"ZnJvbSUyMGRlYnVnX3V0aWxzJTIwaW1wb3J0JTIwZGV0ZWN0X292ZXJmbG93JTBBJTBBJTBBY2xhc3MlMjBUNUxheWVyRkYobm4uTW9kdWxlKSUzQSUwQSUyMCUyMCUyMCUyMCU1Qi4uLiU1RCUwQSUwQSUyMCUyMCUyMCUyMGRlZiUyMGZvcndhcmQoc2VsZiUyQyUyMGhpZGRlbl9zdGF0ZXMpJTNBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZm9yd2FyZGVkX3N0YXRlcyUyMCUzRCUyMHNlbGYubGF5ZXJfbm9ybShoaWRkZW5fc3RhdGVzKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGRldGVjdF9vdmVyZmxvdyhmb3J3YXJkZWRfc3RhdGVzJTJDJTIwJTIyYWZ0ZXIlMjBsYXllcl9ub3JtJTIyKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZvcndhcmRlZF9zdGF0ZXMlMjAlM0QlMjBzZWxmLkRlbnNlUmVsdURlbnNlKGZvcndhcmRlZF9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGV0ZWN0X292ZXJmbG93KGZvcndhcmRlZF9zdGF0ZXMlMkMlMjAlMjJhZnRlciUyMERlbnNlUmVsdURlbnNlJTIyKSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJldHVybiUyMGhpZGRlbl9zdGF0ZXMlMjAlMkIlMjBzZWxmLmRyb3BvdXQoZm9yd2FyZGVkX3N0YXRlcyk=",highlighted:`<span class="hljs-keyword">from</span> debug_utils <span class="hljs-keyword">import</span> detect_overflow


<span class="hljs-keyword">class</span> <span class="hljs-title class_">T5LayerFF</span>(nn.Module):
    [...]

    <span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, hidden_states</span>):
        forwarded_states = self.layer_norm(hidden_states)
        detect_overflow(forwarded_states, <span class="hljs-string">&quot;after layer_norm&quot;</span>)
        forwarded_states = self.DenseReluDense(forwarded_states)
        detect_overflow(forwarded_states, <span class="hljs-string">&quot;after DenseReluDense&quot;</span>)
        <span class="hljs-keyword">return</span> hidden_states + self.dropout(forwarded_states)`,wrap:!1}}),Ms=new T({props:{code:"ZnJvbSUyMC5kZWJ1Z191dGlscyUyMGltcG9ydCUyMERlYnVnVW5kZXJmbG93T3ZlcmZsb3clMEElMEFkZWJ1Z19vdmVyZmxvdyUyMCUzRCUyMERlYnVnVW5kZXJmbG93T3ZlcmZsb3cobW9kZWwlMkMlMjBtYXhfZnJhbWVzX3RvX3NhdmUlM0QxMDAp",highlighted:`<span class="hljs-keyword">from</span> .debug_utils <span class="hljs-keyword">import</span> DebugUnderflowOverflow

debug_overflow = DebugUnderflowOverflow(model, max_frames_to_save=<span class="hljs-number">100</span>)`,wrap:!1}}),js=new Be({props:{title:"Tracciamento della mistura assoluta del lotto specifico e del valore massimo",local:"tracciamento-della-mistura-assoluta-del-lotto-specifico-e-del-valore-massimo",headingTag:"h3"}}),Ts=new T({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwdHJhY2VfYmF0Y2hfbnVtcyUzRCU1QjElMkMlMjAzJTVEKQ==",highlighted:'debug_overflow = DebugUnderflowOverflow(model, trace_batch_nums=[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>])',wrap:!1}}),Is=new T({props:{code:"JTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKioqJTIwU3RhcnRpbmclMjBiYXRjaCUyMG51bWJlciUzRDElMjAqKiolMEFhYnMlMjBtaW4lMjAlMjBhYnMlMjBtYXglMjAlMjBtZXRhZGF0YSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNoYXJlZCUyMEVtYmVkZGluZyUwQTEuMDFlLTA2JTIwNy45MmUlMkIwMiUyMHdlaWdodCUwQTAuMDBlJTJCMDAlMjAyLjQ3ZSUyQjA0JTIwaW5wdXQlNUIwJTVEJTBBNS4zNmUtMDUlMjA3LjkyZSUyQjAyJTIwb3V0cHV0JTBBJTVCLi4uJTVEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGVjb2Rlci5kcm9wb3V0JTIwRHJvcG91dCUwQTEuNjBlLTA3JTIwMi4yN2UlMkIwMSUyMGlucHV0JTVCMCU1RCUwQTAuMDBlJTJCMDAlMjAyLjUyZSUyQjAxJTIwb3V0cHV0JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwZGVjb2RlciUyMFQ1U3RhY2slMEElMjAlMjAlMjAlMjAlMjBub3QlMjBhJTIwdGVuc29yJTIwb3V0cHV0JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwbG1faGVhZCUyMExpbmVhciUwQTEuMDFlLTA2JTIwNy45MmUlMkIwMiUyMHdlaWdodCUwQTAuMDBlJTJCMDAlMjAxLjExZSUyQjAwJTIwaW5wdXQlNUIwJTVEJTBBNi4wNmUtMDIlMjA4LjM5ZSUyQjAxJTIwb3V0cHV0JTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwVDVGb3JDb25kaXRpb25hbEdlbmVyYXRpb24lMEElMjAlMjAlMjAlMjAlMjBub3QlMjBhJTIwdGVuc29yJTIwb3V0cHV0JTBBJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwKioqJTIwU3RhcnRpbmclMjBiYXRjaCUyMG51bWJlciUzRDMlMjAqKiolMEFhYnMlMjBtaW4lMjAlMjBhYnMlMjBtYXglMjAlMjBtZXRhZGF0YSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHNoYXJlZCUyMEVtYmVkZGluZyUwQTEuMDFlLTA2JTIwNy45MmUlMkIwMiUyMHdlaWdodCUwQTAuMDBlJTJCMDAlMjAyLjc4ZSUyQjA0JTIwaW5wdXQlNUIwJTVEJTBBNS4zNmUtMDUlMjA3LjkyZSUyQjAyJTIwb3V0cHV0JTBBJTVCLi4uJTVE",highlighted:`                  *** Starting batch number=1 ***
abs min  abs max  metadata
                  shared Embedding
1.01e<span class="hljs-string">-06</span> 7.92e<span class="hljs-string">+02</span> weight
0.00e<span class="hljs-string">+00</span> 2.47e<span class="hljs-string">+04</span> input[0]
5.36e<span class="hljs-string">-05</span> 7.92e<span class="hljs-string">+02</span> output
[...]
                  decoder.dropout Dropout
1.60e<span class="hljs-string">-07</span> 2.27e<span class="hljs-string">+01</span> input[0]
0.00e<span class="hljs-string">+00</span> 2.52e<span class="hljs-string">+01</span> output
                  decoder T5Stack
     not a tensor output
                  lm_head Linear
1.01e<span class="hljs-string">-06</span> 7.92e<span class="hljs-string">+02</span> weight
0.00e<span class="hljs-string">+00</span> 1.11e<span class="hljs-string">+00</span> input[0]
6.06e<span class="hljs-string">-02</span> 8.39e<span class="hljs-string">+01</span> output
                   T5ForConditionalGeneration
     not a tensor output

                  *** Starting batch number=3 ***
abs min  abs max  metadata
                  shared Embedding
1.01e<span class="hljs-string">-06</span> 7.92e<span class="hljs-string">+02</span> weight
0.00e<span class="hljs-string">+00</span> 2.78e<span class="hljs-string">+04</span> input[0]
5.36e<span class="hljs-string">-05</span> 7.92e<span class="hljs-string">+02</span> output
[...]`,wrap:!1}}),fs=new T({props:{code:"ZGVidWdfb3ZlcmZsb3clMjAlM0QlMjBEZWJ1Z1VuZGVyZmxvd092ZXJmbG93KG1vZGVsJTJDJTIwdHJhY2VfYmF0Y2hfbnVtcyUzRCU1QjElMkMlMjAzJTVEJTJDJTIwYWJvcnRfYWZ0ZXJfYmF0Y2hfbnVtJTNEMyk=",highlighted:'debug_overflow = DebugUnderflowOverflow(model, trace_batch_nums=[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>], abort_after_batch_num=<span class="hljs-number">3</span>)',wrap:!1}}),{c(){u=p("meta"),b=n(),o=p("p"),J=n(),c(f.$$.fragment),Zs=n(),c(C.$$.fragment),As=n(),Z=p("p"),Z.innerHTML=ge,vs=n(),c(A.$$.fragment),Gs=n(),v=p("p"),v.textContent=ke,Vs=n(),c(G.$$.fragment),Bs=n(),V=p("p"),V.textContent=_e,Rs=n(),B=p("p"),B.textContent=Le,$s=n(),R=p("p"),R.textContent=Ne,gs=n(),$=p("p"),$.innerHTML=We,ks=n(),c(g.$$.fragment),_s=n(),k=p("p"),k.textContent=xe,Ls=n(),c(_.$$.fragment),Ns=n(),c(I.$$.fragment),Ws=n(),c(y.$$.fragment),xs=n(),c(U.$$.fragment),Es=n(),L=p("p"),L.innerHTML=Ee,Qs=n(),N=p("p"),N.innerHTML=Qe,Xs=n(),c(W.$$.fragment),zs=n(),x=p("p"),x.innerHTML=Xe,Ds=n(),E=p("p"),E.textContent=ze,Ss=n(),c(Q.$$.fragment),Hs=n(),X=p("p"),X.innerHTML=De,Ys=n(),c(z.$$.fragment),Fs=n(),D=p("p"),D.textContent=Se,Ps=n(),S=p("p"),S.innerHTML=He,qs=n(),H=p("p"),H.innerHTML=Ye,Ks=n(),Y=p("p"),Y.textContent=Fe,Os=n(),c(F.$$.fragment),se=n(),P=p("p"),P.innerHTML=Pe,ee=n(),q=p("p"),q.textContent=qe,le=n(),c(K.$$.fragment),ae=n(),O=p("p"),O.innerHTML=Ke,ne=n(),ss=p("p"),ss.innerHTML=Oe,te=n(),es=p("p"),es.textContent=sl,pe=n(),ls=p("p"),ls.innerHTML=el,ie=n(),c(as.$$.fragment),re=n(),ns=p("p"),ns.innerHTML=ll,ue=n(),ts=p("p"),ts.innerHTML=al,oe=n(),ps=p("p"),ps.innerHTML=nl,ce=n(),c(is.$$.fragment),me=n(),rs=p("p"),rs.innerHTML=tl,Me=n(),c(us.$$.fragment),je=n(),os=p("p"),os.innerHTML=pl,de=n(),cs=p("p"),cs.innerHTML=il,we=n(),ms=p("p"),ms.textContent=rl,Te=n(),c(Ms.$$.fragment),be=n(),c(js.$$.fragment),Je=n(),ds=p("p"),ds.textContent=ul,he=n(),ws=p("p"),ws.innerHTML=ol,Ie=n(),c(Ts.$$.fragment),ye=n(),bs=p("p"),bs.textContent=cl,Ue=n(),Js=p("p"),Js.textContent=ml,fe=n(),hs=p("p"),hs.textContent=Ml,Ce=n(),c(Is.$$.fragment),Ze=n(),ys=p("p"),ys.textContent=jl,Ae=n(),Us=p("p"),Us.textContent=dl,ve=n(),c(fs.$$.fragment),Ge=n(),Cs=p("p"),this.h()},l(s){const e=Cl("svelte-u9bgzb",document.head);u=i(e,"META",{name:!0,content:!0}),e.forEach(l),b=t(s),o=i(s,"P",{}),Jl(o).forEach(l),J=t(s),m(f.$$.fragment,s),Zs=t(s),m(C.$$.fragment,s),As=t(s),Z=i(s,"P",{"data-svelte-h":!0}),r(Z)!=="svelte-1hyjvm9"&&(Z.innerHTML=ge),vs=t(s),m(A.$$.fragment,s),Gs=t(s),v=i(s,"P",{"data-svelte-h":!0}),r(v)!=="svelte-1vrdhm3"&&(v.textContent=ke),Vs=t(s),m(G.$$.fragment,s),Bs=t(s),V=i(s,"P",{"data-svelte-h":!0}),r(V)!=="svelte-1vjn6kw"&&(V.textContent=_e),Rs=t(s),B=i(s,"P",{"data-svelte-h":!0}),r(B)!=="svelte-1miebc0"&&(B.textContent=Le),$s=t(s),R=i(s,"P",{"data-svelte-h":!0}),r(R)!=="svelte-egqa4x"&&(R.textContent=Ne),gs=t(s),$=i(s,"P",{"data-svelte-h":!0}),r($)!=="svelte-1tcqpd7"&&($.innerHTML=We),ks=t(s),m(g.$$.fragment,s),_s=t(s),k=i(s,"P",{"data-svelte-h":!0}),r(k)!=="svelte-mci54i"&&(k.textContent=xe),Ls=t(s),m(_.$$.fragment,s),Ns=t(s),m(I.$$.fragment,s),Ws=t(s),m(y.$$.fragment,s),xs=t(s),m(U.$$.fragment,s),Es=t(s),L=i(s,"P",{"data-svelte-h":!0}),r(L)!=="svelte-1m6be6"&&(L.innerHTML=Ee),Qs=t(s),N=i(s,"P",{"data-svelte-h":!0}),r(N)!=="svelte-2w4vg4"&&(N.innerHTML=Qe),Xs=t(s),m(W.$$.fragment,s),zs=t(s),x=i(s,"P",{"data-svelte-h":!0}),r(x)!=="svelte-1k981gw"&&(x.innerHTML=Xe),Ds=t(s),E=i(s,"P",{"data-svelte-h":!0}),r(E)!=="svelte-4ei2dy"&&(E.textContent=ze),Ss=t(s),m(Q.$$.fragment,s),Hs=t(s),X=i(s,"P",{"data-svelte-h":!0}),r(X)!=="svelte-6tyy5y"&&(X.innerHTML=De),Ys=t(s),m(z.$$.fragment,s),Fs=t(s),D=i(s,"P",{"data-svelte-h":!0}),r(D)!=="svelte-kogqcu"&&(D.textContent=Se),Ps=t(s),S=i(s,"P",{"data-svelte-h":!0}),r(S)!=="svelte-8epfn9"&&(S.innerHTML=He),qs=t(s),H=i(s,"P",{"data-svelte-h":!0}),r(H)!=="svelte-dpn4oc"&&(H.innerHTML=Ye),Ks=t(s),Y=i(s,"P",{"data-svelte-h":!0}),r(Y)!=="svelte-1rpi62k"&&(Y.textContent=Fe),Os=t(s),m(F.$$.fragment,s),se=t(s),P=i(s,"P",{"data-svelte-h":!0}),r(P)!=="svelte-uzqol6"&&(P.innerHTML=Pe),ee=t(s),q=i(s,"P",{"data-svelte-h":!0}),r(q)!=="svelte-yq6hxy"&&(q.textContent=qe),le=t(s),m(K.$$.fragment,s),ae=t(s),O=i(s,"P",{"data-svelte-h":!0}),r(O)!=="svelte-1ozg43v"&&(O.innerHTML=Ke),ne=t(s),ss=i(s,"P",{"data-svelte-h":!0}),r(ss)!=="svelte-1ctj5ht"&&(ss.innerHTML=Oe),te=t(s),es=i(s,"P",{"data-svelte-h":!0}),r(es)!=="svelte-ye3dns"&&(es.textContent=sl),pe=t(s),ls=i(s,"P",{"data-svelte-h":!0}),r(ls)!=="svelte-x6ixjy"&&(ls.innerHTML=el),ie=t(s),m(as.$$.fragment,s),re=t(s),ns=i(s,"P",{"data-svelte-h":!0}),r(ns)!=="svelte-1779sq1"&&(ns.innerHTML=ll),ue=t(s),ts=i(s,"P",{"data-svelte-h":!0}),r(ts)!=="svelte-1qyizrp"&&(ts.innerHTML=al),oe=t(s),ps=i(s,"P",{"data-svelte-h":!0}),r(ps)!=="svelte-6pjqi9"&&(ps.innerHTML=nl),ce=t(s),m(is.$$.fragment,s),me=t(s),rs=i(s,"P",{"data-svelte-h":!0}),r(rs)!=="svelte-nw19bs"&&(rs.innerHTML=tl),Me=t(s),m(us.$$.fragment,s),je=t(s),os=i(s,"P",{"data-svelte-h":!0}),r(os)!=="svelte-1m3tmw7"&&(os.innerHTML=pl),de=t(s),cs=i(s,"P",{"data-svelte-h":!0}),r(cs)!=="svelte-1kpe9jg"&&(cs.innerHTML=il),we=t(s),ms=i(s,"P",{"data-svelte-h":!0}),r(ms)!=="svelte-1gdmp6v"&&(ms.textContent=rl),Te=t(s),m(Ms.$$.fragment,s),be=t(s),m(js.$$.fragment,s),Je=t(s),ds=i(s,"P",{"data-svelte-h":!0}),r(ds)!=="svelte-1ic92zk"&&(ds.textContent=ul),he=t(s),ws=i(s,"P",{"data-svelte-h":!0}),r(ws)!=="svelte-12o5m27"&&(ws.innerHTML=ol),Ie=t(s),m(Ts.$$.fragment,s),ye=t(s),bs=i(s,"P",{"data-svelte-h":!0}),r(bs)!=="svelte-jzxj8u"&&(bs.textContent=cl),Ue=t(s),Js=i(s,"P",{"data-svelte-h":!0}),r(Js)!=="svelte-1q6w0pe"&&(Js.textContent=ml),fe=t(s),hs=i(s,"P",{"data-svelte-h":!0}),r(hs)!=="svelte-w6uanh"&&(hs.textContent=Ml),Ce=t(s),m(Is.$$.fragment,s),Ze=t(s),ys=i(s,"P",{"data-svelte-h":!0}),r(ys)!=="svelte-16p7gx8"&&(ys.textContent=jl),Ae=t(s),Us=i(s,"P",{"data-svelte-h":!0}),r(Us)!=="svelte-1ptunxg"&&(Us.textContent=dl),ve=t(s),m(fs.$$.fragment,s),Ge=t(s),Cs=i(s,"P",{}),Jl(Cs).forEach(l),this.h()},h(){hl(u,"name","hf:doc:metadata"),hl(u,"content",Bl)},m(s,e){Zl(document.head,u),a(s,b,e),a(s,o,e),a(s,J,e),M(f,s,e),a(s,Zs,e),M(C,s,e),a(s,As,e),a(s,Z,e),a(s,vs,e),M(A,s,e),a(s,Gs,e),a(s,v,e),a(s,Vs,e),M(G,s,e),a(s,Bs,e),a(s,V,e),a(s,Rs,e),a(s,B,e),a(s,$s,e),a(s,R,e),a(s,gs,e),a(s,$,e),a(s,ks,e),M(g,s,e),a(s,_s,e),a(s,k,e),a(s,Ls,e),M(_,s,e),a(s,Ns,e),M(I,s,e),a(s,Ws,e),M(y,s,e),a(s,xs,e),M(U,s,e),a(s,Es,e),a(s,L,e),a(s,Qs,e),a(s,N,e),a(s,Xs,e),M(W,s,e),a(s,zs,e),a(s,x,e),a(s,Ds,e),a(s,E,e),a(s,Ss,e),M(Q,s,e),a(s,Hs,e),a(s,X,e),a(s,Ys,e),M(z,s,e),a(s,Fs,e),a(s,D,e),a(s,Ps,e),a(s,S,e),a(s,qs,e),a(s,H,e),a(s,Ks,e),a(s,Y,e),a(s,Os,e),M(F,s,e),a(s,se,e),a(s,P,e),a(s,ee,e),a(s,q,e),a(s,le,e),M(K,s,e),a(s,ae,e),a(s,O,e),a(s,ne,e),a(s,ss,e),a(s,te,e),a(s,es,e),a(s,pe,e),a(s,ls,e),a(s,ie,e),M(as,s,e),a(s,re,e),a(s,ns,e),a(s,ue,e),a(s,ts,e),a(s,oe,e),a(s,ps,e),a(s,ce,e),M(is,s,e),a(s,me,e),a(s,rs,e),a(s,Me,e),M(us,s,e),a(s,je,e),a(s,os,e),a(s,de,e),a(s,cs,e),a(s,we,e),a(s,ms,e),a(s,Te,e),M(Ms,s,e),a(s,be,e),M(js,s,e),a(s,Je,e),a(s,ds,e),a(s,he,e),a(s,ws,e),a(s,Ie,e),M(Ts,s,e),a(s,ye,e),a(s,bs,e),a(s,Ue,e),a(s,Js,e),a(s,fe,e),a(s,hs,e),a(s,Ce,e),M(Is,s,e),a(s,Ze,e),a(s,ys,e),a(s,Ae,e),a(s,Us,e),a(s,ve,e),M(fs,s,e),a(s,Ge,e),a(s,Cs,e),Ve=!0},p(s,[e]){const wl={};e&2&&(wl.$$scope={dirty:e,ctx:s}),I.$set(wl);const Tl={};e&2&&(Tl.$$scope={dirty:e,ctx:s}),y.$set(Tl);const bl={};e&2&&(bl.$$scope={dirty:e,ctx:s}),U.$set(bl)},i(s){Ve||(j(f.$$.fragment,s),j(C.$$.fragment,s),j(A.$$.fragment,s),j(G.$$.fragment,s),j(g.$$.fragment,s),j(_.$$.fragment,s),j(I.$$.fragment,s),j(y.$$.fragment,s),j(U.$$.fragment,s),j(W.$$.fragment,s),j(Q.$$.fragment,s),j(z.$$.fragment,s),j(F.$$.fragment,s),j(K.$$.fragment,s),j(as.$$.fragment,s),j(is.$$.fragment,s),j(us.$$.fragment,s),j(Ms.$$.fragment,s),j(js.$$.fragment,s),j(Ts.$$.fragment,s),j(Is.$$.fragment,s),j(fs.$$.fragment,s),Ve=!0)},o(s){d(f.$$.fragment,s),d(C.$$.fragment,s),d(A.$$.fragment,s),d(G.$$.fragment,s),d(g.$$.fragment,s),d(_.$$.fragment,s),d(I.$$.fragment,s),d(y.$$.fragment,s),d(U.$$.fragment,s),d(W.$$.fragment,s),d(Q.$$.fragment,s),d(z.$$.fragment,s),d(F.$$.fragment,s),d(K.$$.fragment,s),d(as.$$.fragment,s),d(is.$$.fragment,s),d(us.$$.fragment,s),d(Ms.$$.fragment,s),d(js.$$.fragment,s),d(Ts.$$.fragment,s),d(Is.$$.fragment,s),d(fs.$$.fragment,s),Ve=!1},d(s){s&&(l(b),l(o),l(J),l(Zs),l(As),l(Z),l(vs),l(Gs),l(v),l(Vs),l(Bs),l(V),l(Rs),l(B),l($s),l(R),l(gs),l($),l(ks),l(_s),l(k),l(Ls),l(Ns),l(Ws),l(xs),l(Es),l(L),l(Qs),l(N),l(Xs),l(zs),l(x),l(Ds),l(E),l(Ss),l(Hs),l(X),l(Ys),l(Fs),l(D),l(Ps),l(S),l(qs),l(H),l(Ks),l(Y),l(Os),l(se),l(P),l(ee),l(q),l(le),l(ae),l(O),l(ne),l(ss),l(te),l(es),l(pe),l(ls),l(ie),l(re),l(ns),l(ue),l(ts),l(oe),l(ps),l(ce),l(me),l(rs),l(Me),l(je),l(os),l(de),l(cs),l(we),l(ms),l(Te),l(be),l(Je),l(ds),l(he),l(ws),l(Ie),l(ye),l(bs),l(Ue),l(Js),l(fe),l(hs),l(Ce),l(Ze),l(ys),l(Ae),l(Us),l(ve),l(Ge),l(Cs)),l(u),w(f,s),w(C,s),w(A,s),w(G,s),w(g,s),w(_,s),w(I,s),w(y,s),w(U,s),w(W,s),w(Q,s),w(z,s),w(F,s),w(K,s),w(as,s),w(is,s),w(us,s),w(Ms,s),w(js,s),w(Ts,s),w(Is,s),w(fs,s)}}}const Bl='{"title":"Debugging","local":"debugging","sections":[{"title":"Debug dei problemi di rete multi-GPU","local":"debug-dei-problemi-di-rete-multi-gpu","sections":[],"depth":2},{"title":"Rilevamento di Underflow e Overflow","local":"rilevamento-di-underflow-e-overflow","sections":[{"title":"Tracciamento della mistura assoluta del lotto specifico e del valore massimo","local":"tracciamento-della-mistura-assoluta-del-lotto-specifico-e-del-valore-massimo","sections":[],"depth":3}],"depth":2}],"depth":1}';function Rl(h){return yl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nl extends Ul{constructor(u){super(),fl(this,u,Rl,Vl,Il,{})}}export{Nl as component};
