import{s as Fe,o as Ye,n as Be}from"../chunks/scheduler.01eeda35.js";import{S as Qe,i as Ve,g as w,s as n,r as p,m as Ne,A as ze,h as J,f as s,c as o,j as ue,u as i,x as $,n as Le,k as Me,y as b,a as r,v as c,d as u,t as M,w as g}from"../chunks/index.6dd51b66.js";import{D as Re}from"../chunks/Docstring.cb556860.js";import{C as ge}from"../chunks/CodeBlock.19ec9b8c.js";import{E as We}from"../chunks/ExampleCodeBlock.69db56ad.js";import{H as T,E as Se}from"../chunks/index.58fe8f9d.js";function qe(Z){let l,m;return l=new ge({props:{code:"ZnJvbSUyMC4uLm1vZGVsaW5nX3V0aWxzJTIwaW1wb3J0JTIwbW9kZWxfYWRkaXRpb25fZGVidWdnZXIlMEElMEElNDBtb2RlbF9hZGRpdGlvbl9kZWJ1Z2dlciUwQWNsYXNzJTIwTXlNb2RlbChubi5Nb2R1bGUpJTIwJTIzJTIwQ2FuJTIwaW5oZXJpdCUyMGZyb20lMjBQcmVUcmFpbmVkTW9kZWwlMjB0b28lMEElMjAlMjAlMjAlMjAlMjMlMjAuLi4lMjBub3RoaW5nJTIwZWxzZSUyMGNoYW5nZXM=",highlighted:`<span class="hljs-keyword">from</span> ...modeling_utils <span class="hljs-keyword">import</span> model_addition_debugger

<span class="hljs-meta">@model_addition_debugger</span>
<span class="hljs-keyword">class</span> <span class="hljs-title class_">MyModel</span>(nn.Module) <span class="hljs-comment"># Can inherit from PreTrainedModel too</span>
    <span class="hljs-comment"># ... nothing else changes</span>`,wrap:!1}}),{c(){p(l.$$.fragment)},l(a){i(l.$$.fragment,a)},m(a,j){c(l,a,j),m=!0},p:Be,i(a){m||(u(l.$$.fragment,a),m=!0)},o(a){M(l.$$.fragment,a),m=!1},d(a){g(l,a)}}}function Ke(Z){let l,m;return l=new ge({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cm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MC5nZW5lcmF0ZSEpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dCUyMCUzRCUyMG1vZGVsLmZvcndhcmQoKippbnB1dHMp",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlavaProcessor, LlavaForConditionalGeneration
torch.random.manual_seed(<span class="hljs-number">673</span>)

<span class="hljs-comment"># load pretrained model and processor</span>
model_id = <span class="hljs-string">&quot;llava-hf/llava-1.5-7b-hf&quot;</span>
processor = LlavaProcessor.from_pretrained(model_id)
model = LlavaForConditionalGeneration.from_pretrained(model_id, low_cpu_mem_usage=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># create random image input</span>
random_image = Image.fromarray(torch.randint(<span class="hljs-number">0</span>, <span class="hljs-number">256</span>, (<span class="hljs-number">224</span>, <span class="hljs-number">224</span>, <span class="hljs-number">3</span>), dtype=torch.uint8).numpy())

<span class="hljs-comment"># prompt</span>
prompt = <span class="hljs-string">&quot;&lt;image&gt;Describe this image.&quot;</span>

<span class="hljs-comment"># process inputs</span>
inputs = processor(text=prompt, images=random_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-comment"># call forward method (not .generate!)</span>
<span class="hljs-keyword">with</span> torch.no_grad():
    output = model.forward(**inputs)`,wrap:!1}}),{c(){p(l.$$.fragment)},l(a){i(l.$$.fragment,a)},m(a,j){c(l,a,j),m=!0},p:Be,i(a){m||(u(l.$$.fragment,a),m=!0)},o(a){M(l.$$.fragment,a),m=!1},d(a){g(l,a)}}}function Ae(Z){let l,m;return l=new ge({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cmFuc2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W5lcmF0ZSEpJTBBd2l0aCUyMG1vZGVsX2FkZGl0aW9uX2RlYnVnZ2VyX2NvbnRleHQobW9kZWwpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0JTIwJTNEJTIwbW9kZWwuZm9yd2FyZCgqKmlucHV0cyk=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlavaProcessor, LlavaForConditionalGeneration
torch.random.manual_seed(<span class="hljs-number">673</span>)

<span class="hljs-comment"># load pretrained model and processor</span>
model_id = <span class="hljs-string">&quot;llava-hf/llava-1.5-7b-hf&quot;</span>
processor = LlavaProcessor.from_pretrained(model_id)
model = LlavaForConditionalGeneration.from_pretrained(model_id, low_cpu_mem_usage=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># create random image input</span>
random_image = Image.fromarray(torch.randint(<span class="hljs-number">0</span>, <span class="hljs-number">256</span>, (<span class="hljs-number">224</span>, <span class="hljs-number">224</span>, <span class="hljs-number">3</span>), dtype=torch.uint8).numpy())

<span class="hljs-comment"># prompt</span>
prompt = <span class="hljs-string">&quot;&lt;image&gt;Describe this image.&quot;</span>

<span class="hljs-comment"># process inputs</span>
inputs = processor(text=prompt, images=random_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-comment"># call forward method (not .generate!)</span>
<span class="hljs-keyword">with</span> model_addition_debugger_context(model):
    output = model.forward(**inputs)`,wrap:!1}}),{c(){p(l.$$.fragment)},l(a){i(l.$$.fragment,a)},m(a,j){c(l,a,j),m=!0},p:Be,i(a){m||(u(l.$$.fragment,a),m=!0)},o(a){M(l.$$.fragment,a),m=!1},d(a){g(l,a)}}}function Pe(Z){let l,m,a,j,v,D,_,ve="This page lists all the debugging and model adding tools used by the library, as well as the utility functions it provides for it.",O,k,_e="Most of those are only useful if you are adding new models in the library.",ee,E,te,C,ae,I,ke=`This context manager is a power user tool intended for model adders.
It tracks all forward calls within a model forward and logs a slice of each input and output on a nested Json.
To note, this context manager enforces <code>torch.inference_mode()</code>.`,le,x,se,X,Ee="Because when porting models to transformers, even from python to python, model adders often have to do a lot of manual operations, involving saving and loading tensors, comparing dtypes, etc. This small tool can hopefully shave off some time.",ne,G,oe,H,Ce="Add this context manager as follows to debug a model:",re,R,me,d,F,he,Y,fe,S,Ie=`This decorator is a power user tool intended for model adders.
It tracks all forward calls within a model forward and logs a slice of each input and output on a nested Json.
To note, this decorator enforces <code>torch.inference_mode()</code>.`,be,Q,ye,q,xe="add decorator to your model class",we,U,Je,W,de,h,V,je,N,$e,K,Xe=`This context manager is a power user tool intended for model adders.
It tracks all forward calls within a model forward and logs a slice of each input and output on a nested Json.
To note, this context manager enforces <code>torch.inference_mode()</code>.`,Te,z,Ze,A,Ge="add the context manager to a model to debug",Ue,B,pe,L,ie,P,ce;return v=new T({props:{title:"Model debugging toolboxes",local:"model-debugging-toolboxes",headingTag:"h1"}}),E=new T({props:{title:"Model addition debuggers",local:"model-addition-debuggers",headingTag:"h2"}}),C=new T({props:{title:"Model addition debugger - context manager for model adders",local:"model-addition-debugger---context-manager-for-model-adders",headingTag:"h3"}}),x=new T({props:{title:"Rationale",local:"rationale",headingTag:"h3"}}),G=new T({props:{title:"Usage",local:"transformers.model_addition_debugger",headingTag:"h3"}}),R=new ge({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFpbXBvcnQlMjByZXF1ZXN0cyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBMbGF2YVByb2Nlc3NvciUyQyUyMExsYXZhRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBdG9yY2gucmFuZG9tLm1hbnVhbF9zZWVkKDY3MyklMEElMEElMjMlMjBsb2FkJTIwcHJldHJhaW5lZCUyMG1vZGVsJTIwYW5kJTIwcHJ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5mb3J3YXJkKCoqaW5wdXRzKSUwQQ==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> LlavaProcessor, LlavaForConditionalGeneration
torch.random.manual_seed(<span class="hljs-number">673</span>)

<span class="hljs-comment"># load pretrained model and processor</span>
model_id = <span class="hljs-string">&quot;llava-hf/llava-1.5-7b-hf&quot;</span>
processor = LlavaProcessor.from_pretrained(model_id)
model = LlavaForConditionalGeneration.from_pretrained(model_id, low_cpu_mem_usage=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># create random image input</span>
random_image = Image.fromarray(torch.randint(<span class="hljs-number">0</span>, <span class="hljs-number">256</span>, (<span class="hljs-number">224</span>, <span class="hljs-number">224</span>, <span class="hljs-number">3</span>), dtype=torch.uint8).numpy())

<span class="hljs-comment"># prompt</span>
prompt = <span class="hljs-string">&quot;&lt;image&gt;Describe this image.&quot;</span>

<span class="hljs-comment"># process inputs</span>
inputs = processor(text=prompt, images=random_image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-comment"># call forward method (not .generate!)</span>
<span class="hljs-keyword">with</span> model_addition_debugger_context(model, <span class="hljs-string">&quot;optional_path_to_your_output_file.json&quot;</span>):
    output = model.forward(**inputs)
`,wrap:!1}}),F=new Re({props:{name:"transformers.model_addition_debugger",anchor:"transformers.model_addition_debugger",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/model_debugging_utils.py#L228"}}),Y=new T({props:{title:"Model addition debugger - a model adder tracer",local:"model-addition-debugger---a-model-adder-tracer",headingTag:"h1"}}),Q=new T({props:{title:"Usage",local:"usage",headingTag:"h2"}}),U=new We({props:{anchor:"transformers.model_addition_debugger.example",$$slots:{default:[qe]},$$scope:{ctx:Z}}}),W=new We({props:{anchor:"transformers.model_addition_debugger.example-2",$$slots:{default:[Ke]},$$scope:{ctx:Z}}}),V=new Re({props:{name:"transformers.model_addition_debugger_context",anchor:"transformers.model_addition_debugger_context",parameters:[{name:"model",val:""},{name:"debug_path",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/model_debugging_utils.py#L285"}}),N=new T({props:{title:"Model addition debugger - context manager for model adders",local:"model-addition-debugger---context-manager-for-model-adders",headingTag:"h1"}}),z=new T({props:{title:"Usage",local:"usage",headingTag:"h2"}}),B=new We({props:{anchor:"transformers.model_addition_debugger_context.example",$$slots:{default:[Ae]},$$scope:{ctx:Z}}}),L=new Se({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/internal/model_debugging_utils.md"}}),{c(){l=w("meta"),m=n(),a=w("p"),j=n(),p(v.$$.fragment),D=n(),_=w("p"),_.textContent=ve,O=n(),k=w("p"),k.textContent=_e,ee=n(),p(E.$$.fragment),te=n(),p(C.$$.fragment),ae=n(),I=w("p"),I.innerHTML=ke,le=n(),p(x.$$.fragment),se=n(),X=w("p"),X.textContent=Ee,ne=n(),p(G.$$.fragment),oe=n(),H=w("p"),H.textContent=Ce,re=n(),p(R.$$.fragment),me=n(),d=w("div"),p(F.$$.fragment),he=n(),p(Y.$$.fragment),fe=n(),S=w("p"),S.innerHTML=Ie,be=n(),p(Q.$$.fragment),ye=n(),q=w("p"),q.textContent=xe,we=n(),p(U.$$.fragment),Je=Ne(`
Then, in a separate script (example is for Llava)
`),p(W.$$.fragment),de=n(),h=w("div"),p(V.$$.fragment),je=n(),p(N.$$.fragment),$e=n(),K=w("p"),K.innerHTML=Xe,Te=n(),p(z.$$.fragment),Ze=n(),A=w("p"),A.textContent=Ge,Ue=n(),p(B.$$.fragment),pe=n(),p(L.$$.fragment),ie=n(),P=w("p"),this.h()},l(e){const t=ze("svelte-u9bgzb",document.head);l=J(t,"META",{name:!0,content:!0}),t.forEach(s),m=o(e),a=J(e,"P",{}),ue(a).forEach(s),j=o(e),i(v.$$.fragment,e),D=o(e),_=J(e,"P",{"data-svelte-h":!0}),$(_)!=="svelte-4sd845"&&(_.textContent=ve),O=o(e),k=J(e,"P",{"data-svelte-h":!0}),$(k)!=="svelte-x293w1"&&(k.textContent=_e),ee=o(e),i(E.$$.fragment,e),te=o(e),i(C.$$.fragment,e),ae=o(e),I=J(e,"P",{"data-svelte-h":!0}),$(I)!=="svelte-1lvjvx8"&&(I.innerHTML=ke),le=o(e),i(x.$$.fragment,e),se=o(e),X=J(e,"P",{"data-svelte-h":!0}),$(X)!=="svelte-fewkz6"&&(X.textContent=Ee),ne=o(e),i(G.$$.fragment,e),oe=o(e),H=J(e,"P",{"data-svelte-h":!0}),$(H)!=="svelte-jrktnj"&&(H.textContent=Ce),re=o(e),i(R.$$.fragment,e),me=o(e),d=J(e,"DIV",{class:!0});var f=ue(d);i(F.$$.fragment,f),he=o(f),i(Y.$$.fragment,f),fe=o(f),S=J(f,"P",{"data-svelte-h":!0}),$(S)!=="svelte-aviv4m"&&(S.innerHTML=Ie),be=o(f),i(Q.$$.fragment,f),ye=o(f),q=J(f,"P",{"data-svelte-h":!0}),$(q)!=="svelte-1i6bv0z"&&(q.textContent=xe),we=o(f),i(U.$$.fragment,f),Je=Le(f,`
Then, in a separate script (example is for Llava)
`),i(W.$$.fragment,f),f.forEach(s),de=o(e),h=J(e,"DIV",{class:!0});var y=ue(h);i(V.$$.fragment,y),je=o(y),i(N.$$.fragment,y),$e=o(y),K=J(y,"P",{"data-svelte-h":!0}),$(K)!=="svelte-1lvjvx8"&&(K.innerHTML=Xe),Te=o(y),i(z.$$.fragment,y),Ze=o(y),A=J(y,"P",{"data-svelte-h":!0}),$(A)!=="svelte-chd0p3"&&(A.textContent=Ge),Ue=o(y),i(B.$$.fragment,y),y.forEach(s),pe=o(e),i(L.$$.fragment,e),ie=o(e),P=J(e,"P",{}),ue(P).forEach(s),this.h()},h(){Me(l,"name","hf:doc:metadata"),Me(l,"content",De),Me(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Me(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){b(document.head,l),r(e,m,t),r(e,a,t),r(e,j,t),c(v,e,t),r(e,D,t),r(e,_,t),r(e,O,t),r(e,k,t),r(e,ee,t),c(E,e,t),r(e,te,t),c(C,e,t),r(e,ae,t),r(e,I,t),r(e,le,t),c(x,e,t),r(e,se,t),r(e,X,t),r(e,ne,t),c(G,e,t),r(e,oe,t),r(e,H,t),r(e,re,t),c(R,e,t),r(e,me,t),r(e,d,t),c(F,d,null),b(d,he),c(Y,d,null),b(d,fe),b(d,S),b(d,be),c(Q,d,null),b(d,ye),b(d,q),b(d,we),c(U,d,null),b(d,Je),c(W,d,null),r(e,de,t),r(e,h,t),c(V,h,null),b(h,je),c(N,h,null),b(h,$e),b(h,K),b(h,Te),c(z,h,null),b(h,Ze),b(h,A),b(h,Ue),c(B,h,null),r(e,pe,t),c(L,e,t),r(e,ie,t),r(e,P,t),ce=!0},p(e,[t]){const f={};t&2&&(f.$$scope={dirty:t,ctx:e}),U.$set(f);const y={};t&2&&(y.$$scope={dirty:t,ctx:e}),W.$set(y);const He={};t&2&&(He.$$scope={dirty:t,ctx:e}),B.$set(He)},i(e){ce||(u(v.$$.fragment,e),u(E.$$.fragment,e),u(C.$$.fragment,e),u(x.$$.fragment,e),u(G.$$.fragment,e),u(R.$$.fragment,e),u(F.$$.fragment,e),u(Y.$$.fragment,e),u(Q.$$.fragment,e),u(U.$$.fragment,e),u(W.$$.fragment,e),u(V.$$.fragment,e),u(N.$$.fragment,e),u(z.$$.fragment,e),u(B.$$.fragment,e),u(L.$$.fragment,e),ce=!0)},o(e){M(v.$$.fragment,e),M(E.$$.fragment,e),M(C.$$.fragment,e),M(x.$$.fragment,e),M(G.$$.fragment,e),M(R.$$.fragment,e),M(F.$$.fragment,e),M(Y.$$.fragment,e),M(Q.$$.fragment,e),M(U.$$.fragment,e),M(W.$$.fragment,e),M(V.$$.fragment,e),M(N.$$.fragment,e),M(z.$$.fragment,e),M(B.$$.fragment,e),M(L.$$.fragment,e),ce=!1},d(e){e&&(s(m),s(a),s(j),s(D),s(_),s(O),s(k),s(ee),s(te),s(ae),s(I),s(le),s(se),s(X),s(ne),s(oe),s(H),s(re),s(me),s(d),s(de),s(h),s(pe),s(ie),s(P)),s(l),g(v,e),g(E,e),g(C,e),g(x,e),g(G,e),g(R,e),g(F),g(Y),g(Q),g(U),g(W),g(V),g(N),g(z),g(B),g(L,e)}}}const De='{"title":"Model debugging toolboxes","local":"model-debugging-toolboxes","sections":[{"title":"Model addition debuggers","local":"model-addition-debuggers","sections":[{"title":"Model addition debugger - context manager for model adders","local":"model-addition-debugger---context-manager-for-model-adders","sections":[],"depth":3},{"title":"Rationale","local":"rationale","sections":[],"depth":3},{"title":"Usage","local":"transformers.model_addition_debugger","sections":[],"depth":3}],"depth":2}],"depth":1}';function Oe(Z){return Ye(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ot extends Qe{constructor(l){super(),Ve(this,l,Oe,Pe,Fe,{})}}export{ot as component};
