import{S as Bd,i as Vd,s as Nd,e as s,k as m,w as y,t as o,M as Pd,c as r,d as n,m as p,a as i,x as w,h as a,b as d,G as e,g as _,y as M,q as T,o as k,B as A,v as Gd,L as Kt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Wo}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as et}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Y}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Dt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Fd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduQ29uZmlnJTJDJTIwQWxpZ25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnbkNvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduTW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZyUwQSUwQSUyMyUyMFdlJTIwY2FuJTIwYWxzbyUyMGluaXRpYWxpemUlMjBhJTIwQWxpZ25Db25maWclMjBmcm9tJTIwYSUyMEFsaWduVGV4dENvbmZpZyUyMGFuZCUyMGElMjBBbGlnblZpc2lvbkNvbmZpZyUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBbGlnblRleHRDb25maWclMkMlMjBBbGlnblZpc2lvbkNvbmZpZyUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMEFMSUdOJTIwVGV4dCUyMGFuZCUyMFZpc2lvbiUyMGNvbmZpZ3VyYXRpb25zJTBBY29uZmlnX3RleHQlMjAlM0QlMjBBbGlnblRleHRDb25maWcoKSUwQWNvbmZpZ192aXNpb24lMjAlM0QlMjBBbGlnblZpc2lvbkNvbmZpZygpJTBBJTBBY29uZmlnJTIwJTNEJTIwQWxpZ25Db25maWcuZnJvbV90ZXh0X3Zpc2lvbl9jb25maWdzKGNvbmZpZ190ZXh0JTJDJTIwY29uZmlnX3Zpc2lvbik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignConfig, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We can also initialize a AlignConfig from a AlignTextConfig and a AlignVisionConfig</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignTextConfig, AlignVisionConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing ALIGN Text and Vision configurations</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = AlignTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = AlignVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AlignConfig.from_text_vision_configs(config_text, config_vision)`}}),{c(){c=s("p"),v=o("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function Rd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduVGV4dENvbmZpZyUyQyUyMEFsaWduVGV4dE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduVGV4dENvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnblRleHRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnblRleHRNb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwa2FrYW9icmFpbiUyRmFsaWduLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEFsaWduVGV4dE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignTextConfig, AlignTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignTextConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignTextModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignTextModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=s("p"),v=o("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function qd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsaWduVmlzaW9uQ29uZmlnJTJDJTIwQWxpZ25WaXNpb25Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBBbGlnblZpc2lvbkNvbmZpZyUyMHdpdGglMjBrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGlnblZpc2lvbkNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEFsaWduVmlzaW9uTW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBBbGlnblZpc2lvbk1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlignVisionConfig, AlignVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignVisionConfig with kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AlignVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AlignVisionModel (with random weights) from the kakaobrain/align-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignVisionModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){c=s("p"),v=o("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function Sd($){let c,v,u,f,b;return{c(){c=s("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(h,"CODE",{});var x=i(u);f=a(x,"Module"),x.forEach(n),b=a(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(n)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&n(c)}}}function Ld($){let c,v,u,f,b;return{c(){c=s("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(h,"CODE",{});var x=i(u);f=a(x,"Module"),x.forEach(n),b=a(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(n)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&n(c)}}}function Yd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGlnbk1vZGVsJTBBJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTVCJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwY2F0JTIyJTJDJTIwJTIyYSUyMHBob3RvJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTJDJTIwcGFkZGluZyUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXRleHRfZmVhdHVyZXMlMjAlM0QlMjBtb2RlbC5nZXRfdGV4dF9mZWF0dXJlcygqKmlucHV0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>text_features = model.get_text_features(**inputs)`}}),{c(){c=s("p"),v=o("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function Xd($){let c,v,u,f,b;return{c(){c=s("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(h,"CODE",{});var x=i(u);f=a(x,"Module"),x.forEach(n),b=a(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(n)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&n(c)}}}function Qd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEFsaWduTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEFsaWduTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWltYWdlX2ZlYXR1cmVzJTIwJTNEJTIwbW9kZWwuZ2V0X2ltYWdlX2ZlYXR1cmVzKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AlignModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_features = model.get_image_features(**inputs)`}}),{c(){c=s("p"),v=o("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function Hd($){let c,v,u,f,b;return{c(){c=s("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(h,"CODE",{});var x=i(u);f=a(x,"Module"),x.forEach(n),b=a(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(n)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&n(c)}}}function Od($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGlnblRleHRNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwQWxpZ25UZXh0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUIlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGElMjBkb2clMjIlNUQlMkMlMjBwYWRkaW5nJTNEVHJ1ZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlZF9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQlMjAlMjAlMjMlMjBwb29sZWQlMjAoRU9TJTIwdG9rZW4pJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlignTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignTextModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], padding=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled (EOS token) states</span>`}}),{c(){c=s("p"),v=o("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function Dd($){let c,v,u,f,b;return{c(){c=s("p"),v=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(h,"CODE",{});var x=i(u);f=a(x,"Module"),x.forEach(n),b=a(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(n)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&n(c)}}}function Kd($){let c,v,u,f,b;return f=new et({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Byb2Nlc3NvciUyQyUyMEFsaWduVmlzaW9uTW9kZWwlMEElMEFtb2RlbCUyMCUzRCUyMEFsaWduVmlzaW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMmtha2FvYnJhaW4lMkZhbGlnbi1iYXNlJTIyKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsYXN0X2hpZGRlbl9zdGF0ZSUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFwb29sZWRfb3V0cHV0JTIwJTNEJTIwb3V0cHV0cy5wb29sZXJfb3V0cHV0JTIwJTIwJTIzJTIwcG9vbGVkJTIwQ0xTJTIwc3RhdGVz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AlignVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlignVisionModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooled_output = outputs.pooler_output  <span class="hljs-comment"># pooled CLS states</span>`}}),{c(){c=s("p"),v=o("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(n),u=p(l),w(f.$$.fragment,l)},m(l,h){_(l,c,h),e(c,v),_(l,u,h),M(f,l,h),b=!0},p:Kt,i(l){b||(T(f.$$.fragment,l),b=!0)},o(l){k(f.$$.fragment,l),b=!1},d(l){l&&n(c),l&&n(u),A(f,l)}}}function ec($){let c,v,u,f,b,l,h,x,Za,Uo,D,be,Hn,tt,Wa,On,Ua,Bo,V,Ba,nt,Va,Na,en,Pa,Ga,tn,Fa,Ra,Vo,nn,qa,No,on,Dn,Sa,Po,K,ve,Kn,ot,La,eo,Ya,Go,an,Xa,Fo,j,sn,Qa,Ha,rn,Oa,Da,ln,Ka,es,dn,ts,ns,cn,os,as,Ro,at,qo,ye,ss,st,rs,is,So,ee,we,to,rt,ls,no,ds,Lo,mn,cs,Yo,X,it,ms,lt,ps,hs,fs,dt,gs,ct,us,_s,bs,Me,mt,vs,ys,oo,ws,Ms,Xo,pn,Ts,Qo,te,Te,ao,pt,ks,so,As,Ho,C,ht,$s,Q,hn,xs,Es,fn,js,Cs,ft,Js,zs,Is,ne,Zs,gn,Ws,Us,un,Bs,Vs,Ns,ke,Ps,Ae,gt,Gs,ut,Fs,_n,Rs,qs,Oo,oe,$e,ro,_t,Ss,io,Ls,Do,I,bt,Ys,ae,Xs,bn,Qs,Hs,vt,Os,Ds,Ks,se,er,vn,tr,nr,yn,or,ar,sr,xe,Ko,re,Ee,lo,yt,rr,co,ir,ea,Z,wt,lr,ie,dr,wn,cr,mr,Mt,pr,hr,fr,le,gr,Mn,ur,_r,Tn,br,vr,yr,je,ta,de,Ce,mo,Tt,wr,po,Mr,na,W,kt,Tr,J,kr,kn,Ar,$r,An,xr,Er,$n,jr,Cr,ho,Jr,zr,xn,Ir,Zr,Wr,Je,At,Ur,$t,Br,En,Vr,Nr,Pr,ze,xt,Gr,Et,Fr,jn,Rr,qr,oa,ce,Ie,fo,jt,Sr,go,Lr,aa,E,Ct,Yr,Jt,Xr,Cn,Qr,Hr,Or,zt,Dr,It,Kr,ei,ti,H,Zt,ni,me,oi,Jn,ai,si,uo,ri,ii,li,Ze,di,N,Wt,ci,pe,mi,zn,pi,hi,_o,fi,gi,ui,We,_i,Ue,bi,P,Ut,vi,he,yi,In,wi,Mi,bo,Ti,ki,Ai,Be,$i,Ve,sa,fe,Ne,vo,Bt,xi,yo,Ei,ra,U,Vt,ji,Nt,Ci,Zn,Ji,zi,Ii,Pt,Zi,Gt,Wi,Ui,Bi,G,Ft,Vi,ge,Ni,Wn,Pi,Gi,wo,Fi,Ri,qi,Pe,Si,Ge,ia,ue,Fe,Mo,Rt,Li,To,Yi,la,B,qt,Xi,St,Qi,Un,Hi,Oi,Di,Lt,Ki,Yt,el,tl,nl,F,Xt,ol,_e,al,Bn,sl,rl,ko,il,ll,dl,Re,cl,qe,da;return l=new Y({}),tt=new Y({}),ot=new Y({}),at=new et({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBbGlnblByb2Nlc3NvciUyQyUyMEFsaWduTW9kZWwlMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBbGlnblByb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIya2FrYW9icmFpbiUyRmFsaWduLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGlnbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJrYWthb2JyYWluJTJGYWxpZ24tYmFzZSUyMiklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBY2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMmFuJTIwaW1hZ2UlMjBvZiUyMGElMjBjYXQlMjIlMkMlMjAlMjJhbiUyMGltYWdlJTIwb2YlMjBhJTIwZG9nJTIyJTVEJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKHRleHQlM0RjYW5kaWRhdGVfbGFiZWxzJTJDJTIwaW1hZ2VzJTNEaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBJTIzJTIwdGhpcyUyMGlzJTIwdGhlJTIwaW1hZ2UtdGV4dCUyMHNpbWlsYXJpdHklMjBzY29yZSUwQWxvZ2l0c19wZXJfaW1hZ2UlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0c19wZXJfaW1hZ2UlMEElMEElMjMlMjB3ZSUyMGNhbiUyMHRha2UlMjB0aGUlMjBzb2Z0bWF4JTIwdG8lMjBnZXQlMjB0aGUlMjBsYWJlbCUyMHByb2JhYmlsaXRpZXMlMEFwcm9icyUyMCUzRCUyMGxvZ2l0c19wZXJfaW1hZ2Uuc29mdG1heChkaW0lM0QxKSUwQXByaW50KHByb2JzKQ==",highlighted:`<span class="hljs-keyword">import</span> requests
<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">from</span> transformers <span class="hljs-keyword">import</span> AlignProcessor, AlignModel

processor = AlignProcessor.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)
model = AlignModel.from_pretrained(<span class="hljs-string">&quot;kakaobrain/align-base&quot;</span>)

url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
candidate_labels = [<span class="hljs-string">&quot;an image of a cat&quot;</span>, <span class="hljs-string">&quot;an image of a dog&quot;</span>]

inputs = processor(text=candidate_labels, images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-keyword">with</span> torch.no_grad():
    outputs = model(**inputs)

<span class="hljs-comment"># this is the image-text similarity score</span>
logits_per_image = outputs.logits_per_image

<span class="hljs-comment"># we can take the softmax to get the label probabilities</span>
probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(probs)`}}),rt=new Y({}),pt=new Y({}),ht=new z({props:{name:"class transformers.AlignConfig",anchor:"transformers.AlignConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 640"},{name:"temperature_init_value",val:" = 1.0"},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignConfig.text_config",description:`<strong>text_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/align#transformers.AlignTextConfig">AlignTextConfig</a>.`,name:"text_config"},{anchor:"transformers.AlignConfig.vision_config",description:`<strong>vision_config</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Dictionary of configuration options used to initialize <a href="/docs/transformers/main/en/model_doc/align#transformers.AlignVisionConfig">AlignVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.AlignConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 640) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.AlignConfig.temperature_init_value",description:`<strong>temperature_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The inital value of the <em>temperature</em> paramter. Default is used as per the original ALIGN implementation.`,name:"temperature_init_value"},{anchor:"transformers.AlignConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.AlignConfig.kwargs",description:`<strong>kwargs</strong> (<em>optional</em>) &#x2014;
Dictionary of keyword arguments.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/configuration_align.py#L297"}}),ke=new Dt({props:{anchor:"transformers.AlignConfig.example",$$slots:{default:[Fd]},$$scope:{ctx:$}}}),gt=new z({props:{name:"from_text_vision_configs",anchor:"transformers.AlignConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": AlignTextConfig"},{name:"vision_config",val:": AlignVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/configuration_align.py#L373",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/align#transformers.AlignConfig"
>AlignConfig</a></p>
`}}),_t=new Y({}),bt=new z({props:{name:"class transformers.AlignTextConfig",anchor:"transformers.AlignTextConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Align Text model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel">AlignTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.AlignTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.AlignTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.AlignTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.AlignTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.AlignTextConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.AlignTextConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.AlignTextConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.AlignTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.AlignTextConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel">AlignTextModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.AlignTextConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.AlignTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.AlignTextConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.AlignTextConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.AlignTextConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Padding token id.`,name:"pad_token_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/configuration_align.py#L35"}}),xe=new Dt({props:{anchor:"transformers.AlignTextConfig.example",$$slots:{default:[Rd]},$$scope:{ctx:$}}}),yt=new Y({}),wt=new z({props:{name:"class transformers.AlignVisionConfig",anchor:"transformers.AlignVisionConfig",parameters:[{name:"num_channels",val:": int = 3"},{name:"image_size",val:": int = 600"},{name:"width_coefficient",val:": float = 2.0"},{name:"depth_coefficient",val:": float = 3.1"},{name:"depth_divisor",val:": int = 8"},{name:"kernel_sizes",val:": typing.List[int] = [3, 3, 5, 3, 5, 5, 3]"},{name:"in_channels",val:": typing.List[int] = [32, 16, 24, 40, 80, 112, 192]"},{name:"out_channels",val:": typing.List[int] = [16, 24, 40, 80, 112, 192, 320]"},{name:"depthwise_padding",val:": typing.List[int] = []"},{name:"strides",val:": typing.List[int] = [1, 2, 2, 2, 1, 2, 1]"},{name:"num_block_repeats",val:": typing.List[int] = [1, 2, 2, 3, 3, 4, 1]"},{name:"expand_ratios",val:": typing.List[int] = [1, 6, 6, 6, 6, 6, 6]"},{name:"squeeze_expansion_ratio",val:": float = 0.25"},{name:"hidden_act",val:": str = 'swish'"},{name:"hidden_dim",val:": int = 2560"},{name:"pooling_type",val:": str = 'mean'"},{name:"initializer_range",val:": float = 0.02"},{name:"batch_norm_eps",val:": float = 0.001"},{name:"batch_norm_momentum",val:": float = 0.99"},{name:"drop_connect_rate",val:": float = 0.2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlignVisionConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.AlignVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 600) &#x2014;
The input image size.`,name:"image_size"},{anchor:"transformers.AlignVisionConfig.width_coefficient",description:`<strong>width_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 2.0) &#x2014;
Scaling coefficient for network width at each stage.`,name:"width_coefficient"},{anchor:"transformers.AlignVisionConfig.depth_coefficient",description:`<strong>depth_coefficient</strong> (<code>float</code>, <em>optional</em>, defaults to 3.1) &#x2014;
Scaling coefficient for network depth at each stage.`,name:"depth_coefficient"},{anchor:"transformers.AlignVisionConfig.depth_divisor",description:`<strong>depth_divisor</strong> <code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
A unit of network width.`,name:"depth_divisor"},{anchor:"transformers.AlignVisionConfig.kernel_sizes",description:`<strong>kernel_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[3, 3, 5, 3, 5, 5, 3]</code>) &#x2014;
List of kernel sizes to be used in each block.`,name:"kernel_sizes"},{anchor:"transformers.AlignVisionConfig.in_channels",description:`<strong>in_channels</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[32, 16, 24, 40, 80, 112, 192]</code>) &#x2014;
List of input channel sizes to be used in each block for convolutional layers.`,name:"in_channels"},{anchor:"transformers.AlignVisionConfig.out_channels",description:`<strong>out_channels</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[16, 24, 40, 80, 112, 192, 320]</code>) &#x2014;
List of output channel sizes to be used in each block for convolutional layers.`,name:"out_channels"},{anchor:"transformers.AlignVisionConfig.depthwise_padding",description:`<strong>depthwise_padding</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[]</code>) &#x2014;
List of block indices with square padding.`,name:"depthwise_padding"},{anchor:"transformers.AlignVisionConfig.strides",description:`<strong>strides</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 2, 2, 1, 2, 1]</code>) &#x2014;
List of stride sizes to be used in each block for convolutional layers.`,name:"strides"},{anchor:"transformers.AlignVisionConfig.num_block_repeats",description:`<strong>num_block_repeats</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 2, 2, 3, 3, 4, 1]</code>) &#x2014;
List of the number of times each block is to repeated.`,name:"num_block_repeats"},{anchor:"transformers.AlignVisionConfig.expand_ratios",description:`<strong>expand_ratios</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[1, 6, 6, 6, 6, 6, 6]</code>) &#x2014;
List of scaling coefficient of each block.`,name:"expand_ratios"},{anchor:"transformers.AlignVisionConfig.squeeze_expansion_ratio",description:`<strong>squeeze_expansion_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.25) &#x2014;
Squeeze expansion ratio.`,name:"squeeze_expansion_ratio"},{anchor:"transformers.AlignVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in each block. If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>,
<code>&quot;selu&quot;, </code>&#x201C;gelu_new&#x201D;<code>, </code>&#x201C;silu&#x201D;<code>and</code>&#x201C;mish&#x201D;\` are supported.`,name:"hidden_act"},{anchor:"transformers.AlignVisionConfig.hiddem_dim",description:`<strong>hiddem_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1280) &#x2014;
The hidden dimension of the layer before the classification head.`,name:"hiddem_dim"},{anchor:"transformers.AlignVisionConfig.pooling_type",description:`<strong>pooling_type</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Type of final pooling to be applied before the dense classification head. Available options are [<code>&quot;mean&quot;</code>,
<code>&quot;max&quot;</code>]`,name:"pooling_type"},{anchor:"transformers.AlignVisionConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.AlignVisionConfig.batch_norm_eps",description:`<strong>batch_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-3) &#x2014;
The epsilon used by the batch normalization layers.`,name:"batch_norm_eps"},{anchor:"transformers.AlignVisionConfig.batch_norm_momentum",description:`<strong>batch_norm_momentum</strong> (<code>float</code>, <em>optional</em>, defaults to 0.99) &#x2014;
The momentum used by the batch normalization layers.`,name:"batch_norm_momentum"},{anchor:"transformers.AlignVisionConfig.drop_connect_rate",description:`<strong>drop_connect_rate</strong> (<code>float</code>, <em>optional</em>, defaults to 0.2) &#x2014;
The drop rate for skip connections.`,name:"drop_connect_rate"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/configuration_align.py#L158"}}),je=new Dt({props:{anchor:"transformers.AlignVisionConfig.example",$$slots:{default:[qd]},$$scope:{ctx:$}}}),Tt=new Y({}),kt=new z({props:{name:"class transformers.AlignProcessor",anchor:"transformers.AlignProcessor",parameters:[{name:"image_processor",val:""},{name:"tokenizer",val:""}],parametersDescription:[{anchor:"transformers.AlignProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/efficientnet#transformers.EfficientNetImageProcessor">EfficientNetImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.AlignProcessor.tokenizer",description:`<strong>tokenizer</strong> ([<code>BertTokenizer</code>, <code>BertTokenizerFast</code>]) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/processing_align.py#L24"}}),At=new z({props:{name:"batch_decode",anchor:"transformers.AlignProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/processing_align.py#L104"}}),xt=new z({props:{name:"decode",anchor:"transformers.AlignProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/processing_align.py#L111"}}),jt=new Y({}),Ct=new z({props:{name:"class transformers.AlignModel",anchor:"transformers.AlignModel",parameters:[{name:"config",val:": AlignConfig"}],parametersDescription:[{anchor:"transformers.AlignModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1420"}}),Zt=new z({props:{name:"forward",anchor:"transformers.AlignModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"return_loss",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlignModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
attention_mask (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>
position_ids (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>
token_type_ids (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>):
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>
head_mask (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>):
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>
<p>inputs_embeds (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>):
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.
pixel_values (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>):
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.
return_loss (<code>bool</code>, <em>optional</em>):
Whether or not to return the contrastive loss.
output_attentions (<code>bool</code>, <em>optional</em>):
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.
output_hidden_states (<code>bool</code>, <em>optional</em>):
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.
return_dict (<code>bool</code>, <em>optional</em>):
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"input_ids"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1551"}}),Ze=new Wo({props:{$$slots:{default:[Sd]},$$scope:{ctx:$}}}),Wt=new z({props:{name:"get_text_features",anchor:"transformers.AlignModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlignModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AlignModel.get_text_features.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.AlignModel.get_text_features.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.AlignModel.get_text_features.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.AlignModel.get_text_features.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.AlignModel.get_text_features.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.AlignModel.get_text_features.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.AlignModel.get_text_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.AlignModel.get_text_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1453",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel"
>AlignTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),We=new Wo({props:{$$slots:{default:[Ld]},$$scope:{ctx:$}}}),Ue=new Dt({props:{anchor:"transformers.AlignModel.get_text_features.example",$$slots:{default:[Yd]},$$scope:{ctx:$}}}),Ut=new z({props:{name:"get_image_features",anchor:"transformers.AlignModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlignModel.get_image_features.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AlignModel.get_image_features.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.AlignModel.get_image_features.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1506",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/align#transformers.AlignVisionModel"
>AlignVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Be=new Wo({props:{$$slots:{default:[Xd]},$$scope:{ctx:$}}}),Ve=new Dt({props:{anchor:"transformers.AlignModel.get_image_features.example",$$slots:{default:[Qd]},$$scope:{ctx:$}}}),Bt=new Y({}),Vt=new z({props:{name:"class transformers.AlignTextModel",anchor:"transformers.AlignTextModel",parameters:[{name:"config",val:": AlignTextConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.AlignTextModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1209"}}),Ft=new z({props:{name:"forward",anchor:"transformers.AlignTextModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlignTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AlignTextModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.AlignTextModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.AlignTextModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.AlignTextModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.AlignTextModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>({0}, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.AlignTextModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.AlignTextModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.AlignTextModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1230",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.align.configuration_align.AlignTextConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new Wo({props:{$$slots:{default:[Hd]},$$scope:{ctx:$}}}),Ge=new Dt({props:{anchor:"transformers.AlignTextModel.forward.example",$$slots:{default:[Od]},$$scope:{ctx:$}}}),Rt=new Y({}),qt=new z({props:{name:"class transformers.AlignVisionModel",anchor:"transformers.AlignVisionModel",parameters:[{name:"config",val:": AlignVisionConfig"}],parametersDescription:[{anchor:"transformers.AlignVisionModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/align#transformers.AlignConfig">AlignConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1335"}}),Xt=new z({props:{name:"forward",anchor:"transformers.AlignVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlignVisionModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Pixel values. Padding will be ignored by default should you provide it. Pixel values can be obtained using
<a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/main/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">EfficientNetImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AlignVisionModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.AlignVisionModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/align/modeling_align.py#L1359",returnDescription:`
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.align.configuration_align.AlignVisionConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state after a pooling operation on the spatial dimensions.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, num_channels, height, width)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndNoAttention</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Re=new Wo({props:{$$slots:{default:[Dd]},$$scope:{ctx:$}}}),qe=new Dt({props:{anchor:"transformers.AlignVisionModel.forward.example",$$slots:{default:[Kd]},$$scope:{ctx:$}}}),{c(){c=s("meta"),v=m(),u=s("h1"),f=s("a"),b=s("span"),y(l.$$.fragment),h=m(),x=s("span"),Za=o("ALIGN"),Uo=m(),D=s("h2"),be=s("a"),Hn=s("span"),y(tt.$$.fragment),Wa=m(),On=s("span"),Ua=o("Overview"),Bo=m(),V=s("p"),Ba=o("The ALIGN model was proposed in "),nt=s("a"),Va=o("Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision"),Na=o(" by Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, Tom Duerig. ALIGN is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image classification. ALIGN features a dual-encoder architecture with "),en=s("a"),Pa=o("EfficientNet"),Ga=o(" as its vision encoder and "),tn=s("a"),Fa=o("BERT"),Ra=o(" as its text encoder, and learns to align visual and text representations with contrastive learning. Unlike previous work, ALIGN leverages a massive noisy dataset and shows that the scale of the corpus can be used to achieve SOTA representations with a simple recipe."),Vo=m(),nn=s("p"),qa=o("The abstract from the paper is the following:"),No=m(),on=s("p"),Dn=s("em"),Sa=o("Pre-trained representations are becoming crucial for many NLP and perception tasks. While representation learning in NLP has transitioned to training on raw text without human annotations, visual and vision-language representations still rely heavily on curated training datasets that are expensive or require expert knowledge. For vision applications, representations are mostly learned using datasets with explicit class labels such as ImageNet or OpenImages. For vision-language, popular datasets like Conceptual Captions, MSCOCO, or CLIP all involve a non-trivial data collection (and cleaning) process. This costly curation process limits the size of datasets and hence hinders the scaling of trained models. In this paper, we leverage a noisy dataset of over one billion image alt-text pairs, obtained without expensive filtering or post-processing steps in the Conceptual Captions dataset. A simple dual-encoder architecture learns to align visual and language representations of the image and text pairs using a contrastive loss. We show that the scale of our corpus can make up for its noise and leads to state-of-the-art representations even with such a simple learning scheme. Our visual representation achieves strong performance when transferred to classification tasks such as ImageNet and VTAB. The aligned visual and language representations enables zero-shot image classification and also set new state-of-the-art results on Flickr30K and MSCOCO image-text retrieval benchmarks, even when compared with more sophisticated cross-attention models. The representations also enable cross-modality search with complex text and text + image queries."),Po=m(),K=s("h2"),ve=s("a"),Kn=s("span"),y(ot.$$.fragment),La=m(),eo=s("span"),Ya=o("Usage"),Go=m(),an=s("p"),Xa=o("ALIGN uses EfficientNet to get visual features and BERT to get the text features. Both the text and visual features are then projected to a latent space with identical dimension. The dot product between the projected image and text features is then used as a similarity score."),Fo=m(),j=s("p"),sn=s("a"),Qa=o("AlignProcessor"),Ha=o(" wraps "),rn=s("a"),Oa=o("EfficientNetImageProcessor"),Da=o(" and "),ln=s("a"),Ka=o("BertTokenizer"),es=o(" into a single instance to both encode the text and preprocess the images. The following example shows how to get the image-text similarity scores using "),dn=s("a"),ts=o("AlignProcessor"),ns=o(" and "),cn=s("a"),os=o("AlignModel"),as=o("."),Ro=m(),y(at.$$.fragment),qo=m(),ye=s("p"),ss=o("This model was contributed by "),st=s("a"),rs=o("Alara Dirik"),is=o(`.
The original code is not released, this implementation is based on the Kakao Brain implementation based on the original paper.`),So=m(),ee=s("h2"),we=s("a"),to=s("span"),y(rt.$$.fragment),ls=m(),no=s("span"),ds=o("Resources"),Lo=m(),mn=s("p"),cs=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ALIGN."),Yo=m(),X=s("ul"),it=s("li"),ms=o("A blog post on "),lt=s("a"),ps=o("ALIGN and the COYO-700M dataset"),hs=o("."),fs=m(),dt=s("li"),gs=o("A zero-shot image classification "),ct=s("a"),us=o("demo"),_s=o("."),bs=m(),Me=s("li"),mt=s("a"),vs=o("Model card"),ys=o(" of "),oo=s("code"),ws=o("kakaobrain/align-base"),Ms=o(" model."),Xo=m(),pn=s("p"),Ts=o("If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it. The resource should ideally demonstrate something new instead of duplicating an existing resource."),Qo=m(),te=s("h2"),Te=s("a"),ao=s("span"),y(pt.$$.fragment),ks=m(),so=s("span"),As=o("AlignConfig"),Ho=m(),C=s("div"),y(ht.$$.fragment),$s=m(),Q=s("p"),hn=s("a"),xs=o("AlignConfig"),Es=o(" is the configuration class to store the configuration of a "),fn=s("a"),js=o("AlignModel"),Cs=o(`. It is used to
instantiate a ALIGN model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the ALIGN
`),ft=s("a"),Js=o("kakaobrain/align-base"),zs=o(" architecture."),Is=m(),ne=s("p"),Zs=o("Configuration objects inherit from "),gn=s("a"),Ws=o("PretrainedConfig"),Us=o(` and can be used to control the model outputs. Read the
documentation from `),un=s("a"),Bs=o("PretrainedConfig"),Vs=o(" for more information."),Ns=m(),y(ke.$$.fragment),Ps=m(),Ae=s("div"),y(gt.$$.fragment),Gs=m(),ut=s("p"),Fs=o("Instantiate a "),_n=s("a"),Rs=o("AlignConfig"),qs=o(` (or a derived class) from align text model configuration and align vision model
configuration.`),Oo=m(),oe=s("h2"),$e=s("a"),ro=s("span"),y(_t.$$.fragment),Ss=m(),io=s("span"),Ls=o("AlignTextConfig"),Do=m(),I=s("div"),y(bt.$$.fragment),Ys=m(),ae=s("p"),Xs=o("This is the configuration class to store the configuration of a "),bn=s("a"),Qs=o("AlignTextModel"),Hs=o(`. It is used to instantiate a
ALIGN text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the text encoder of the ALIGN
`),vt=s("a"),Os=o("kakaobrain/align-base"),Ds=o(` architecture. The default values here are
copied from BERT.`),Ks=m(),se=s("p"),er=o("Configuration objects inherit from "),vn=s("a"),tr=o("PretrainedConfig"),nr=o(` and can be used to control the model outputs. Read the
documentation from `),yn=s("a"),or=o("PretrainedConfig"),ar=o(" for more information."),sr=m(),y(xe.$$.fragment),Ko=m(),re=s("h2"),Ee=s("a"),lo=s("span"),y(yt.$$.fragment),rr=m(),co=s("span"),ir=o("AlignVisionConfig"),ea=m(),Z=s("div"),y(wt.$$.fragment),lr=m(),ie=s("p"),dr=o("This is the configuration class to store the configuration of a "),wn=s("a"),cr=o("AlignVisionModel"),mr=o(`. It is used to instantiate a
ALIGN vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder of the ALIGN
`),Mt=s("a"),pr=o("kakaobrain/align-base"),hr=o(` architecture. The default values are copied
from EfficientNet (efficientnet-b7)`),fr=m(),le=s("p"),gr=o("Configuration objects inherit from "),Mn=s("a"),ur=o("PretrainedConfig"),_r=o(` and can be used to control the model outputs. Read the
documentation from `),Tn=s("a"),br=o("PretrainedConfig"),vr=o(" for more information."),yr=m(),y(je.$$.fragment),ta=m(),de=s("h2"),Ce=s("a"),mo=s("span"),y(Tt.$$.fragment),wr=m(),po=s("span"),Mr=o("AlignProcessor"),na=m(),W=s("div"),y(kt.$$.fragment),Tr=m(),J=s("p"),kr=o("Constructs an ALIGN processor which wraps "),kn=s("a"),Ar=o("EfficientNetImageProcessor"),$r=o(` and
`),An=s("a"),xr=o("BertTokenizer"),Er=o("/"),$n=s("a"),jr=o("BertTokenizerFast"),Cr=o(` into a single processor that interits both the image processor and
tokenizer functionalities. See the `),ho=s("code"),Jr=o("__call__()"),zr=o(" and "),xn=s("a"),Ir=o("decode()"),Zr=o(` for more
information.`),Wr=m(),Je=s("div"),y(At.$$.fragment),Ur=m(),$t=s("p"),Br=o("This method forwards all its arguments to BertTokenizerFast\u2019s "),En=s("a"),Vr=o("batch_decode()"),Nr=o(`. Please
refer to the docstring of this method for more information.`),Pr=m(),ze=s("div"),y(xt.$$.fragment),Gr=m(),Et=s("p"),Fr=o("This method forwards all its arguments to BertTokenizerFast\u2019s "),jn=s("a"),Rr=o("decode()"),qr=o(`. Please refer to
the docstring of this method for more information.`),oa=m(),ce=s("h2"),Ie=s("a"),fo=s("span"),y(jt.$$.fragment),Sr=m(),go=s("span"),Lr=o("AlignModel"),aa=m(),E=s("div"),y(Ct.$$.fragment),Yr=m(),Jt=s("p"),Xr=o("This model inherits from "),Cn=s("a"),Qr=o("PreTrainedModel"),Hr=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Or=m(),zt=s("p"),Dr=o("This model is also a PyTorch "),It=s("a"),Kr=o("torch.nn.Module"),ei=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ti=m(),H=s("div"),y(Zt.$$.fragment),ni=m(),me=s("p"),oi=o("The "),Jn=s("a"),ai=o("AlignModel"),si=o(" forward method, overrides the "),uo=s("code"),ri=o("__call__"),ii=o(" special method."),li=m(),y(Ze.$$.fragment),di=m(),N=s("div"),y(Wt.$$.fragment),ci=m(),pe=s("p"),mi=o("The "),zn=s("a"),pi=o("AlignModel"),hi=o(" forward method, overrides the "),_o=s("code"),fi=o("__call__"),gi=o(" special method."),ui=m(),y(We.$$.fragment),_i=m(),y(Ue.$$.fragment),bi=m(),P=s("div"),y(Ut.$$.fragment),vi=m(),he=s("p"),yi=o("The "),In=s("a"),wi=o("AlignModel"),Mi=o(" forward method, overrides the "),bo=s("code"),Ti=o("__call__"),ki=o(" special method."),Ai=m(),y(Be.$$.fragment),$i=m(),y(Ve.$$.fragment),sa=m(),fe=s("h2"),Ne=s("a"),vo=s("span"),y(Bt.$$.fragment),xi=m(),yo=s("span"),Ei=o("AlignTextModel"),ra=m(),U=s("div"),y(Vt.$$.fragment),ji=m(),Nt=s("p"),Ci=o(`The text model from ALIGN without any head or projection on top.
This model inherits from `),Zn=s("a"),Ji=o("PreTrainedModel"),zi=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ii=m(),Pt=s("p"),Zi=o("This model is also a PyTorch "),Gt=s("a"),Wi=o("torch.nn.Module"),Ui=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bi=m(),G=s("div"),y(Ft.$$.fragment),Vi=m(),ge=s("p"),Ni=o("The "),Wn=s("a"),Pi=o("AlignTextModel"),Gi=o(" forward method, overrides the "),wo=s("code"),Fi=o("__call__"),Ri=o(" special method."),qi=m(),y(Pe.$$.fragment),Si=m(),y(Ge.$$.fragment),ia=m(),ue=s("h2"),Fe=s("a"),Mo=s("span"),y(Rt.$$.fragment),Li=m(),To=s("span"),Yi=o("AlignVisionModel"),la=m(),B=s("div"),y(qt.$$.fragment),Xi=m(),St=s("p"),Qi=o(`The vision model from ALIGN without any head or projection on top.
This model inherits from `),Un=s("a"),Hi=o("PreTrainedModel"),Oi=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Di=m(),Lt=s("p"),Ki=o("This model is also a PyTorch "),Yt=s("a"),el=o("torch.nn.Module"),tl=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nl=m(),F=s("div"),y(Xt.$$.fragment),ol=m(),_e=s("p"),al=o("The "),Bn=s("a"),sl=o("AlignVisionModel"),rl=o(" forward method, overrides the "),ko=s("code"),il=o("__call__"),ll=o(" special method."),dl=m(),y(Re.$$.fragment),cl=m(),y(qe.$$.fragment),this.h()},l(t){const g=Pd('[data-svelte="svelte-1phssyn"]',document.head);c=r(g,"META",{name:!0,content:!0}),g.forEach(n),v=p(t),u=r(t,"H1",{class:!0});var Qt=i(u);f=r(Qt,"A",{id:!0,class:!0,href:!0});var Ao=i(f);b=r(Ao,"SPAN",{});var $o=i(b);w(l.$$.fragment,$o),$o.forEach(n),Ao.forEach(n),h=p(Qt),x=r(Qt,"SPAN",{});var xo=i(x);Za=a(xo,"ALIGN"),xo.forEach(n),Qt.forEach(n),Uo=p(t),D=r(t,"H2",{class:!0});var Ht=i(D);be=r(Ht,"A",{id:!0,class:!0,href:!0});var Eo=i(be);Hn=r(Eo,"SPAN",{});var jo=i(Hn);w(tt.$$.fragment,jo),jo.forEach(n),Eo.forEach(n),Wa=p(Ht),On=r(Ht,"SPAN",{});var Co=i(On);Ua=a(Co,"Overview"),Co.forEach(n),Ht.forEach(n),Bo=p(t),V=r(t,"P",{});var S=i(V);Ba=a(S,"The ALIGN model was proposed in "),nt=r(S,"A",{href:!0,rel:!0});var Jo=i(nt);Va=a(Jo,"Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision"),Jo.forEach(n),Na=a(S," by Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yunhsuan Sung, Zhen Li, Tom Duerig. ALIGN is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image classification. ALIGN features a dual-encoder architecture with "),en=r(S,"A",{href:!0});var zo=i(en);Pa=a(zo,"EfficientNet"),zo.forEach(n),Ga=a(S," as its vision encoder and "),tn=r(S,"A",{href:!0});var Io=i(tn);Fa=a(Io,"BERT"),Io.forEach(n),Ra=a(S," as its text encoder, and learns to align visual and text representations with contrastive learning. Unlike previous work, ALIGN leverages a massive noisy dataset and shows that the scale of the corpus can be used to achieve SOTA representations with a simple recipe."),S.forEach(n),Vo=p(t),nn=r(t,"P",{});var ml=i(nn);qa=a(ml,"The abstract from the paper is the following:"),ml.forEach(n),No=p(t),on=r(t,"P",{});var pl=i(on);Dn=r(pl,"EM",{});var hl=i(Dn);Sa=a(hl,"Pre-trained representations are becoming crucial for many NLP and perception tasks. While representation learning in NLP has transitioned to training on raw text without human annotations, visual and vision-language representations still rely heavily on curated training datasets that are expensive or require expert knowledge. For vision applications, representations are mostly learned using datasets with explicit class labels such as ImageNet or OpenImages. For vision-language, popular datasets like Conceptual Captions, MSCOCO, or CLIP all involve a non-trivial data collection (and cleaning) process. This costly curation process limits the size of datasets and hence hinders the scaling of trained models. In this paper, we leverage a noisy dataset of over one billion image alt-text pairs, obtained without expensive filtering or post-processing steps in the Conceptual Captions dataset. A simple dual-encoder architecture learns to align visual and language representations of the image and text pairs using a contrastive loss. We show that the scale of our corpus can make up for its noise and leads to state-of-the-art representations even with such a simple learning scheme. Our visual representation achieves strong performance when transferred to classification tasks such as ImageNet and VTAB. The aligned visual and language representations enables zero-shot image classification and also set new state-of-the-art results on Flickr30K and MSCOCO image-text retrieval benchmarks, even when compared with more sophisticated cross-attention models. The representations also enable cross-modality search with complex text and text + image queries."),hl.forEach(n),pl.forEach(n),Po=p(t),K=r(t,"H2",{class:!0});var ca=i(K);ve=r(ca,"A",{id:!0,class:!0,href:!0});var fl=i(ve);Kn=r(fl,"SPAN",{});var gl=i(Kn);w(ot.$$.fragment,gl),gl.forEach(n),fl.forEach(n),La=p(ca),eo=r(ca,"SPAN",{});var ul=i(eo);Ya=a(ul,"Usage"),ul.forEach(n),ca.forEach(n),Go=p(t),an=r(t,"P",{});var _l=i(an);Xa=a(_l,"ALIGN uses EfficientNet to get visual features and BERT to get the text features. Both the text and visual features are then projected to a latent space with identical dimension. The dot product between the projected image and text features is then used as a similarity score."),_l.forEach(n),Fo=p(t),j=r(t,"P",{});var L=i(j);sn=r(L,"A",{href:!0});var bl=i(sn);Qa=a(bl,"AlignProcessor"),bl.forEach(n),Ha=a(L," wraps "),rn=r(L,"A",{href:!0});var vl=i(rn);Oa=a(vl,"EfficientNetImageProcessor"),vl.forEach(n),Da=a(L," and "),ln=r(L,"A",{href:!0});var yl=i(ln);Ka=a(yl,"BertTokenizer"),yl.forEach(n),es=a(L," into a single instance to both encode the text and preprocess the images. The following example shows how to get the image-text similarity scores using "),dn=r(L,"A",{href:!0});var wl=i(dn);ts=a(wl,"AlignProcessor"),wl.forEach(n),ns=a(L," and "),cn=r(L,"A",{href:!0});var Ml=i(cn);os=a(Ml,"AlignModel"),Ml.forEach(n),as=a(L,"."),L.forEach(n),Ro=p(t),w(at.$$.fragment,t),qo=p(t),ye=r(t,"P",{});var ma=i(ye);ss=a(ma,"This model was contributed by "),st=r(ma,"A",{href:!0,rel:!0});var Tl=i(st);rs=a(Tl,"Alara Dirik"),Tl.forEach(n),is=a(ma,`.
The original code is not released, this implementation is based on the Kakao Brain implementation based on the original paper.`),ma.forEach(n),So=p(t),ee=r(t,"H2",{class:!0});var pa=i(ee);we=r(pa,"A",{id:!0,class:!0,href:!0});var kl=i(we);to=r(kl,"SPAN",{});var Al=i(to);w(rt.$$.fragment,Al),Al.forEach(n),kl.forEach(n),ls=p(pa),no=r(pa,"SPAN",{});var $l=i(no);ds=a($l,"Resources"),$l.forEach(n),pa.forEach(n),Lo=p(t),mn=r(t,"P",{});var xl=i(mn);cs=a(xl,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ALIGN."),xl.forEach(n),Yo=p(t),X=r(t,"UL",{});var Vn=i(X);it=r(Vn,"LI",{});var ha=i(it);ms=a(ha,"A blog post on "),lt=r(ha,"A",{href:!0,rel:!0});var El=i(lt);ps=a(El,"ALIGN and the COYO-700M dataset"),El.forEach(n),hs=a(ha,"."),ha.forEach(n),fs=p(Vn),dt=r(Vn,"LI",{});var fa=i(dt);gs=a(fa,"A zero-shot image classification "),ct=r(fa,"A",{href:!0,rel:!0});var jl=i(ct);us=a(jl,"demo"),jl.forEach(n),_s=a(fa,"."),fa.forEach(n),bs=p(Vn),Me=r(Vn,"LI",{});var Zo=i(Me);mt=r(Zo,"A",{href:!0,rel:!0});var Cl=i(mt);vs=a(Cl,"Model card"),Cl.forEach(n),ys=a(Zo," of "),oo=r(Zo,"CODE",{});var Jl=i(oo);ws=a(Jl,"kakaobrain/align-base"),Jl.forEach(n),Ms=a(Zo," model."),Zo.forEach(n),Vn.forEach(n),Xo=p(t),pn=r(t,"P",{});var zl=i(pn);Ts=a(zl,"If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it. The resource should ideally demonstrate something new instead of duplicating an existing resource."),zl.forEach(n),Qo=p(t),te=r(t,"H2",{class:!0});var ga=i(te);Te=r(ga,"A",{id:!0,class:!0,href:!0});var Il=i(Te);ao=r(Il,"SPAN",{});var Zl=i(ao);w(pt.$$.fragment,Zl),Zl.forEach(n),Il.forEach(n),ks=p(ga),so=r(ga,"SPAN",{});var Wl=i(so);As=a(Wl,"AlignConfig"),Wl.forEach(n),ga.forEach(n),Ho=p(t),C=r(t,"DIV",{class:!0});var O=i(C);w(ht.$$.fragment,O),$s=p(O),Q=r(O,"P",{});var Ot=i(Q);hn=r(Ot,"A",{href:!0});var Ul=i(hn);xs=a(Ul,"AlignConfig"),Ul.forEach(n),Es=a(Ot," is the configuration class to store the configuration of a "),fn=r(Ot,"A",{href:!0});var Bl=i(fn);js=a(Bl,"AlignModel"),Bl.forEach(n),Cs=a(Ot,`. It is used to
instantiate a ALIGN model according to the specified arguments, defining the text model and vision model configs.
Instantiating a configuration with the defaults will yield a similar configuration to that of the ALIGN
`),ft=r(Ot,"A",{href:!0,rel:!0});var Vl=i(ft);Js=a(Vl,"kakaobrain/align-base"),Vl.forEach(n),zs=a(Ot," architecture."),Ot.forEach(n),Is=p(O),ne=r(O,"P",{});var Nn=i(ne);Zs=a(Nn,"Configuration objects inherit from "),gn=r(Nn,"A",{href:!0});var Nl=i(gn);Ws=a(Nl,"PretrainedConfig"),Nl.forEach(n),Us=a(Nn,` and can be used to control the model outputs. Read the
documentation from `),un=r(Nn,"A",{href:!0});var Pl=i(un);Bs=a(Pl,"PretrainedConfig"),Pl.forEach(n),Vs=a(Nn," for more information."),Nn.forEach(n),Ns=p(O),w(ke.$$.fragment,O),Ps=p(O),Ae=r(O,"DIV",{class:!0});var ua=i(Ae);w(gt.$$.fragment,ua),Gs=p(ua),ut=r(ua,"P",{});var _a=i(ut);Fs=a(_a,"Instantiate a "),_n=r(_a,"A",{href:!0});var Gl=i(_n);Rs=a(Gl,"AlignConfig"),Gl.forEach(n),qs=a(_a,` (or a derived class) from align text model configuration and align vision model
configuration.`),_a.forEach(n),ua.forEach(n),O.forEach(n),Oo=p(t),oe=r(t,"H2",{class:!0});var ba=i(oe);$e=r(ba,"A",{id:!0,class:!0,href:!0});var Fl=i($e);ro=r(Fl,"SPAN",{});var Rl=i(ro);w(_t.$$.fragment,Rl),Rl.forEach(n),Fl.forEach(n),Ss=p(ba),io=r(ba,"SPAN",{});var ql=i(io);Ls=a(ql,"AlignTextConfig"),ql.forEach(n),ba.forEach(n),Do=p(t),I=r(t,"DIV",{class:!0});var Se=i(I);w(bt.$$.fragment,Se),Ys=p(Se),ae=r(Se,"P",{});var Pn=i(ae);Xs=a(Pn,"This is the configuration class to store the configuration of a "),bn=r(Pn,"A",{href:!0});var Sl=i(bn);Qs=a(Sl,"AlignTextModel"),Sl.forEach(n),Hs=a(Pn,`. It is used to instantiate a
ALIGN text encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the text encoder of the ALIGN
`),vt=r(Pn,"A",{href:!0,rel:!0});var Ll=i(vt);Os=a(Ll,"kakaobrain/align-base"),Ll.forEach(n),Ds=a(Pn,` architecture. The default values here are
copied from BERT.`),Pn.forEach(n),Ks=p(Se),se=r(Se,"P",{});var Gn=i(se);er=a(Gn,"Configuration objects inherit from "),vn=r(Gn,"A",{href:!0});var Yl=i(vn);tr=a(Yl,"PretrainedConfig"),Yl.forEach(n),nr=a(Gn,` and can be used to control the model outputs. Read the
documentation from `),yn=r(Gn,"A",{href:!0});var Xl=i(yn);or=a(Xl,"PretrainedConfig"),Xl.forEach(n),ar=a(Gn," for more information."),Gn.forEach(n),sr=p(Se),w(xe.$$.fragment,Se),Se.forEach(n),Ko=p(t),re=r(t,"H2",{class:!0});var va=i(re);Ee=r(va,"A",{id:!0,class:!0,href:!0});var Ql=i(Ee);lo=r(Ql,"SPAN",{});var Hl=i(lo);w(yt.$$.fragment,Hl),Hl.forEach(n),Ql.forEach(n),rr=p(va),co=r(va,"SPAN",{});var Ol=i(co);ir=a(Ol,"AlignVisionConfig"),Ol.forEach(n),va.forEach(n),ea=p(t),Z=r(t,"DIV",{class:!0});var Le=i(Z);w(wt.$$.fragment,Le),lr=p(Le),ie=r(Le,"P",{});var Fn=i(ie);dr=a(Fn,"This is the configuration class to store the configuration of a "),wn=r(Fn,"A",{href:!0});var Dl=i(wn);cr=a(Dl,"AlignVisionModel"),Dl.forEach(n),mr=a(Fn,`. It is used to instantiate a
ALIGN vision encoder according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the vision encoder of the ALIGN
`),Mt=r(Fn,"A",{href:!0,rel:!0});var Kl=i(Mt);pr=a(Kl,"kakaobrain/align-base"),Kl.forEach(n),hr=a(Fn,` architecture. The default values are copied
from EfficientNet (efficientnet-b7)`),Fn.forEach(n),fr=p(Le),le=r(Le,"P",{});var Rn=i(le);gr=a(Rn,"Configuration objects inherit from "),Mn=r(Rn,"A",{href:!0});var ed=i(Mn);ur=a(ed,"PretrainedConfig"),ed.forEach(n),_r=a(Rn,` and can be used to control the model outputs. Read the
documentation from `),Tn=r(Rn,"A",{href:!0});var td=i(Tn);br=a(td,"PretrainedConfig"),td.forEach(n),vr=a(Rn," for more information."),Rn.forEach(n),yr=p(Le),w(je.$$.fragment,Le),Le.forEach(n),ta=p(t),de=r(t,"H2",{class:!0});var ya=i(de);Ce=r(ya,"A",{id:!0,class:!0,href:!0});var nd=i(Ce);mo=r(nd,"SPAN",{});var od=i(mo);w(Tt.$$.fragment,od),od.forEach(n),nd.forEach(n),wr=p(ya),po=r(ya,"SPAN",{});var ad=i(po);Mr=a(ad,"AlignProcessor"),ad.forEach(n),ya.forEach(n),na=p(t),W=r(t,"DIV",{class:!0});var Ye=i(W);w(kt.$$.fragment,Ye),Tr=p(Ye),J=r(Ye,"P",{});var R=i(J);kr=a(R,"Constructs an ALIGN processor which wraps "),kn=r(R,"A",{href:!0});var sd=i(kn);Ar=a(sd,"EfficientNetImageProcessor"),sd.forEach(n),$r=a(R,` and
`),An=r(R,"A",{href:!0});var rd=i(An);xr=a(rd,"BertTokenizer"),rd.forEach(n),Er=a(R,"/"),$n=r(R,"A",{href:!0});var id=i($n);jr=a(id,"BertTokenizerFast"),id.forEach(n),Cr=a(R,` into a single processor that interits both the image processor and
tokenizer functionalities. See the `),ho=r(R,"CODE",{});var ld=i(ho);Jr=a(ld,"__call__()"),ld.forEach(n),zr=a(R," and "),xn=r(R,"A",{href:!0});var dd=i(xn);Ir=a(dd,"decode()"),dd.forEach(n),Zr=a(R,` for more
information.`),R.forEach(n),Wr=p(Ye),Je=r(Ye,"DIV",{class:!0});var wa=i(Je);w(At.$$.fragment,wa),Ur=p(wa),$t=r(wa,"P",{});var Ma=i($t);Br=a(Ma,"This method forwards all its arguments to BertTokenizerFast\u2019s "),En=r(Ma,"A",{href:!0});var cd=i(En);Vr=a(cd,"batch_decode()"),cd.forEach(n),Nr=a(Ma,`. Please
refer to the docstring of this method for more information.`),Ma.forEach(n),wa.forEach(n),Pr=p(Ye),ze=r(Ye,"DIV",{class:!0});var Ta=i(ze);w(xt.$$.fragment,Ta),Gr=p(Ta),Et=r(Ta,"P",{});var ka=i(Et);Fr=a(ka,"This method forwards all its arguments to BertTokenizerFast\u2019s "),jn=r(ka,"A",{href:!0});var md=i(jn);Rr=a(md,"decode()"),md.forEach(n),qr=a(ka,`. Please refer to
the docstring of this method for more information.`),ka.forEach(n),Ta.forEach(n),Ye.forEach(n),oa=p(t),ce=r(t,"H2",{class:!0});var Aa=i(ce);Ie=r(Aa,"A",{id:!0,class:!0,href:!0});var pd=i(Ie);fo=r(pd,"SPAN",{});var hd=i(fo);w(jt.$$.fragment,hd),hd.forEach(n),pd.forEach(n),Sr=p(Aa),go=r(Aa,"SPAN",{});var fd=i(go);Lr=a(fd,"AlignModel"),fd.forEach(n),Aa.forEach(n),aa=p(t),E=r(t,"DIV",{class:!0});var q=i(E);w(Ct.$$.fragment,q),Yr=p(q),Jt=r(q,"P",{});var $a=i(Jt);Xr=a($a,"This model inherits from "),Cn=r($a,"A",{href:!0});var gd=i(Cn);Qr=a(gd,"PreTrainedModel"),gd.forEach(n),Hr=a($a,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$a.forEach(n),Or=p(q),zt=r(q,"P",{});var xa=i(zt);Dr=a(xa,"This model is also a PyTorch "),It=r(xa,"A",{href:!0,rel:!0});var ud=i(It);Kr=a(ud,"torch.nn.Module"),ud.forEach(n),ei=a(xa,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xa.forEach(n),ti=p(q),H=r(q,"DIV",{class:!0});var qn=i(H);w(Zt.$$.fragment,qn),ni=p(qn),me=r(qn,"P",{});var Sn=i(me);oi=a(Sn,"The "),Jn=r(Sn,"A",{href:!0});var _d=i(Jn);ai=a(_d,"AlignModel"),_d.forEach(n),si=a(Sn," forward method, overrides the "),uo=r(Sn,"CODE",{});var bd=i(uo);ri=a(bd,"__call__"),bd.forEach(n),ii=a(Sn," special method."),Sn.forEach(n),li=p(qn),w(Ze.$$.fragment,qn),qn.forEach(n),di=p(q),N=r(q,"DIV",{class:!0});var Xe=i(N);w(Wt.$$.fragment,Xe),ci=p(Xe),pe=r(Xe,"P",{});var Ln=i(pe);mi=a(Ln,"The "),zn=r(Ln,"A",{href:!0});var vd=i(zn);pi=a(vd,"AlignModel"),vd.forEach(n),hi=a(Ln," forward method, overrides the "),_o=r(Ln,"CODE",{});var yd=i(_o);fi=a(yd,"__call__"),yd.forEach(n),gi=a(Ln," special method."),Ln.forEach(n),ui=p(Xe),w(We.$$.fragment,Xe),_i=p(Xe),w(Ue.$$.fragment,Xe),Xe.forEach(n),bi=p(q),P=r(q,"DIV",{class:!0});var Qe=i(P);w(Ut.$$.fragment,Qe),vi=p(Qe),he=r(Qe,"P",{});var Yn=i(he);yi=a(Yn,"The "),In=r(Yn,"A",{href:!0});var wd=i(In);wi=a(wd,"AlignModel"),wd.forEach(n),Mi=a(Yn," forward method, overrides the "),bo=r(Yn,"CODE",{});var Md=i(bo);Ti=a(Md,"__call__"),Md.forEach(n),ki=a(Yn," special method."),Yn.forEach(n),Ai=p(Qe),w(Be.$$.fragment,Qe),$i=p(Qe),w(Ve.$$.fragment,Qe),Qe.forEach(n),q.forEach(n),sa=p(t),fe=r(t,"H2",{class:!0});var Ea=i(fe);Ne=r(Ea,"A",{id:!0,class:!0,href:!0});var Td=i(Ne);vo=r(Td,"SPAN",{});var kd=i(vo);w(Bt.$$.fragment,kd),kd.forEach(n),Td.forEach(n),xi=p(Ea),yo=r(Ea,"SPAN",{});var Ad=i(yo);Ei=a(Ad,"AlignTextModel"),Ad.forEach(n),Ea.forEach(n),ra=p(t),U=r(t,"DIV",{class:!0});var He=i(U);w(Vt.$$.fragment,He),ji=p(He),Nt=r(He,"P",{});var ja=i(Nt);Ci=a(ja,`The text model from ALIGN without any head or projection on top.
This model inherits from `),Zn=r(ja,"A",{href:!0});var $d=i(Zn);Ji=a($d,"PreTrainedModel"),$d.forEach(n),zi=a(ja,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ja.forEach(n),Ii=p(He),Pt=r(He,"P",{});var Ca=i(Pt);Zi=a(Ca,"This model is also a PyTorch "),Gt=r(Ca,"A",{href:!0,rel:!0});var xd=i(Gt);Wi=a(xd,"torch.nn.Module"),xd.forEach(n),Ui=a(Ca,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ca.forEach(n),Bi=p(He),G=r(He,"DIV",{class:!0});var Oe=i(G);w(Ft.$$.fragment,Oe),Vi=p(Oe),ge=r(Oe,"P",{});var Xn=i(ge);Ni=a(Xn,"The "),Wn=r(Xn,"A",{href:!0});var Ed=i(Wn);Pi=a(Ed,"AlignTextModel"),Ed.forEach(n),Gi=a(Xn," forward method, overrides the "),wo=r(Xn,"CODE",{});var jd=i(wo);Fi=a(jd,"__call__"),jd.forEach(n),Ri=a(Xn," special method."),Xn.forEach(n),qi=p(Oe),w(Pe.$$.fragment,Oe),Si=p(Oe),w(Ge.$$.fragment,Oe),Oe.forEach(n),He.forEach(n),ia=p(t),ue=r(t,"H2",{class:!0});var Ja=i(ue);Fe=r(Ja,"A",{id:!0,class:!0,href:!0});var Cd=i(Fe);Mo=r(Cd,"SPAN",{});var Jd=i(Mo);w(Rt.$$.fragment,Jd),Jd.forEach(n),Cd.forEach(n),Li=p(Ja),To=r(Ja,"SPAN",{});var zd=i(To);Yi=a(zd,"AlignVisionModel"),zd.forEach(n),Ja.forEach(n),la=p(t),B=r(t,"DIV",{class:!0});var De=i(B);w(qt.$$.fragment,De),Xi=p(De),St=r(De,"P",{});var za=i(St);Qi=a(za,`The vision model from ALIGN without any head or projection on top.
This model inherits from `),Un=r(za,"A",{href:!0});var Id=i(Un);Hi=a(Id,"PreTrainedModel"),Id.forEach(n),Oi=a(za,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),za.forEach(n),Di=p(De),Lt=r(De,"P",{});var Ia=i(Lt);Ki=a(Ia,"This model is also a PyTorch "),Yt=r(Ia,"A",{href:!0,rel:!0});var Zd=i(Yt);el=a(Zd,"torch.nn.Module"),Zd.forEach(n),tl=a(Ia,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ia.forEach(n),nl=p(De),F=r(De,"DIV",{class:!0});var Ke=i(F);w(Xt.$$.fragment,Ke),ol=p(Ke),_e=r(Ke,"P",{});var Qn=i(_e);al=a(Qn,"The "),Bn=r(Qn,"A",{href:!0});var Wd=i(Bn);sl=a(Wd,"AlignVisionModel"),Wd.forEach(n),rl=a(Qn," forward method, overrides the "),ko=r(Qn,"CODE",{});var Ud=i(ko);il=a(Ud,"__call__"),Ud.forEach(n),ll=a(Qn," special method."),Qn.forEach(n),dl=p(Ke),w(Re.$$.fragment,Ke),cl=p(Ke),w(qe.$$.fragment,Ke),Ke.forEach(n),De.forEach(n),this.h()},h(){d(c,"name","hf:doc:metadata"),d(c,"content",JSON.stringify(tc)),d(f,"id","align"),d(f,"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"),d(f,"href","#align"),d(u,"class","relative group"),d(be,"id","overview"),d(be,"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"),d(be,"href","#overview"),d(D,"class","relative group"),d(nt,"href","https://arxiv.org/abs/2102.05918"),d(nt,"rel","nofollow"),d(en,"href","efficientnet"),d(tn,"href","bert"),d(ve,"id","usage"),d(ve,"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"),d(ve,"href","#usage"),d(K,"class","relative group"),d(sn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignProcessor"),d(rn,"href","/docs/transformers/main/en/model_doc/efficientnet#transformers.EfficientNetImageProcessor"),d(ln,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizer"),d(dn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignProcessor"),d(cn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(st,"href","https://huggingface.co/adirik"),d(st,"rel","nofollow"),d(we,"id","resources"),d(we,"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"),d(we,"href","#resources"),d(ee,"class","relative group"),d(lt,"href","https://huggingface.co/blog/vit-align"),d(lt,"rel","nofollow"),d(ct,"href","https://huggingface.co/spaces/adirik/ALIGN-zero-shot-image-classification"),d(ct,"rel","nofollow"),d(mt,"href","https://huggingface.co/kakaobrain/align-base"),d(mt,"rel","nofollow"),d(Te,"id","transformers.AlignConfig"),d(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"),d(Te,"href","#transformers.AlignConfig"),d(te,"class","relative group"),d(hn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignConfig"),d(fn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(ft,"href","https://huggingface.co/kakaobrain/align-base"),d(ft,"rel","nofollow"),d(gn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(un,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(_n,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignConfig"),d(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($e,"id","transformers.AlignTextConfig"),d($e,"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"),d($e,"href","#transformers.AlignTextConfig"),d(oe,"class","relative group"),d(bn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel"),d(vt,"href","https://huggingface.co/kakaobrain/align-base"),d(vt,"rel","nofollow"),d(vn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(yn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ee,"id","transformers.AlignVisionConfig"),d(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"),d(Ee,"href","#transformers.AlignVisionConfig"),d(re,"class","relative group"),d(wn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignVisionModel"),d(Mt,"href","https://huggingface.co/kakaobrain/align-base"),d(Mt,"rel","nofollow"),d(Mn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(Tn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ce,"id","transformers.AlignProcessor"),d(Ce,"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"),d(Ce,"href","#transformers.AlignProcessor"),d(de,"class","relative group"),d(kn,"href","/docs/transformers/main/en/model_doc/efficientnet#transformers.EfficientNetImageProcessor"),d(An,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizer"),d($n,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast"),d(xn,"href","/docs/transformers/main/en/model_doc/owlvit#transformers.OwlViTProcessor.decode"),d(En,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(jn,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),d(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ie,"id","transformers.AlignModel"),d(Ie,"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"),d(Ie,"href","#transformers.AlignModel"),d(ce,"class","relative group"),d(Cn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(It,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(It,"rel","nofollow"),d(Jn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(zn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(In,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ne,"id","transformers.AlignTextModel"),d(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"),d(Ne,"href","#transformers.AlignTextModel"),d(fe,"class","relative group"),d(Zn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Gt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Gt,"rel","nofollow"),d(Wn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel"),d(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Fe,"id","transformers.AlignVisionModel"),d(Fe,"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"),d(Fe,"href","#transformers.AlignVisionModel"),d(ue,"class","relative group"),d(Un,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),d(Yt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Yt,"rel","nofollow"),d(Bn,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignVisionModel"),d(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,c),_(t,v,g),_(t,u,g),e(u,f),e(f,b),M(l,b,null),e(u,h),e(u,x),e(x,Za),_(t,Uo,g),_(t,D,g),e(D,be),e(be,Hn),M(tt,Hn,null),e(D,Wa),e(D,On),e(On,Ua),_(t,Bo,g),_(t,V,g),e(V,Ba),e(V,nt),e(nt,Va),e(V,Na),e(V,en),e(en,Pa),e(V,Ga),e(V,tn),e(tn,Fa),e(V,Ra),_(t,Vo,g),_(t,nn,g),e(nn,qa),_(t,No,g),_(t,on,g),e(on,Dn),e(Dn,Sa),_(t,Po,g),_(t,K,g),e(K,ve),e(ve,Kn),M(ot,Kn,null),e(K,La),e(K,eo),e(eo,Ya),_(t,Go,g),_(t,an,g),e(an,Xa),_(t,Fo,g),_(t,j,g),e(j,sn),e(sn,Qa),e(j,Ha),e(j,rn),e(rn,Oa),e(j,Da),e(j,ln),e(ln,Ka),e(j,es),e(j,dn),e(dn,ts),e(j,ns),e(j,cn),e(cn,os),e(j,as),_(t,Ro,g),M(at,t,g),_(t,qo,g),_(t,ye,g),e(ye,ss),e(ye,st),e(st,rs),e(ye,is),_(t,So,g),_(t,ee,g),e(ee,we),e(we,to),M(rt,to,null),e(ee,ls),e(ee,no),e(no,ds),_(t,Lo,g),_(t,mn,g),e(mn,cs),_(t,Yo,g),_(t,X,g),e(X,it),e(it,ms),e(it,lt),e(lt,ps),e(it,hs),e(X,fs),e(X,dt),e(dt,gs),e(dt,ct),e(ct,us),e(dt,_s),e(X,bs),e(X,Me),e(Me,mt),e(mt,vs),e(Me,ys),e(Me,oo),e(oo,ws),e(Me,Ms),_(t,Xo,g),_(t,pn,g),e(pn,Ts),_(t,Qo,g),_(t,te,g),e(te,Te),e(Te,ao),M(pt,ao,null),e(te,ks),e(te,so),e(so,As),_(t,Ho,g),_(t,C,g),M(ht,C,null),e(C,$s),e(C,Q),e(Q,hn),e(hn,xs),e(Q,Es),e(Q,fn),e(fn,js),e(Q,Cs),e(Q,ft),e(ft,Js),e(Q,zs),e(C,Is),e(C,ne),e(ne,Zs),e(ne,gn),e(gn,Ws),e(ne,Us),e(ne,un),e(un,Bs),e(ne,Vs),e(C,Ns),M(ke,C,null),e(C,Ps),e(C,Ae),M(gt,Ae,null),e(Ae,Gs),e(Ae,ut),e(ut,Fs),e(ut,_n),e(_n,Rs),e(ut,qs),_(t,Oo,g),_(t,oe,g),e(oe,$e),e($e,ro),M(_t,ro,null),e(oe,Ss),e(oe,io),e(io,Ls),_(t,Do,g),_(t,I,g),M(bt,I,null),e(I,Ys),e(I,ae),e(ae,Xs),e(ae,bn),e(bn,Qs),e(ae,Hs),e(ae,vt),e(vt,Os),e(ae,Ds),e(I,Ks),e(I,se),e(se,er),e(se,vn),e(vn,tr),e(se,nr),e(se,yn),e(yn,or),e(se,ar),e(I,sr),M(xe,I,null),_(t,Ko,g),_(t,re,g),e(re,Ee),e(Ee,lo),M(yt,lo,null),e(re,rr),e(re,co),e(co,ir),_(t,ea,g),_(t,Z,g),M(wt,Z,null),e(Z,lr),e(Z,ie),e(ie,dr),e(ie,wn),e(wn,cr),e(ie,mr),e(ie,Mt),e(Mt,pr),e(ie,hr),e(Z,fr),e(Z,le),e(le,gr),e(le,Mn),e(Mn,ur),e(le,_r),e(le,Tn),e(Tn,br),e(le,vr),e(Z,yr),M(je,Z,null),_(t,ta,g),_(t,de,g),e(de,Ce),e(Ce,mo),M(Tt,mo,null),e(de,wr),e(de,po),e(po,Mr),_(t,na,g),_(t,W,g),M(kt,W,null),e(W,Tr),e(W,J),e(J,kr),e(J,kn),e(kn,Ar),e(J,$r),e(J,An),e(An,xr),e(J,Er),e(J,$n),e($n,jr),e(J,Cr),e(J,ho),e(ho,Jr),e(J,zr),e(J,xn),e(xn,Ir),e(J,Zr),e(W,Wr),e(W,Je),M(At,Je,null),e(Je,Ur),e(Je,$t),e($t,Br),e($t,En),e(En,Vr),e($t,Nr),e(W,Pr),e(W,ze),M(xt,ze,null),e(ze,Gr),e(ze,Et),e(Et,Fr),e(Et,jn),e(jn,Rr),e(Et,qr),_(t,oa,g),_(t,ce,g),e(ce,Ie),e(Ie,fo),M(jt,fo,null),e(ce,Sr),e(ce,go),e(go,Lr),_(t,aa,g),_(t,E,g),M(Ct,E,null),e(E,Yr),e(E,Jt),e(Jt,Xr),e(Jt,Cn),e(Cn,Qr),e(Jt,Hr),e(E,Or),e(E,zt),e(zt,Dr),e(zt,It),e(It,Kr),e(zt,ei),e(E,ti),e(E,H),M(Zt,H,null),e(H,ni),e(H,me),e(me,oi),e(me,Jn),e(Jn,ai),e(me,si),e(me,uo),e(uo,ri),e(me,ii),e(H,li),M(Ze,H,null),e(E,di),e(E,N),M(Wt,N,null),e(N,ci),e(N,pe),e(pe,mi),e(pe,zn),e(zn,pi),e(pe,hi),e(pe,_o),e(_o,fi),e(pe,gi),e(N,ui),M(We,N,null),e(N,_i),M(Ue,N,null),e(E,bi),e(E,P),M(Ut,P,null),e(P,vi),e(P,he),e(he,yi),e(he,In),e(In,wi),e(he,Mi),e(he,bo),e(bo,Ti),e(he,ki),e(P,Ai),M(Be,P,null),e(P,$i),M(Ve,P,null),_(t,sa,g),_(t,fe,g),e(fe,Ne),e(Ne,vo),M(Bt,vo,null),e(fe,xi),e(fe,yo),e(yo,Ei),_(t,ra,g),_(t,U,g),M(Vt,U,null),e(U,ji),e(U,Nt),e(Nt,Ci),e(Nt,Zn),e(Zn,Ji),e(Nt,zi),e(U,Ii),e(U,Pt),e(Pt,Zi),e(Pt,Gt),e(Gt,Wi),e(Pt,Ui),e(U,Bi),e(U,G),M(Ft,G,null),e(G,Vi),e(G,ge),e(ge,Ni),e(ge,Wn),e(Wn,Pi),e(ge,Gi),e(ge,wo),e(wo,Fi),e(ge,Ri),e(G,qi),M(Pe,G,null),e(G,Si),M(Ge,G,null),_(t,ia,g),_(t,ue,g),e(ue,Fe),e(Fe,Mo),M(Rt,Mo,null),e(ue,Li),e(ue,To),e(To,Yi),_(t,la,g),_(t,B,g),M(qt,B,null),e(B,Xi),e(B,St),e(St,Qi),e(St,Un),e(Un,Hi),e(St,Oi),e(B,Di),e(B,Lt),e(Lt,Ki),e(Lt,Yt),e(Yt,el),e(Lt,tl),e(B,nl),e(B,F),M(Xt,F,null),e(F,ol),e(F,_e),e(_e,al),e(_e,Bn),e(Bn,sl),e(_e,rl),e(_e,ko),e(ko,il),e(_e,ll),e(F,dl),M(Re,F,null),e(F,cl),M(qe,F,null),da=!0},p(t,[g]){const Qt={};g&2&&(Qt.$$scope={dirty:g,ctx:t}),ke.$set(Qt);const Ao={};g&2&&(Ao.$$scope={dirty:g,ctx:t}),xe.$set(Ao);const $o={};g&2&&($o.$$scope={dirty:g,ctx:t}),je.$set($o);const xo={};g&2&&(xo.$$scope={dirty:g,ctx:t}),Ze.$set(xo);const Ht={};g&2&&(Ht.$$scope={dirty:g,ctx:t}),We.$set(Ht);const Eo={};g&2&&(Eo.$$scope={dirty:g,ctx:t}),Ue.$set(Eo);const jo={};g&2&&(jo.$$scope={dirty:g,ctx:t}),Be.$set(jo);const Co={};g&2&&(Co.$$scope={dirty:g,ctx:t}),Ve.$set(Co);const S={};g&2&&(S.$$scope={dirty:g,ctx:t}),Pe.$set(S);const Jo={};g&2&&(Jo.$$scope={dirty:g,ctx:t}),Ge.$set(Jo);const zo={};g&2&&(zo.$$scope={dirty:g,ctx:t}),Re.$set(zo);const Io={};g&2&&(Io.$$scope={dirty:g,ctx:t}),qe.$set(Io)},i(t){da||(T(l.$$.fragment,t),T(tt.$$.fragment,t),T(ot.$$.fragment,t),T(at.$$.fragment,t),T(rt.$$.fragment,t),T(pt.$$.fragment,t),T(ht.$$.fragment,t),T(ke.$$.fragment,t),T(gt.$$.fragment,t),T(_t.$$.fragment,t),T(bt.$$.fragment,t),T(xe.$$.fragment,t),T(yt.$$.fragment,t),T(wt.$$.fragment,t),T(je.$$.fragment,t),T(Tt.$$.fragment,t),T(kt.$$.fragment,t),T(At.$$.fragment,t),T(xt.$$.fragment,t),T(jt.$$.fragment,t),T(Ct.$$.fragment,t),T(Zt.$$.fragment,t),T(Ze.$$.fragment,t),T(Wt.$$.fragment,t),T(We.$$.fragment,t),T(Ue.$$.fragment,t),T(Ut.$$.fragment,t),T(Be.$$.fragment,t),T(Ve.$$.fragment,t),T(Bt.$$.fragment,t),T(Vt.$$.fragment,t),T(Ft.$$.fragment,t),T(Pe.$$.fragment,t),T(Ge.$$.fragment,t),T(Rt.$$.fragment,t),T(qt.$$.fragment,t),T(Xt.$$.fragment,t),T(Re.$$.fragment,t),T(qe.$$.fragment,t),da=!0)},o(t){k(l.$$.fragment,t),k(tt.$$.fragment,t),k(ot.$$.fragment,t),k(at.$$.fragment,t),k(rt.$$.fragment,t),k(pt.$$.fragment,t),k(ht.$$.fragment,t),k(ke.$$.fragment,t),k(gt.$$.fragment,t),k(_t.$$.fragment,t),k(bt.$$.fragment,t),k(xe.$$.fragment,t),k(yt.$$.fragment,t),k(wt.$$.fragment,t),k(je.$$.fragment,t),k(Tt.$$.fragment,t),k(kt.$$.fragment,t),k(At.$$.fragment,t),k(xt.$$.fragment,t),k(jt.$$.fragment,t),k(Ct.$$.fragment,t),k(Zt.$$.fragment,t),k(Ze.$$.fragment,t),k(Wt.$$.fragment,t),k(We.$$.fragment,t),k(Ue.$$.fragment,t),k(Ut.$$.fragment,t),k(Be.$$.fragment,t),k(Ve.$$.fragment,t),k(Bt.$$.fragment,t),k(Vt.$$.fragment,t),k(Ft.$$.fragment,t),k(Pe.$$.fragment,t),k(Ge.$$.fragment,t),k(Rt.$$.fragment,t),k(qt.$$.fragment,t),k(Xt.$$.fragment,t),k(Re.$$.fragment,t),k(qe.$$.fragment,t),da=!1},d(t){n(c),t&&n(v),t&&n(u),A(l),t&&n(Uo),t&&n(D),A(tt),t&&n(Bo),t&&n(V),t&&n(Vo),t&&n(nn),t&&n(No),t&&n(on),t&&n(Po),t&&n(K),A(ot),t&&n(Go),t&&n(an),t&&n(Fo),t&&n(j),t&&n(Ro),A(at,t),t&&n(qo),t&&n(ye),t&&n(So),t&&n(ee),A(rt),t&&n(Lo),t&&n(mn),t&&n(Yo),t&&n(X),t&&n(Xo),t&&n(pn),t&&n(Qo),t&&n(te),A(pt),t&&n(Ho),t&&n(C),A(ht),A(ke),A(gt),t&&n(Oo),t&&n(oe),A(_t),t&&n(Do),t&&n(I),A(bt),A(xe),t&&n(Ko),t&&n(re),A(yt),t&&n(ea),t&&n(Z),A(wt),A(je),t&&n(ta),t&&n(de),A(Tt),t&&n(na),t&&n(W),A(kt),A(At),A(xt),t&&n(oa),t&&n(ce),A(jt),t&&n(aa),t&&n(E),A(Ct),A(Zt),A(Ze),A(Wt),A(We),A(Ue),A(Ut),A(Be),A(Ve),t&&n(sa),t&&n(fe),A(Bt),t&&n(ra),t&&n(U),A(Vt),A(Ft),A(Pe),A(Ge),t&&n(ia),t&&n(ue),A(Rt),t&&n(la),t&&n(B),A(qt),A(Xt),A(Re),A(qe)}}}const tc={local:"align",sections:[{local:"overview",title:"Overview"},{local:"usage",title:"Usage"},{local:"resources",title:"Resources"},{local:"transformers.AlignConfig",title:"AlignConfig"},{local:"transformers.AlignTextConfig",title:"AlignTextConfig"},{local:"transformers.AlignVisionConfig",title:"AlignVisionConfig"},{local:"transformers.AlignProcessor",title:"AlignProcessor"},{local:"transformers.AlignModel",title:"AlignModel"},{local:"transformers.AlignTextModel",title:"AlignTextModel"},{local:"transformers.AlignVisionModel",title:"AlignVisionModel"}],title:"ALIGN"};function nc($){return Gd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dc extends Bd{constructor(c){super();Vd(this,c,nc,ec,Nd,{})}}export{dc as default,tc as metadata};
