import{S as fl,i as hl,s as gl,e as s,k as h,w as C,t as i,M as ul,c as r,d as o,m as g,a,x as I,h as l,b as p,G as e,g as _,y as v,q as L,o as $,B as b,v as _l,L as Ke}from"../../chunks/vendor-hf-doc-builder.js";import{T as cn}from"../../chunks/Tip-hf-doc-builder.js";import{D as j}from"../../chunks/Docstring-hf-doc-builder.js";import{C as he}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as X}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Je}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Pl(w){let d,A,u,m,P;return m=new he({props:{code:`from transformers import AltCLIPConfig, AltCLIPModel

# Initializing a AltCLIPConfig with BAAI/AltCLIP style configuration
configuration = AltCLIPConfig()

# Initializing a AltCLIPModel (with random weights) from the BAAI/AltCLIP style configuration
model = AltCLIPModel(configuration)

# Accessing the model configuration
configuration = model.config

# We can also initialize a AltCLIPConfig from a AltCLIPTextConfig and a AltCLIPVisionConfig

# Initializing a AltCLIPText and AltCLIPVision configuration
config_text = AltCLIPTextConfig()
config_vision = AltCLIPVisionConfig()

config = AltCLIPConfig.from_text_vision_configs(config_text, config_vision)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AltCLIPConfig, AltCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPConfig with BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AltCLIPConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPModel (with random weights) from the BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPModel(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 AltCLIPConfig from a AltCLIPTextConfig and a AltCLIPVisionConfig</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPText and AltCLIPVision configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>config_text = AltCLIPTextConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_vision = AltCLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span>config = AltCLIPConfig.from_text_vision_configs(config_text, config_vision)`}}),{c(){d=s("p"),A=i("Example:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Example:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function Al(w){let d,A,u,m,P;return m=new he({props:{code:`from transformers import AltCLIPTextModel, AltCLIPTextConfig

# Initializing a AltCLIPTextConfig with BAAI/AltCLIP style configuration
configuration = AltCLIPTextConfig()

# Initializing a AltCLIPTextModel (with random weights) from the BAAI/AltCLIP style configuration
model = AltCLIPTextModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AltCLIPTextModel, AltCLIPTextConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPTextConfig with BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AltCLIPTextConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPTextModel (with random weights) from the BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPTextModel(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(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function Cl(w){let d,A,u,m,P;return m=new he({props:{code:`from transformers import AltCLIPVisionConfig, AltCLIPVisionModel

# Initializing a AltCLIPVisionConfig with BAAI/AltCLIP style configuration
configuration = AltCLIPVisionConfig()

# Initializing a AltCLIPVisionModel (with random weights) from the BAAI/AltCLIP style configuration
model = AltCLIPVisionModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AltCLIPVisionConfig, AltCLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPVisionConfig with BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = AltCLIPVisionConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a AltCLIPVisionModel (with random weights) from the BAAI/AltCLIP style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPVisionModel(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(){d=s("p"),A=i("Example:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Example:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function Il(w){let d,A,u,m,P;return{c(){d=s("p"),A=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),m=i("Module"),P=i(`
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(n){d=r(n,"P",{});var c=a(d);A=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(c,"CODE",{});var x=a(u);m=l(x,"Module"),x.forEach(o),P=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){_(n,d,c),e(d,A),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function vl(w){let d,A,u,m,P;return m=new he({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, AltCLIPModel

model = AltCLIPModel.from_pretrained("BAAI/AltCLIP")
processor = AutoProcessor.from_pretrained("BAAI/AltCLIP")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(
    text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True
)
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities`,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, AltCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&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(
<span class="hljs-meta">... </span>    text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),{c(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function Ll(w){let d,A,u,m,P;return{c(){d=s("p"),A=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),m=i("Module"),P=i(`
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(n){d=r(n,"P",{});var c=a(d);A=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(c,"CODE",{});var x=a(u);m=l(x,"Module"),x.forEach(o),P=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){_(n,d,c),e(d,A),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function $l(w){let d,A,u,m,P;return m=new he({props:{code:`from transformers import AutoProcessor, AltCLIPModel

model = AltCLIPModel.from_pretrained("BAAI/AltCLIP")
processor = AutoProcessor.from_pretrained("BAAI/AltCLIP")
inputs = processor(text=["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="pt")
text_features = model.get_text_features(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AltCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=[<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(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function bl(w){let d,A,u,m,P;return{c(){d=s("p"),A=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),m=i("Module"),P=i(`
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(n){d=r(n,"P",{});var c=a(d);A=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(c,"CODE",{});var x=a(u);m=l(x,"Module"),x.forEach(o),P=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){_(n,d,c),e(d,A),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function wl(w){let d,A,u,m,P;return m=new he({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, AltCLIPModel

model = AltCLIPModel.from_pretrained("BAAI/AltCLIP")
processor = AutoProcessor.from_pretrained("BAAI/AltCLIP")
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(images=image, return_tensors="pt")
image_features = model.get_image_features(**inputs)`,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, AltCLIPModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&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(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function xl(w){let d,A,u,m,P;return{c(){d=s("p"),A=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),m=i("Module"),P=i(`
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(n){d=r(n,"P",{});var c=a(d);A=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(c,"CODE",{});var x=a(u);m=l(x,"Module"),x.forEach(o),P=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){_(n,d,c),e(d,A),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function Tl(w){let d,A,u,m,P;return m=new he({props:{code:`from transformers import AutoProcessor, AltCLIPTextModel

model = AltCLIPTextModel.from_pretrained("BAAI/AltCLIP")
processor = AutoProcessor.from_pretrained("BAAI/AltCLIP")

texts = ["it's a cat", "it's a dog"]

inputs = processor(text=texts, padding=True, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled CLS states`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AltCLIPTextModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPTextModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>texts = [<span class="hljs-string">&quot;it&#x27;s a cat&quot;</span>, <span class="hljs-string">&quot;it&#x27;s a dog&quot;</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(text=texts, 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 CLS states</span>`}}),{c(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function yl(w){let d,A,u,m,P;return{c(){d=s("p"),A=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),m=i("Module"),P=i(`
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(n){d=r(n,"P",{});var c=a(d);A=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(c,"CODE",{});var x=a(u);m=l(x,"Module"),x.forEach(o),P=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){_(n,d,c),e(d,A),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function kl(w){let d,A,u,m,P;return m=new he({props:{code:`from PIL import Image
import requests
from transformers import AutoProcessor, AltCLIPVisionModel

model = AltCLIPVisionModel.from_pretrained("BAAI/AltCLIP")
processor = AutoProcessor.from_pretrained("BAAI/AltCLIP")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(images=image, return_tensors="pt")

outputs = model(**inputs)
last_hidden_state = outputs.last_hidden_state
pooled_output = outputs.pooler_output  # pooled CLS states`,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, AltCLIPVisionModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPVisionModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&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(){d=s("p"),A=i("Examples:"),u=h(),C(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);A=l(c,"Examples:"),c.forEach(o),u=g(n),I(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,A),_(n,u,c),v(m,n,c),P=!0},p:Ke,i(n){P||(L(m.$$.fragment,n),P=!0)},o(n){$(m.$$.fragment,n),P=!1},d(n){n&&o(d),n&&o(u),b(m,n)}}}function jl(w){let d,A,u,m,P,n,c,x,ss,pn,H,ge,wo,et,rs,xo,as,mn,ue,is,tt,ls,ds,fn,Vt,cs,hn,Ot,To,ps,gn,U,_e,yo,ot,ms,ko,fs,un,Nt,hs,_n,Bt,gs,Pn,Pe,us,Ft,_s,Ps,An,T,As,Dt,Cs,Is,St,vs,Ls,Wt,$s,bs,Rt,ws,xs,Xt,Ts,ys,Cn,nt,In,Ht,ks,vn,Ae,js,jo,Ms,Es,Ln,Ce,zs,st,qs,Vs,$n,Y,Ie,Mo,rt,Os,Eo,Ns,bn,y,at,Bs,Z,Fs,Ut,Ds,Ss,it,Ws,Rs,Xs,G,Hs,Yt,Us,Ys,Zt,Zs,Gs,Qs,ve,Js,Le,lt,Ks,dt,er,Gt,tr,or,wn,Q,$e,zo,ct,nr,qo,sr,xn,E,pt,rr,J,ar,Qt,ir,lr,mt,dr,cr,pr,K,mr,Jt,fr,hr,Kt,gr,ur,_r,be,Tn,ee,we,Vo,ft,Pr,Oo,Ar,yn,z,ht,Cr,te,Ir,eo,vr,Lr,gt,$r,br,wr,oe,xr,to,Tr,yr,oo,kr,jr,Mr,xe,kn,ne,Te,No,ut,Er,Bo,zr,jn,k,_t,qr,Fo,Vr,Or,M,no,Nr,Br,so,Fr,Dr,ro,Sr,Wr,Do,Rr,Xr,ao,Hr,Ur,Yr,ye,Pt,Zr,At,Gr,io,Qr,Jr,Kr,ke,Ct,ea,It,ta,lo,oa,na,Mn,se,je,So,vt,sa,Wo,ra,En,q,Lt,aa,V,$t,ia,re,la,co,da,ca,Ro,pa,ma,fa,Me,ha,Ee,ga,O,bt,ua,ae,_a,po,Pa,Aa,Xo,Ca,Ia,va,ze,La,qe,$a,N,wt,ba,ie,wa,mo,xa,Ta,Ho,ya,ka,ja,Ve,Ma,Oe,zn,le,Ne,Uo,xt,Ea,Yo,za,qn,de,Tt,qa,B,yt,Va,ce,Oa,fo,Na,Ba,Zo,Fa,Da,Sa,Be,Wa,Fe,Vn,pe,De,Go,kt,Ra,Qo,Xa,On,me,jt,Ha,F,Mt,Ua,fe,Ya,ho,Za,Ga,Jo,Qa,Ja,Ka,Se,ei,We,Nn;return n=new X({}),et=new X({}),ot=new X({}),nt=new he({props:{code:`from PIL import Image
import requests

from transformers import AltCLIPModel, AltCLIPProcessor

model = AltCLIPModel.from_pretrained("BAAI/AltCLIP")
processor = AltCLIPProcessor.from_pretrained("BAAI/AltCLIP")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image  # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1)  # we can take the softmax to get the label probabilities`,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> AltCLIPModel, AltCLIPProcessor

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AltCLIPModel.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AltCLIPProcessor.from_pretrained(<span class="hljs-string">&quot;BAAI/AltCLIP&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(text=[<span class="hljs-string">&quot;a photo of a cat&quot;</span>, <span class="hljs-string">&quot;a photo of a dog&quot;</span>], images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits_per_image = outputs.logits_per_image  <span class="hljs-comment"># this is the image-text similarity score</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits_per_image.softmax(dim=<span class="hljs-number">1</span>)  <span class="hljs-comment"># we can take the softmax to get the label probabilities</span>`}}),rt=new X({}),at=new j({props:{name:"class transformers.AltCLIPConfig",anchor:"transformers.AltCLIPConfig",parameters:[{name:"text_config",val:" = None"},{name:"vision_config",val:" = None"},{name:"projection_dim",val:" = 768"},{name:"logit_scale_init_value",val:" = 2.6592"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AltCLIPConfig.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/altclip#transformers.AltCLIPTextConfig">AltCLIPTextConfig</a>.`,name:"text_config"},{anchor:"transformers.AltCLIPConfig.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/altclip#transformers.AltCLIPVisionConfig">AltCLIPVisionConfig</a>.`,name:"vision_config"},{anchor:"transformers.AltCLIPConfig.projection_dim",description:`<strong>projection_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimentionality of text and vision projection layers.`,name:"projection_dim"},{anchor:"transformers.AltCLIPConfig.logit_scale_init_value",description:`<strong>logit_scale_init_value</strong> (<code>float</code>, <em>optional</em>, defaults to 2.6592) &#x2014;
The inital value of the <em>logit_scale</em> paramter. Default is used as per the original CLIP implementation.`,name:"logit_scale_init_value"},{anchor:"transformers.AltCLIPConfig.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/altclip/configuration_altclip.py#L258"}}),ve=new Je({props:{anchor:"transformers.AltCLIPConfig.example",$$slots:{default:[Pl]},$$scope:{ctx:w}}}),lt=new j({props:{name:"from_text_vision_configs",anchor:"transformers.AltCLIPConfig.from_text_vision_configs",parameters:[{name:"text_config",val:": AltCLIPTextConfig"},{name:"vision_config",val:": AltCLIPVisionConfig"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/configuration_altclip.py#L334",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPConfig"
>AltCLIPConfig</a></p>
`}}),ct=new X({}),pt=new j({props:{name:"class transformers.AltCLIPTextConfig",anchor:"transformers.AltCLIPTextConfig",parameters:[{name:"vocab_size",val:" = 250002"},{name:"hidden_size",val:" = 1024"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 16"},{name:"intermediate_size",val:" = 4096"},{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:" = 514"},{name:"type_vocab_size",val:" = 1"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"project_dim",val:" = 768"},{name:"pooler_fn",val:" = 'cls'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AltCLIPTextConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250002) &#x2014;
Vocabulary size of the AltCLIP 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/altclip#transformers.AltCLIPTextModel">AltCLIPTextModel</a>.`,name:"vocab_size"},{anchor:"transformers.AltCLIPTextConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.AltCLIPTextConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.AltCLIPTextConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.AltCLIPTextConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.AltCLIPTextConfig.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.AltCLIPTextConfig.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.AltCLIPTextConfig.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.AltCLIPTextConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 514) &#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.AltCLIPTextConfig.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/altclip#transformers.AltCLIPTextModel">AltCLIPTextModel</a>`,name:"type_vocab_size"},{anchor:"transformers.AltCLIPTextConfig.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.AltCLIPTextConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.AltCLIPTextConfig.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.AltCLIPTextConfig.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.AltCLIPTextConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"},{anchor:"transformers.AltCLIPTextConfig.project_dim",description:`<strong>project_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The dimentions of the teacher model before the mapping layer.`,name:"project_dim"},{anchor:"transformers.AltCLIPTextConfig.pooler_fn",description:`<strong>pooler_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;cls&quot;</code>) &#x2014;
Type of pooler we use. We take the first token as pooled output.`,name:"pooler_fn"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/configuration_altclip.py#L32"}}),be=new Je({props:{anchor:"transformers.AltCLIPTextConfig.example",$$slots:{default:[Al]},$$scope:{ctx:w}}}),ft=new X({}),ht=new j({props:{name:"class transformers.AltCLIPVisionConfig",anchor:"transformers.AltCLIPVisionConfig",parameters:[{name:"hidden_size",val:" = 768"},{name:"intermediate_size",val:" = 3072"},{name:"projection_dim",val:" = 512"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"num_channels",val:" = 3"},{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 32"},{name:"hidden_act",val:" = 'quick_gelu'"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"initializer_factor",val:" = 1.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AltCLIPVisionConfig.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.AltCLIPVisionConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.AltCLIPVisionConfig.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.AltCLIPVisionConfig.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.AltCLIPVisionConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.AltCLIPVisionConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.AltCLIPVisionConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;quick_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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> \`<code>&quot;quick_gelu&quot;</code> are supported. layer_norm_eps (<code>float</code>, <em>optional</em>,
defaults to 1e-5): The epsilon used by the layer normalization layers.`,name:"hidden_act"},{anchor:"transformers.AltCLIPVisionConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.AltCLIPVisionConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.AltCLIPVisionConfig.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.AltCLIPVisionConfig.initializer_factor",description:`<strong>initializer_factor</strong> (\`float&#x201C;, <em>optional</em>, defaults to 1) &#x2014;
A factor for initializing all weight matrices (should be kept to 1, used internally for initialization
testing).`,name:"initializer_factor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/configuration_altclip.py#L150"}}),xe=new Je({props:{anchor:"transformers.AltCLIPVisionConfig.example",$$slots:{default:[Cl]},$$scope:{ctx:w}}}),ut=new X({}),_t=new j({props:{name:"class transformers.AltCLIPProcessor",anchor:"transformers.AltCLIPProcessor",parameters:[{name:"image_processor",val:" = None"},{name:"tokenizer",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AltCLIPProcessor.image_processor",description:`<strong>image_processor</strong> (<a href="/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor">CLIPImageProcessor</a>) &#x2014;
The image processor is a required input.`,name:"image_processor"},{anchor:"transformers.AltCLIPProcessor.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizerFast">XLMRobertaTokenizerFast</a>) &#x2014;
The tokenizer is a required input.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/processing_altclip.py#L24"}}),Pt=new j({props:{name:"batch_decode",anchor:"transformers.AltCLIPProcessor.batch_decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/processing_altclip.py#L112"}}),Ct=new j({props:{name:"decode",anchor:"transformers.AltCLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/processing_altclip.py#L119"}}),vt=new X({}),Lt=new j({props:{name:"class transformers.AltCLIPModel",anchor:"transformers.AltCLIPModel",parameters:[{name:"config",val:": AltCLIPConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/modeling_altclip.py#L1475"}}),$t=new j({props:{name:"forward",anchor:"transformers.AltCLIPModel.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:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:" = 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.AltCLIPModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AltCLIPModel.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.AltCLIPModel.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.AltCLIPModel.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AltCLIPModel.forward.return_loss",description:`<strong>return_loss</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the contrastive loss.`,name:"return_loss"},{anchor:"transformers.AltCLIPModel.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.AltCLIPModel.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.AltCLIPModel.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/altclip/modeling_altclip.py#L1602",returnDescription:`
<p>A <code>transformers.models.altclip.modeling_altclip.AltCLIPOutput</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.altclip.configuration_altclip.AltCLIPConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>return_loss</code> is <code>True</code>) \u2014 Contrastive loss for image-text similarity.</li>
<li><strong>logits_per_image:(<code>torch.FloatTensor</code></strong> of shape <code>(image_batch_size, text_batch_size)</code>) \u2014 The scaled dot product scores between <code>image_embeds</code> and <code>text_embeds</code>. This represents the image-text
similarity scores.</li>
<li><strong>logits_per_text:(<code>torch.FloatTensor</code></strong> of shape <code>(text_batch_size, image_batch_size)</code>) \u2014 The scaled dot product scores between <code>text_embeds</code> and <code>image_embeds</code>. This represents the text-image
similarity scores.</li>
<li><strong>text_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The text embeddings obtained by applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPTextModel"
>AltCLIPTextModel</a>.</li>
<li><strong>image_embeds(<code>torch.FloatTensor</code></strong> of shape <code>(batch_size, output_dim</code>) \u2014 The image embeddings obtained by applying the projection layer to the pooled output of
<a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPVisionModel"
>AltCLIPVisionModel</a>.</li>
<li><strong>text_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPTextModel"
>AltCLIPTextModel</a>.</li>
<li><strong>vision_model_output(<code>BaseModelOutputWithPooling</code>):</strong>
The output of the <a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPVisionModel"
>AltCLIPVisionModel</a>.</li>
</ul>
`,returnType:`
<p><code>transformers.models.altclip.modeling_altclip.AltCLIPOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Me=new cn({props:{$$slots:{default:[Il]},$$scope:{ctx:w}}}),Ee=new Je({props:{anchor:"transformers.AltCLIPModel.forward.example",$$slots:{default:[vl]},$$scope:{ctx:w}}}),bt=new j({props:{name:"get_text_features",anchor:"transformers.AltCLIPModel.get_text_features",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:" = 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.AltCLIPModel.get_text_features.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AltCLIPModel.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.AltCLIPModel.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.AltCLIPModel.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.AltCLIPModel.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.AltCLIPModel.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/altclip/modeling_altclip.py#L1509",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPTextModel"
>AltCLIPTextModel</a>.</p>
`,returnType:`
<p>text_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),ze=new cn({props:{$$slots:{default:[Ll]},$$scope:{ctx:w}}}),qe=new Je({props:{anchor:"transformers.AltCLIPModel.get_text_features.example",$$slots:{default:[$l]},$$scope:{ctx:w}}}),wt=new j({props:{name:"get_image_features",anchor:"transformers.AltCLIPModel.get_image_features",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = 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.AltCLIPModel.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AltCLIPModel.get_image_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.AltCLIPModel.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.AltCLIPModel.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/altclip/modeling_altclip.py#L1556",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPVisionModel"
>AltCLIPVisionModel</a>.</p>
`,returnType:`
<p>image_features (<code>torch.FloatTensor</code> of shape <code>(batch_size, output_dim</code>)</p>
`}}),Ve=new cn({props:{$$slots:{default:[bl]},$$scope:{ctx:w}}}),Oe=new Je({props:{anchor:"transformers.AltCLIPModel.get_image_features.example",$$slots:{default:[wl]},$$scope:{ctx:w}}}),xt=new X({}),Tt=new j({props:{name:"class transformers.AltCLIPTextModel",anchor:"transformers.AltCLIPTextModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/modeling_altclip.py#L1383"}}),yt=new j({props:{name:"forward",anchor:"transformers.AltCLIPTextModel.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:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AltCLIPTextModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.AltCLIPTextModel.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.AltCLIPTextModel.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.AltCLIPTextModel.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.AltCLIPTextModel.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.AltCLIPTextModel.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/altclip/modeling_altclip.py#L1402",returnDescription:`
<p>A <code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndProjection</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.altclip.configuration_altclip.AltCLIPTextConfig'&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>projection_state</strong> (<code>tuple(torch.FloatTensor)</code>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> of shape <code>(batch_size,config.project_dim)</code>.</p>
<p>Text embeddings before the projection layer, used to mimic the last hidden state of the teacher encoder.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.modeling_outputs.BaseModelOutputWithPoolingAndProjection</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Be=new cn({props:{$$slots:{default:[xl]},$$scope:{ctx:w}}}),Fe=new Je({props:{anchor:"transformers.AltCLIPTextModel.forward.example",$$slots:{default:[Tl]},$$scope:{ctx:w}}}),kt=new X({}),jt=new j({props:{name:"class transformers.AltCLIPVisionModel",anchor:"transformers.AltCLIPVisionModel",parameters:[{name:"config",val:": AltCLIPVisionConfig"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/altclip/modeling_altclip.py#L1153"}}),Mt=new j({props:{name:"forward",anchor:"transformers.AltCLIPVisionModel.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.FloatTensor] = 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.AltCLIPVisionModel.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/poolformer#transformers.PoolFormerFeatureExtractor.__call__">CLIPImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.AltCLIPVisionModel.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.AltCLIPVisionModel.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.AltCLIPVisionModel.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/altclip/modeling_altclip.py#L1166",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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.altclip.configuration_altclip.AltCLIPVisionConfig'&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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Se=new cn({props:{$$slots:{default:[yl]},$$scope:{ctx:w}}}),We=new Je({props:{anchor:"transformers.AltCLIPVisionModel.forward.example",$$slots:{default:[kl]},$$scope:{ctx:w}}}),{c(){d=s("meta"),A=h(),u=s("h1"),m=s("a"),P=s("span"),C(n.$$.fragment),c=h(),x=s("span"),ss=i("AltCLIP"),pn=h(),H=s("h2"),ge=s("a"),wo=s("span"),C(et.$$.fragment),rs=h(),xo=s("span"),as=i("Overview"),mn=h(),ue=s("p"),is=i("The AltCLIP model was proposed in "),tt=s("a"),ls=i("AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),ds=i(` by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu. AltCLIP
(Altering the Language Encoder in CLIP) is a neural network trained on a variety of image-text and text-text pairs. By switching CLIP\u2019s
text encoder with a pretrained multilingual text encoder XLM-R, we could obtain very close performances with CLIP on almost all tasks, and extended original CLIP\u2019s capabilities such as multilingual understanding.`),fn=h(),Vt=s("p"),cs=i("The abstract from the paper is the following:"),hn=h(),Ot=s("p"),To=s("em"),ps=i(`In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model.
Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained
multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of
teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art
performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with
CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding.`),gn=h(),U=s("h2"),_e=s("a"),yo=s("span"),C(ot.$$.fragment),ms=h(),ko=s("span"),fs=i("Usage"),un=h(),Nt=s("p"),hs=i(`The usage of AltCLIP is very similar to the CLIP. the difference between CLIP is the text encoder. Note that we use bidirectional attention instead of casual attention
and we take the [CLS] token in XLM-R to represent text embedding.`),_n=h(),Bt=s("p"),gs=i(`AltCLIP is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image
classification. AltCLIP uses a ViT like transformer to get visual features and a bidirectional language model 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 similar score.`),Pn=h(),Pe=s("p"),us=i(`To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image. The authors
also add absolute position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder.
The `),Ft=s("a"),_s=i("CLIPImageProcessor"),Ps=i(" can be used to resize (or rescale) and normalize images for the model."),An=h(),T=s("p"),As=i("The "),Dt=s("a"),Cs=i("AltCLIPProcessor"),Is=i(" wraps a "),St=s("a"),vs=i("CLIPImageProcessor"),Ls=i(" and a "),Wt=s("a"),$s=i("XLMRobertaTokenizer"),bs=i(` into a single instance to both
encode the text and prepare the images. The following example shows how to get the image-text similarity scores using
`),Rt=s("a"),ws=i("AltCLIPProcessor"),xs=i(" and "),Xt=s("a"),Ts=i("AltCLIPModel"),ys=i("."),Cn=h(),C(nt.$$.fragment),In=h(),Ht=s("p"),ks=i("Tips:"),vn=h(),Ae=s("p"),js=i("This model is build on "),jo=s("code"),Ms=i("CLIPModel"),Es=i(", so use it like a original CLIP."),Ln=h(),Ce=s("p"),zs=i("This model was contributed by "),st=s("a"),qs=i("jongjyh"),Vs=i("."),$n=h(),Y=s("h2"),Ie=s("a"),Mo=s("span"),C(rt.$$.fragment),Os=h(),Eo=s("span"),Ns=i("AltCLIPConfig"),bn=h(),y=s("div"),C(at.$$.fragment),Bs=h(),Z=s("p"),Fs=i("This is the configuration class to store the configuration of a "),Ut=s("a"),Ds=i("AltCLIPModel"),Ss=i(`. It is used to instantiate an
AltCLIP model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the AltCLIP
`),it=s("a"),Ws=i("BAAI/AltCLIP"),Rs=i(" architecture."),Xs=h(),G=s("p"),Hs=i("Configuration objects inherit from "),Yt=s("a"),Us=i("PretrainedConfig"),Ys=i(` and can be used to control the model outputs. Read the
documentation from `),Zt=s("a"),Zs=i("PretrainedConfig"),Gs=i(" for more information."),Qs=h(),C(ve.$$.fragment),Js=h(),Le=s("div"),C(lt.$$.fragment),Ks=h(),dt=s("p"),er=i("Instantiate a "),Gt=s("a"),tr=i("AltCLIPConfig"),or=i(` (or a derived class) from altclip text model configuration and altclip vision
model configuration.`),wn=h(),Q=s("h2"),$e=s("a"),zo=s("span"),C(ct.$$.fragment),nr=h(),qo=s("span"),sr=i("AltCLIPTextConfig"),xn=h(),E=s("div"),C(pt.$$.fragment),rr=h(),J=s("p"),ar=i("This is the configuration class to store the configuration of a "),Qt=s("a"),ir=i("AltCLIPTextModel"),lr=i(`. It is used to instantiate a
AltCLIP text model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the AltCLIP
`),mt=s("a"),dr=i("BAAI/AltCLIP"),cr=i(" architecture."),pr=h(),K=s("p"),mr=i("Configuration objects inherit from "),Jt=s("a"),fr=i("PretrainedConfig"),hr=i(` and can be used to control the model outputs. Read the
documentation from `),Kt=s("a"),gr=i("PretrainedConfig"),ur=i(" for more information."),_r=h(),C(be.$$.fragment),Tn=h(),ee=s("h2"),we=s("a"),Vo=s("span"),C(ft.$$.fragment),Pr=h(),Oo=s("span"),Ar=i("AltCLIPVisionConfig"),yn=h(),z=s("div"),C(ht.$$.fragment),Cr=h(),te=s("p"),Ir=i("This is the configuration class to store the configuration of a "),eo=s("a"),vr=i("AltCLIPModel"),Lr=i(`. It is used to instantiate an
AltCLIP model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the AltCLIP
`),gt=s("a"),$r=i("BAAI/AltCLIP"),br=i(" architecture."),wr=h(),oe=s("p"),xr=i("Configuration objects inherit from "),to=s("a"),Tr=i("PretrainedConfig"),yr=i(` and can be used to control the model outputs. Read the
documentation from `),oo=s("a"),kr=i("PretrainedConfig"),jr=i(" for more information."),Mr=h(),C(xe.$$.fragment),kn=h(),ne=s("h2"),Te=s("a"),No=s("span"),C(ut.$$.fragment),Er=h(),Bo=s("span"),zr=i("AltCLIPProcessor"),jn=h(),k=s("div"),C(_t.$$.fragment),qr=h(),Fo=s("p"),Vr=i(`Constructs a AltCLIP processor which wraps a CLIP image processor and a XLM-Roberta tokenizer into a single
processor.`),Or=h(),M=s("p"),no=s("a"),Nr=i("AltCLIPProcessor"),Br=i(" offers all the functionalities of "),so=s("a"),Fr=i("CLIPImageProcessor"),Dr=i(" and "),ro=s("a"),Sr=i("XLMRobertaTokenizerFast"),Wr=i(`. See
the `),Do=s("code"),Rr=i("__call__()"),Xr=i(" and "),ao=s("a"),Hr=i("decode()"),Ur=i(" for more information."),Yr=h(),ye=s("div"),C(Pt.$$.fragment),Zr=h(),At=s("p"),Gr=i("This method forwards all its arguments to XLMRobertaTokenizerFast\u2019s "),io=s("a"),Qr=i("batch_decode()"),Jr=i(`.
Please refer to the docstring of this method for more information.`),Kr=h(),ke=s("div"),C(Ct.$$.fragment),ea=h(),It=s("p"),ta=i("This method forwards all its arguments to XLMRobertaTokenizerFast\u2019s "),lo=s("a"),oa=i("decode()"),na=i(`. Please
refer to the docstring of this method for more information.`),Mn=h(),se=s("h2"),je=s("a"),So=s("span"),C(vt.$$.fragment),sa=h(),Wo=s("span"),ra=i("AltCLIPModel"),En=h(),q=s("div"),C(Lt.$$.fragment),aa=h(),V=s("div"),C($t.$$.fragment),ia=h(),re=s("p"),la=i("The "),co=s("a"),da=i("AltCLIPModel"),ca=i(" forward method, overrides the "),Ro=s("code"),pa=i("__call__"),ma=i(" special method."),fa=h(),C(Me.$$.fragment),ha=h(),C(Ee.$$.fragment),ga=h(),O=s("div"),C(bt.$$.fragment),ua=h(),ae=s("p"),_a=i("The "),po=s("a"),Pa=i("AltCLIPModel"),Aa=i(" forward method, overrides the "),Xo=s("code"),Ca=i("__call__"),Ia=i(" special method."),va=h(),C(ze.$$.fragment),La=h(),C(qe.$$.fragment),$a=h(),N=s("div"),C(wt.$$.fragment),ba=h(),ie=s("p"),wa=i("The "),mo=s("a"),xa=i("AltCLIPModel"),Ta=i(" forward method, overrides the "),Ho=s("code"),ya=i("__call__"),ka=i(" special method."),ja=h(),C(Ve.$$.fragment),Ma=h(),C(Oe.$$.fragment),zn=h(),le=s("h2"),Ne=s("a"),Uo=s("span"),C(xt.$$.fragment),Ea=h(),Yo=s("span"),za=i("AltCLIPTextModel"),qn=h(),de=s("div"),C(Tt.$$.fragment),qa=h(),B=s("div"),C(yt.$$.fragment),Va=h(),ce=s("p"),Oa=i("The "),fo=s("a"),Na=i("AltCLIPTextModel"),Ba=i(" forward method, overrides the "),Zo=s("code"),Fa=i("__call__"),Da=i(" special method."),Sa=h(),C(Be.$$.fragment),Wa=h(),C(Fe.$$.fragment),Vn=h(),pe=s("h2"),De=s("a"),Go=s("span"),C(kt.$$.fragment),Ra=h(),Qo=s("span"),Xa=i("AltCLIPVisionModel"),On=h(),me=s("div"),C(jt.$$.fragment),Ha=h(),F=s("div"),C(Mt.$$.fragment),Ua=h(),fe=s("p"),Ya=i("The "),ho=s("a"),Za=i("AltCLIPVisionModel"),Ga=i(" forward method, overrides the "),Jo=s("code"),Qa=i("__call__"),Ja=i(" special method."),Ka=h(),C(Se.$$.fragment),ei=h(),C(We.$$.fragment),this.h()},l(t){const f=ul('[data-svelte="svelte-1phssyn"]',document.head);d=r(f,"META",{name:!0,content:!0}),f.forEach(o),A=g(t),u=r(t,"H1",{class:!0});var Et=a(u);m=r(Et,"A",{id:!0,class:!0,href:!0});var Ko=a(m);P=r(Ko,"SPAN",{});var en=a(P);I(n.$$.fragment,en),en.forEach(o),Ko.forEach(o),c=g(Et),x=r(Et,"SPAN",{});var tn=a(x);ss=l(tn,"AltCLIP"),tn.forEach(o),Et.forEach(o),pn=g(t),H=r(t,"H2",{class:!0});var zt=a(H);ge=r(zt,"A",{id:!0,class:!0,href:!0});var on=a(ge);wo=r(on,"SPAN",{});var nn=a(wo);I(et.$$.fragment,nn),nn.forEach(o),on.forEach(o),rs=g(zt),xo=r(zt,"SPAN",{});var sn=a(xo);as=l(sn,"Overview"),sn.forEach(o),zt.forEach(o),mn=g(t),ue=r(t,"P",{});var qt=a(ue);is=l(qt,"The AltCLIP model was proposed in "),tt=r(qt,"A",{href:!0,rel:!0});var rn=a(tt);ls=l(rn,"AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities"),rn.forEach(o),ds=l(qt,` by Zhongzhi Chen, Guang Liu, Bo-Wen Zhang, Fulong Ye, Qinghong Yang, Ledell Wu. AltCLIP
(Altering the Language Encoder in CLIP) is a neural network trained on a variety of image-text and text-text pairs. By switching CLIP\u2019s
text encoder with a pretrained multilingual text encoder XLM-R, we could obtain very close performances with CLIP on almost all tasks, and extended original CLIP\u2019s capabilities such as multilingual understanding.`),qt.forEach(o),fn=g(t),Vt=r(t,"P",{});var an=a(Vt);cs=l(an,"The abstract from the paper is the following:"),an.forEach(o),hn=g(t),Ot=r(t,"P",{});var ln=a(Ot);To=r(ln,"EM",{});var dn=a(To);ps=l(dn,`In this work, we present a conceptually simple and effective method to train a strong bilingual multimodal representation model.
Starting from the pretrained multimodal representation model CLIP released by OpenAI, we switched its text encoder with a pretrained
multilingual text encoder XLM-R, and aligned both languages and image representations by a two-stage training schema consisting of
teacher learning and contrastive learning. We validate our method through evaluations of a wide range of tasks. We set new state-of-the-art
performances on a bunch of tasks including ImageNet-CN, Flicker30k- CN, and COCO-CN. Further, we obtain very close performances with
CLIP on almost all tasks, suggesting that one can simply alter the text encoder in CLIP for extended capabilities such as multilingual understanding.`),dn.forEach(o),ln.forEach(o),gn=g(t),U=r(t,"H2",{class:!0});var Bn=a(U);_e=r(Bn,"A",{id:!0,class:!0,href:!0});var ti=a(_e);yo=r(ti,"SPAN",{});var oi=a(yo);I(ot.$$.fragment,oi),oi.forEach(o),ti.forEach(o),ms=g(Bn),ko=r(Bn,"SPAN",{});var ni=a(ko);fs=l(ni,"Usage"),ni.forEach(o),Bn.forEach(o),un=g(t),Nt=r(t,"P",{});var si=a(Nt);hs=l(si,`The usage of AltCLIP is very similar to the CLIP. the difference between CLIP is the text encoder. Note that we use bidirectional attention instead of casual attention
and we take the [CLS] token in XLM-R to represent text embedding.`),si.forEach(o),_n=g(t),Bt=r(t,"P",{});var ri=a(Bt);gs=l(ri,`AltCLIP is a multi-modal vision and language model. It can be used for image-text similarity and for zero-shot image
classification. AltCLIP uses a ViT like transformer to get visual features and a bidirectional language model 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 similar score.`),ri.forEach(o),Pn=g(t),Pe=r(t,"P",{});var Fn=a(Pe);us=l(Fn,`To feed images to the Transformer encoder, each image is split into a sequence of fixed-size non-overlapping patches,
which are then linearly embedded. A [CLS] token is added to serve as representation of an entire image. The authors
also add absolute position embeddings, and feed the resulting sequence of vectors to a standard Transformer encoder.
The `),Ft=r(Fn,"A",{href:!0});var ai=a(Ft);_s=l(ai,"CLIPImageProcessor"),ai.forEach(o),Ps=l(Fn," can be used to resize (or rescale) and normalize images for the model."),Fn.forEach(o),An=g(t),T=r(t,"P",{});var D=a(T);As=l(D,"The "),Dt=r(D,"A",{href:!0});var ii=a(Dt);Cs=l(ii,"AltCLIPProcessor"),ii.forEach(o),Is=l(D," wraps a "),St=r(D,"A",{href:!0});var li=a(St);vs=l(li,"CLIPImageProcessor"),li.forEach(o),Ls=l(D," and a "),Wt=r(D,"A",{href:!0});var di=a(Wt);$s=l(di,"XLMRobertaTokenizer"),di.forEach(o),bs=l(D,` into a single instance to both
encode the text and prepare the images. The following example shows how to get the image-text similarity scores using
`),Rt=r(D,"A",{href:!0});var ci=a(Rt);ws=l(ci,"AltCLIPProcessor"),ci.forEach(o),xs=l(D," and "),Xt=r(D,"A",{href:!0});var pi=a(Xt);Ts=l(pi,"AltCLIPModel"),pi.forEach(o),ys=l(D,"."),D.forEach(o),Cn=g(t),I(nt.$$.fragment,t),In=g(t),Ht=r(t,"P",{});var mi=a(Ht);ks=l(mi,"Tips:"),mi.forEach(o),vn=g(t),Ae=r(t,"P",{});var Dn=a(Ae);js=l(Dn,"This model is build on "),jo=r(Dn,"CODE",{});var fi=a(jo);Ms=l(fi,"CLIPModel"),fi.forEach(o),Es=l(Dn,", so use it like a original CLIP."),Dn.forEach(o),Ln=g(t),Ce=r(t,"P",{});var Sn=a(Ce);zs=l(Sn,"This model was contributed by "),st=r(Sn,"A",{href:!0,rel:!0});var hi=a(st);qs=l(hi,"jongjyh"),hi.forEach(o),Vs=l(Sn,"."),Sn.forEach(o),$n=g(t),Y=r(t,"H2",{class:!0});var Wn=a(Y);Ie=r(Wn,"A",{id:!0,class:!0,href:!0});var gi=a(Ie);Mo=r(gi,"SPAN",{});var ui=a(Mo);I(rt.$$.fragment,ui),ui.forEach(o),gi.forEach(o),Os=g(Wn),Eo=r(Wn,"SPAN",{});var _i=a(Eo);Ns=l(_i,"AltCLIPConfig"),_i.forEach(o),Wn.forEach(o),bn=g(t),y=r(t,"DIV",{class:!0});var W=a(y);I(at.$$.fragment,W),Bs=g(W),Z=r(W,"P",{});var go=a(Z);Fs=l(go,"This is the configuration class to store the configuration of a "),Ut=r(go,"A",{href:!0});var Pi=a(Ut);Ds=l(Pi,"AltCLIPModel"),Pi.forEach(o),Ss=l(go,`. It is used to instantiate an
AltCLIP model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the AltCLIP
`),it=r(go,"A",{href:!0,rel:!0});var Ai=a(it);Ws=l(Ai,"BAAI/AltCLIP"),Ai.forEach(o),Rs=l(go," architecture."),go.forEach(o),Xs=g(W),G=r(W,"P",{});var uo=a(G);Hs=l(uo,"Configuration objects inherit from "),Yt=r(uo,"A",{href:!0});var Ci=a(Yt);Us=l(Ci,"PretrainedConfig"),Ci.forEach(o),Ys=l(uo,` and can be used to control the model outputs. Read the
documentation from `),Zt=r(uo,"A",{href:!0});var Ii=a(Zt);Zs=l(Ii,"PretrainedConfig"),Ii.forEach(o),Gs=l(uo," for more information."),uo.forEach(o),Qs=g(W),I(ve.$$.fragment,W),Js=g(W),Le=r(W,"DIV",{class:!0});var Rn=a(Le);I(lt.$$.fragment,Rn),Ks=g(Rn),dt=r(Rn,"P",{});var Xn=a(dt);er=l(Xn,"Instantiate a "),Gt=r(Xn,"A",{href:!0});var vi=a(Gt);tr=l(vi,"AltCLIPConfig"),vi.forEach(o),or=l(Xn,` (or a derived class) from altclip text model configuration and altclip vision
model configuration.`),Xn.forEach(o),Rn.forEach(o),W.forEach(o),wn=g(t),Q=r(t,"H2",{class:!0});var Hn=a(Q);$e=r(Hn,"A",{id:!0,class:!0,href:!0});var Li=a($e);zo=r(Li,"SPAN",{});var $i=a(zo);I(ct.$$.fragment,$i),$i.forEach(o),Li.forEach(o),nr=g(Hn),qo=r(Hn,"SPAN",{});var bi=a(qo);sr=l(bi,"AltCLIPTextConfig"),bi.forEach(o),Hn.forEach(o),xn=g(t),E=r(t,"DIV",{class:!0});var Re=a(E);I(pt.$$.fragment,Re),rr=g(Re),J=r(Re,"P",{});var _o=a(J);ar=l(_o,"This is the configuration class to store the configuration of a "),Qt=r(_o,"A",{href:!0});var wi=a(Qt);ir=l(wi,"AltCLIPTextModel"),wi.forEach(o),lr=l(_o,`. It is used to instantiate a
AltCLIP text model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the AltCLIP
`),mt=r(_o,"A",{href:!0,rel:!0});var xi=a(mt);dr=l(xi,"BAAI/AltCLIP"),xi.forEach(o),cr=l(_o," architecture."),_o.forEach(o),pr=g(Re),K=r(Re,"P",{});var Po=a(K);mr=l(Po,"Configuration objects inherit from "),Jt=r(Po,"A",{href:!0});var Ti=a(Jt);fr=l(Ti,"PretrainedConfig"),Ti.forEach(o),hr=l(Po,` and can be used to control the model outputs. Read the
documentation from `),Kt=r(Po,"A",{href:!0});var yi=a(Kt);gr=l(yi,"PretrainedConfig"),yi.forEach(o),ur=l(Po," for more information."),Po.forEach(o),_r=g(Re),I(be.$$.fragment,Re),Re.forEach(o),Tn=g(t),ee=r(t,"H2",{class:!0});var Un=a(ee);we=r(Un,"A",{id:!0,class:!0,href:!0});var ki=a(we);Vo=r(ki,"SPAN",{});var ji=a(Vo);I(ft.$$.fragment,ji),ji.forEach(o),ki.forEach(o),Pr=g(Un),Oo=r(Un,"SPAN",{});var Mi=a(Oo);Ar=l(Mi,"AltCLIPVisionConfig"),Mi.forEach(o),Un.forEach(o),yn=g(t),z=r(t,"DIV",{class:!0});var Xe=a(z);I(ht.$$.fragment,Xe),Cr=g(Xe),te=r(Xe,"P",{});var Ao=a(te);Ir=l(Ao,"This is the configuration class to store the configuration of a "),eo=r(Ao,"A",{href:!0});var Ei=a(eo);vr=l(Ei,"AltCLIPModel"),Ei.forEach(o),Lr=l(Ao,`. It is used to instantiate an
AltCLIP model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the AltCLIP
`),gt=r(Ao,"A",{href:!0,rel:!0});var zi=a(gt);$r=l(zi,"BAAI/AltCLIP"),zi.forEach(o),br=l(Ao," architecture."),Ao.forEach(o),wr=g(Xe),oe=r(Xe,"P",{});var Co=a(oe);xr=l(Co,"Configuration objects inherit from "),to=r(Co,"A",{href:!0});var qi=a(to);Tr=l(qi,"PretrainedConfig"),qi.forEach(o),yr=l(Co,` and can be used to control the model outputs. Read the
documentation from `),oo=r(Co,"A",{href:!0});var Vi=a(oo);kr=l(Vi,"PretrainedConfig"),Vi.forEach(o),jr=l(Co," for more information."),Co.forEach(o),Mr=g(Xe),I(xe.$$.fragment,Xe),Xe.forEach(o),kn=g(t),ne=r(t,"H2",{class:!0});var Yn=a(ne);Te=r(Yn,"A",{id:!0,class:!0,href:!0});var Oi=a(Te);No=r(Oi,"SPAN",{});var Ni=a(No);I(ut.$$.fragment,Ni),Ni.forEach(o),Oi.forEach(o),Er=g(Yn),Bo=r(Yn,"SPAN",{});var Bi=a(Bo);zr=l(Bi,"AltCLIPProcessor"),Bi.forEach(o),Yn.forEach(o),jn=g(t),k=r(t,"DIV",{class:!0});var R=a(k);I(_t.$$.fragment,R),qr=g(R),Fo=r(R,"P",{});var Fi=a(Fo);Vr=l(Fi,`Constructs a AltCLIP processor which wraps a CLIP image processor and a XLM-Roberta tokenizer into a single
processor.`),Fi.forEach(o),Or=g(R),M=r(R,"P",{});var S=a(M);no=r(S,"A",{href:!0});var Di=a(no);Nr=l(Di,"AltCLIPProcessor"),Di.forEach(o),Br=l(S," offers all the functionalities of "),so=r(S,"A",{href:!0});var Si=a(so);Fr=l(Si,"CLIPImageProcessor"),Si.forEach(o),Dr=l(S," and "),ro=r(S,"A",{href:!0});var Wi=a(ro);Sr=l(Wi,"XLMRobertaTokenizerFast"),Wi.forEach(o),Wr=l(S,`. See
the `),Do=r(S,"CODE",{});var Ri=a(Do);Rr=l(Ri,"__call__()"),Ri.forEach(o),Xr=l(S," and "),ao=r(S,"A",{href:!0});var Xi=a(ao);Hr=l(Xi,"decode()"),Xi.forEach(o),Ur=l(S," for more information."),S.forEach(o),Yr=g(R),ye=r(R,"DIV",{class:!0});var Zn=a(ye);I(Pt.$$.fragment,Zn),Zr=g(Zn),At=r(Zn,"P",{});var Gn=a(At);Gr=l(Gn,"This method forwards all its arguments to XLMRobertaTokenizerFast\u2019s "),io=r(Gn,"A",{href:!0});var Hi=a(io);Qr=l(Hi,"batch_decode()"),Hi.forEach(o),Jr=l(Gn,`.
Please refer to the docstring of this method for more information.`),Gn.forEach(o),Zn.forEach(o),Kr=g(R),ke=r(R,"DIV",{class:!0});var Qn=a(ke);I(Ct.$$.fragment,Qn),ea=g(Qn),It=r(Qn,"P",{});var Jn=a(It);ta=l(Jn,"This method forwards all its arguments to XLMRobertaTokenizerFast\u2019s "),lo=r(Jn,"A",{href:!0});var Ui=a(lo);oa=l(Ui,"decode()"),Ui.forEach(o),na=l(Jn,`. Please
refer to the docstring of this method for more information.`),Jn.forEach(o),Qn.forEach(o),R.forEach(o),Mn=g(t),se=r(t,"H2",{class:!0});var Kn=a(se);je=r(Kn,"A",{id:!0,class:!0,href:!0});var Yi=a(je);So=r(Yi,"SPAN",{});var Zi=a(So);I(vt.$$.fragment,Zi),Zi.forEach(o),Yi.forEach(o),sa=g(Kn),Wo=r(Kn,"SPAN",{});var Gi=a(Wo);ra=l(Gi,"AltCLIPModel"),Gi.forEach(o),Kn.forEach(o),En=g(t),q=r(t,"DIV",{class:!0});var He=a(q);I(Lt.$$.fragment,He),aa=g(He),V=r(He,"DIV",{class:!0});var Ue=a(V);I($t.$$.fragment,Ue),ia=g(Ue),re=r(Ue,"P",{});var Io=a(re);la=l(Io,"The "),co=r(Io,"A",{href:!0});var Qi=a(co);da=l(Qi,"AltCLIPModel"),Qi.forEach(o),ca=l(Io," forward method, overrides the "),Ro=r(Io,"CODE",{});var Ji=a(Ro);pa=l(Ji,"__call__"),Ji.forEach(o),ma=l(Io," special method."),Io.forEach(o),fa=g(Ue),I(Me.$$.fragment,Ue),ha=g(Ue),I(Ee.$$.fragment,Ue),Ue.forEach(o),ga=g(He),O=r(He,"DIV",{class:!0});var Ye=a(O);I(bt.$$.fragment,Ye),ua=g(Ye),ae=r(Ye,"P",{});var vo=a(ae);_a=l(vo,"The "),po=r(vo,"A",{href:!0});var Ki=a(po);Pa=l(Ki,"AltCLIPModel"),Ki.forEach(o),Aa=l(vo," forward method, overrides the "),Xo=r(vo,"CODE",{});var el=a(Xo);Ca=l(el,"__call__"),el.forEach(o),Ia=l(vo," special method."),vo.forEach(o),va=g(Ye),I(ze.$$.fragment,Ye),La=g(Ye),I(qe.$$.fragment,Ye),Ye.forEach(o),$a=g(He),N=r(He,"DIV",{class:!0});var Ze=a(N);I(wt.$$.fragment,Ze),ba=g(Ze),ie=r(Ze,"P",{});var Lo=a(ie);wa=l(Lo,"The "),mo=r(Lo,"A",{href:!0});var tl=a(mo);xa=l(tl,"AltCLIPModel"),tl.forEach(o),Ta=l(Lo," forward method, overrides the "),Ho=r(Lo,"CODE",{});var ol=a(Ho);ya=l(ol,"__call__"),ol.forEach(o),ka=l(Lo," special method."),Lo.forEach(o),ja=g(Ze),I(Ve.$$.fragment,Ze),Ma=g(Ze),I(Oe.$$.fragment,Ze),Ze.forEach(o),He.forEach(o),zn=g(t),le=r(t,"H2",{class:!0});var es=a(le);Ne=r(es,"A",{id:!0,class:!0,href:!0});var nl=a(Ne);Uo=r(nl,"SPAN",{});var sl=a(Uo);I(xt.$$.fragment,sl),sl.forEach(o),nl.forEach(o),Ea=g(es),Yo=r(es,"SPAN",{});var rl=a(Yo);za=l(rl,"AltCLIPTextModel"),rl.forEach(o),es.forEach(o),qn=g(t),de=r(t,"DIV",{class:!0});var ts=a(de);I(Tt.$$.fragment,ts),qa=g(ts),B=r(ts,"DIV",{class:!0});var Ge=a(B);I(yt.$$.fragment,Ge),Va=g(Ge),ce=r(Ge,"P",{});var $o=a(ce);Oa=l($o,"The "),fo=r($o,"A",{href:!0});var al=a(fo);Na=l(al,"AltCLIPTextModel"),al.forEach(o),Ba=l($o," forward method, overrides the "),Zo=r($o,"CODE",{});var il=a(Zo);Fa=l(il,"__call__"),il.forEach(o),Da=l($o," special method."),$o.forEach(o),Sa=g(Ge),I(Be.$$.fragment,Ge),Wa=g(Ge),I(Fe.$$.fragment,Ge),Ge.forEach(o),ts.forEach(o),Vn=g(t),pe=r(t,"H2",{class:!0});var os=a(pe);De=r(os,"A",{id:!0,class:!0,href:!0});var ll=a(De);Go=r(ll,"SPAN",{});var dl=a(Go);I(kt.$$.fragment,dl),dl.forEach(o),ll.forEach(o),Ra=g(os),Qo=r(os,"SPAN",{});var cl=a(Qo);Xa=l(cl,"AltCLIPVisionModel"),cl.forEach(o),os.forEach(o),On=g(t),me=r(t,"DIV",{class:!0});var ns=a(me);I(jt.$$.fragment,ns),Ha=g(ns),F=r(ns,"DIV",{class:!0});var Qe=a(F);I(Mt.$$.fragment,Qe),Ua=g(Qe),fe=r(Qe,"P",{});var bo=a(fe);Ya=l(bo,"The "),ho=r(bo,"A",{href:!0});var pl=a(ho);Za=l(pl,"AltCLIPVisionModel"),pl.forEach(o),Ga=l(bo," forward method, overrides the "),Jo=r(bo,"CODE",{});var ml=a(Jo);Qa=l(ml,"__call__"),ml.forEach(o),Ja=l(bo," special method."),bo.forEach(o),Ka=g(Qe),I(Se.$$.fragment,Qe),ei=g(Qe),I(We.$$.fragment,Qe),Qe.forEach(o),ns.forEach(o),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(Ml)),p(m,"id","altclip"),p(m,"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"),p(m,"href","#altclip"),p(u,"class","relative group"),p(ge,"id","overview"),p(ge,"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"),p(ge,"href","#overview"),p(H,"class","relative group"),p(tt,"href","https://arxiv.org/abs/2211.06679v2"),p(tt,"rel","nofollow"),p(_e,"id","usage"),p(_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"),p(_e,"href","#usage"),p(U,"class","relative group"),p(Ft,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),p(Dt,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(St,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),p(Wt,"href","/docs/transformers/main/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizer"),p(Rt,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(Xt,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(st,"href","https://huggingface.co/jongjyh"),p(st,"rel","nofollow"),p(Ie,"id","transformers.AltCLIPConfig"),p(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"),p(Ie,"href","#transformers.AltCLIPConfig"),p(Y,"class","relative group"),p(Ut,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(it,"href","https://huggingface.co/BAAI/AltCLIP"),p(it,"rel","nofollow"),p(Yt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(Zt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(Gt,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPConfig"),p(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p($e,"id","transformers.AltCLIPTextConfig"),p($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"),p($e,"href","#transformers.AltCLIPTextConfig"),p(Q,"class","relative group"),p(Qt,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPTextModel"),p(mt,"href","https://huggingface.co/BAAI/AltCLIP"),p(mt,"rel","nofollow"),p(Jt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(Kt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(we,"id","transformers.AltCLIPVisionConfig"),p(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"),p(we,"href","#transformers.AltCLIPVisionConfig"),p(ee,"class","relative group"),p(eo,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(gt,"href","https://huggingface.co/BAAI/AltCLIP"),p(gt,"rel","nofollow"),p(to,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(oo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),p(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Te,"id","transformers.AltCLIPProcessor"),p(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"),p(Te,"href","#transformers.AltCLIPProcessor"),p(ne,"class","relative group"),p(no,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(so,"href","/docs/transformers/main/en/model_doc/clip#transformers.CLIPImageProcessor"),p(ro,"href","/docs/transformers/main/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizerFast"),p(ao,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPProcessor.decode"),p(io,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),p(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(lo,"href","/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.decode"),p(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(je,"id","transformers.AltCLIPModel"),p(je,"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"),p(je,"href","#transformers.AltCLIPModel"),p(se,"class","relative group"),p(co,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(po,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(mo,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPModel"),p(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ne,"id","transformers.AltCLIPTextModel"),p(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"),p(Ne,"href","#transformers.AltCLIPTextModel"),p(le,"class","relative group"),p(fo,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPTextModel"),p(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(De,"id","transformers.AltCLIPVisionModel"),p(De,"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"),p(De,"href","#transformers.AltCLIPVisionModel"),p(pe,"class","relative group"),p(ho,"href","/docs/transformers/main/en/model_doc/altclip#transformers.AltCLIPVisionModel"),p(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(me,"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,f){e(document.head,d),_(t,A,f),_(t,u,f),e(u,m),e(m,P),v(n,P,null),e(u,c),e(u,x),e(x,ss),_(t,pn,f),_(t,H,f),e(H,ge),e(ge,wo),v(et,wo,null),e(H,rs),e(H,xo),e(xo,as),_(t,mn,f),_(t,ue,f),e(ue,is),e(ue,tt),e(tt,ls),e(ue,ds),_(t,fn,f),_(t,Vt,f),e(Vt,cs),_(t,hn,f),_(t,Ot,f),e(Ot,To),e(To,ps),_(t,gn,f),_(t,U,f),e(U,_e),e(_e,yo),v(ot,yo,null),e(U,ms),e(U,ko),e(ko,fs),_(t,un,f),_(t,Nt,f),e(Nt,hs),_(t,_n,f),_(t,Bt,f),e(Bt,gs),_(t,Pn,f),_(t,Pe,f),e(Pe,us),e(Pe,Ft),e(Ft,_s),e(Pe,Ps),_(t,An,f),_(t,T,f),e(T,As),e(T,Dt),e(Dt,Cs),e(T,Is),e(T,St),e(St,vs),e(T,Ls),e(T,Wt),e(Wt,$s),e(T,bs),e(T,Rt),e(Rt,ws),e(T,xs),e(T,Xt),e(Xt,Ts),e(T,ys),_(t,Cn,f),v(nt,t,f),_(t,In,f),_(t,Ht,f),e(Ht,ks),_(t,vn,f),_(t,Ae,f),e(Ae,js),e(Ae,jo),e(jo,Ms),e(Ae,Es),_(t,Ln,f),_(t,Ce,f),e(Ce,zs),e(Ce,st),e(st,qs),e(Ce,Vs),_(t,$n,f),_(t,Y,f),e(Y,Ie),e(Ie,Mo),v(rt,Mo,null),e(Y,Os),e(Y,Eo),e(Eo,Ns),_(t,bn,f),_(t,y,f),v(at,y,null),e(y,Bs),e(y,Z),e(Z,Fs),e(Z,Ut),e(Ut,Ds),e(Z,Ss),e(Z,it),e(it,Ws),e(Z,Rs),e(y,Xs),e(y,G),e(G,Hs),e(G,Yt),e(Yt,Us),e(G,Ys),e(G,Zt),e(Zt,Zs),e(G,Gs),e(y,Qs),v(ve,y,null),e(y,Js),e(y,Le),v(lt,Le,null),e(Le,Ks),e(Le,dt),e(dt,er),e(dt,Gt),e(Gt,tr),e(dt,or),_(t,wn,f),_(t,Q,f),e(Q,$e),e($e,zo),v(ct,zo,null),e(Q,nr),e(Q,qo),e(qo,sr),_(t,xn,f),_(t,E,f),v(pt,E,null),e(E,rr),e(E,J),e(J,ar),e(J,Qt),e(Qt,ir),e(J,lr),e(J,mt),e(mt,dr),e(J,cr),e(E,pr),e(E,K),e(K,mr),e(K,Jt),e(Jt,fr),e(K,hr),e(K,Kt),e(Kt,gr),e(K,ur),e(E,_r),v(be,E,null),_(t,Tn,f),_(t,ee,f),e(ee,we),e(we,Vo),v(ft,Vo,null),e(ee,Pr),e(ee,Oo),e(Oo,Ar),_(t,yn,f),_(t,z,f),v(ht,z,null),e(z,Cr),e(z,te),e(te,Ir),e(te,eo),e(eo,vr),e(te,Lr),e(te,gt),e(gt,$r),e(te,br),e(z,wr),e(z,oe),e(oe,xr),e(oe,to),e(to,Tr),e(oe,yr),e(oe,oo),e(oo,kr),e(oe,jr),e(z,Mr),v(xe,z,null),_(t,kn,f),_(t,ne,f),e(ne,Te),e(Te,No),v(ut,No,null),e(ne,Er),e(ne,Bo),e(Bo,zr),_(t,jn,f),_(t,k,f),v(_t,k,null),e(k,qr),e(k,Fo),e(Fo,Vr),e(k,Or),e(k,M),e(M,no),e(no,Nr),e(M,Br),e(M,so),e(so,Fr),e(M,Dr),e(M,ro),e(ro,Sr),e(M,Wr),e(M,Do),e(Do,Rr),e(M,Xr),e(M,ao),e(ao,Hr),e(M,Ur),e(k,Yr),e(k,ye),v(Pt,ye,null),e(ye,Zr),e(ye,At),e(At,Gr),e(At,io),e(io,Qr),e(At,Jr),e(k,Kr),e(k,ke),v(Ct,ke,null),e(ke,ea),e(ke,It),e(It,ta),e(It,lo),e(lo,oa),e(It,na),_(t,Mn,f),_(t,se,f),e(se,je),e(je,So),v(vt,So,null),e(se,sa),e(se,Wo),e(Wo,ra),_(t,En,f),_(t,q,f),v(Lt,q,null),e(q,aa),e(q,V),v($t,V,null),e(V,ia),e(V,re),e(re,la),e(re,co),e(co,da),e(re,ca),e(re,Ro),e(Ro,pa),e(re,ma),e(V,fa),v(Me,V,null),e(V,ha),v(Ee,V,null),e(q,ga),e(q,O),v(bt,O,null),e(O,ua),e(O,ae),e(ae,_a),e(ae,po),e(po,Pa),e(ae,Aa),e(ae,Xo),e(Xo,Ca),e(ae,Ia),e(O,va),v(ze,O,null),e(O,La),v(qe,O,null),e(q,$a),e(q,N),v(wt,N,null),e(N,ba),e(N,ie),e(ie,wa),e(ie,mo),e(mo,xa),e(ie,Ta),e(ie,Ho),e(Ho,ya),e(ie,ka),e(N,ja),v(Ve,N,null),e(N,Ma),v(Oe,N,null),_(t,zn,f),_(t,le,f),e(le,Ne),e(Ne,Uo),v(xt,Uo,null),e(le,Ea),e(le,Yo),e(Yo,za),_(t,qn,f),_(t,de,f),v(Tt,de,null),e(de,qa),e(de,B),v(yt,B,null),e(B,Va),e(B,ce),e(ce,Oa),e(ce,fo),e(fo,Na),e(ce,Ba),e(ce,Zo),e(Zo,Fa),e(ce,Da),e(B,Sa),v(Be,B,null),e(B,Wa),v(Fe,B,null),_(t,Vn,f),_(t,pe,f),e(pe,De),e(De,Go),v(kt,Go,null),e(pe,Ra),e(pe,Qo),e(Qo,Xa),_(t,On,f),_(t,me,f),v(jt,me,null),e(me,Ha),e(me,F),v(Mt,F,null),e(F,Ua),e(F,fe),e(fe,Ya),e(fe,ho),e(ho,Za),e(fe,Ga),e(fe,Jo),e(Jo,Qa),e(fe,Ja),e(F,Ka),v(Se,F,null),e(F,ei),v(We,F,null),Nn=!0},p(t,[f]){const Et={};f&2&&(Et.$$scope={dirty:f,ctx:t}),ve.$set(Et);const Ko={};f&2&&(Ko.$$scope={dirty:f,ctx:t}),be.$set(Ko);const en={};f&2&&(en.$$scope={dirty:f,ctx:t}),xe.$set(en);const tn={};f&2&&(tn.$$scope={dirty:f,ctx:t}),Me.$set(tn);const zt={};f&2&&(zt.$$scope={dirty:f,ctx:t}),Ee.$set(zt);const on={};f&2&&(on.$$scope={dirty:f,ctx:t}),ze.$set(on);const nn={};f&2&&(nn.$$scope={dirty:f,ctx:t}),qe.$set(nn);const sn={};f&2&&(sn.$$scope={dirty:f,ctx:t}),Ve.$set(sn);const qt={};f&2&&(qt.$$scope={dirty:f,ctx:t}),Oe.$set(qt);const rn={};f&2&&(rn.$$scope={dirty:f,ctx:t}),Be.$set(rn);const an={};f&2&&(an.$$scope={dirty:f,ctx:t}),Fe.$set(an);const ln={};f&2&&(ln.$$scope={dirty:f,ctx:t}),Se.$set(ln);const dn={};f&2&&(dn.$$scope={dirty:f,ctx:t}),We.$set(dn)},i(t){Nn||(L(n.$$.fragment,t),L(et.$$.fragment,t),L(ot.$$.fragment,t),L(nt.$$.fragment,t),L(rt.$$.fragment,t),L(at.$$.fragment,t),L(ve.$$.fragment,t),L(lt.$$.fragment,t),L(ct.$$.fragment,t),L(pt.$$.fragment,t),L(be.$$.fragment,t),L(ft.$$.fragment,t),L(ht.$$.fragment,t),L(xe.$$.fragment,t),L(ut.$$.fragment,t),L(_t.$$.fragment,t),L(Pt.$$.fragment,t),L(Ct.$$.fragment,t),L(vt.$$.fragment,t),L(Lt.$$.fragment,t),L($t.$$.fragment,t),L(Me.$$.fragment,t),L(Ee.$$.fragment,t),L(bt.$$.fragment,t),L(ze.$$.fragment,t),L(qe.$$.fragment,t),L(wt.$$.fragment,t),L(Ve.$$.fragment,t),L(Oe.$$.fragment,t),L(xt.$$.fragment,t),L(Tt.$$.fragment,t),L(yt.$$.fragment,t),L(Be.$$.fragment,t),L(Fe.$$.fragment,t),L(kt.$$.fragment,t),L(jt.$$.fragment,t),L(Mt.$$.fragment,t),L(Se.$$.fragment,t),L(We.$$.fragment,t),Nn=!0)},o(t){$(n.$$.fragment,t),$(et.$$.fragment,t),$(ot.$$.fragment,t),$(nt.$$.fragment,t),$(rt.$$.fragment,t),$(at.$$.fragment,t),$(ve.$$.fragment,t),$(lt.$$.fragment,t),$(ct.$$.fragment,t),$(pt.$$.fragment,t),$(be.$$.fragment,t),$(ft.$$.fragment,t),$(ht.$$.fragment,t),$(xe.$$.fragment,t),$(ut.$$.fragment,t),$(_t.$$.fragment,t),$(Pt.$$.fragment,t),$(Ct.$$.fragment,t),$(vt.$$.fragment,t),$(Lt.$$.fragment,t),$($t.$$.fragment,t),$(Me.$$.fragment,t),$(Ee.$$.fragment,t),$(bt.$$.fragment,t),$(ze.$$.fragment,t),$(qe.$$.fragment,t),$(wt.$$.fragment,t),$(Ve.$$.fragment,t),$(Oe.$$.fragment,t),$(xt.$$.fragment,t),$(Tt.$$.fragment,t),$(yt.$$.fragment,t),$(Be.$$.fragment,t),$(Fe.$$.fragment,t),$(kt.$$.fragment,t),$(jt.$$.fragment,t),$(Mt.$$.fragment,t),$(Se.$$.fragment,t),$(We.$$.fragment,t),Nn=!1},d(t){o(d),t&&o(A),t&&o(u),b(n),t&&o(pn),t&&o(H),b(et),t&&o(mn),t&&o(ue),t&&o(fn),t&&o(Vt),t&&o(hn),t&&o(Ot),t&&o(gn),t&&o(U),b(ot),t&&o(un),t&&o(Nt),t&&o(_n),t&&o(Bt),t&&o(Pn),t&&o(Pe),t&&o(An),t&&o(T),t&&o(Cn),b(nt,t),t&&o(In),t&&o(Ht),t&&o(vn),t&&o(Ae),t&&o(Ln),t&&o(Ce),t&&o($n),t&&o(Y),b(rt),t&&o(bn),t&&o(y),b(at),b(ve),b(lt),t&&o(wn),t&&o(Q),b(ct),t&&o(xn),t&&o(E),b(pt),b(be),t&&o(Tn),t&&o(ee),b(ft),t&&o(yn),t&&o(z),b(ht),b(xe),t&&o(kn),t&&o(ne),b(ut),t&&o(jn),t&&o(k),b(_t),b(Pt),b(Ct),t&&o(Mn),t&&o(se),b(vt),t&&o(En),t&&o(q),b(Lt),b($t),b(Me),b(Ee),b(bt),b(ze),b(qe),b(wt),b(Ve),b(Oe),t&&o(zn),t&&o(le),b(xt),t&&o(qn),t&&o(de),b(Tt),b(yt),b(Be),b(Fe),t&&o(Vn),t&&o(pe),b(kt),t&&o(On),t&&o(me),b(jt),b(Mt),b(Se),b(We)}}}const Ml={local:"altclip",sections:[{local:"overview",title:"Overview"},{local:"usage",title:"Usage"},{local:"transformers.AltCLIPConfig",title:"AltCLIPConfig"},{local:"transformers.AltCLIPTextConfig",title:"AltCLIPTextConfig"},{local:"transformers.AltCLIPVisionConfig",title:"AltCLIPVisionConfig"},{local:"transformers.AltCLIPProcessor",title:"AltCLIPProcessor"},{local:"transformers.AltCLIPModel",title:"AltCLIPModel"},{local:"transformers.AltCLIPTextModel",title:"AltCLIPTextModel"},{local:"transformers.AltCLIPVisionModel",title:"AltCLIPVisionModel"}],title:"AltCLIP"};function El(w){return _l(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Fl extends fl{constructor(d){super();hl(this,d,El,jl,gl,{})}}export{Fl as default,Ml as metadata};
