import{S as Bd,i as Vd,s as Nd,e as s,k as m,w as y,t as n,M as Pd,c as r,d as o,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 Wn}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=n("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(o),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&&o(c),l&&o(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=n("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(o),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&&o(c),l&&o(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=n("Example:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Example:"),h.forEach(o),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&&o(c),l&&o(u),A(f,l)}}}function Sd($){let c,v,u,f,b;return{c(){c=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=n("Module"),b=n(`
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(o),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(o)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&o(c)}}}function Ld($){let c,v,u,f,b;return{c(){c=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=n("Module"),b=n(`
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(o),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(o)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&o(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=n("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(o),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&&o(c),l&&o(u),A(f,l)}}}function Xd($){let c,v,u,f,b;return{c(){c=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=n("Module"),b=n(`
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(o),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(o)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&o(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=n("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(o),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&&o(c),l&&o(u),A(f,l)}}}function Hd($){let c,v,u,f,b;return{c(){c=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=n("Module"),b=n(`
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(o),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(o)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&o(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=n("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(o),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&&o(c),l&&o(u),A(f,l)}}}function Dd($){let c,v,u,f,b;return{c(){c=s("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=n("Module"),b=n(`
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(o),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(o)},m(l,h){_(l,c,h),e(c,v),e(c,u),e(u,f),e(c,b)},d(l){l&&o(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=n("Examples:"),u=m(),y(f.$$.fragment)},l(l){c=r(l,"P",{});var h=i(c);v=a(h,"Examples:"),h.forEach(o),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&&o(c),l&&o(u),A(f,l)}}}function ec($){let c,v,u,f,b,l,h,x,Za,Un,D,be,Ho,tt,Wa,Oo,Ua,Bn,V,Ba,ot,Va,Na,eo,Pa,Ga,to,Fa,Ra,Vn,oo,qa,Nn,no,Do,Sa,Pn,K,ve,Ko,nt,La,en,Ya,Gn,ao,Xa,Fn,j,so,Qa,Ha,ro,Oa,Da,io,Ka,es,lo,ts,os,co,ns,as,Rn,at,qn,ye,ss,st,rs,is,Sn,ee,we,tn,rt,ls,on,ds,Ln,mo,cs,Yn,X,it,ms,lt,ps,hs,fs,dt,gs,ct,us,_s,bs,Me,mt,vs,ys,nn,ws,Ms,Xn,po,Ts,Qn,te,Te,an,pt,ks,sn,As,Hn,C,ht,$s,Q,ho,xs,Es,fo,js,Cs,ft,Js,zs,Is,oe,Zs,go,Ws,Us,uo,Bs,Vs,Ns,ke,Ps,Ae,gt,Gs,ut,Fs,_o,Rs,qs,On,ne,$e,rn,_t,Ss,ln,Ls,Dn,I,bt,Ys,ae,Xs,bo,Qs,Hs,vt,Os,Ds,Ks,se,er,vo,tr,or,yo,nr,ar,sr,xe,Kn,re,Ee,dn,yt,rr,cn,ir,ea,Z,wt,lr,ie,dr,wo,cr,mr,Mt,pr,hr,fr,le,gr,Mo,ur,_r,To,br,vr,yr,je,ta,de,Ce,mn,Tt,wr,pn,Mr,oa,W,kt,Tr,J,kr,ko,Ar,$r,Ao,xr,Er,$o,jr,Cr,hn,Jr,zr,xo,Ir,Zr,Wr,Je,At,Ur,$t,Br,Eo,Vr,Nr,Pr,ze,xt,Gr,Et,Fr,jo,Rr,qr,na,ce,Ie,fn,jt,Sr,gn,Lr,aa,E,Ct,Yr,Jt,Xr,Co,Qr,Hr,Or,zt,Dr,It,Kr,ei,ti,H,Zt,oi,me,ni,Jo,ai,si,un,ri,ii,li,Ze,di,N,Wt,ci,pe,mi,zo,pi,hi,_n,fi,gi,ui,We,_i,Ue,bi,P,Ut,vi,he,yi,Io,wi,Mi,bn,Ti,ki,Ai,Be,$i,Ve,sa,fe,Ne,vn,Bt,xi,yn,Ei,ra,U,Vt,ji,Nt,Ci,Zo,Ji,zi,Ii,Pt,Zi,Gt,Wi,Ui,Bi,G,Ft,Vi,ge,Ni,Wo,Pi,Gi,wn,Fi,Ri,qi,Pe,Si,Ge,ia,ue,Fe,Mn,Rt,Li,Tn,Yi,la,B,qt,Xi,St,Qi,Uo,Hi,Oi,Di,Lt,Ki,Yt,el,tl,ol,F,Xt,nl,_e,al,Bo,sl,rl,kn,il,ll,dl,Re,cl,qe,da;return l=new Y({}),tt=new Y({}),nt=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/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/mobilevit#transformers.MobileViTFeatureExtractor.__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 Wn({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/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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 Wn({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/mobilevit#transformers.MobileViTFeatureExtractor.__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 Wn({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/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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 Wn({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/mobilevit#transformers.MobileViTFeatureExtractor.__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 Wn({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=n("ALIGN"),Un=m(),D=s("h2"),be=s("a"),Ho=s("span"),y(tt.$$.fragment),Wa=m(),Oo=s("span"),Ua=n("Overview"),Bn=m(),V=s("p"),Ba=n("The ALIGN model was proposed in "),ot=s("a"),Va=n("Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision"),Na=n(" 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 "),eo=s("a"),Pa=n("EfficientNet"),Ga=n(" as its vision encoder and "),to=s("a"),Fa=n("BERT"),Ra=n(" 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."),Vn=m(),oo=s("p"),qa=n("The abstract from the paper is the following:"),Nn=m(),no=s("p"),Do=s("em"),Sa=n("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."),Pn=m(),K=s("h2"),ve=s("a"),Ko=s("span"),y(nt.$$.fragment),La=m(),en=s("span"),Ya=n("Usage"),Gn=m(),ao=s("p"),Xa=n("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."),Fn=m(),j=s("p"),so=s("a"),Qa=n("AlignProcessor"),Ha=n(" wraps "),ro=s("a"),Oa=n("EfficientNetImageProcessor"),Da=n(" and "),io=s("a"),Ka=n("BertTokenizer"),es=n(" 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 "),lo=s("a"),ts=n("AlignProcessor"),os=n(" and "),co=s("a"),ns=n("AlignModel"),as=n("."),Rn=m(),y(at.$$.fragment),qn=m(),ye=s("p"),ss=n("This model was contributed by "),st=s("a"),rs=n("Alara Dirik"),is=n(`.
The original code is not released, this implementation is based on the Kakao Brain implementation based on the original paper.`),Sn=m(),ee=s("h2"),we=s("a"),tn=s("span"),y(rt.$$.fragment),ls=m(),on=s("span"),ds=n("Resources"),Ln=m(),mo=s("p"),cs=n("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with ALIGN."),Yn=m(),X=s("ul"),it=s("li"),ms=n("A blog post on "),lt=s("a"),ps=n("ALIGN and the COYO-700M dataset"),hs=n("."),fs=m(),dt=s("li"),gs=n("A zero-shot image classification "),ct=s("a"),us=n("demo"),_s=n("."),bs=m(),Me=s("li"),mt=s("a"),vs=n("Model card"),ys=n(" of "),nn=s("code"),ws=n("kakaobrain/align-base"),Ms=n(" model."),Xn=m(),po=s("p"),Ts=n("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."),Qn=m(),te=s("h2"),Te=s("a"),an=s("span"),y(pt.$$.fragment),ks=m(),sn=s("span"),As=n("AlignConfig"),Hn=m(),C=s("div"),y(ht.$$.fragment),$s=m(),Q=s("p"),ho=s("a"),xs=n("AlignConfig"),Es=n(" is the configuration class to store the configuration of a "),fo=s("a"),js=n("AlignModel"),Cs=n(`. 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=n("kakaobrain/align-base"),zs=n(" architecture."),Is=m(),oe=s("p"),Zs=n("Configuration objects inherit from "),go=s("a"),Ws=n("PretrainedConfig"),Us=n(` and can be used to control the model outputs. Read the
documentation from `),uo=s("a"),Bs=n("PretrainedConfig"),Vs=n(" for more information."),Ns=m(),y(ke.$$.fragment),Ps=m(),Ae=s("div"),y(gt.$$.fragment),Gs=m(),ut=s("p"),Fs=n("Instantiate a "),_o=s("a"),Rs=n("AlignConfig"),qs=n(` (or a derived class) from align text model configuration and align vision model
configuration.`),On=m(),ne=s("h2"),$e=s("a"),rn=s("span"),y(_t.$$.fragment),Ss=m(),ln=s("span"),Ls=n("AlignTextConfig"),Dn=m(),I=s("div"),y(bt.$$.fragment),Ys=m(),ae=s("p"),Xs=n("This is the configuration class to store the configuration of a "),bo=s("a"),Qs=n("AlignTextModel"),Hs=n(`. 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=n("kakaobrain/align-base"),Ds=n(` architecture. The default values here are
copied from BERT.`),Ks=m(),se=s("p"),er=n("Configuration objects inherit from "),vo=s("a"),tr=n("PretrainedConfig"),or=n(` and can be used to control the model outputs. Read the
documentation from `),yo=s("a"),nr=n("PretrainedConfig"),ar=n(" for more information."),sr=m(),y(xe.$$.fragment),Kn=m(),re=s("h2"),Ee=s("a"),dn=s("span"),y(yt.$$.fragment),rr=m(),cn=s("span"),ir=n("AlignVisionConfig"),ea=m(),Z=s("div"),y(wt.$$.fragment),lr=m(),ie=s("p"),dr=n("This is the configuration class to store the configuration of a "),wo=s("a"),cr=n("AlignVisionModel"),mr=n(`. 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=n("kakaobrain/align-base"),hr=n(` architecture. The default values are copied
from EfficientNet (efficientnet-b7)`),fr=m(),le=s("p"),gr=n("Configuration objects inherit from "),Mo=s("a"),ur=n("PretrainedConfig"),_r=n(` and can be used to control the model outputs. Read the
documentation from `),To=s("a"),br=n("PretrainedConfig"),vr=n(" for more information."),yr=m(),y(je.$$.fragment),ta=m(),de=s("h2"),Ce=s("a"),mn=s("span"),y(Tt.$$.fragment),wr=m(),pn=s("span"),Mr=n("AlignProcessor"),oa=m(),W=s("div"),y(kt.$$.fragment),Tr=m(),J=s("p"),kr=n("Constructs an ALIGN processor which wraps "),ko=s("a"),Ar=n("EfficientNetImageProcessor"),$r=n(` and
`),Ao=s("a"),xr=n("BertTokenizer"),Er=n("/"),$o=s("a"),jr=n("BertTokenizerFast"),Cr=n(` into a single processor that interits both the image processor and
tokenizer functionalities. See the `),hn=s("code"),Jr=n("__call__()"),zr=n(" and "),xo=s("a"),Ir=n("decode()"),Zr=n(` for more
information.`),Wr=m(),Je=s("div"),y(At.$$.fragment),Ur=m(),$t=s("p"),Br=n("This method forwards all its arguments to BertTokenizerFast\u2019s "),Eo=s("a"),Vr=n("batch_decode()"),Nr=n(`. 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=n("This method forwards all its arguments to BertTokenizerFast\u2019s "),jo=s("a"),Rr=n("decode()"),qr=n(`. Please refer to
the docstring of this method for more information.`),na=m(),ce=s("h2"),Ie=s("a"),fn=s("span"),y(jt.$$.fragment),Sr=m(),gn=s("span"),Lr=n("AlignModel"),aa=m(),E=s("div"),y(Ct.$$.fragment),Yr=m(),Jt=s("p"),Xr=n("This model inherits from "),Co=s("a"),Qr=n("PreTrainedModel"),Hr=n(`. 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=n("This model is also a PyTorch "),It=s("a"),Kr=n("torch.nn.Module"),ei=n(` 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),oi=m(),me=s("p"),ni=n("The "),Jo=s("a"),ai=n("AlignModel"),si=n(" forward method, overrides the "),un=s("code"),ri=n("__call__"),ii=n(" special method."),li=m(),y(Ze.$$.fragment),di=m(),N=s("div"),y(Wt.$$.fragment),ci=m(),pe=s("p"),mi=n("The "),zo=s("a"),pi=n("AlignModel"),hi=n(" forward method, overrides the "),_n=s("code"),fi=n("__call__"),gi=n(" 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=n("The "),Io=s("a"),wi=n("AlignModel"),Mi=n(" forward method, overrides the "),bn=s("code"),Ti=n("__call__"),ki=n(" special method."),Ai=m(),y(Be.$$.fragment),$i=m(),y(Ve.$$.fragment),sa=m(),fe=s("h2"),Ne=s("a"),vn=s("span"),y(Bt.$$.fragment),xi=m(),yn=s("span"),Ei=n("AlignTextModel"),ra=m(),U=s("div"),y(Vt.$$.fragment),ji=m(),Nt=s("p"),Ci=n(`The text model from ALIGN without any head or projection on top.
This model inherits from `),Zo=s("a"),Ji=n("PreTrainedModel"),zi=n(`. 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=n("This model is also a PyTorch "),Gt=s("a"),Wi=n("torch.nn.Module"),Ui=n(` 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=n("The "),Wo=s("a"),Pi=n("AlignTextModel"),Gi=n(" forward method, overrides the "),wn=s("code"),Fi=n("__call__"),Ri=n(" special method."),qi=m(),y(Pe.$$.fragment),Si=m(),y(Ge.$$.fragment),ia=m(),ue=s("h2"),Fe=s("a"),Mn=s("span"),y(Rt.$$.fragment),Li=m(),Tn=s("span"),Yi=n("AlignVisionModel"),la=m(),B=s("div"),y(qt.$$.fragment),Xi=m(),St=s("p"),Qi=n(`The vision model from ALIGN without any head or projection on top.
This model inherits from `),Uo=s("a"),Hi=n("PreTrainedModel"),Oi=n(`. 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=n("This model is also a PyTorch "),Yt=s("a"),el=n("torch.nn.Module"),tl=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ol=m(),F=s("div"),y(Xt.$$.fragment),nl=m(),_e=s("p"),al=n("The "),Bo=s("a"),sl=n("AlignVisionModel"),rl=n(" forward method, overrides the "),kn=s("code"),il=n("__call__"),ll=n(" 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(o),v=p(t),u=r(t,"H1",{class:!0});var Qt=i(u);f=r(Qt,"A",{id:!0,class:!0,href:!0});var An=i(f);b=r(An,"SPAN",{});var $n=i(b);w(l.$$.fragment,$n),$n.forEach(o),An.forEach(o),h=p(Qt),x=r(Qt,"SPAN",{});var xn=i(x);Za=a(xn,"ALIGN"),xn.forEach(o),Qt.forEach(o),Un=p(t),D=r(t,"H2",{class:!0});var Ht=i(D);be=r(Ht,"A",{id:!0,class:!0,href:!0});var En=i(be);Ho=r(En,"SPAN",{});var jn=i(Ho);w(tt.$$.fragment,jn),jn.forEach(o),En.forEach(o),Wa=p(Ht),Oo=r(Ht,"SPAN",{});var Cn=i(Oo);Ua=a(Cn,"Overview"),Cn.forEach(o),Ht.forEach(o),Bn=p(t),V=r(t,"P",{});var S=i(V);Ba=a(S,"The ALIGN model was proposed in "),ot=r(S,"A",{href:!0,rel:!0});var Jn=i(ot);Va=a(Jn,"Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision"),Jn.forEach(o),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 "),eo=r(S,"A",{href:!0});var zn=i(eo);Pa=a(zn,"EfficientNet"),zn.forEach(o),Ga=a(S," as its vision encoder and "),to=r(S,"A",{href:!0});var In=i(to);Fa=a(In,"BERT"),In.forEach(o),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(o),Vn=p(t),oo=r(t,"P",{});var ml=i(oo);qa=a(ml,"The abstract from the paper is the following:"),ml.forEach(o),Nn=p(t),no=r(t,"P",{});var pl=i(no);Do=r(pl,"EM",{});var hl=i(Do);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(o),pl.forEach(o),Pn=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);Ko=r(fl,"SPAN",{});var gl=i(Ko);w(nt.$$.fragment,gl),gl.forEach(o),fl.forEach(o),La=p(ca),en=r(ca,"SPAN",{});var ul=i(en);Ya=a(ul,"Usage"),ul.forEach(o),ca.forEach(o),Gn=p(t),ao=r(t,"P",{});var _l=i(ao);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(o),Fn=p(t),j=r(t,"P",{});var L=i(j);so=r(L,"A",{href:!0});var bl=i(so);Qa=a(bl,"AlignProcessor"),bl.forEach(o),Ha=a(L," wraps "),ro=r(L,"A",{href:!0});var vl=i(ro);Oa=a(vl,"EfficientNetImageProcessor"),vl.forEach(o),Da=a(L," and "),io=r(L,"A",{href:!0});var yl=i(io);Ka=a(yl,"BertTokenizer"),yl.forEach(o),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 "),lo=r(L,"A",{href:!0});var wl=i(lo);ts=a(wl,"AlignProcessor"),wl.forEach(o),os=a(L," and "),co=r(L,"A",{href:!0});var Ml=i(co);ns=a(Ml,"AlignModel"),Ml.forEach(o),as=a(L,"."),L.forEach(o),Rn=p(t),w(at.$$.fragment,t),qn=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(o),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(o),Sn=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);tn=r(kl,"SPAN",{});var Al=i(tn);w(rt.$$.fragment,Al),Al.forEach(o),kl.forEach(o),ls=p(pa),on=r(pa,"SPAN",{});var $l=i(on);ds=a($l,"Resources"),$l.forEach(o),pa.forEach(o),Ln=p(t),mo=r(t,"P",{});var xl=i(mo);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(o),Yn=p(t),X=r(t,"UL",{});var Vo=i(X);it=r(Vo,"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(o),hs=a(ha,"."),ha.forEach(o),fs=p(Vo),dt=r(Vo,"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(o),_s=a(fa,"."),fa.forEach(o),bs=p(Vo),Me=r(Vo,"LI",{});var Zn=i(Me);mt=r(Zn,"A",{href:!0,rel:!0});var Cl=i(mt);vs=a(Cl,"Model card"),Cl.forEach(o),ys=a(Zn," of "),nn=r(Zn,"CODE",{});var Jl=i(nn);ws=a(Jl,"kakaobrain/align-base"),Jl.forEach(o),Ms=a(Zn," model."),Zn.forEach(o),Vo.forEach(o),Xn=p(t),po=r(t,"P",{});var zl=i(po);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(o),Qn=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);an=r(Il,"SPAN",{});var Zl=i(an);w(pt.$$.fragment,Zl),Zl.forEach(o),Il.forEach(o),ks=p(ga),sn=r(ga,"SPAN",{});var Wl=i(sn);As=a(Wl,"AlignConfig"),Wl.forEach(o),ga.forEach(o),Hn=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);ho=r(Ot,"A",{href:!0});var Ul=i(ho);xs=a(Ul,"AlignConfig"),Ul.forEach(o),Es=a(Ot," is the configuration class to store the configuration of a "),fo=r(Ot,"A",{href:!0});var Bl=i(fo);js=a(Bl,"AlignModel"),Bl.forEach(o),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(o),zs=a(Ot," architecture."),Ot.forEach(o),Is=p(O),oe=r(O,"P",{});var No=i(oe);Zs=a(No,"Configuration objects inherit from "),go=r(No,"A",{href:!0});var Nl=i(go);Ws=a(Nl,"PretrainedConfig"),Nl.forEach(o),Us=a(No,` and can be used to control the model outputs. Read the
documentation from `),uo=r(No,"A",{href:!0});var Pl=i(uo);Bs=a(Pl,"PretrainedConfig"),Pl.forEach(o),Vs=a(No," for more information."),No.forEach(o),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 "),_o=r(_a,"A",{href:!0});var Gl=i(_o);Rs=a(Gl,"AlignConfig"),Gl.forEach(o),qs=a(_a,` (or a derived class) from align text model configuration and align vision model
configuration.`),_a.forEach(o),ua.forEach(o),O.forEach(o),On=p(t),ne=r(t,"H2",{class:!0});var ba=i(ne);$e=r(ba,"A",{id:!0,class:!0,href:!0});var Fl=i($e);rn=r(Fl,"SPAN",{});var Rl=i(rn);w(_t.$$.fragment,Rl),Rl.forEach(o),Fl.forEach(o),Ss=p(ba),ln=r(ba,"SPAN",{});var ql=i(ln);Ls=a(ql,"AlignTextConfig"),ql.forEach(o),ba.forEach(o),Dn=p(t),I=r(t,"DIV",{class:!0});var Se=i(I);w(bt.$$.fragment,Se),Ys=p(Se),ae=r(Se,"P",{});var Po=i(ae);Xs=a(Po,"This is the configuration class to store the configuration of a "),bo=r(Po,"A",{href:!0});var Sl=i(bo);Qs=a(Sl,"AlignTextModel"),Sl.forEach(o),Hs=a(Po,`. 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(Po,"A",{href:!0,rel:!0});var Ll=i(vt);Os=a(Ll,"kakaobrain/align-base"),Ll.forEach(o),Ds=a(Po,` architecture. The default values here are
copied from BERT.`),Po.forEach(o),Ks=p(Se),se=r(Se,"P",{});var Go=i(se);er=a(Go,"Configuration objects inherit from "),vo=r(Go,"A",{href:!0});var Yl=i(vo);tr=a(Yl,"PretrainedConfig"),Yl.forEach(o),or=a(Go,` and can be used to control the model outputs. Read the
documentation from `),yo=r(Go,"A",{href:!0});var Xl=i(yo);nr=a(Xl,"PretrainedConfig"),Xl.forEach(o),ar=a(Go," for more information."),Go.forEach(o),sr=p(Se),w(xe.$$.fragment,Se),Se.forEach(o),Kn=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);dn=r(Ql,"SPAN",{});var Hl=i(dn);w(yt.$$.fragment,Hl),Hl.forEach(o),Ql.forEach(o),rr=p(va),cn=r(va,"SPAN",{});var Ol=i(cn);ir=a(Ol,"AlignVisionConfig"),Ol.forEach(o),va.forEach(o),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 Fo=i(ie);dr=a(Fo,"This is the configuration class to store the configuration of a "),wo=r(Fo,"A",{href:!0});var Dl=i(wo);cr=a(Dl,"AlignVisionModel"),Dl.forEach(o),mr=a(Fo,`. 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(Fo,"A",{href:!0,rel:!0});var Kl=i(Mt);pr=a(Kl,"kakaobrain/align-base"),Kl.forEach(o),hr=a(Fo,` architecture. The default values are copied
from EfficientNet (efficientnet-b7)`),Fo.forEach(o),fr=p(Le),le=r(Le,"P",{});var Ro=i(le);gr=a(Ro,"Configuration objects inherit from "),Mo=r(Ro,"A",{href:!0});var ed=i(Mo);ur=a(ed,"PretrainedConfig"),ed.forEach(o),_r=a(Ro,` and can be used to control the model outputs. Read the
documentation from `),To=r(Ro,"A",{href:!0});var td=i(To);br=a(td,"PretrainedConfig"),td.forEach(o),vr=a(Ro," for more information."),Ro.forEach(o),yr=p(Le),w(je.$$.fragment,Le),Le.forEach(o),ta=p(t),de=r(t,"H2",{class:!0});var ya=i(de);Ce=r(ya,"A",{id:!0,class:!0,href:!0});var od=i(Ce);mn=r(od,"SPAN",{});var nd=i(mn);w(Tt.$$.fragment,nd),nd.forEach(o),od.forEach(o),wr=p(ya),pn=r(ya,"SPAN",{});var ad=i(pn);Mr=a(ad,"AlignProcessor"),ad.forEach(o),ya.forEach(o),oa=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 "),ko=r(R,"A",{href:!0});var sd=i(ko);Ar=a(sd,"EfficientNetImageProcessor"),sd.forEach(o),$r=a(R,` and
`),Ao=r(R,"A",{href:!0});var rd=i(Ao);xr=a(rd,"BertTokenizer"),rd.forEach(o),Er=a(R,"/"),$o=r(R,"A",{href:!0});var id=i($o);jr=a(id,"BertTokenizerFast"),id.forEach(o),Cr=a(R,` into a single processor that interits both the image processor and
tokenizer functionalities. See the `),hn=r(R,"CODE",{});var ld=i(hn);Jr=a(ld,"__call__()"),ld.forEach(o),zr=a(R," and "),xo=r(R,"A",{href:!0});var dd=i(xo);Ir=a(dd,"decode()"),dd.forEach(o),Zr=a(R,` for more
information.`),R.forEach(o),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 "),Eo=r(Ma,"A",{href:!0});var cd=i(Eo);Vr=a(cd,"batch_decode()"),cd.forEach(o),Nr=a(Ma,`. Please
refer to the docstring of this method for more information.`),Ma.forEach(o),wa.forEach(o),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 "),jo=r(ka,"A",{href:!0});var md=i(jo);Rr=a(md,"decode()"),md.forEach(o),qr=a(ka,`. Please refer to
the docstring of this method for more information.`),ka.forEach(o),Ta.forEach(o),Ye.forEach(o),na=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);fn=r(pd,"SPAN",{});var hd=i(fn);w(jt.$$.fragment,hd),hd.forEach(o),pd.forEach(o),Sr=p(Aa),gn=r(Aa,"SPAN",{});var fd=i(gn);Lr=a(fd,"AlignModel"),fd.forEach(o),Aa.forEach(o),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 "),Co=r($a,"A",{href:!0});var gd=i(Co);Qr=a(gd,"PreTrainedModel"),gd.forEach(o),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(o),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(o),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(o),ti=p(q),H=r(q,"DIV",{class:!0});var qo=i(H);w(Zt.$$.fragment,qo),oi=p(qo),me=r(qo,"P",{});var So=i(me);ni=a(So,"The "),Jo=r(So,"A",{href:!0});var _d=i(Jo);ai=a(_d,"AlignModel"),_d.forEach(o),si=a(So," forward method, overrides the "),un=r(So,"CODE",{});var bd=i(un);ri=a(bd,"__call__"),bd.forEach(o),ii=a(So," special method."),So.forEach(o),li=p(qo),w(Ze.$$.fragment,qo),qo.forEach(o),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 Lo=i(pe);mi=a(Lo,"The "),zo=r(Lo,"A",{href:!0});var vd=i(zo);pi=a(vd,"AlignModel"),vd.forEach(o),hi=a(Lo," forward method, overrides the "),_n=r(Lo,"CODE",{});var yd=i(_n);fi=a(yd,"__call__"),yd.forEach(o),gi=a(Lo," special method."),Lo.forEach(o),ui=p(Xe),w(We.$$.fragment,Xe),_i=p(Xe),w(Ue.$$.fragment,Xe),Xe.forEach(o),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 Yo=i(he);yi=a(Yo,"The "),Io=r(Yo,"A",{href:!0});var wd=i(Io);wi=a(wd,"AlignModel"),wd.forEach(o),Mi=a(Yo," forward method, overrides the "),bn=r(Yo,"CODE",{});var Md=i(bn);Ti=a(Md,"__call__"),Md.forEach(o),ki=a(Yo," special method."),Yo.forEach(o),Ai=p(Qe),w(Be.$$.fragment,Qe),$i=p(Qe),w(Ve.$$.fragment,Qe),Qe.forEach(o),q.forEach(o),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);vn=r(Td,"SPAN",{});var kd=i(vn);w(Bt.$$.fragment,kd),kd.forEach(o),Td.forEach(o),xi=p(Ea),yn=r(Ea,"SPAN",{});var Ad=i(yn);Ei=a(Ad,"AlignTextModel"),Ad.forEach(o),Ea.forEach(o),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 `),Zo=r(ja,"A",{href:!0});var $d=i(Zo);Ji=a($d,"PreTrainedModel"),$d.forEach(o),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(o),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(o),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(o),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 Xo=i(ge);Ni=a(Xo,"The "),Wo=r(Xo,"A",{href:!0});var Ed=i(Wo);Pi=a(Ed,"AlignTextModel"),Ed.forEach(o),Gi=a(Xo," forward method, overrides the "),wn=r(Xo,"CODE",{});var jd=i(wn);Fi=a(jd,"__call__"),jd.forEach(o),Ri=a(Xo," special method."),Xo.forEach(o),qi=p(Oe),w(Pe.$$.fragment,Oe),Si=p(Oe),w(Ge.$$.fragment,Oe),Oe.forEach(o),He.forEach(o),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);Mn=r(Cd,"SPAN",{});var Jd=i(Mn);w(Rt.$$.fragment,Jd),Jd.forEach(o),Cd.forEach(o),Li=p(Ja),Tn=r(Ja,"SPAN",{});var zd=i(Tn);Yi=a(zd,"AlignVisionModel"),zd.forEach(o),Ja.forEach(o),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 `),Uo=r(za,"A",{href:!0});var Id=i(Uo);Hi=a(Id,"PreTrainedModel"),Id.forEach(o),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(o),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(o),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(o),ol=p(De),F=r(De,"DIV",{class:!0});var Ke=i(F);w(Xt.$$.fragment,Ke),nl=p(Ke),_e=r(Ke,"P",{});var Qo=i(_e);al=a(Qo,"The "),Bo=r(Qo,"A",{href:!0});var Wd=i(Bo);sl=a(Wd,"AlignVisionModel"),Wd.forEach(o),rl=a(Qo," forward method, overrides the "),kn=r(Qo,"CODE",{});var Ud=i(kn);il=a(Ud,"__call__"),Ud.forEach(o),ll=a(Qo," special method."),Qo.forEach(o),dl=p(Ke),w(Re.$$.fragment,Ke),cl=p(Ke),w(qe.$$.fragment,Ke),Ke.forEach(o),De.forEach(o),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(ot,"href","https://arxiv.org/abs/2102.05918"),d(ot,"rel","nofollow"),d(eo,"href","efficientnet"),d(to,"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(so,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignProcessor"),d(ro,"href","/docs/transformers/main/en/model_doc/efficientnet#transformers.EfficientNetImageProcessor"),d(io,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizer"),d(lo,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignProcessor"),d(co,"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(ho,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignConfig"),d(fo,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignModel"),d(ft,"href","https://huggingface.co/kakaobrain/align-base"),d(ft,"rel","nofollow"),d(go,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(uo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(_o,"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(ne,"class","relative group"),d(bo,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignTextModel"),d(vt,"href","https://huggingface.co/kakaobrain/align-base"),d(vt,"rel","nofollow"),d(vo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(yo,"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(wo,"href","/docs/transformers/main/en/model_doc/align#transformers.AlignVisionModel"),d(Mt,"href","https://huggingface.co/kakaobrain/align-base"),d(Mt,"rel","nofollow"),d(Mo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),d(To,"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(ko,"href","/docs/transformers/main/en/model_doc/efficientnet#transformers.EfficientNetImageProcessor"),d(Ao,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizer"),d($o,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertTokenizerFast"),d(xo,"href","/docs/transformers/main/en/model_doc/owlvit#transformers.OwlViTProcessor.decode"),d(Eo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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(jo,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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(Co,"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(Jo,"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(zo,"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(Io,"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(Zo,"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(Wo,"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(Uo,"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(Bo,"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,Un,g),_(t,D,g),e(D,be),e(be,Ho),M(tt,Ho,null),e(D,Wa),e(D,Oo),e(Oo,Ua),_(t,Bn,g),_(t,V,g),e(V,Ba),e(V,ot),e(ot,Va),e(V,Na),e(V,eo),e(eo,Pa),e(V,Ga),e(V,to),e(to,Fa),e(V,Ra),_(t,Vn,g),_(t,oo,g),e(oo,qa),_(t,Nn,g),_(t,no,g),e(no,Do),e(Do,Sa),_(t,Pn,g),_(t,K,g),e(K,ve),e(ve,Ko),M(nt,Ko,null),e(K,La),e(K,en),e(en,Ya),_(t,Gn,g),_(t,ao,g),e(ao,Xa),_(t,Fn,g),_(t,j,g),e(j,so),e(so,Qa),e(j,Ha),e(j,ro),e(ro,Oa),e(j,Da),e(j,io),e(io,Ka),e(j,es),e(j,lo),e(lo,ts),e(j,os),e(j,co),e(co,ns),e(j,as),_(t,Rn,g),M(at,t,g),_(t,qn,g),_(t,ye,g),e(ye,ss),e(ye,st),e(st,rs),e(ye,is),_(t,Sn,g),_(t,ee,g),e(ee,we),e(we,tn),M(rt,tn,null),e(ee,ls),e(ee,on),e(on,ds),_(t,Ln,g),_(t,mo,g),e(mo,cs),_(t,Yn,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,nn),e(nn,ws),e(Me,Ms),_(t,Xn,g),_(t,po,g),e(po,Ts),_(t,Qn,g),_(t,te,g),e(te,Te),e(Te,an),M(pt,an,null),e(te,ks),e(te,sn),e(sn,As),_(t,Hn,g),_(t,C,g),M(ht,C,null),e(C,$s),e(C,Q),e(Q,ho),e(ho,xs),e(Q,Es),e(Q,fo),e(fo,js),e(Q,Cs),e(Q,ft),e(ft,Js),e(Q,zs),e(C,Is),e(C,oe),e(oe,Zs),e(oe,go),e(go,Ws),e(oe,Us),e(oe,uo),e(uo,Bs),e(oe,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,_o),e(_o,Rs),e(ut,qs),_(t,On,g),_(t,ne,g),e(ne,$e),e($e,rn),M(_t,rn,null),e(ne,Ss),e(ne,ln),e(ln,Ls),_(t,Dn,g),_(t,I,g),M(bt,I,null),e(I,Ys),e(I,ae),e(ae,Xs),e(ae,bo),e(bo,Qs),e(ae,Hs),e(ae,vt),e(vt,Os),e(ae,Ds),e(I,Ks),e(I,se),e(se,er),e(se,vo),e(vo,tr),e(se,or),e(se,yo),e(yo,nr),e(se,ar),e(I,sr),M(xe,I,null),_(t,Kn,g),_(t,re,g),e(re,Ee),e(Ee,dn),M(yt,dn,null),e(re,rr),e(re,cn),e(cn,ir),_(t,ea,g),_(t,Z,g),M(wt,Z,null),e(Z,lr),e(Z,ie),e(ie,dr),e(ie,wo),e(wo,cr),e(ie,mr),e(ie,Mt),e(Mt,pr),e(ie,hr),e(Z,fr),e(Z,le),e(le,gr),e(le,Mo),e(Mo,ur),e(le,_r),e(le,To),e(To,br),e(le,vr),e(Z,yr),M(je,Z,null),_(t,ta,g),_(t,de,g),e(de,Ce),e(Ce,mn),M(Tt,mn,null),e(de,wr),e(de,pn),e(pn,Mr),_(t,oa,g),_(t,W,g),M(kt,W,null),e(W,Tr),e(W,J),e(J,kr),e(J,ko),e(ko,Ar),e(J,$r),e(J,Ao),e(Ao,xr),e(J,Er),e(J,$o),e($o,jr),e(J,Cr),e(J,hn),e(hn,Jr),e(J,zr),e(J,xo),e(xo,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,Eo),e(Eo,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,jo),e(jo,Rr),e(Et,qr),_(t,na,g),_(t,ce,g),e(ce,Ie),e(Ie,fn),M(jt,fn,null),e(ce,Sr),e(ce,gn),e(gn,Lr),_(t,aa,g),_(t,E,g),M(Ct,E,null),e(E,Yr),e(E,Jt),e(Jt,Xr),e(Jt,Co),e(Co,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,oi),e(H,me),e(me,ni),e(me,Jo),e(Jo,ai),e(me,si),e(me,un),e(un,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,zo),e(zo,pi),e(pe,hi),e(pe,_n),e(_n,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,Io),e(Io,wi),e(he,Mi),e(he,bn),e(bn,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,vn),M(Bt,vn,null),e(fe,xi),e(fe,yn),e(yn,Ei),_(t,ra,g),_(t,U,g),M(Vt,U,null),e(U,ji),e(U,Nt),e(Nt,Ci),e(Nt,Zo),e(Zo,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,Wo),e(Wo,Pi),e(ge,Gi),e(ge,wn),e(wn,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,Mn),M(Rt,Mn,null),e(ue,Li),e(ue,Tn),e(Tn,Yi),_(t,la,g),_(t,B,g),M(qt,B,null),e(B,Xi),e(B,St),e(St,Qi),e(St,Uo),e(Uo,Hi),e(St,Oi),e(B,Di),e(B,Lt),e(Lt,Ki),e(Lt,Yt),e(Yt,el),e(Lt,tl),e(B,ol),e(B,F),M(Xt,F,null),e(F,nl),e(F,_e),e(_e,al),e(_e,Bo),e(Bo,sl),e(_e,rl),e(_e,kn),e(kn,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 An={};g&2&&(An.$$scope={dirty:g,ctx:t}),xe.$set(An);const $n={};g&2&&($n.$$scope={dirty:g,ctx:t}),je.$set($n);const xn={};g&2&&(xn.$$scope={dirty:g,ctx:t}),Ze.$set(xn);const Ht={};g&2&&(Ht.$$scope={dirty:g,ctx:t}),We.$set(Ht);const En={};g&2&&(En.$$scope={dirty:g,ctx:t}),Ue.$set(En);const jn={};g&2&&(jn.$$scope={dirty:g,ctx:t}),Be.$set(jn);const Cn={};g&2&&(Cn.$$scope={dirty:g,ctx:t}),Ve.$set(Cn);const S={};g&2&&(S.$$scope={dirty:g,ctx:t}),Pe.$set(S);const Jn={};g&2&&(Jn.$$scope={dirty:g,ctx:t}),Ge.$set(Jn);const zn={};g&2&&(zn.$$scope={dirty:g,ctx:t}),Re.$set(zn);const In={};g&2&&(In.$$scope={dirty:g,ctx:t}),qe.$set(In)},i(t){da||(T(l.$$.fragment,t),T(tt.$$.fragment,t),T(nt.$$.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(nt.$$.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){o(c),t&&o(v),t&&o(u),A(l),t&&o(Un),t&&o(D),A(tt),t&&o(Bn),t&&o(V),t&&o(Vn),t&&o(oo),t&&o(Nn),t&&o(no),t&&o(Pn),t&&o(K),A(nt),t&&o(Gn),t&&o(ao),t&&o(Fn),t&&o(j),t&&o(Rn),A(at,t),t&&o(qn),t&&o(ye),t&&o(Sn),t&&o(ee),A(rt),t&&o(Ln),t&&o(mo),t&&o(Yn),t&&o(X),t&&o(Xn),t&&o(po),t&&o(Qn),t&&o(te),A(pt),t&&o(Hn),t&&o(C),A(ht),A(ke),A(gt),t&&o(On),t&&o(ne),A(_t),t&&o(Dn),t&&o(I),A(bt),A(xe),t&&o(Kn),t&&o(re),A(yt),t&&o(ea),t&&o(Z),A(wt),A(je),t&&o(ta),t&&o(de),A(Tt),t&&o(oa),t&&o(W),A(kt),A(At),A(xt),t&&o(na),t&&o(ce),A(jt),t&&o(aa),t&&o(E),A(Ct),A(Zt),A(Ze),A(Wt),A(We),A(Ue),A(Ut),A(Be),A(Ve),t&&o(sa),t&&o(fe),A(Bt),t&&o(ra),t&&o(U),A(Vt),A(Ft),A(Pe),A(Ge),t&&o(ia),t&&o(ue),A(Rt),t&&o(la),t&&o(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 oc($){return Gd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dc extends Bd{constructor(c){super();Vd(this,c,oc,ec,Nd,{})}}export{dc as default,tc as metadata};
