import{S as km,i as Mm,s as $m,e as n,k as p,w as y,t as r,M as Bm,c as s,d as o,m as h,a,x as w,h as l,b as c,G as e,g as _,y as T,q as k,o as M,B as $,v as Fm,L as Ue}from"../../chunks/vendor-hf-doc-builder.js";import{T as wo}from"../../chunks/Tip-hf-doc-builder.js";import{D as J}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Je}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as xm}from"../../chunks/PipelineTag-hf-doc-builder.js";function Em(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsb29tQ29uZmlnJTJDJTIwQmxvb21Nb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBCbG9vbSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwQmxvb21Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQmxvb21Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BloomConfig, BloomModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Bloom configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BloomConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomModel(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=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Cm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function zm(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCbG9vbU1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiklMEFtb2RlbCUyMCUzRCUyMEJsb29tTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BloomModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomModel.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</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_states = outputs.last_hidden_state`}}),{c(){d=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function jm(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJsb29tVG9rZW5pemVyRmFzdCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEJsb29tVG9rZW5pemVyRmFzdC5mcm9tX3ByZXRyYWluZWQoJTIyYmlnc2NpZW5jZSUyRmJsb29tJTIyKSUwQXRva2VuaXplciglMjJIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUwQXRva2VuaXplciglMjIlMjBIZWxsbyUyMHdvcmxkJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BloomTokenizerFast

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = BloomTokenizerFast.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">59414</span>, <span class="hljs-number">8876</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
[<span class="hljs-number">86153</span>, <span class="hljs-number">8876</span>]`}}),{c(){d=n("p"),v=r("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"be encoded differently whether it is at the beginning of the sentence (without space) or not:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Jm(B){let d,v,f,u,b,i,m,F;return{c(){d=n("p"),v=r("When used with "),f=n("code"),u=r("is_split_into_words=True"),b=r(", this tokenizer needs to be instantiated with "),i=n("code"),m=r("add_prefix_space=True"),F=r(".")},l(he){d=s(he,"P",{});var V=a(d);v=l(V,"When used with "),f=s(V,"CODE",{});var Q=a(f);u=l(Q,"is_split_into_words=True"),Q.forEach(o),b=l(V,", this tokenizer needs to be instantiated with "),i=s(V,"CODE",{});var oe=a(i);m=l(oe,"add_prefix_space=True"),oe.forEach(o),F=l(V,"."),V.forEach(o)},m(he,V){_(he,d,V),e(d,v),e(d,f),e(f,u),e(d,b),e(d,i),e(i,m),e(d,F)},d(he){he&&o(d)}}}function Um(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Im(B){let d,v,f,u,b;return u=new Ie({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJsb29tRm9yQ2F1c2FsTE0lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiklMEFtb2RlbCUyMCUzRCUyMEJsb29tRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BloomForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForCausalLM.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Wm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Nm(B){let d,v,f,u,b;return u=new Ie({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJsb29tRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmxvb21Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwQmxvb21Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BloomForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=n("p"),v=r("Example of single-label classification:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example of single-label classification:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Pm(B){let d,v,f,u,b;return u=new Ie({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJsb29tRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmxvb21Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwQmxvb21Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BloomForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=n("p"),v=r("Example of multi-label classification:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example of multi-label classification:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Zm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Am(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCbG9vbUZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbS01NjBtJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmxvb21Gb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20tNTYwbSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BloomForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BloomForTokenClassification.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom-560m&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function qm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Sm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Gm(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Qmxvb21Nb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCbG9vbU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBloomModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBloomModel.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Vm(B){let d,v,f,u,b;return{c(){d=n("p"),v=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),u=r("Module"),b=r(`
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(i){d=s(i,"P",{});var m=a(d);v=l(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(m,"CODE",{});var F=a(f);u=l(F,"Module"),F.forEach(o),b=l(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(o)},m(i,m){_(i,d,m),e(d,v),e(d,f),e(f,u),e(d,b)},d(i){i&&o(d)}}}function Lm(B){let d,v,f,u,b;return u=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Qmxvb21Gb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJpZ3NjaWVuY2UlMkZibG9vbSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCbG9vbUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJiaWdzY2llbmNlJTJGYmxvb20lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjByZXRyaWV2ZSUyMGxvZ3RzJTIwZm9yJTIwbmV4dCUyMHRva2VuJTBBbmV4dF90b2tlbl9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyU1QiUzQSUyQyUyMC0xJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBloomForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBloomForCausalLM.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=n("p"),v=r("Example:"),f=p(),y(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(o),f=h(i),w(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,f,m),T(u,i,m),b=!0},p:Ue,i(i){b||(k(u.$$.fragment,i),b=!0)},o(i){M(u.$$.fragment,i),b=!1},d(i){i&&o(d),i&&o(f),$(u,i)}}}function Rm(B){let d,v,f,u,b,i,m,F,he,V,Q,oe,Wn,To,ur,Nn,fr,ra,We,gr,ko,_r,br,la,j,Pn,Mo,vr,yr,Zn,$o,wr,Tr,An,Bo,kr,Mr,qn,Fo,$r,Br,Sn,xo,Fr,xr,Ot,Eo,Er,Cr,ia,me,Ne,Gn,Co,zr,Vn,jr,da,Xt,Jr,ca,zo,pa,Yt,se,Ht,Ur,Ir,jo,Wr,Nr,Jo,Pr,Zr,ha,Dt,Ar,ma,O,Ln,Kt,qr,Sr,Rn,en,Gr,Vr,Qn,on,Lr,Rr,On,tn,Qr,ua,nn,Or,fa,Pe,Uo,Xr,Io,Yr,Hr,Dr,Wo,Kr,No,el,ol,ga,sn,tl,_a,an,Po,nl,Zo,sl,al,ba,ue,Ze,Xn,Ao,rl,Yn,ll,va,L,qo,il,fe,dl,rn,cl,pl,So,hl,ml,ul,ge,fl,ln,gl,_l,dn,bl,vl,yl,Ae,ya,_e,qe,Hn,Go,wl,Dn,Tl,wa,U,Vo,kl,Kn,Ml,$l,Lo,Bl,cn,Fl,xl,El,Ro,Cl,Qo,zl,jl,Jl,X,Oo,Ul,be,Il,pn,Wl,Nl,es,Pl,Zl,Al,Se,ql,Ge,Ta,ve,Ve,os,Xo,Sl,ts,Gl,ka,x,Yo,Vl,Ho,Ll,ns,Rl,Ql,Ol,ss,Xl,Yl,Le,Hl,Do,Dl,as,Kl,ei,oi,Re,ti,Ko,ni,hn,si,ai,Ma,ye,Qe,rs,et,ri,ls,li,$a,I,ot,ii,is,di,ci,tt,pi,mn,hi,mi,ui,nt,fi,st,gi,_i,bi,Y,at,vi,we,yi,un,wi,Ti,ds,ki,Mi,$i,Oe,Bi,Xe,Ba,Te,Ye,cs,rt,Fi,ps,xi,Fa,E,lt,Ei,hs,Ci,zi,fn,gn,ji,Ji,Ui,R,Ii,ms,Wi,Ni,us,Pi,Zi,fs,Ai,qi,gs,Si,Gi,Vi,it,Li,_n,Ri,Qi,Oi,dt,Xi,ct,Yi,Hi,Di,Z,pt,Ki,ke,ed,bn,od,td,_s,nd,sd,ad,He,rd,De,ld,Ke,xa,Me,eo,bs,ht,id,vs,dd,Ea,W,mt,cd,ys,pd,hd,ut,md,vn,ud,fd,gd,ft,_d,gt,bd,vd,yd,H,_t,wd,$e,Td,yn,kd,Md,ws,$d,Bd,Fd,oo,xd,to,Ca,Be,no,Ts,bt,Ed,ks,Cd,za,N,vt,zd,Fe,jd,Ms,Jd,Ud,$s,Id,Wd,Nd,yt,Pd,wn,Zd,Ad,qd,wt,Sd,Tt,Gd,Vd,Ld,ae,kt,Rd,xe,Qd,Tn,Od,Xd,Bs,Yd,Hd,Dd,so,ja,Ee,ao,Fs,Mt,Kd,xs,ec,Ja,C,$t,oc,Es,tc,nc,Bt,sc,kn,ac,rc,lc,Ft,ic,xt,dc,cc,pc,Cs,hc,mc,te,zs,Et,uc,fc,js,Ct,gc,_c,Js,zt,bc,vc,Us,jt,yc,wc,D,Jt,Tc,Ce,kc,Is,Mc,$c,Ws,Bc,Fc,xc,ro,Ec,lo,Ua,ze,io,Ns,Ut,Cc,Ps,zc,Ia,z,It,jc,Zs,Jc,Uc,Wt,Ic,Mn,Wc,Nc,Pc,Nt,Zc,Pt,Ac,qc,Sc,As,Gc,Vc,ne,qs,Zt,Lc,Rc,Ss,At,Qc,Oc,Gs,qt,Xc,Yc,Vs,St,Hc,Dc,K,Gt,Kc,je,ep,Ls,op,tp,Rs,np,sp,ap,co,rp,po,Wa;return i=new ee({}),To=new ee({}),Co=new ee({}),zo=new xm({props:{pipeline:"text-generation"}}),Ao=new ee({}),qo=new J({props:{name:"class transformers.BloomConfig",anchor:"transformers.BloomConfig",parameters:[{name:"vocab_size",val:" = 250880"},{name:"hidden_size",val:" = 64"},{name:"n_layer",val:" = 2"},{name:"n_head",val:" = 8"},{name:"layer_norm_epsilon",val:" = 1e-05"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"apply_residual_connection_post_layernorm",val:" = False"},{name:"hidden_dropout",val:" = 0.0"},{name:"attention_dropout",val:" = 0.0"},{name:"pretraining_tp",val:" = 1"},{name:"slow_but_exact",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BloomConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250880) &#x2014;
Vocabulary size of the Bloom model. Defines the maximum number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomModel">BloomModel</a>. Check <a href="https://huggingface.co/bigscience/bloom/discussions/120#633d28389addb8530b406c2a" rel="nofollow">this
discussion</a> on how the
<code>vocab_size</code> has been defined.`,name:"vocab_size"},{anchor:"transformers.BloomConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of the embeddings and hidden states.`,name:"hidden_size"},{anchor:"transformers.BloomConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.BloomConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.BloomConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon to use in the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.BloomConfig.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.BloomConfig.apply_residual_connection_post_layernorm",description:`<strong>apply_residual_connection_post_layernorm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If enabled, use the layer norm of the hidden states as the residual in the transformer blocks`,name:"apply_residual_connection_post_layernorm"},{anchor:"transformers.BloomConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Dropout rate of the dropout function on the bias dropout.`,name:"hidden_dropout"},{anchor:"transformers.BloomConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Dropout rate applied to the attention probs`,name:"attention_dropout"},{anchor:"transformers.BloomConfig.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).`,name:"use_cache"},{anchor:"transformers.BloomConfig.pretraining_tp",description:`<strong>pretraining_tp</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014;
Experimental feature. Tensor parallelism rank used during pretraining with Megatron. Please refer to <a href="https://huggingface.co/docs/transformers/parallelism" rel="nofollow">this
document</a> to understand more about it. This value is
necessary to ensure exact reproducibility of the pretraining results. Please refer to <a href="https://github.com/pytorch/pytorch/issues/76232" rel="nofollow">this
issue</a>. Note also that this is enabled only when
<code>slow_but_exact=True</code>.`,name:"pretraining_tp"},{anchor:"transformers.BloomConfig.slow_but_exact",description:`<strong>slow_but_exact</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Experimental feature. Whether to use slow but exact implementation of the attention mechanism. While
merging the TP rank tensors, due to slicing operations the results may be slightly different between the
model trained on Megatron and our model. Please refer to <a href="https://github.com/pytorch/pytorch/issues/76232" rel="nofollow">this
issue</a>. A solution to obtain more accurate results is to
enable this feature. Enabling this will hurt the computational time of the inference. Will be probably
resolved in the future once the main model has been fine-tuned with TP_rank=1.`,name:"slow_but_exact"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/configuration_bloom.py#L42"}}),Ae=new Je({props:{anchor:"transformers.BloomConfig.example",$$slots:{default:[Em]},$$scope:{ctx:B}}}),Go=new ee({}),Vo=new J({props:{name:"class transformers.BloomModel",anchor:"transformers.BloomModel",parameters:[{name:"config",val:": BloomConfig"}],parametersDescription:[{anchor:"transformers.BloomModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L617"}}),Oo=new J({props:{name:"forward",anchor:"transformers.BloomModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",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"},{name:"**deprecated_arguments",val:""}],parametersDescription:[{anchor:"transformers.BloomModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.BloomModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.BloomModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.BloomModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BloomModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.BloomModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BloomModel.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.BloomModel.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.BloomModel.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.32.0/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.32.0/src/transformers/models/bloom/modeling_bloom.py#L670",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) 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>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Se=new wo({props:{$$slots:{default:[Cm]},$$scope:{ctx:B}}}),Ge=new Je({props:{anchor:"transformers.BloomModel.forward.example",$$slots:{default:[zm]},$$scope:{ctx:B}}}),Xo=new ee({}),Yo=new J({props:{name:"class transformers.BloomTokenizerFast",anchor:"transformers.BloomTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"add_prefix_space",val:" = False"},{name:"clean_up_tokenization_spaces",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BloomTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BloomTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BloomTokenizerFast.errors",description:`<strong>errors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;replace&quot;</code>) &#x2014;
Paradigm to follow when decoding bytes to UTF-8. See
<a href="https://docs.python.org/3/library/stdtypes.html#bytes.decode" rel="nofollow">bytes.decode</a> for more information.`,name:"errors"},{anchor:"transformers.BloomTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BloomTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.BloomTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&lt;|endoftext|&gt;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.BloomTokenizerFast.add_prefix_space",description:`<strong>add_prefix_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to add an initial space to the input. This allows to treat the leading word just as any
other word. (Bloom tokenizer detect beginning of words by the preceding space).`,name:"add_prefix_space"},{anchor:"transformers.BloomTokenizerFast.trim_offsets",description:`<strong>trim_offsets</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the post-processing step should trim offsets to avoid including whitespaces.`,name:"trim_offsets"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/tokenization_bloom_fast.py#L47"}}),Le=new Je({props:{anchor:"transformers.BloomTokenizerFast.example",$$slots:{default:[jm]},$$scope:{ctx:B}}}),Re=new wo({props:{$$slots:{default:[Jm]},$$scope:{ctx:B}}}),et=new ee({}),ot=new J({props:{name:"class transformers.BloomForCausalLM",anchor:"transformers.BloomForCausalLM",parameters:[{name:"config",val:": BloomConfig"}],parametersDescription:[{anchor:"transformers.BloomForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L822"}}),at=new J({props:{name:"forward",anchor:"transformers.BloomForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",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:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",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"},{name:"**deprecated_arguments",val:""}],parametersDescription:[{anchor:"transformers.BloomForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.BloomForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.BloomForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.BloomForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BloomForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.BloomForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BloomForCausalLM.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.BloomForCausalLM.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.BloomForCausalLM.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BloomForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L870",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> 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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oe=new wo({props:{$$slots:{default:[Um]},$$scope:{ctx:B}}}),Xe=new Je({props:{anchor:"transformers.BloomForCausalLM.forward.example",$$slots:{default:[Im]},$$scope:{ctx:B}}}),rt=new ee({}),lt=new J({props:{name:"class transformers.BloomForSequenceClassification",anchor:"transformers.BloomForSequenceClassification",parameters:[{name:"config",val:": BloomConfig"}],parametersDescription:[{anchor:"transformers.BloomForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L990"}}),pt=new J({props:{name:"forward",anchor:"transformers.BloomForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",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:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",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"},{name:"**deprecated_arguments",val:""}],parametersDescription:[{anchor:"transformers.BloomForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.BloomForSequenceClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.BloomForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.BloomForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BloomForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.BloomForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BloomForSequenceClassification.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.BloomForSequenceClassification.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.BloomForSequenceClassification.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BloomForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L1000",returnDescription:`
<p>A <code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</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><code>transformers.modeling_outputs.SequenceClassifierOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new wo({props:{$$slots:{default:[Wm]},$$scope:{ctx:B}}}),De=new Je({props:{anchor:"transformers.BloomForSequenceClassification.forward.example",$$slots:{default:[Nm]},$$scope:{ctx:B}}}),Ke=new Je({props:{anchor:"transformers.BloomForSequenceClassification.forward.example-2",$$slots:{default:[Pm]},$$scope:{ctx:B}}}),ht=new ee({}),mt=new J({props:{name:"class transformers.BloomForTokenClassification",anchor:"transformers.BloomForTokenClassification",parameters:[{name:"config",val:": BloomConfig"}],parametersDescription:[{anchor:"transformers.BloomForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L1116"}}),_t=new J({props:{name:"forward",anchor:"transformers.BloomForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[torch.Tensor, torch.Tensor], ...], NoneType] = None"},{name:"attention_mask",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:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_cache",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"},{name:"**deprecated_arguments",val:""}],parametersDescription:[{anchor:"transformers.BloomForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.BloomForTokenClassification.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.BloomForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.BloomForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BloomForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.BloomForTokenClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BloomForTokenClassification.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.BloomForTokenClassification.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.BloomForTokenClassification.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BloomForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L1134",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</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.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new wo({props:{$$slots:{default:[Zm]},$$scope:{ctx:B}}}),to=new Je({props:{anchor:"transformers.BloomForTokenClassification.forward.example",$$slots:{default:[Am]},$$scope:{ctx:B}}}),bt=new ee({}),vt=new J({props:{name:"class transformers.BloomForQuestionAnswering",anchor:"transformers.BloomForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BloomForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L1217"}}),kt=new J({props:{name:"forward",anchor:"transformers.BloomForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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.BloomForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code> if <code>past_key_values</code> is <code>None</code> else <code>past_key_values[0][0].shape[2]</code>
(<code>sequence_length</code> of input past key value states). Indices of input sequence tokens in the vocabulary.</p>
<p>If <code>past_key_values</code> is used, only <code>input_ids</code> that do not have their past calculated should be passed as
<code>input_ids</code>.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.BloomForQuestionAnswering.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
Contains precomputed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>past_key_values</code> output below). Can be used to speed up sequential decoding. The <code>input_ids</code> which have
their past given to this model should not be passed as <code>input_ids</code> as they have already been computed.</p>
<p>Each element of <code>past_key_values</code> is a tuple (past_key, past_value):</p>
<ul>
<li>past_key: [batch_size * num_heads, head_dim, kv_length]</li>
<li>past_value: [batch_size * num_heads, kv_length, head_dim]</li>
</ul>`,name:"past_key_values"},{anchor:"transformers.BloomForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</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.BloomForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BloomForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>inputs_embeds</code> have to be input (see
<code>past_key_values</code>).`,name:"inputs_embeds"},{anchor:"transformers.BloomForQuestionAnswering.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BloomForQuestionAnswering.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.BloomForQuestionAnswering.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.BloomForQuestionAnswering.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BloomForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.BloomForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_bloom.py#L1226"}}),so=new wo({props:{$$slots:{default:[qm]},$$scope:{ctx:B}}}),Mt=new ee({}),$t=new J({props:{name:"class transformers.FlaxBloomModel",anchor:"transformers.FlaxBloomModel",parameters:[{name:"config",val:": BloomConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBloomModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBloomModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_flax_bloom.py#L647"}}),Jt=new J({props:{name:"__call__",anchor:"transformers.FlaxBloomModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"past_key_values",val:": dict = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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.FlaxBloomModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code>. Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>BloomTokenizer</code>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.FlaxBloomModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBloomModel.__call__.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxBloomModel.__call__.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.FlaxBloomModel.__call__.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.FlaxBloomModel.__call__.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.32.0/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.32.0/src/transformers/models/bloom/modeling_flax_bloom.py#L461",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new wo({props:{$$slots:{default:[Sm]},$$scope:{ctx:B}}}),lo=new Je({props:{anchor:"transformers.FlaxBloomModel.__call__.example",$$slots:{default:[Gm]},$$scope:{ctx:B}}}),Ut=new ee({}),It=new J({props:{name:"class transformers.FlaxBloomForCausalLM",anchor:"transformers.FlaxBloomForCausalLM",parameters:[{name:"config",val:": BloomConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBloomForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig">BloomConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBloomForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/bloom/modeling_flax_bloom.py#L708"}}),Gt=new J({props:{name:"__call__",anchor:"transformers.FlaxBloomForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"past_key_values",val:": dict = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{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.FlaxBloomForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, input_ids_length)</code>) &#x2014;
<code>input_ids_length</code> = <code>sequence_length</code>. Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>BloomTokenizer</code>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/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.FlaxBloomForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBloomForCausalLM.__call__.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxBloomForCausalLM.__call__.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.FlaxBloomForCausalLM.__call__.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.FlaxBloomForCausalLM.__call__.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.32.0/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.32.0/src/transformers/models/bloom/modeling_flax_bloom.py#L461",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</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 (<a
  href="/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomConfig"
>BloomConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new wo({props:{$$slots:{default:[Vm]},$$scope:{ctx:B}}}),po=new Je({props:{anchor:"transformers.FlaxBloomForCausalLM.__call__.example",$$slots:{default:[Lm]},$$scope:{ctx:B}}}),{c(){d=n("meta"),v=p(),f=n("h1"),u=n("a"),b=n("span"),y(i.$$.fragment),m=p(),F=n("span"),he=r("BLOOM"),V=p(),Q=n("h2"),oe=n("a"),Wn=n("span"),y(To.$$.fragment),ur=p(),Nn=n("span"),fr=r("Overview"),ra=p(),We=n("p"),gr=r("The BLOOM model has been proposed with its various versions through the "),ko=n("a"),_r=r("BigScience Workshop"),br=r(`. BigScience is inspired by other open science initiatives where researchers have pooled their time and resources to collectively achieve a higher impact.
The architecture of BLOOM is essentially similar to GPT3 (auto-regressive model for next token prediction), but has been trained on 46 different languages and 13 programming languages.
Several smaller versions of the models have been trained on the same dataset. BLOOM is available in the following versions:`),la=p(),j=n("ul"),Pn=n("li"),Mo=n("a"),vr=r("bloom-560m"),yr=p(),Zn=n("li"),$o=n("a"),wr=r("bloom-1b1"),Tr=p(),An=n("li"),Bo=n("a"),kr=r("bloom-1b7"),Mr=p(),qn=n("li"),Fo=n("a"),$r=r("bloom-3b"),Br=p(),Sn=n("li"),xo=n("a"),Fr=r("bloom-7b1"),xr=p(),Ot=n("li"),Eo=n("a"),Er=r("bloom"),Cr=r(" (176B parameters)"),ia=p(),me=n("h2"),Ne=n("a"),Gn=n("span"),y(Co.$$.fragment),zr=p(),Vn=n("span"),jr=r("Resources"),da=p(),Xt=n("p"),Jr=r("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BLOOM. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),ca=p(),y(zo.$$.fragment),pa=p(),Yt=n("ul"),se=n("li"),Ht=n("a"),Ur=r("BloomForCausalLM"),Ir=r(" is supported by this "),jo=n("a"),Wr=r("causal language modeling example script"),Nr=r(" and "),Jo=n("a"),Pr=r("notebook"),Zr=r("."),ha=p(),Dt=n("p"),Ar=r("See also:"),ma=p(),O=n("ul"),Ln=n("li"),Kt=n("a"),qr=r("Causal language modeling task guide"),Sr=p(),Rn=n("li"),en=n("a"),Gr=r("Text classification task guide"),Vr=p(),Qn=n("li"),on=n("a"),Lr=r("Token classification task guide"),Rr=p(),On=n("li"),tn=n("a"),Qr=r("Question answering task guide"),ua=p(),nn=n("p"),Or=r("\u26A1\uFE0F Inference"),fa=p(),Pe=n("ul"),Uo=n("li"),Xr=r("A blog on "),Io=n("a"),Yr=r("Optimization story: Bloom inference"),Hr=r("."),Dr=p(),Wo=n("li"),Kr=r("A blog on "),No=n("a"),el=r("Incredibly Fast BLOOM Inference with DeepSpeed and Accelerate"),ol=r("."),ga=p(),sn=n("p"),tl=r("\u2699\uFE0F Training"),_a=p(),an=n("ul"),Po=n("li"),nl=r("A blog on "),Zo=n("a"),sl=r("The Technology Behind BLOOM Training"),al=r("."),ba=p(),ue=n("h2"),Ze=n("a"),Xn=n("span"),y(Ao.$$.fragment),rl=p(),Yn=n("span"),ll=r("BloomConfig"),va=p(),L=n("div"),y(qo.$$.fragment),il=p(),fe=n("p"),dl=r("This is the configuration class to store the configuration of a "),rn=n("a"),cl=r("BloomModel"),pl=r(`. It is used to instantiate a Bloom
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to the Bloom architecture
`),So=n("a"),hl=r("bigscience/bloom"),ml=r("."),ul=p(),ge=n("p"),fl=r("Configuration objects inherit from "),ln=n("a"),gl=r("PretrainedConfig"),_l=r(` and can be used to control the model outputs. Read the
documentation from `),dn=n("a"),bl=r("PretrainedConfig"),vl=r(" for more information."),yl=p(),y(Ae.$$.fragment),ya=p(),_e=n("h2"),qe=n("a"),Hn=n("span"),y(Go.$$.fragment),wl=p(),Dn=n("span"),Tl=r("BloomModel"),wa=p(),U=n("div"),y(Vo.$$.fragment),kl=p(),Kn=n("p"),Ml=r("The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),$l=p(),Lo=n("p"),Bl=r("This model inherits from "),cn=n("a"),Fl=r("PreTrainedModel"),xl=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),El=p(),Ro=n("p"),Cl=r("This model is also a PyTorch "),Qo=n("a"),zl=r("torch.nn.Module"),jl=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jl=p(),X=n("div"),y(Oo.$$.fragment),Ul=p(),be=n("p"),Il=r("The "),pn=n("a"),Wl=r("BloomModel"),Nl=r(" forward method, overrides the "),es=n("code"),Pl=r("__call__"),Zl=r(" special method."),Al=p(),y(Se.$$.fragment),ql=p(),y(Ge.$$.fragment),Ta=p(),ve=n("h2"),Ve=n("a"),os=n("span"),y(Xo.$$.fragment),Sl=p(),ts=n("span"),Gl=r("BloomTokenizerFast"),ka=p(),x=n("div"),y(Yo.$$.fragment),Vl=p(),Ho=n("p"),Ll=r("Construct a \u201Cfast\u201D Bloom tokenizer (backed by HuggingFace\u2019s "),ns=n("em"),Rl=r("tokenizers"),Ql=r(` library). Based on byte-level
Byte-Pair-Encoding.`),Ol=p(),ss=n("p"),Xl=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Yl=p(),y(Le.$$.fragment),Hl=p(),Do=n("p"),Dl=r("You can get around that behavior by passing "),as=n("code"),Kl=r("add_prefix_space=True"),ei=r(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),oi=p(),y(Re.$$.fragment),ti=p(),Ko=n("p"),ni=r("This tokenizer inherits from "),hn=n("a"),si=r("PreTrainedTokenizerFast"),ai=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ma=p(),ye=n("h2"),Qe=n("a"),rs=n("span"),y(et.$$.fragment),ri=p(),ls=n("span"),li=r("BloomForCausalLM"),$a=p(),I=n("div"),y(ot.$$.fragment),ii=p(),is=n("p"),di=r(`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),ci=p(),tt=n("p"),pi=r("This model inherits from "),mn=n("a"),hi=r("PreTrainedModel"),mi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),ui=p(),nt=n("p"),fi=r("This model is also a PyTorch "),st=n("a"),gi=r("torch.nn.Module"),_i=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bi=p(),Y=n("div"),y(at.$$.fragment),vi=p(),we=n("p"),yi=r("The "),un=n("a"),wi=r("BloomForCausalLM"),Ti=r(" forward method, overrides the "),ds=n("code"),ki=r("__call__"),Mi=r(" special method."),$i=p(),y(Oe.$$.fragment),Bi=p(),y(Xe.$$.fragment),Ba=p(),Te=n("h2"),Ye=n("a"),cs=n("span"),y(rt.$$.fragment),Fi=p(),ps=n("span"),xi=r("BloomForSequenceClassification"),Fa=p(),E=n("div"),y(lt.$$.fragment),Ei=p(),hs=n("p"),Ci=r("The Bloom Model transformer with a sequence classification head on top (linear layer)."),zi=p(),fn=n("p"),gn=n("a"),ji=r("BloomForSequenceClassification"),Ji=r(` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),Ui=p(),R=n("p"),Ii=r(`Since it does classification on the last token, it requires to know the position of the last token. If a
`),ms=n("code"),Wi=r("pad_token_id"),Ni=r(` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),us=n("code"),Pi=r("pad_token_id"),Zi=r(` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),fs=n("code"),Ai=r("inputs_embeds"),qi=r(" are passed instead of "),gs=n("code"),Si=r("input_ids"),Gi=r(`, it does the same (take the last value in
each row of the batch).`),Vi=p(),it=n("p"),Li=r("This model inherits from "),_n=n("a"),Ri=r("PreTrainedModel"),Qi=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Oi=p(),dt=n("p"),Xi=r("This model is also a PyTorch "),ct=n("a"),Yi=r("torch.nn.Module"),Hi=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Di=p(),Z=n("div"),y(pt.$$.fragment),Ki=p(),ke=n("p"),ed=r("The "),bn=n("a"),od=r("BloomForSequenceClassification"),td=r(" forward method, overrides the "),_s=n("code"),nd=r("__call__"),sd=r(" special method."),ad=p(),y(He.$$.fragment),rd=p(),y(De.$$.fragment),ld=p(),y(Ke.$$.fragment),xa=p(),Me=n("h2"),eo=n("a"),bs=n("span"),y(ht.$$.fragment),id=p(),vs=n("span"),dd=r("BloomForTokenClassification"),Ea=p(),W=n("div"),y(mt.$$.fragment),cd=p(),ys=n("p"),pd=r(`Bloom Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),hd=p(),ut=n("p"),md=r("This model inherits from "),vn=n("a"),ud=r("PreTrainedModel"),fd=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),gd=p(),ft=n("p"),_d=r("This model is also a PyTorch "),gt=n("a"),bd=r("torch.nn.Module"),vd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),yd=p(),H=n("div"),y(_t.$$.fragment),wd=p(),$e=n("p"),Td=r("The "),yn=n("a"),kd=r("BloomForTokenClassification"),Md=r(" forward method, overrides the "),ws=n("code"),$d=r("__call__"),Bd=r(" special method."),Fd=p(),y(oo.$$.fragment),xd=p(),y(to.$$.fragment),Ca=p(),Be=n("h2"),no=n("a"),Ts=n("span"),y(bt.$$.fragment),Ed=p(),ks=n("span"),Cd=r("BloomForQuestionAnswering"),za=p(),N=n("div"),y(vt.$$.fragment),zd=p(),Fe=n("p"),jd=r(`The BLOOM Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),Ms=n("code"),Jd=r("span start logits"),Ud=r(" and "),$s=n("code"),Id=r("span end logits"),Wd=r(")."),Nd=p(),yt=n("p"),Pd=r("This model inherits from "),wn=n("a"),Zd=r("PreTrainedModel"),Ad=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),qd=p(),wt=n("p"),Sd=r("This model is also a PyTorch "),Tt=n("a"),Gd=r("torch.nn.Module"),Vd=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ld=p(),ae=n("div"),y(kt.$$.fragment),Rd=p(),xe=n("p"),Qd=r("The "),Tn=n("a"),Od=r("BloomForQuestionAnswering"),Xd=r(" forward method, overrides the "),Bs=n("code"),Yd=r("__call__"),Hd=r(" special method."),Dd=p(),y(so.$$.fragment),ja=p(),Ee=n("h2"),ao=n("a"),Fs=n("span"),y(Mt.$$.fragment),Kd=p(),xs=n("span"),ec=r("FlaxBloomModel"),Ja=p(),C=n("div"),y($t.$$.fragment),oc=p(),Es=n("p"),tc=r("The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),nc=p(),Bt=n("p"),sc=r("This model inherits from "),kn=n("a"),ac=r("FlaxPreTrainedModel"),rc=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),lc=p(),Ft=n("p"),ic=r(`This model is also a Flax Linen
`),xt=n("a"),dc=r("flax.nn.Module"),cc=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),pc=p(),Cs=n("p"),hc=r("Finally, this model supports inherent JAX features such as:"),mc=p(),te=n("ul"),zs=n("li"),Et=n("a"),uc=r("Just-In-Time (JIT) compilation"),fc=p(),js=n("li"),Ct=n("a"),gc=r("Automatic Differentiation"),_c=p(),Js=n("li"),zt=n("a"),bc=r("Vectorization"),vc=p(),Us=n("li"),jt=n("a"),yc=r("Parallelization"),wc=p(),D=n("div"),y(Jt.$$.fragment),Tc=p(),Ce=n("p"),kc=r("The "),Is=n("code"),Mc=r("FlaxBloomPreTrainedModel"),$c=r(" forward method, overrides the "),Ws=n("code"),Bc=r("__call__"),Fc=r(" special method."),xc=p(),y(ro.$$.fragment),Ec=p(),y(lo.$$.fragment),Ua=p(),ze=n("h2"),io=n("a"),Ns=n("span"),y(Ut.$$.fragment),Cc=p(),Ps=n("span"),zc=r("FlaxBloomForCausalLM"),Ia=p(),z=n("div"),y(It.$$.fragment),jc=p(),Zs=n("p"),Jc=r(`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Uc=p(),Wt=n("p"),Ic=r("This model inherits from "),Mn=n("a"),Wc=r("FlaxPreTrainedModel"),Nc=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pc=p(),Nt=n("p"),Zc=r(`This model is also a Flax Linen
`),Pt=n("a"),Ac=r("flax.nn.Module"),qc=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Sc=p(),As=n("p"),Gc=r("Finally, this model supports inherent JAX features such as:"),Vc=p(),ne=n("ul"),qs=n("li"),Zt=n("a"),Lc=r("Just-In-Time (JIT) compilation"),Rc=p(),Ss=n("li"),At=n("a"),Qc=r("Automatic Differentiation"),Oc=p(),Gs=n("li"),qt=n("a"),Xc=r("Vectorization"),Yc=p(),Vs=n("li"),St=n("a"),Hc=r("Parallelization"),Dc=p(),K=n("div"),y(Gt.$$.fragment),Kc=p(),je=n("p"),ep=r("The "),Ls=n("code"),op=r("FlaxBloomPreTrainedModel"),tp=r(" forward method, overrides the "),Rs=n("code"),np=r("__call__"),sp=r(" special method."),ap=p(),y(co.$$.fragment),rp=p(),y(po.$$.fragment),this.h()},l(t){const g=Bm('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(o),v=h(t),f=s(t,"H1",{class:!0});var Vt=a(f);u=s(Vt,"A",{id:!0,class:!0,href:!0});var Qs=a(u);b=s(Qs,"SPAN",{});var Os=a(b);w(i.$$.fragment,Os),Os.forEach(o),Qs.forEach(o),m=h(Vt),F=s(Vt,"SPAN",{});var Xs=a(F);he=l(Xs,"BLOOM"),Xs.forEach(o),Vt.forEach(o),V=h(t),Q=s(t,"H2",{class:!0});var Lt=a(Q);oe=s(Lt,"A",{id:!0,class:!0,href:!0});var Ys=a(oe);Wn=s(Ys,"SPAN",{});var Hs=a(Wn);w(To.$$.fragment,Hs),Hs.forEach(o),Ys.forEach(o),ur=h(Lt),Nn=s(Lt,"SPAN",{});var Ds=a(Nn);fr=l(Ds,"Overview"),Ds.forEach(o),Lt.forEach(o),ra=h(t),We=s(t,"P",{});var Rt=a(We);gr=l(Rt,"The BLOOM model has been proposed with its various versions through the "),ko=s(Rt,"A",{href:!0,rel:!0});var Ks=a(ko);_r=l(Ks,"BigScience Workshop"),Ks.forEach(o),br=l(Rt,`. BigScience is inspired by other open science initiatives where researchers have pooled their time and resources to collectively achieve a higher impact.
The architecture of BLOOM is essentially similar to GPT3 (auto-regressive model for next token prediction), but has been trained on 46 different languages and 13 programming languages.
Several smaller versions of the models have been trained on the same dataset. BLOOM is available in the following versions:`),Rt.forEach(o),la=h(t),j=s(t,"UL",{});var P=a(j);Pn=s(P,"LI",{});var ea=a(Pn);Mo=s(ea,"A",{href:!0,rel:!0});var oa=a(Mo);vr=l(oa,"bloom-560m"),oa.forEach(o),ea.forEach(o),yr=h(P),Zn=s(P,"LI",{});var ta=a(Zn);$o=s(ta,"A",{href:!0,rel:!0});var na=a($o);wr=l(na,"bloom-1b1"),na.forEach(o),ta.forEach(o),Tr=h(P),An=s(P,"LI",{});var sa=a(An);Bo=s(sa,"A",{href:!0,rel:!0});var aa=a(Bo);kr=l(aa,"bloom-1b7"),aa.forEach(o),sa.forEach(o),Mr=h(P),qn=s(P,"LI",{});var dp=a(qn);Fo=s(dp,"A",{href:!0,rel:!0});var cp=a(Fo);$r=l(cp,"bloom-3b"),cp.forEach(o),dp.forEach(o),Br=h(P),Sn=s(P,"LI",{});var pp=a(Sn);xo=s(pp,"A",{href:!0,rel:!0});var hp=a(xo);Fr=l(hp,"bloom-7b1"),hp.forEach(o),pp.forEach(o),xr=h(P),Ot=s(P,"LI",{});var lp=a(Ot);Eo=s(lp,"A",{href:!0,rel:!0});var mp=a(Eo);Er=l(mp,"bloom"),mp.forEach(o),Cr=l(lp," (176B parameters)"),lp.forEach(o),P.forEach(o),ia=h(t),me=s(t,"H2",{class:!0});var Na=a(me);Ne=s(Na,"A",{id:!0,class:!0,href:!0});var up=a(Ne);Gn=s(up,"SPAN",{});var fp=a(Gn);w(Co.$$.fragment,fp),fp.forEach(o),up.forEach(o),zr=h(Na),Vn=s(Na,"SPAN",{});var gp=a(Vn);jr=l(gp,"Resources"),gp.forEach(o),Na.forEach(o),da=h(t),Xt=s(t,"P",{});var _p=a(Xt);Jr=l(_p,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BLOOM. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),_p.forEach(o),ca=h(t),w(zo.$$.fragment,t),pa=h(t),Yt=s(t,"UL",{});var bp=a(Yt);se=s(bp,"LI",{});var Qt=a(se);Ht=s(Qt,"A",{href:!0});var vp=a(Ht);Ur=l(vp,"BloomForCausalLM"),vp.forEach(o),Ir=l(Qt," is supported by this "),jo=s(Qt,"A",{href:!0,rel:!0});var yp=a(jo);Wr=l(yp,"causal language modeling example script"),yp.forEach(o),Nr=l(Qt," and "),Jo=s(Qt,"A",{href:!0,rel:!0});var wp=a(Jo);Pr=l(wp,"notebook"),wp.forEach(o),Zr=l(Qt,"."),Qt.forEach(o),bp.forEach(o),ha=h(t),Dt=s(t,"P",{});var Tp=a(Dt);Ar=l(Tp,"See also:"),Tp.forEach(o),ma=h(t),O=s(t,"UL",{});var ho=a(O);Ln=s(ho,"LI",{});var kp=a(Ln);Kt=s(kp,"A",{href:!0});var Mp=a(Kt);qr=l(Mp,"Causal language modeling task guide"),Mp.forEach(o),kp.forEach(o),Sr=h(ho),Rn=s(ho,"LI",{});var $p=a(Rn);en=s($p,"A",{href:!0});var Bp=a(en);Gr=l(Bp,"Text classification task guide"),Bp.forEach(o),$p.forEach(o),Vr=h(ho),Qn=s(ho,"LI",{});var Fp=a(Qn);on=s(Fp,"A",{href:!0});var xp=a(on);Lr=l(xp,"Token classification task guide"),xp.forEach(o),Fp.forEach(o),Rr=h(ho),On=s(ho,"LI",{});var Ep=a(On);tn=s(Ep,"A",{href:!0});var Cp=a(tn);Qr=l(Cp,"Question answering task guide"),Cp.forEach(o),Ep.forEach(o),ho.forEach(o),ua=h(t),nn=s(t,"P",{});var zp=a(nn);Or=l(zp,"\u26A1\uFE0F Inference"),zp.forEach(o),fa=h(t),Pe=s(t,"UL",{});var Pa=a(Pe);Uo=s(Pa,"LI",{});var Za=a(Uo);Xr=l(Za,"A blog on "),Io=s(Za,"A",{href:!0,rel:!0});var jp=a(Io);Yr=l(jp,"Optimization story: Bloom inference"),jp.forEach(o),Hr=l(Za,"."),Za.forEach(o),Dr=h(Pa),Wo=s(Pa,"LI",{});var Aa=a(Wo);Kr=l(Aa,"A blog on "),No=s(Aa,"A",{href:!0,rel:!0});var Jp=a(No);el=l(Jp,"Incredibly Fast BLOOM Inference with DeepSpeed and Accelerate"),Jp.forEach(o),ol=l(Aa,"."),Aa.forEach(o),Pa.forEach(o),ga=h(t),sn=s(t,"P",{});var Up=a(sn);tl=l(Up,"\u2699\uFE0F Training"),Up.forEach(o),_a=h(t),an=s(t,"UL",{});var Ip=a(an);Po=s(Ip,"LI",{});var qa=a(Po);nl=l(qa,"A blog on "),Zo=s(qa,"A",{href:!0,rel:!0});var Wp=a(Zo);sl=l(Wp,"The Technology Behind BLOOM Training"),Wp.forEach(o),al=l(qa,"."),qa.forEach(o),Ip.forEach(o),ba=h(t),ue=s(t,"H2",{class:!0});var Sa=a(ue);Ze=s(Sa,"A",{id:!0,class:!0,href:!0});var Np=a(Ze);Xn=s(Np,"SPAN",{});var Pp=a(Xn);w(Ao.$$.fragment,Pp),Pp.forEach(o),Np.forEach(o),rl=h(Sa),Yn=s(Sa,"SPAN",{});var Zp=a(Yn);ll=l(Zp,"BloomConfig"),Zp.forEach(o),Sa.forEach(o),va=h(t),L=s(t,"DIV",{class:!0});var mo=a(L);w(qo.$$.fragment,mo),il=h(mo),fe=s(mo,"P",{});var $n=a(fe);dl=l($n,"This is the configuration class to store the configuration of a "),rn=s($n,"A",{href:!0});var Ap=a(rn);cl=l(Ap,"BloomModel"),Ap.forEach(o),pl=l($n,`. It is used to instantiate a Bloom
model according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to the Bloom architecture
`),So=s($n,"A",{href:!0,rel:!0});var qp=a(So);hl=l(qp,"bigscience/bloom"),qp.forEach(o),ml=l($n,"."),$n.forEach(o),ul=h(mo),ge=s(mo,"P",{});var Bn=a(ge);fl=l(Bn,"Configuration objects inherit from "),ln=s(Bn,"A",{href:!0});var Sp=a(ln);gl=l(Sp,"PretrainedConfig"),Sp.forEach(o),_l=l(Bn,` and can be used to control the model outputs. Read the
documentation from `),dn=s(Bn,"A",{href:!0});var Gp=a(dn);bl=l(Gp,"PretrainedConfig"),Gp.forEach(o),vl=l(Bn," for more information."),Bn.forEach(o),yl=h(mo),w(Ae.$$.fragment,mo),mo.forEach(o),ya=h(t),_e=s(t,"H2",{class:!0});var Ga=a(_e);qe=s(Ga,"A",{id:!0,class:!0,href:!0});var Vp=a(qe);Hn=s(Vp,"SPAN",{});var Lp=a(Hn);w(Go.$$.fragment,Lp),Lp.forEach(o),Vp.forEach(o),wl=h(Ga),Dn=s(Ga,"SPAN",{});var Rp=a(Dn);Tl=l(Rp,"BloomModel"),Rp.forEach(o),Ga.forEach(o),wa=h(t),U=s(t,"DIV",{class:!0});var re=a(U);w(Vo.$$.fragment,re),kl=h(re),Kn=s(re,"P",{});var Qp=a(Kn);Ml=l(Qp,"The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),Qp.forEach(o),$l=h(re),Lo=s(re,"P",{});var Va=a(Lo);Bl=l(Va,"This model inherits from "),cn=s(Va,"A",{href:!0});var Op=a(cn);Fl=l(Op,"PreTrainedModel"),Op.forEach(o),xl=l(Va,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Va.forEach(o),El=h(re),Ro=s(re,"P",{});var La=a(Ro);Cl=l(La,"This model is also a PyTorch "),Qo=s(La,"A",{href:!0,rel:!0});var Xp=a(Qo);zl=l(Xp,"torch.nn.Module"),Xp.forEach(o),jl=l(La,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),La.forEach(o),Jl=h(re),X=s(re,"DIV",{class:!0});var uo=a(X);w(Oo.$$.fragment,uo),Ul=h(uo),be=s(uo,"P",{});var Fn=a(be);Il=l(Fn,"The "),pn=s(Fn,"A",{href:!0});var Yp=a(pn);Wl=l(Yp,"BloomModel"),Yp.forEach(o),Nl=l(Fn," forward method, overrides the "),es=s(Fn,"CODE",{});var Hp=a(es);Pl=l(Hp,"__call__"),Hp.forEach(o),Zl=l(Fn," special method."),Fn.forEach(o),Al=h(uo),w(Se.$$.fragment,uo),ql=h(uo),w(Ge.$$.fragment,uo),uo.forEach(o),re.forEach(o),Ta=h(t),ve=s(t,"H2",{class:!0});var Ra=a(ve);Ve=s(Ra,"A",{id:!0,class:!0,href:!0});var Dp=a(Ve);os=s(Dp,"SPAN",{});var Kp=a(os);w(Xo.$$.fragment,Kp),Kp.forEach(o),Dp.forEach(o),Sl=h(Ra),ts=s(Ra,"SPAN",{});var eh=a(ts);Gl=l(eh,"BloomTokenizerFast"),eh.forEach(o),Ra.forEach(o),ka=h(t),x=s(t,"DIV",{class:!0});var A=a(x);w(Yo.$$.fragment,A),Vl=h(A),Ho=s(A,"P",{});var Qa=a(Ho);Ll=l(Qa,"Construct a \u201Cfast\u201D Bloom tokenizer (backed by HuggingFace\u2019s "),ns=s(Qa,"EM",{});var oh=a(ns);Rl=l(oh,"tokenizers"),oh.forEach(o),Ql=l(Qa,` library). Based on byte-level
Byte-Pair-Encoding.`),Qa.forEach(o),Ol=h(A),ss=s(A,"P",{});var th=a(ss);Xl=l(th,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),th.forEach(o),Yl=h(A),w(Le.$$.fragment,A),Hl=h(A),Do=s(A,"P",{});var Oa=a(Do);Dl=l(Oa,"You can get around that behavior by passing "),as=s(Oa,"CODE",{});var nh=a(as);Kl=l(nh,"add_prefix_space=True"),nh.forEach(o),ei=l(Oa,` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),Oa.forEach(o),oi=h(A),w(Re.$$.fragment,A),ti=h(A),Ko=s(A,"P",{});var Xa=a(Ko);ni=l(Xa,"This tokenizer inherits from "),hn=s(Xa,"A",{href:!0});var sh=a(hn);si=l(sh,"PreTrainedTokenizerFast"),sh.forEach(o),ai=l(Xa,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Xa.forEach(o),A.forEach(o),Ma=h(t),ye=s(t,"H2",{class:!0});var Ya=a(ye);Qe=s(Ya,"A",{id:!0,class:!0,href:!0});var ah=a(Qe);rs=s(ah,"SPAN",{});var rh=a(rs);w(et.$$.fragment,rh),rh.forEach(o),ah.forEach(o),ri=h(Ya),ls=s(Ya,"SPAN",{});var lh=a(ls);li=l(lh,"BloomForCausalLM"),lh.forEach(o),Ya.forEach(o),$a=h(t),I=s(t,"DIV",{class:!0});var le=a(I);w(ot.$$.fragment,le),ii=h(le),is=s(le,"P",{});var ih=a(is);di=l(ih,`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),ih.forEach(o),ci=h(le),tt=s(le,"P",{});var Ha=a(tt);pi=l(Ha,"This model inherits from "),mn=s(Ha,"A",{href:!0});var dh=a(mn);hi=l(dh,"PreTrainedModel"),dh.forEach(o),mi=l(Ha,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),Ha.forEach(o),ui=h(le),nt=s(le,"P",{});var Da=a(nt);fi=l(Da,"This model is also a PyTorch "),st=s(Da,"A",{href:!0,rel:!0});var ch=a(st);gi=l(ch,"torch.nn.Module"),ch.forEach(o),_i=l(Da,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Da.forEach(o),bi=h(le),Y=s(le,"DIV",{class:!0});var fo=a(Y);w(at.$$.fragment,fo),vi=h(fo),we=s(fo,"P",{});var xn=a(we);yi=l(xn,"The "),un=s(xn,"A",{href:!0});var ph=a(un);wi=l(ph,"BloomForCausalLM"),ph.forEach(o),Ti=l(xn," forward method, overrides the "),ds=s(xn,"CODE",{});var hh=a(ds);ki=l(hh,"__call__"),hh.forEach(o),Mi=l(xn," special method."),xn.forEach(o),$i=h(fo),w(Oe.$$.fragment,fo),Bi=h(fo),w(Xe.$$.fragment,fo),fo.forEach(o),le.forEach(o),Ba=h(t),Te=s(t,"H2",{class:!0});var Ka=a(Te);Ye=s(Ka,"A",{id:!0,class:!0,href:!0});var mh=a(Ye);cs=s(mh,"SPAN",{});var uh=a(cs);w(rt.$$.fragment,uh),uh.forEach(o),mh.forEach(o),Fi=h(Ka),ps=s(Ka,"SPAN",{});var fh=a(ps);xi=l(fh,"BloomForSequenceClassification"),fh.forEach(o),Ka.forEach(o),Fa=h(t),E=s(t,"DIV",{class:!0});var q=a(E);w(lt.$$.fragment,q),Ei=h(q),hs=s(q,"P",{});var gh=a(hs);Ci=l(gh,"The Bloom Model transformer with a sequence classification head on top (linear layer)."),gh.forEach(o),zi=h(q),fn=s(q,"P",{});var ip=a(fn);gn=s(ip,"A",{href:!0});var _h=a(gn);ji=l(_h,"BloomForSequenceClassification"),_h.forEach(o),Ji=l(ip,` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),ip.forEach(o),Ui=h(q),R=s(q,"P",{});var ie=a(R);Ii=l(ie,`Since it does classification on the last token, it requires to know the position of the last token. If a
`),ms=s(ie,"CODE",{});var bh=a(ms);Wi=l(bh,"pad_token_id"),bh.forEach(o),Ni=l(ie,` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),us=s(ie,"CODE",{});var vh=a(us);Pi=l(vh,"pad_token_id"),vh.forEach(o),Zi=l(ie,` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),fs=s(ie,"CODE",{});var yh=a(fs);Ai=l(yh,"inputs_embeds"),yh.forEach(o),qi=l(ie," are passed instead of "),gs=s(ie,"CODE",{});var wh=a(gs);Si=l(wh,"input_ids"),wh.forEach(o),Gi=l(ie,`, it does the same (take the last value in
each row of the batch).`),ie.forEach(o),Vi=h(q),it=s(q,"P",{});var er=a(it);Li=l(er,"This model inherits from "),_n=s(er,"A",{href:!0});var Th=a(_n);Ri=l(Th,"PreTrainedModel"),Th.forEach(o),Qi=l(er,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),er.forEach(o),Oi=h(q),dt=s(q,"P",{});var or=a(dt);Xi=l(or,"This model is also a PyTorch "),ct=s(or,"A",{href:!0,rel:!0});var kh=a(ct);Yi=l(kh,"torch.nn.Module"),kh.forEach(o),Hi=l(or,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),or.forEach(o),Di=h(q),Z=s(q,"DIV",{class:!0});var de=a(Z);w(pt.$$.fragment,de),Ki=h(de),ke=s(de,"P",{});var En=a(ke);ed=l(En,"The "),bn=s(En,"A",{href:!0});var Mh=a(bn);od=l(Mh,"BloomForSequenceClassification"),Mh.forEach(o),td=l(En," forward method, overrides the "),_s=s(En,"CODE",{});var $h=a(_s);nd=l($h,"__call__"),$h.forEach(o),sd=l(En," special method."),En.forEach(o),ad=h(de),w(He.$$.fragment,de),rd=h(de),w(De.$$.fragment,de),ld=h(de),w(Ke.$$.fragment,de),de.forEach(o),q.forEach(o),xa=h(t),Me=s(t,"H2",{class:!0});var tr=a(Me);eo=s(tr,"A",{id:!0,class:!0,href:!0});var Bh=a(eo);bs=s(Bh,"SPAN",{});var Fh=a(bs);w(ht.$$.fragment,Fh),Fh.forEach(o),Bh.forEach(o),id=h(tr),vs=s(tr,"SPAN",{});var xh=a(vs);dd=l(xh,"BloomForTokenClassification"),xh.forEach(o),tr.forEach(o),Ea=h(t),W=s(t,"DIV",{class:!0});var ce=a(W);w(mt.$$.fragment,ce),cd=h(ce),ys=s(ce,"P",{});var Eh=a(ys);pd=l(Eh,`Bloom Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Eh.forEach(o),hd=h(ce),ut=s(ce,"P",{});var nr=a(ut);md=l(nr,"This model inherits from "),vn=s(nr,"A",{href:!0});var Ch=a(vn);ud=l(Ch,"PreTrainedModel"),Ch.forEach(o),fd=l(nr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),nr.forEach(o),gd=h(ce),ft=s(ce,"P",{});var sr=a(ft);_d=l(sr,"This model is also a PyTorch "),gt=s(sr,"A",{href:!0,rel:!0});var zh=a(gt);bd=l(zh,"torch.nn.Module"),zh.forEach(o),vd=l(sr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sr.forEach(o),yd=h(ce),H=s(ce,"DIV",{class:!0});var go=a(H);w(_t.$$.fragment,go),wd=h(go),$e=s(go,"P",{});var Cn=a($e);Td=l(Cn,"The "),yn=s(Cn,"A",{href:!0});var jh=a(yn);kd=l(jh,"BloomForTokenClassification"),jh.forEach(o),Md=l(Cn," forward method, overrides the "),ws=s(Cn,"CODE",{});var Jh=a(ws);$d=l(Jh,"__call__"),Jh.forEach(o),Bd=l(Cn," special method."),Cn.forEach(o),Fd=h(go),w(oo.$$.fragment,go),xd=h(go),w(to.$$.fragment,go),go.forEach(o),ce.forEach(o),Ca=h(t),Be=s(t,"H2",{class:!0});var ar=a(Be);no=s(ar,"A",{id:!0,class:!0,href:!0});var Uh=a(no);Ts=s(Uh,"SPAN",{});var Ih=a(Ts);w(bt.$$.fragment,Ih),Ih.forEach(o),Uh.forEach(o),Ed=h(ar),ks=s(ar,"SPAN",{});var Wh=a(ks);Cd=l(Wh,"BloomForQuestionAnswering"),Wh.forEach(o),ar.forEach(o),za=h(t),N=s(t,"DIV",{class:!0});var pe=a(N);w(vt.$$.fragment,pe),zd=h(pe),Fe=s(pe,"P",{});var zn=a(Fe);jd=l(zn,`The BLOOM Model transformer with a span classification head on top for extractive question-answering tasks like
SQuAD (a linear layers on top of the hidden-states output to compute `),Ms=s(zn,"CODE",{});var Nh=a(Ms);Jd=l(Nh,"span start logits"),Nh.forEach(o),Ud=l(zn," and "),$s=s(zn,"CODE",{});var Ph=a($s);Id=l(Ph,"span end logits"),Ph.forEach(o),Wd=l(zn,")."),zn.forEach(o),Nd=h(pe),yt=s(pe,"P",{});var rr=a(yt);Pd=l(rr,"This model inherits from "),wn=s(rr,"A",{href:!0});var Zh=a(wn);Zd=l(Zh,"PreTrainedModel"),Zh.forEach(o),Ad=l(rr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings etc.)`),rr.forEach(o),qd=h(pe),wt=s(pe,"P",{});var lr=a(wt);Sd=l(lr,"This model is also a PyTorch "),Tt=s(lr,"A",{href:!0,rel:!0});var Ah=a(Tt);Gd=l(Ah,"torch.nn.Module"),Ah.forEach(o),Vd=l(lr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lr.forEach(o),Ld=h(pe),ae=s(pe,"DIV",{class:!0});var jn=a(ae);w(kt.$$.fragment,jn),Rd=h(jn),xe=s(jn,"P",{});var Jn=a(xe);Qd=l(Jn,"The "),Tn=s(Jn,"A",{href:!0});var qh=a(Tn);Od=l(qh,"BloomForQuestionAnswering"),qh.forEach(o),Xd=l(Jn," forward method, overrides the "),Bs=s(Jn,"CODE",{});var Sh=a(Bs);Yd=l(Sh,"__call__"),Sh.forEach(o),Hd=l(Jn," special method."),Jn.forEach(o),Dd=h(jn),w(so.$$.fragment,jn),jn.forEach(o),pe.forEach(o),ja=h(t),Ee=s(t,"H2",{class:!0});var ir=a(Ee);ao=s(ir,"A",{id:!0,class:!0,href:!0});var Gh=a(ao);Fs=s(Gh,"SPAN",{});var Vh=a(Fs);w(Mt.$$.fragment,Vh),Vh.forEach(o),Gh.forEach(o),Kd=h(ir),xs=s(ir,"SPAN",{});var Lh=a(xs);ec=l(Lh,"FlaxBloomModel"),Lh.forEach(o),ir.forEach(o),Ja=h(t),C=s(t,"DIV",{class:!0});var S=a(C);w($t.$$.fragment,S),oc=h(S),Es=s(S,"P",{});var Rh=a(Es);tc=l(Rh,"The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),Rh.forEach(o),nc=h(S),Bt=s(S,"P",{});var dr=a(Bt);sc=l(dr,"This model inherits from "),kn=s(dr,"A",{href:!0});var Qh=a(kn);ac=l(Qh,"FlaxPreTrainedModel"),Qh.forEach(o),rc=l(dr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dr.forEach(o),lc=h(S),Ft=s(S,"P",{});var cr=a(Ft);ic=l(cr,`This model is also a Flax Linen
`),xt=s(cr,"A",{href:!0,rel:!0});var Oh=a(xt);dc=l(Oh,"flax.nn.Module"),Oh.forEach(o),cc=l(cr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),cr.forEach(o),pc=h(S),Cs=s(S,"P",{});var Xh=a(Cs);hc=l(Xh,"Finally, this model supports inherent JAX features such as:"),Xh.forEach(o),mc=h(S),te=s(S,"UL",{});var _o=a(te);zs=s(_o,"LI",{});var Yh=a(zs);Et=s(Yh,"A",{href:!0,rel:!0});var Hh=a(Et);uc=l(Hh,"Just-In-Time (JIT) compilation"),Hh.forEach(o),Yh.forEach(o),fc=h(_o),js=s(_o,"LI",{});var Dh=a(js);Ct=s(Dh,"A",{href:!0,rel:!0});var Kh=a(Ct);gc=l(Kh,"Automatic Differentiation"),Kh.forEach(o),Dh.forEach(o),_c=h(_o),Js=s(_o,"LI",{});var em=a(Js);zt=s(em,"A",{href:!0,rel:!0});var om=a(zt);bc=l(om,"Vectorization"),om.forEach(o),em.forEach(o),vc=h(_o),Us=s(_o,"LI",{});var tm=a(Us);jt=s(tm,"A",{href:!0,rel:!0});var nm=a(jt);yc=l(nm,"Parallelization"),nm.forEach(o),tm.forEach(o),_o.forEach(o),wc=h(S),D=s(S,"DIV",{class:!0});var bo=a(D);w(Jt.$$.fragment,bo),Tc=h(bo),Ce=s(bo,"P",{});var Un=a(Ce);kc=l(Un,"The "),Is=s(Un,"CODE",{});var sm=a(Is);Mc=l(sm,"FlaxBloomPreTrainedModel"),sm.forEach(o),$c=l(Un," forward method, overrides the "),Ws=s(Un,"CODE",{});var am=a(Ws);Bc=l(am,"__call__"),am.forEach(o),Fc=l(Un," special method."),Un.forEach(o),xc=h(bo),w(ro.$$.fragment,bo),Ec=h(bo),w(lo.$$.fragment,bo),bo.forEach(o),S.forEach(o),Ua=h(t),ze=s(t,"H2",{class:!0});var pr=a(ze);io=s(pr,"A",{id:!0,class:!0,href:!0});var rm=a(io);Ns=s(rm,"SPAN",{});var lm=a(Ns);w(Ut.$$.fragment,lm),lm.forEach(o),rm.forEach(o),Cc=h(pr),Ps=s(pr,"SPAN",{});var im=a(Ps);zc=l(im,"FlaxBloomForCausalLM"),im.forEach(o),pr.forEach(o),Ia=h(t),z=s(t,"DIV",{class:!0});var G=a(z);w(It.$$.fragment,G),jc=h(G),Zs=s(G,"P",{});var dm=a(Zs);Jc=l(dm,`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),dm.forEach(o),Uc=h(G),Wt=s(G,"P",{});var hr=a(Wt);Ic=l(hr,"This model inherits from "),Mn=s(hr,"A",{href:!0});var cm=a(Mn);Wc=l(cm,"FlaxPreTrainedModel"),cm.forEach(o),Nc=l(hr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),hr.forEach(o),Pc=h(G),Nt=s(G,"P",{});var mr=a(Nt);Zc=l(mr,`This model is also a Flax Linen
`),Pt=s(mr,"A",{href:!0,rel:!0});var pm=a(Pt);Ac=l(pm,"flax.nn.Module"),pm.forEach(o),qc=l(mr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),mr.forEach(o),Sc=h(G),As=s(G,"P",{});var hm=a(As);Gc=l(hm,"Finally, this model supports inherent JAX features such as:"),hm.forEach(o),Vc=h(G),ne=s(G,"UL",{});var vo=a(ne);qs=s(vo,"LI",{});var mm=a(qs);Zt=s(mm,"A",{href:!0,rel:!0});var um=a(Zt);Lc=l(um,"Just-In-Time (JIT) compilation"),um.forEach(o),mm.forEach(o),Rc=h(vo),Ss=s(vo,"LI",{});var fm=a(Ss);At=s(fm,"A",{href:!0,rel:!0});var gm=a(At);Qc=l(gm,"Automatic Differentiation"),gm.forEach(o),fm.forEach(o),Oc=h(vo),Gs=s(vo,"LI",{});var _m=a(Gs);qt=s(_m,"A",{href:!0,rel:!0});var bm=a(qt);Xc=l(bm,"Vectorization"),bm.forEach(o),_m.forEach(o),Yc=h(vo),Vs=s(vo,"LI",{});var vm=a(Vs);St=s(vm,"A",{href:!0,rel:!0});var ym=a(St);Hc=l(ym,"Parallelization"),ym.forEach(o),vm.forEach(o),vo.forEach(o),Dc=h(G),K=s(G,"DIV",{class:!0});var yo=a(K);w(Gt.$$.fragment,yo),Kc=h(yo),je=s(yo,"P",{});var In=a(je);ep=l(In,"The "),Ls=s(In,"CODE",{});var wm=a(Ls);op=l(wm,"FlaxBloomPreTrainedModel"),wm.forEach(o),tp=l(In," forward method, overrides the "),Rs=s(In,"CODE",{});var Tm=a(Rs);np=l(Tm,"__call__"),Tm.forEach(o),sp=l(In," special method."),In.forEach(o),ap=h(yo),w(co.$$.fragment,yo),rp=h(yo),w(po.$$.fragment,yo),yo.forEach(o),G.forEach(o),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Qm)),c(u,"id","bloom"),c(u,"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"),c(u,"href","#bloom"),c(f,"class","relative group"),c(oe,"id","overview"),c(oe,"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"),c(oe,"href","#overview"),c(Q,"class","relative group"),c(ko,"href","https://bigscience.huggingface.co/"),c(ko,"rel","nofollow"),c(Mo,"href","https://huggingface.co/bigscience/bloom-560m"),c(Mo,"rel","nofollow"),c($o,"href","https://huggingface.co/bigscience/bloom-1b1"),c($o,"rel","nofollow"),c(Bo,"href","https://huggingface.co/bigscience/bloom-1b7"),c(Bo,"rel","nofollow"),c(Fo,"href","https://huggingface.co/bigscience/bloom-3b"),c(Fo,"rel","nofollow"),c(xo,"href","https://huggingface.co/bigscience/bloom-7b1"),c(xo,"rel","nofollow"),c(Eo,"href","https://huggingface.co/bigscience/bloom"),c(Eo,"rel","nofollow"),c(Ne,"id","resources"),c(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"),c(Ne,"href","#resources"),c(me,"class","relative group"),c(Ht,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForCausalLM"),c(jo,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling"),c(jo,"rel","nofollow"),c(Jo,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(Jo,"rel","nofollow"),c(Kt,"href","../tasks/language_modeling"),c(en,"href","../tasks/sequence_classification"),c(on,"href","../tasks/token_classification"),c(tn,"href","../tasks/question_answering"),c(Io,"href","https://huggingface.co/blog/bloom-inference-optimization"),c(Io,"rel","nofollow"),c(No,"href","https://huggingface.co/blog/bloom-inference-pytorch-scripts"),c(No,"rel","nofollow"),c(Zo,"href","https://huggingface.co/blog/bloom-megatron-deepspeed"),c(Zo,"rel","nofollow"),c(Ze,"id","transformers.BloomConfig"),c(Ze,"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"),c(Ze,"href","#transformers.BloomConfig"),c(ue,"class","relative group"),c(rn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomModel"),c(So,"href","https://huggingface.co/bigscience/bloom"),c(So,"rel","nofollow"),c(ln,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(dn,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(qe,"id","transformers.BloomModel"),c(qe,"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"),c(qe,"href","#transformers.BloomModel"),c(_e,"class","relative group"),c(cn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Qo,"rel","nofollow"),c(pn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomModel"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ve,"id","transformers.BloomTokenizerFast"),c(Ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ve,"href","#transformers.BloomTokenizerFast"),c(ve,"class","relative group"),c(hn,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Qe,"id","transformers.BloomForCausalLM"),c(Qe,"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"),c(Qe,"href","#transformers.BloomForCausalLM"),c(ye,"class","relative group"),c(mn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(st,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(st,"rel","nofollow"),c(un,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForCausalLM"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ye,"id","transformers.BloomForSequenceClassification"),c(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"),c(Ye,"href","#transformers.BloomForSequenceClassification"),c(Te,"class","relative group"),c(gn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForSequenceClassification"),c(_n,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(ct,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ct,"rel","nofollow"),c(bn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForSequenceClassification"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(eo,"id","transformers.BloomForTokenClassification"),c(eo,"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"),c(eo,"href","#transformers.BloomForTokenClassification"),c(Me,"class","relative group"),c(vn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(gt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(gt,"rel","nofollow"),c(yn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForTokenClassification"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(no,"id","transformers.BloomForQuestionAnswering"),c(no,"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"),c(no,"href","#transformers.BloomForQuestionAnswering"),c(Be,"class","relative group"),c(wn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),c(Tt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Tt,"rel","nofollow"),c(Tn,"href","/docs/transformers/v4.32.0/en/model_doc/bloom#transformers.BloomForQuestionAnswering"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ao,"id","transformers.FlaxBloomModel"),c(ao,"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"),c(ao,"href","#transformers.FlaxBloomModel"),c(Ee,"class","relative group"),c(kn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(xt,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(xt,"rel","nofollow"),c(Et,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Et,"rel","nofollow"),c(Ct,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Ct,"rel","nofollow"),c(zt,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(zt,"rel","nofollow"),c(jt,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(jt,"rel","nofollow"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(io,"id","transformers.FlaxBloomForCausalLM"),c(io,"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"),c(io,"href","#transformers.FlaxBloomForCausalLM"),c(ze,"class","relative group"),c(Mn,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Pt,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),c(Pt,"rel","nofollow"),c(Zt,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Zt,"rel","nofollow"),c(At,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(At,"rel","nofollow"),c(qt,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(qt,"rel","nofollow"),c(St,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(St,"rel","nofollow"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),_(t,v,g),_(t,f,g),e(f,u),e(u,b),T(i,b,null),e(f,m),e(f,F),e(F,he),_(t,V,g),_(t,Q,g),e(Q,oe),e(oe,Wn),T(To,Wn,null),e(Q,ur),e(Q,Nn),e(Nn,fr),_(t,ra,g),_(t,We,g),e(We,gr),e(We,ko),e(ko,_r),e(We,br),_(t,la,g),_(t,j,g),e(j,Pn),e(Pn,Mo),e(Mo,vr),e(j,yr),e(j,Zn),e(Zn,$o),e($o,wr),e(j,Tr),e(j,An),e(An,Bo),e(Bo,kr),e(j,Mr),e(j,qn),e(qn,Fo),e(Fo,$r),e(j,Br),e(j,Sn),e(Sn,xo),e(xo,Fr),e(j,xr),e(j,Ot),e(Ot,Eo),e(Eo,Er),e(Ot,Cr),_(t,ia,g),_(t,me,g),e(me,Ne),e(Ne,Gn),T(Co,Gn,null),e(me,zr),e(me,Vn),e(Vn,jr),_(t,da,g),_(t,Xt,g),e(Xt,Jr),_(t,ca,g),T(zo,t,g),_(t,pa,g),_(t,Yt,g),e(Yt,se),e(se,Ht),e(Ht,Ur),e(se,Ir),e(se,jo),e(jo,Wr),e(se,Nr),e(se,Jo),e(Jo,Pr),e(se,Zr),_(t,ha,g),_(t,Dt,g),e(Dt,Ar),_(t,ma,g),_(t,O,g),e(O,Ln),e(Ln,Kt),e(Kt,qr),e(O,Sr),e(O,Rn),e(Rn,en),e(en,Gr),e(O,Vr),e(O,Qn),e(Qn,on),e(on,Lr),e(O,Rr),e(O,On),e(On,tn),e(tn,Qr),_(t,ua,g),_(t,nn,g),e(nn,Or),_(t,fa,g),_(t,Pe,g),e(Pe,Uo),e(Uo,Xr),e(Uo,Io),e(Io,Yr),e(Uo,Hr),e(Pe,Dr),e(Pe,Wo),e(Wo,Kr),e(Wo,No),e(No,el),e(Wo,ol),_(t,ga,g),_(t,sn,g),e(sn,tl),_(t,_a,g),_(t,an,g),e(an,Po),e(Po,nl),e(Po,Zo),e(Zo,sl),e(Po,al),_(t,ba,g),_(t,ue,g),e(ue,Ze),e(Ze,Xn),T(Ao,Xn,null),e(ue,rl),e(ue,Yn),e(Yn,ll),_(t,va,g),_(t,L,g),T(qo,L,null),e(L,il),e(L,fe),e(fe,dl),e(fe,rn),e(rn,cl),e(fe,pl),e(fe,So),e(So,hl),e(fe,ml),e(L,ul),e(L,ge),e(ge,fl),e(ge,ln),e(ln,gl),e(ge,_l),e(ge,dn),e(dn,bl),e(ge,vl),e(L,yl),T(Ae,L,null),_(t,ya,g),_(t,_e,g),e(_e,qe),e(qe,Hn),T(Go,Hn,null),e(_e,wl),e(_e,Dn),e(Dn,Tl),_(t,wa,g),_(t,U,g),T(Vo,U,null),e(U,kl),e(U,Kn),e(Kn,Ml),e(U,$l),e(U,Lo),e(Lo,Bl),e(Lo,cn),e(cn,Fl),e(Lo,xl),e(U,El),e(U,Ro),e(Ro,Cl),e(Ro,Qo),e(Qo,zl),e(Ro,jl),e(U,Jl),e(U,X),T(Oo,X,null),e(X,Ul),e(X,be),e(be,Il),e(be,pn),e(pn,Wl),e(be,Nl),e(be,es),e(es,Pl),e(be,Zl),e(X,Al),T(Se,X,null),e(X,ql),T(Ge,X,null),_(t,Ta,g),_(t,ve,g),e(ve,Ve),e(Ve,os),T(Xo,os,null),e(ve,Sl),e(ve,ts),e(ts,Gl),_(t,ka,g),_(t,x,g),T(Yo,x,null),e(x,Vl),e(x,Ho),e(Ho,Ll),e(Ho,ns),e(ns,Rl),e(Ho,Ql),e(x,Ol),e(x,ss),e(ss,Xl),e(x,Yl),T(Le,x,null),e(x,Hl),e(x,Do),e(Do,Dl),e(Do,as),e(as,Kl),e(Do,ei),e(x,oi),T(Re,x,null),e(x,ti),e(x,Ko),e(Ko,ni),e(Ko,hn),e(hn,si),e(Ko,ai),_(t,Ma,g),_(t,ye,g),e(ye,Qe),e(Qe,rs),T(et,rs,null),e(ye,ri),e(ye,ls),e(ls,li),_(t,$a,g),_(t,I,g),T(ot,I,null),e(I,ii),e(I,is),e(is,di),e(I,ci),e(I,tt),e(tt,pi),e(tt,mn),e(mn,hi),e(tt,mi),e(I,ui),e(I,nt),e(nt,fi),e(nt,st),e(st,gi),e(nt,_i),e(I,bi),e(I,Y),T(at,Y,null),e(Y,vi),e(Y,we),e(we,yi),e(we,un),e(un,wi),e(we,Ti),e(we,ds),e(ds,ki),e(we,Mi),e(Y,$i),T(Oe,Y,null),e(Y,Bi),T(Xe,Y,null),_(t,Ba,g),_(t,Te,g),e(Te,Ye),e(Ye,cs),T(rt,cs,null),e(Te,Fi),e(Te,ps),e(ps,xi),_(t,Fa,g),_(t,E,g),T(lt,E,null),e(E,Ei),e(E,hs),e(hs,Ci),e(E,zi),e(E,fn),e(fn,gn),e(gn,ji),e(fn,Ji),e(E,Ui),e(E,R),e(R,Ii),e(R,ms),e(ms,Wi),e(R,Ni),e(R,us),e(us,Pi),e(R,Zi),e(R,fs),e(fs,Ai),e(R,qi),e(R,gs),e(gs,Si),e(R,Gi),e(E,Vi),e(E,it),e(it,Li),e(it,_n),e(_n,Ri),e(it,Qi),e(E,Oi),e(E,dt),e(dt,Xi),e(dt,ct),e(ct,Yi),e(dt,Hi),e(E,Di),e(E,Z),T(pt,Z,null),e(Z,Ki),e(Z,ke),e(ke,ed),e(ke,bn),e(bn,od),e(ke,td),e(ke,_s),e(_s,nd),e(ke,sd),e(Z,ad),T(He,Z,null),e(Z,rd),T(De,Z,null),e(Z,ld),T(Ke,Z,null),_(t,xa,g),_(t,Me,g),e(Me,eo),e(eo,bs),T(ht,bs,null),e(Me,id),e(Me,vs),e(vs,dd),_(t,Ea,g),_(t,W,g),T(mt,W,null),e(W,cd),e(W,ys),e(ys,pd),e(W,hd),e(W,ut),e(ut,md),e(ut,vn),e(vn,ud),e(ut,fd),e(W,gd),e(W,ft),e(ft,_d),e(ft,gt),e(gt,bd),e(ft,vd),e(W,yd),e(W,H),T(_t,H,null),e(H,wd),e(H,$e),e($e,Td),e($e,yn),e(yn,kd),e($e,Md),e($e,ws),e(ws,$d),e($e,Bd),e(H,Fd),T(oo,H,null),e(H,xd),T(to,H,null),_(t,Ca,g),_(t,Be,g),e(Be,no),e(no,Ts),T(bt,Ts,null),e(Be,Ed),e(Be,ks),e(ks,Cd),_(t,za,g),_(t,N,g),T(vt,N,null),e(N,zd),e(N,Fe),e(Fe,jd),e(Fe,Ms),e(Ms,Jd),e(Fe,Ud),e(Fe,$s),e($s,Id),e(Fe,Wd),e(N,Nd),e(N,yt),e(yt,Pd),e(yt,wn),e(wn,Zd),e(yt,Ad),e(N,qd),e(N,wt),e(wt,Sd),e(wt,Tt),e(Tt,Gd),e(wt,Vd),e(N,Ld),e(N,ae),T(kt,ae,null),e(ae,Rd),e(ae,xe),e(xe,Qd),e(xe,Tn),e(Tn,Od),e(xe,Xd),e(xe,Bs),e(Bs,Yd),e(xe,Hd),e(ae,Dd),T(so,ae,null),_(t,ja,g),_(t,Ee,g),e(Ee,ao),e(ao,Fs),T(Mt,Fs,null),e(Ee,Kd),e(Ee,xs),e(xs,ec),_(t,Ja,g),_(t,C,g),T($t,C,null),e(C,oc),e(C,Es),e(Es,tc),e(C,nc),e(C,Bt),e(Bt,sc),e(Bt,kn),e(kn,ac),e(Bt,rc),e(C,lc),e(C,Ft),e(Ft,ic),e(Ft,xt),e(xt,dc),e(Ft,cc),e(C,pc),e(C,Cs),e(Cs,hc),e(C,mc),e(C,te),e(te,zs),e(zs,Et),e(Et,uc),e(te,fc),e(te,js),e(js,Ct),e(Ct,gc),e(te,_c),e(te,Js),e(Js,zt),e(zt,bc),e(te,vc),e(te,Us),e(Us,jt),e(jt,yc),e(C,wc),e(C,D),T(Jt,D,null),e(D,Tc),e(D,Ce),e(Ce,kc),e(Ce,Is),e(Is,Mc),e(Ce,$c),e(Ce,Ws),e(Ws,Bc),e(Ce,Fc),e(D,xc),T(ro,D,null),e(D,Ec),T(lo,D,null),_(t,Ua,g),_(t,ze,g),e(ze,io),e(io,Ns),T(Ut,Ns,null),e(ze,Cc),e(ze,Ps),e(Ps,zc),_(t,Ia,g),_(t,z,g),T(It,z,null),e(z,jc),e(z,Zs),e(Zs,Jc),e(z,Uc),e(z,Wt),e(Wt,Ic),e(Wt,Mn),e(Mn,Wc),e(Wt,Nc),e(z,Pc),e(z,Nt),e(Nt,Zc),e(Nt,Pt),e(Pt,Ac),e(Nt,qc),e(z,Sc),e(z,As),e(As,Gc),e(z,Vc),e(z,ne),e(ne,qs),e(qs,Zt),e(Zt,Lc),e(ne,Rc),e(ne,Ss),e(Ss,At),e(At,Qc),e(ne,Oc),e(ne,Gs),e(Gs,qt),e(qt,Xc),e(ne,Yc),e(ne,Vs),e(Vs,St),e(St,Hc),e(z,Dc),e(z,K),T(Gt,K,null),e(K,Kc),e(K,je),e(je,ep),e(je,Ls),e(Ls,op),e(je,tp),e(je,Rs),e(Rs,np),e(je,sp),e(K,ap),T(co,K,null),e(K,rp),T(po,K,null),Wa=!0},p(t,[g]){const Vt={};g&2&&(Vt.$$scope={dirty:g,ctx:t}),Ae.$set(Vt);const Qs={};g&2&&(Qs.$$scope={dirty:g,ctx:t}),Se.$set(Qs);const Os={};g&2&&(Os.$$scope={dirty:g,ctx:t}),Ge.$set(Os);const Xs={};g&2&&(Xs.$$scope={dirty:g,ctx:t}),Le.$set(Xs);const Lt={};g&2&&(Lt.$$scope={dirty:g,ctx:t}),Re.$set(Lt);const Ys={};g&2&&(Ys.$$scope={dirty:g,ctx:t}),Oe.$set(Ys);const Hs={};g&2&&(Hs.$$scope={dirty:g,ctx:t}),Xe.$set(Hs);const Ds={};g&2&&(Ds.$$scope={dirty:g,ctx:t}),He.$set(Ds);const Rt={};g&2&&(Rt.$$scope={dirty:g,ctx:t}),De.$set(Rt);const Ks={};g&2&&(Ks.$$scope={dirty:g,ctx:t}),Ke.$set(Ks);const P={};g&2&&(P.$$scope={dirty:g,ctx:t}),oo.$set(P);const ea={};g&2&&(ea.$$scope={dirty:g,ctx:t}),to.$set(ea);const oa={};g&2&&(oa.$$scope={dirty:g,ctx:t}),so.$set(oa);const ta={};g&2&&(ta.$$scope={dirty:g,ctx:t}),ro.$set(ta);const na={};g&2&&(na.$$scope={dirty:g,ctx:t}),lo.$set(na);const sa={};g&2&&(sa.$$scope={dirty:g,ctx:t}),co.$set(sa);const aa={};g&2&&(aa.$$scope={dirty:g,ctx:t}),po.$set(aa)},i(t){Wa||(k(i.$$.fragment,t),k(To.$$.fragment,t),k(Co.$$.fragment,t),k(zo.$$.fragment,t),k(Ao.$$.fragment,t),k(qo.$$.fragment,t),k(Ae.$$.fragment,t),k(Go.$$.fragment,t),k(Vo.$$.fragment,t),k(Oo.$$.fragment,t),k(Se.$$.fragment,t),k(Ge.$$.fragment,t),k(Xo.$$.fragment,t),k(Yo.$$.fragment,t),k(Le.$$.fragment,t),k(Re.$$.fragment,t),k(et.$$.fragment,t),k(ot.$$.fragment,t),k(at.$$.fragment,t),k(Oe.$$.fragment,t),k(Xe.$$.fragment,t),k(rt.$$.fragment,t),k(lt.$$.fragment,t),k(pt.$$.fragment,t),k(He.$$.fragment,t),k(De.$$.fragment,t),k(Ke.$$.fragment,t),k(ht.$$.fragment,t),k(mt.$$.fragment,t),k(_t.$$.fragment,t),k(oo.$$.fragment,t),k(to.$$.fragment,t),k(bt.$$.fragment,t),k(vt.$$.fragment,t),k(kt.$$.fragment,t),k(so.$$.fragment,t),k(Mt.$$.fragment,t),k($t.$$.fragment,t),k(Jt.$$.fragment,t),k(ro.$$.fragment,t),k(lo.$$.fragment,t),k(Ut.$$.fragment,t),k(It.$$.fragment,t),k(Gt.$$.fragment,t),k(co.$$.fragment,t),k(po.$$.fragment,t),Wa=!0)},o(t){M(i.$$.fragment,t),M(To.$$.fragment,t),M(Co.$$.fragment,t),M(zo.$$.fragment,t),M(Ao.$$.fragment,t),M(qo.$$.fragment,t),M(Ae.$$.fragment,t),M(Go.$$.fragment,t),M(Vo.$$.fragment,t),M(Oo.$$.fragment,t),M(Se.$$.fragment,t),M(Ge.$$.fragment,t),M(Xo.$$.fragment,t),M(Yo.$$.fragment,t),M(Le.$$.fragment,t),M(Re.$$.fragment,t),M(et.$$.fragment,t),M(ot.$$.fragment,t),M(at.$$.fragment,t),M(Oe.$$.fragment,t),M(Xe.$$.fragment,t),M(rt.$$.fragment,t),M(lt.$$.fragment,t),M(pt.$$.fragment,t),M(He.$$.fragment,t),M(De.$$.fragment,t),M(Ke.$$.fragment,t),M(ht.$$.fragment,t),M(mt.$$.fragment,t),M(_t.$$.fragment,t),M(oo.$$.fragment,t),M(to.$$.fragment,t),M(bt.$$.fragment,t),M(vt.$$.fragment,t),M(kt.$$.fragment,t),M(so.$$.fragment,t),M(Mt.$$.fragment,t),M($t.$$.fragment,t),M(Jt.$$.fragment,t),M(ro.$$.fragment,t),M(lo.$$.fragment,t),M(Ut.$$.fragment,t),M(It.$$.fragment,t),M(Gt.$$.fragment,t),M(co.$$.fragment,t),M(po.$$.fragment,t),Wa=!1},d(t){o(d),t&&o(v),t&&o(f),$(i),t&&o(V),t&&o(Q),$(To),t&&o(ra),t&&o(We),t&&o(la),t&&o(j),t&&o(ia),t&&o(me),$(Co),t&&o(da),t&&o(Xt),t&&o(ca),$(zo,t),t&&o(pa),t&&o(Yt),t&&o(ha),t&&o(Dt),t&&o(ma),t&&o(O),t&&o(ua),t&&o(nn),t&&o(fa),t&&o(Pe),t&&o(ga),t&&o(sn),t&&o(_a),t&&o(an),t&&o(ba),t&&o(ue),$(Ao),t&&o(va),t&&o(L),$(qo),$(Ae),t&&o(ya),t&&o(_e),$(Go),t&&o(wa),t&&o(U),$(Vo),$(Oo),$(Se),$(Ge),t&&o(Ta),t&&o(ve),$(Xo),t&&o(ka),t&&o(x),$(Yo),$(Le),$(Re),t&&o(Ma),t&&o(ye),$(et),t&&o($a),t&&o(I),$(ot),$(at),$(Oe),$(Xe),t&&o(Ba),t&&o(Te),$(rt),t&&o(Fa),t&&o(E),$(lt),$(pt),$(He),$(De),$(Ke),t&&o(xa),t&&o(Me),$(ht),t&&o(Ea),t&&o(W),$(mt),$(_t),$(oo),$(to),t&&o(Ca),t&&o(Be),$(bt),t&&o(za),t&&o(N),$(vt),$(kt),$(so),t&&o(ja),t&&o(Ee),$(Mt),t&&o(Ja),t&&o(C),$($t),$(Jt),$(ro),$(lo),t&&o(Ua),t&&o(ze),$(Ut),t&&o(Ia),t&&o(z),$(It),$(Gt),$(co),$(po)}}}const Qm={local:"bloom",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.BloomConfig",title:"BloomConfig"},{local:"transformers.BloomModel",title:"BloomModel"},{local:"transformers.BloomTokenizerFast",title:"BloomTokenizerFast"},{local:"transformers.BloomForCausalLM",title:"BloomForCausalLM"},{local:"transformers.BloomForSequenceClassification",title:"BloomForSequenceClassification"},{local:"transformers.BloomForTokenClassification",title:"BloomForTokenClassification"},{local:"transformers.BloomForQuestionAnswering",title:"BloomForQuestionAnswering"},{local:"transformers.FlaxBloomModel",title:"FlaxBloomModel"},{local:"transformers.FlaxBloomForCausalLM",title:"FlaxBloomForCausalLM"}],title:"BLOOM"};function Om(B){return Fm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tu extends km{constructor(d){super();Mm(this,d,Om,Rm,$m,{})}}export{tu as default,Qm as metadata};
