import{S as fl,i as hl,s as gl,e as s,k as h,w as A,t as i,M as ul,c as r,d as o,m as g,a,x as C,h as l,b as p,G as e,g as _,y as I,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,v,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"),v=i("Example:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Example:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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 vl(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,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"),v=i("Example:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Example:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,u,m,P;return{c(){d=s("p"),v=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);v=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,v),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function Il(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,u,m,P;return{c(){d=s("p"),v=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);v=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,v),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function $l(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,u,m,P;return{c(){d=s("p"),v=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);v=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,v),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function wl(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,u,m,P;return{c(){d=s("p"),v=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);v=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,v),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function yl(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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 Tl(w){let d,v,u,m,P;return{c(){d=s("p"),v=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);v=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,v),e(d,u),e(u,m),e(d,P)},d(n){n&&o(d)}}}function kl(w){let d,v,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"),v=i("Examples:"),u=h(),A(m.$$.fragment)},l(n){d=r(n,"P",{});var c=a(d);v=l(c,"Examples:"),c.forEach(o),u=g(n),C(m.$$.fragment,n)},m(n,c){_(n,d,c),e(d,v),_(n,u,c),I(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,v,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,yo,ps,gn,U,_e,To,ot,ms,ko,fs,un,Nt,hs,_n,Bt,gs,Pn,Pe,us,Dt,_s,Ps,vn,y,vs,Ft,As,Cs,St,Is,Ls,Wt,$s,bs,Rt,ws,xs,Xt,ys,Ts,An,nt,Cn,Ht,ks,In,ve,js,jo,Ms,Es,Ln,Ae,zs,st,qs,Vs,$n,Y,Ce,Mo,rt,Os,Eo,Ns,bn,T,at,Bs,Z,Ds,Ut,Fs,Ss,it,Ws,Rs,Xs,G,Hs,Yt,Us,Ys,Zt,Zs,Gs,Qs,Ie,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,yn,ee,we,Vo,ft,Pr,Oo,vr,Tn,z,ht,Ar,te,Cr,eo,Ir,Lr,gt,$r,br,wr,oe,xr,to,yr,Tr,oo,kr,jr,Mr,xe,kn,ne,ye,No,ut,Er,Bo,zr,jn,k,_t,qr,Do,Vr,Or,M,no,Nr,Br,so,Dr,Fr,ro,Sr,Wr,Fo,Rr,Xr,ao,Hr,Ur,Yr,Te,Pt,Zr,vt,Gr,io,Qr,Jr,Kr,ke,At,ea,Ct,ta,lo,oa,na,Mn,se,je,So,It,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,va,Xo,Aa,Ca,Ia,ze,La,qe,$a,N,wt,ba,ie,wa,mo,xa,ya,Ho,Ta,ka,ja,Ve,Ma,Oe,zn,le,Ne,Uo,xt,Ea,Yo,za,qn,de,yt,qa,B,Tt,Va,ce,Oa,fo,Na,Ba,Zo,Da,Fa,Sa,Be,Wa,De,Vn,pe,Fe,Go,kt,Ra,Qo,Xa,On,me,jt,Ha,D,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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/altclip/configuration_altclip.py#L246"}}),Ie=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/v4.27.1/src/transformers/models/altclip/configuration_altclip.py#L382",returnDescription:`
<p>An instance of a configuration object</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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:"project_dim",val:" = 768"},{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/v4.27.1/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/v4.27.1/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.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"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/configuration_altclip.py#L32"}}),be=new Je({props:{anchor:"transformers.AltCLIPTextConfig.example",$$slots:{default:[vl]},$$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:"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.`,name:"hidden_act"},{anchor:"transformers.AltCLIPVisionConfig.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.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/v4.27.1/src/transformers/models/altclip/configuration_altclip.py#L142"}}),xe=new Je({props:{anchor:"transformers.AltCLIPVisionConfig.example",$$slots:{default:[Al]},$$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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/src/transformers/models/altclip/processing_altclip.py#L112"}}),At=new j({props:{name:"decode",anchor:"transformers.AltCLIPProcessor.decode",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/processing_altclip.py#L119"}}),It=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/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1478"}}),$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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1605",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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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:[Cl]},$$scope:{ctx:w}}}),Ee=new Je({props:{anchor:"transformers.AltCLIPModel.forward.example",$$slots:{default:[Il]},$$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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1512",returnDescription:`
<p>The text embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1559",returnDescription:`
<p>The image embeddings obtained by
applying the projection layer to the pooled output of <a
  href="/docs/transformers/v4.27.1/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({}),yt=new j({props:{name:"class transformers.AltCLIPTextModel",anchor:"transformers.AltCLIPTextModel",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1386"}}),Tt=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/v4.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1405",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}}}),De=new Je({props:{anchor:"transformers.AltCLIPTextModel.forward.example",$$slots:{default:[yl]},$$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/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1156"}}),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/v4.27.1/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See <a href="/docs/transformers/v4.27.1/en/model_doc/videomae#transformers.VideoMAEFeatureExtractor.__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/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/altclip/modeling_altclip.py#L1169",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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/v4.27.1/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:[Tl]},$$scope:{ctx:w}}}),We=new Je({props:{anchor:"transformers.AltCLIPVisionModel.forward.example",$$slots:{default:[kl]},$$scope:{ctx:w}}}),{c(){d=s("meta"),v=h(),u=s("h1"),m=s("a"),P=s("span"),A(n.$$.fragment),c=h(),x=s("span"),ss=i("AltCLIP"),pn=h(),H=s("h2"),ge=s("a"),wo=s("span"),A(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"),yo=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"),To=s("span"),A(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 `),Dt=s("a"),_s=i("CLIPImageProcessor"),Ps=i(" can be used to resize (or rescale) and normalize images for the model."),vn=h(),y=s("p"),vs=i("The "),Ft=s("a"),As=i("AltCLIPProcessor"),Cs=i(" wraps a "),St=s("a"),Is=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"),ys=i("AltCLIPModel"),Ts=i("."),An=h(),A(nt.$$.fragment),Cn=h(),Ht=s("p"),ks=i("Tips:"),In=h(),ve=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(),Ae=s("p"),zs=i("This model was contributed by "),st=s("a"),qs=i("jongjyh"),Vs=i("."),$n=h(),Y=s("h2"),Ce=s("a"),Mo=s("span"),A(rt.$$.fragment),Os=h(),Eo=s("span"),Ns=i("AltCLIPConfig"),bn=h(),T=s("div"),A(at.$$.fragment),Bs=h(),Z=s("p"),Ds=i("This is the configuration class to store the configuration of a "),Ut=s("a"),Fs=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(),A(Ie.$$.fragment),Js=h(),Le=s("div"),A(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"),A(ct.$$.fragment),nr=h(),qo=s("span"),sr=i("AltCLIPTextConfig"),xn=h(),E=s("div"),A(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(),A(be.$$.fragment),yn=h(),ee=s("h2"),we=s("a"),Vo=s("span"),A(ft.$$.fragment),Pr=h(),Oo=s("span"),vr=i("AltCLIPVisionConfig"),Tn=h(),z=s("div"),A(ht.$$.fragment),Ar=h(),te=s("p"),Cr=i("This is the configuration class to store the configuration of a "),eo=s("a"),Ir=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"),yr=i("PretrainedConfig"),Tr=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(),A(xe.$$.fragment),kn=h(),ne=s("h2"),ye=s("a"),No=s("span"),A(ut.$$.fragment),Er=h(),Bo=s("span"),zr=i("AltCLIPProcessor"),jn=h(),k=s("div"),A(_t.$$.fragment),qr=h(),Do=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"),Dr=i("CLIPImageProcessor"),Fr=i(" and "),ro=s("a"),Sr=i("XLMRobertaTokenizerFast"),Wr=i(`. See
the `),Fo=s("code"),Rr=i("__call__()"),Xr=i(" and "),ao=s("a"),Hr=i("decode()"),Ur=i(" for more information."),Yr=h(),Te=s("div"),A(Pt.$$.fragment),Zr=h(),vt=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"),A(At.$$.fragment),ea=h(),Ct=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"),A(It.$$.fragment),sa=h(),Wo=s("span"),ra=i("AltCLIPModel"),En=h(),q=s("div"),A(Lt.$$.fragment),aa=h(),V=s("div"),A($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(),A(Me.$$.fragment),ha=h(),A(Ee.$$.fragment),ga=h(),O=s("div"),A(bt.$$.fragment),ua=h(),ae=s("p"),_a=i("The "),po=s("a"),Pa=i("AltCLIPModel"),va=i(" forward method, overrides the "),Xo=s("code"),Aa=i("__call__"),Ca=i(" special method."),Ia=h(),A(ze.$$.fragment),La=h(),A(qe.$$.fragment),$a=h(),N=s("div"),A(wt.$$.fragment),ba=h(),ie=s("p"),wa=i("The "),mo=s("a"),xa=i("AltCLIPModel"),ya=i(" forward method, overrides the "),Ho=s("code"),Ta=i("__call__"),ka=i(" special method."),ja=h(),A(Ve.$$.fragment),Ma=h(),A(Oe.$$.fragment),zn=h(),le=s("h2"),Ne=s("a"),Uo=s("span"),A(xt.$$.fragment),Ea=h(),Yo=s("span"),za=i("AltCLIPTextModel"),qn=h(),de=s("div"),A(yt.$$.fragment),qa=h(),B=s("div"),A(Tt.$$.fragment),Va=h(),ce=s("p"),Oa=i("The "),fo=s("a"),Na=i("AltCLIPTextModel"),Ba=i(" forward method, overrides the "),Zo=s("code"),Da=i("__call__"),Fa=i(" special method."),Sa=h(),A(Be.$$.fragment),Wa=h(),A(De.$$.fragment),Vn=h(),pe=s("h2"),Fe=s("a"),Go=s("span"),A(kt.$$.fragment),Ra=h(),Qo=s("span"),Xa=i("AltCLIPVisionModel"),On=h(),me=s("div"),A(jt.$$.fragment),Ha=h(),D=s("div"),A(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(),A(Se.$$.fragment),ei=h(),A(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),v=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);C(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);C(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);yo=r(ln,"EM",{});var dn=a(yo);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);To=r(ti,"SPAN",{});var oi=a(To);C(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 Dn=a(Pe);us=l(Dn,`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 `),Dt=r(Dn,"A",{href:!0});var ai=a(Dt);_s=l(ai,"CLIPImageProcessor"),ai.forEach(o),Ps=l(Dn," can be used to resize (or rescale) and normalize images for the model."),Dn.forEach(o),vn=g(t),y=r(t,"P",{});var F=a(y);vs=l(F,"The "),Ft=r(F,"A",{href:!0});var ii=a(Ft);As=l(ii,"AltCLIPProcessor"),ii.forEach(o),Cs=l(F," wraps a "),St=r(F,"A",{href:!0});var li=a(St);Is=l(li,"CLIPImageProcessor"),li.forEach(o),Ls=l(F," and a "),Wt=r(F,"A",{href:!0});var di=a(Wt);$s=l(di,"XLMRobertaTokenizer"),di.forEach(o),bs=l(F,` 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(F,"A",{href:!0});var ci=a(Rt);ws=l(ci,"AltCLIPProcessor"),ci.forEach(o),xs=l(F," and "),Xt=r(F,"A",{href:!0});var pi=a(Xt);ys=l(pi,"AltCLIPModel"),pi.forEach(o),Ts=l(F,"."),F.forEach(o),An=g(t),C(nt.$$.fragment,t),Cn=g(t),Ht=r(t,"P",{});var mi=a(Ht);ks=l(mi,"Tips:"),mi.forEach(o),In=g(t),ve=r(t,"P",{});var Fn=a(ve);js=l(Fn,"This model is build on "),jo=r(Fn,"CODE",{});var fi=a(jo);Ms=l(fi,"CLIPModel"),fi.forEach(o),Es=l(Fn,", so use it like a original CLIP."),Fn.forEach(o),Ln=g(t),Ae=r(t,"P",{});var Sn=a(Ae);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);Ce=r(Wn,"A",{id:!0,class:!0,href:!0});var gi=a(Ce);Mo=r(gi,"SPAN",{});var ui=a(Mo);C(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),T=r(t,"DIV",{class:!0});var W=a(T);C(at.$$.fragment,W),Bs=g(W),Z=r(W,"P",{});var go=a(Z);Ds=l(go,"This is the configuration class to store the configuration of a "),Ut=r(go,"A",{href:!0});var Pi=a(Ut);Fs=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 vi=a(it);Ws=l(vi,"BAAI/AltCLIP"),vi.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 Ai=a(Yt);Us=l(Ai,"PretrainedConfig"),Ai.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 Ci=a(Zt);Zs=l(Ci,"PretrainedConfig"),Ci.forEach(o),Gs=l(uo," for more information."),uo.forEach(o),Qs=g(W),C(Ie.$$.fragment,W),Js=g(W),Le=r(W,"DIV",{class:!0});var Rn=a(Le);C(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 Ii=a(Gt);tr=l(Ii,"AltCLIPConfig"),Ii.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);C(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);C(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 yi=a(Jt);fr=l(yi,"PretrainedConfig"),yi.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 Ti=a(Kt);gr=l(Ti,"PretrainedConfig"),Ti.forEach(o),ur=l(Po," for more information."),Po.forEach(o),_r=g(Re),C(be.$$.fragment,Re),Re.forEach(o),yn=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);C(ft.$$.fragment,ji),ji.forEach(o),ki.forEach(o),Pr=g(Un),Oo=r(Un,"SPAN",{});var Mi=a(Oo);vr=l(Mi,"AltCLIPVisionConfig"),Mi.forEach(o),Un.forEach(o),Tn=g(t),z=r(t,"DIV",{class:!0});var Xe=a(z);C(ht.$$.fragment,Xe),Ar=g(Xe),te=r(Xe,"P",{});var vo=a(te);Cr=l(vo,"This is the configuration class to store the configuration of a "),eo=r(vo,"A",{href:!0});var Ei=a(eo);Ir=l(Ei,"AltCLIPModel"),Ei.forEach(o),Lr=l(vo,`. 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(vo,"A",{href:!0,rel:!0});var zi=a(gt);$r=l(zi,"BAAI/AltCLIP"),zi.forEach(o),br=l(vo," architecture."),vo.forEach(o),wr=g(Xe),oe=r(Xe,"P",{});var Ao=a(oe);xr=l(Ao,"Configuration objects inherit from "),to=r(Ao,"A",{href:!0});var qi=a(to);yr=l(qi,"PretrainedConfig"),qi.forEach(o),Tr=l(Ao,` and can be used to control the model outputs. Read the
documentation from `),oo=r(Ao,"A",{href:!0});var Vi=a(oo);kr=l(Vi,"PretrainedConfig"),Vi.forEach(o),jr=l(Ao," for more information."),Ao.forEach(o),Mr=g(Xe),C(xe.$$.fragment,Xe),Xe.forEach(o),kn=g(t),ne=r(t,"H2",{class:!0});var Yn=a(ne);ye=r(Yn,"A",{id:!0,class:!0,href:!0});var Oi=a(ye);No=r(Oi,"SPAN",{});var Ni=a(No);C(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);C(_t.$$.fragment,R),qr=g(R),Do=r(R,"P",{});var Di=a(Do);Vr=l(Di,`Constructs a AltCLIP processor which wraps a CLIP image processor and a XLM-Roberta tokenizer into a single
processor.`),Di.forEach(o),Or=g(R),M=r(R,"P",{});var S=a(M);no=r(S,"A",{href:!0});var Fi=a(no);Nr=l(Fi,"AltCLIPProcessor"),Fi.forEach(o),Br=l(S," offers all the functionalities of "),so=r(S,"A",{href:!0});var Si=a(so);Dr=l(Si,"CLIPImageProcessor"),Si.forEach(o),Fr=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 `),Fo=r(S,"CODE",{});var Ri=a(Fo);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),Te=r(R,"DIV",{class:!0});var Zn=a(Te);C(Pt.$$.fragment,Zn),Zr=g(Zn),vt=r(Zn,"P",{});var Gn=a(vt);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);C(At.$$.fragment,Qn),ea=g(Qn),Ct=r(Qn,"P",{});var Jn=a(Ct);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);C(It.$$.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);C(Lt.$$.fragment,He),aa=g(He),V=r(He,"DIV",{class:!0});var Ue=a(V);C($t.$$.fragment,Ue),ia=g(Ue),re=r(Ue,"P",{});var Co=a(re);la=l(Co,"The "),co=r(Co,"A",{href:!0});var Qi=a(co);da=l(Qi,"AltCLIPModel"),Qi.forEach(o),ca=l(Co," forward method, overrides the "),Ro=r(Co,"CODE",{});var Ji=a(Ro);pa=l(Ji,"__call__"),Ji.forEach(o),ma=l(Co," special method."),Co.forEach(o),fa=g(Ue),C(Me.$$.fragment,Ue),ha=g(Ue),C(Ee.$$.fragment,Ue),Ue.forEach(o),ga=g(He),O=r(He,"DIV",{class:!0});var Ye=a(O);C(bt.$$.fragment,Ye),ua=g(Ye),ae=r(Ye,"P",{});var Io=a(ae);_a=l(Io,"The "),po=r(Io,"A",{href:!0});var Ki=a(po);Pa=l(Ki,"AltCLIPModel"),Ki.forEach(o),va=l(Io," forward method, overrides the "),Xo=r(Io,"CODE",{});var el=a(Xo);Aa=l(el,"__call__"),el.forEach(o),Ca=l(Io," special method."),Io.forEach(o),Ia=g(Ye),C(ze.$$.fragment,Ye),La=g(Ye),C(qe.$$.fragment,Ye),Ye.forEach(o),$a=g(He),N=r(He,"DIV",{class:!0});var Ze=a(N);C(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),ya=l(Lo," forward method, overrides the "),Ho=r(Lo,"CODE",{});var ol=a(Ho);Ta=l(ol,"__call__"),ol.forEach(o),ka=l(Lo," special method."),Lo.forEach(o),ja=g(Ze),C(Ve.$$.fragment,Ze),Ma=g(Ze),C(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);C(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);C(yt.$$.fragment,ts),qa=g(ts),B=r(ts,"DIV",{class:!0});var Ge=a(B);C(Tt.$$.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);Da=l(il,"__call__"),il.forEach(o),Fa=l($o," special method."),$o.forEach(o),Sa=g(Ge),C(Be.$$.fragment,Ge),Wa=g(Ge),C(De.$$.fragment,Ge),Ge.forEach(o),ts.forEach(o),Vn=g(t),pe=r(t,"H2",{class:!0});var os=a(pe);Fe=r(os,"A",{id:!0,class:!0,href:!0});var ll=a(Fe);Go=r(ll,"SPAN",{});var dl=a(Go);C(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);C(jt.$$.fragment,ns),Ha=g(ns),D=r(ns,"DIV",{class:!0});var Qe=a(D);C(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),C(Se.$$.fragment,Qe),ei=g(Qe),C(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(Dt,"href","/docs/transformers/v4.27.1/en/model_doc/clip#transformers.CLIPImageProcessor"),p(Ft,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(St,"href","/docs/transformers/v4.27.1/en/model_doc/clip#transformers.CLIPImageProcessor"),p(Wt,"href","/docs/transformers/v4.27.1/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizer"),p(Rt,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(Xt,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPModel"),p(st,"href","https://huggingface.co/jongjyh"),p(st,"rel","nofollow"),p(Ce,"id","transformers.AltCLIPConfig"),p(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ce,"href","#transformers.AltCLIPConfig"),p(Y,"class","relative group"),p(Ut,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPModel"),p(it,"href","https://huggingface.co/BAAI/AltCLIP"),p(it,"rel","nofollow"),p(Yt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(Zt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(Gt,"href","/docs/transformers/v4.27.1/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(T,"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/v4.27.1/en/model_doc/altclip#transformers.AltCLIPTextModel"),p(mt,"href","https://huggingface.co/BAAI/AltCLIP"),p(mt,"rel","nofollow"),p(Jt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(Kt,"href","/docs/transformers/v4.27.1/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/v4.27.1/en/model_doc/altclip#transformers.AltCLIPModel"),p(gt,"href","https://huggingface.co/BAAI/AltCLIP"),p(gt,"rel","nofollow"),p(to,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(oo,"href","/docs/transformers/v4.27.1/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(ye,"id","transformers.AltCLIPProcessor"),p(ye,"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(ye,"href","#transformers.AltCLIPProcessor"),p(ne,"class","relative group"),p(no,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPProcessor"),p(so,"href","/docs/transformers/v4.27.1/en/model_doc/clip#transformers.CLIPImageProcessor"),p(ro,"href","/docs/transformers/v4.27.1/en/model_doc/xlm-roberta#transformers.XLMRobertaTokenizerFast"),p(ao,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPProcessor.decode"),p(io,"href","/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.batch_decode"),p(Te,"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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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/v4.27.1/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(Fe,"id","transformers.AltCLIPVisionModel"),p(Fe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Fe,"href","#transformers.AltCLIPVisionModel"),p(pe,"class","relative group"),p(ho,"href","/docs/transformers/v4.27.1/en/model_doc/altclip#transformers.AltCLIPVisionModel"),p(D,"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,v,f),_(t,u,f),e(u,m),e(m,P),I(n,P,null),e(u,c),e(u,x),e(x,ss),_(t,pn,f),_(t,H,f),e(H,ge),e(ge,wo),I(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,yo),e(yo,ps),_(t,gn,f),_(t,U,f),e(U,_e),e(_e,To),I(ot,To,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,Dt),e(Dt,_s),e(Pe,Ps),_(t,vn,f),_(t,y,f),e(y,vs),e(y,Ft),e(Ft,As),e(y,Cs),e(y,St),e(St,Is),e(y,Ls),e(y,Wt),e(Wt,$s),e(y,bs),e(y,Rt),e(Rt,ws),e(y,xs),e(y,Xt),e(Xt,ys),e(y,Ts),_(t,An,f),I(nt,t,f),_(t,Cn,f),_(t,Ht,f),e(Ht,ks),_(t,In,f),_(t,ve,f),e(ve,js),e(ve,jo),e(jo,Ms),e(ve,Es),_(t,Ln,f),_(t,Ae,f),e(Ae,zs),e(Ae,st),e(st,qs),e(Ae,Vs),_(t,$n,f),_(t,Y,f),e(Y,Ce),e(Ce,Mo),I(rt,Mo,null),e(Y,Os),e(Y,Eo),e(Eo,Ns),_(t,bn,f),_(t,T,f),I(at,T,null),e(T,Bs),e(T,Z),e(Z,Ds),e(Z,Ut),e(Ut,Fs),e(Z,Ss),e(Z,it),e(it,Ws),e(Z,Rs),e(T,Xs),e(T,G),e(G,Hs),e(G,Yt),e(Yt,Us),e(G,Ys),e(G,Zt),e(Zt,Zs),e(G,Gs),e(T,Qs),I(Ie,T,null),e(T,Js),e(T,Le),I(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),I(ct,zo,null),e(Q,nr),e(Q,qo),e(qo,sr),_(t,xn,f),_(t,E,f),I(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),I(be,E,null),_(t,yn,f),_(t,ee,f),e(ee,we),e(we,Vo),I(ft,Vo,null),e(ee,Pr),e(ee,Oo),e(Oo,vr),_(t,Tn,f),_(t,z,f),I(ht,z,null),e(z,Ar),e(z,te),e(te,Cr),e(te,eo),e(eo,Ir),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,yr),e(oe,Tr),e(oe,oo),e(oo,kr),e(oe,jr),e(z,Mr),I(xe,z,null),_(t,kn,f),_(t,ne,f),e(ne,ye),e(ye,No),I(ut,No,null),e(ne,Er),e(ne,Bo),e(Bo,zr),_(t,jn,f),_(t,k,f),I(_t,k,null),e(k,qr),e(k,Do),e(Do,Vr),e(k,Or),e(k,M),e(M,no),e(no,Nr),e(M,Br),e(M,so),e(so,Dr),e(M,Fr),e(M,ro),e(ro,Sr),e(M,Wr),e(M,Fo),e(Fo,Rr),e(M,Xr),e(M,ao),e(ao,Hr),e(M,Ur),e(k,Yr),e(k,Te),I(Pt,Te,null),e(Te,Zr),e(Te,vt),e(vt,Gr),e(vt,io),e(io,Qr),e(vt,Jr),e(k,Kr),e(k,ke),I(At,ke,null),e(ke,ea),e(ke,Ct),e(Ct,ta),e(Ct,lo),e(lo,oa),e(Ct,na),_(t,Mn,f),_(t,se,f),e(se,je),e(je,So),I(It,So,null),e(se,sa),e(se,Wo),e(Wo,ra),_(t,En,f),_(t,q,f),I(Lt,q,null),e(q,aa),e(q,V),I($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),I(Me,V,null),e(V,ha),I(Ee,V,null),e(q,ga),e(q,O),I(bt,O,null),e(O,ua),e(O,ae),e(ae,_a),e(ae,po),e(po,Pa),e(ae,va),e(ae,Xo),e(Xo,Aa),e(ae,Ca),e(O,Ia),I(ze,O,null),e(O,La),I(qe,O,null),e(q,$a),e(q,N),I(wt,N,null),e(N,ba),e(N,ie),e(ie,wa),e(ie,mo),e(mo,xa),e(ie,ya),e(ie,Ho),e(Ho,Ta),e(ie,ka),e(N,ja),I(Ve,N,null),e(N,Ma),I(Oe,N,null),_(t,zn,f),_(t,le,f),e(le,Ne),e(Ne,Uo),I(xt,Uo,null),e(le,Ea),e(le,Yo),e(Yo,za),_(t,qn,f),_(t,de,f),I(yt,de,null),e(de,qa),e(de,B),I(Tt,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,Da),e(ce,Fa),e(B,Sa),I(Be,B,null),e(B,Wa),I(De,B,null),_(t,Vn,f),_(t,pe,f),e(pe,Fe),e(Fe,Go),I(kt,Go,null),e(pe,Ra),e(pe,Qo),e(Qo,Xa),_(t,On,f),_(t,me,f),I(jt,me,null),e(me,Ha),e(me,D),I(Mt,D,null),e(D,Ua),e(D,fe),e(fe,Ya),e(fe,ho),e(ho,Za),e(fe,Ga),e(fe,Jo),e(Jo,Qa),e(fe,Ja),e(D,Ka),I(Se,D,null),e(D,ei),I(We,D,null),Nn=!0},p(t,[f]){const Et={};f&2&&(Et.$$scope={dirty:f,ctx:t}),Ie.$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}),De.$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(Ie.$$.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(At.$$.fragment,t),L(It.$$.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(yt.$$.fragment,t),L(Tt.$$.fragment,t),L(Be.$$.fragment,t),L(De.$$.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),$(Ie.$$.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),$(At.$$.fragment,t),$(It.$$.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),$(yt.$$.fragment,t),$(Tt.$$.fragment,t),$(Be.$$.fragment,t),$(De.$$.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(v),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(vn),t&&o(y),t&&o(An),b(nt,t),t&&o(Cn),t&&o(Ht),t&&o(In),t&&o(ve),t&&o(Ln),t&&o(Ae),t&&o($n),t&&o(Y),b(rt),t&&o(bn),t&&o(T),b(at),b(Ie),b(lt),t&&o(wn),t&&o(Q),b(ct),t&&o(xn),t&&o(E),b(pt),b(be),t&&o(yn),t&&o(ee),b(ft),t&&o(Tn),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(At),t&&o(Mn),t&&o(se),b(It),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(yt),b(Tt),b(Be),b(De),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 Dl extends fl{constructor(d){super();hl(this,d,El,jl,gl,{})}}export{Dl as default,Ml as metadata};
