import{S as mc,i as uc,s as fc,e as n,k as p,w as k,t as r,M as gc,c as s,d as t,m as h,a,x as y,h as l,b as c,G as e,g as _,y as w,q as T,o as $,B,v as _c,L as nt}from"../../chunks/vendor-hf-doc-builder.js";import{T as Wt}from"../../chunks/Tip-hf-doc-builder.js";import{D as R}from"../../chunks/Docstring-hf-doc-builder.js";import{C as st}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as tt}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as bc}from"../../chunks/PipelineTag-hf-doc-builder.js";function vc(C){let d,v,g,u,b;return u=new st({props:{code:`from transformers import BloomConfig, BloomModel

# Initializing a Bloom configuration
configuration = BloomConfig()

# Initializing a model (with random weights) from the configuration
model = BloomModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> 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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function kc(C){let d,v,g,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 "),g=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 "),g=s(m,"CODE",{});var z=a(g);u=l(z,"Module"),z.forEach(t),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(t)},m(i,m){_(i,d,m),e(d,v),e(d,g),e(g,u),e(d,b)},d(i){i&&t(d)}}}function yc(C){let d,v,g,u,b;return u=new st({props:{code:`from transformers import AutoTokenizer, BloomModel
import torch

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
model = BloomModel.from_pretrained("bigscience/bloom-560m")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function wc(C){let d,v,g,u,b;return u=new st({props:{code:`from transformers import BloomTokenizerFast
tokenizer = BloomTokenizerFast.from_pretrained("bigscience/bloom")
tokenizer("Hello world")['input_ids']
tokenizer(" Hello world")['input_ids']`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BloomTokenizerFast</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer = BloomTokenizerFast.from_pretrained(<span class="hljs-string">&quot;bigscience/bloom&quot;</span>)</span>
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot;Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[15496, 995]
<span class="hljs-meta">&gt;&gt;&gt;</span> <span class="language-python">tokenizer(<span class="hljs-string">&quot; Hello world&quot;</span>)[<span class="hljs-string">&#x27;input_ids&#x27;</span>]</span>
[18435, 995]`}}),{c(){d=n("p"),v=r("be encoded differently whether it is at the beginning of the sentence (without space) or not:"),g=p(),k(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(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function Tc(C){let d,v,g,u,b,i,m,z;return{c(){d=n("p"),v=r("When used with "),g=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"),z=r(".")},l(se){d=s(se,"P",{});var N=a(d);v=l(N,"When used with "),g=s(N,"CODE",{});var W=a(g);u=l(W,"is_split_into_words=True"),W.forEach(t),b=l(N,", this tokenizer needs to be instantiated with "),i=s(N,"CODE",{});var G=a(i);m=l(G,"add_prefix_space=True"),G.forEach(t),z=l(N,"."),N.forEach(t)},m(se,N){_(se,d,N),e(d,v),e(d,g),e(g,u),e(d,b),e(d,i),e(i,m),e(d,z)},d(se){se&&t(d)}}}function $c(C){let d,v,g,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 "),g=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 "),g=s(m,"CODE",{});var z=a(g);u=l(z,"Module"),z.forEach(t),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(t)},m(i,m){_(i,d,m),e(d,v),e(d,g),e(g,u),e(d,b)},d(i){i&&t(d)}}}function Bc(C){let d,v,g,u,b;return u=new st({props:{code:`import torch
from transformers import AutoTokenizer, BloomForCausalLM

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
model = BloomForCausalLM.from_pretrained("bigscience/bloom-560m")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs, labels=inputs["input_ids"])
loss = outputs.loss
logits = outputs.logits`,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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function Cc(C){let d,v,g,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 "),g=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 "),g=s(m,"CODE",{});var z=a(g);u=l(z,"Module"),z.forEach(t),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(t)},m(i,m){_(i,d,m),e(d,v),e(d,g),e(g,u),e(d,b)},d(i){i&&t(d)}}}function zc(C){let d,v,g,u,b;return u=new st({props:{code:`import torch
from transformers import AutoTokenizer, BloomForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
model = BloomForSequenceClassification.from_pretrained("bigscience/bloom-560m")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = BloomForSequenceClassification.from_pretrained("bigscience/bloom-560m", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example of single-label classification:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function Fc(C){let d,v,g,u,b;return u=new st({props:{code:`import torch
from transformers import AutoTokenizer, BloomForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
model = BloomForSequenceClassification.from_pretrained("bigscience/bloom-560m", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = BloomForSequenceClassification.from_pretrained(
    "bigscience/bloom-560m", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example of multi-label classification:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function Ec(C){let d,v,g,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 "),g=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 "),g=s(m,"CODE",{});var z=a(g);u=l(z,"Module"),z.forEach(t),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(t)},m(i,m){_(i,d,m),e(d,v),e(d,g),e(g,u),e(d,b)},d(i){i&&t(d)}}}function Mc(C){let d,v,g,u,b;return u=new st({props:{code:`from transformers import AutoTokenizer, BloomForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-560m")
model = BloomForTokenClassification.from_pretrained("bigscience/bloom-560m")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,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:"),g=p(),k(u.$$.fragment)},l(i){d=s(i,"P",{});var m=a(d);v=l(m,"Example:"),m.forEach(t),g=h(i),y(u.$$.fragment,i)},m(i,m){_(i,d,m),e(d,v),_(i,g,m),w(u,i,m),b=!0},p:nt,i(i){b||(T(u.$$.fragment,i),b=!0)},o(i){$(u.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(g),B(u,i)}}}function xc(C){let d,v,g,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 "),g=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 "),g=s(m,"CODE",{});var z=a(g);u=l(z,"Module"),z.forEach(t),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(t)},m(i,m){_(i,d,m),e(d,v),e(d,g),e(g,u),e(d,b)},d(i){i&&t(d)}}}function qc(C){let d,v,g,u,b,i,m,z,se,N,W,G,Ht,Ye,Ws,Qt,Hs,Qn,ye,Qs,Je,Us,Vs,Un,M,Ut,Ke,Rs,Gs,Vt,Xe,Ys,Js,Rt,Ze,Ks,Xs,Gt,eo,Zs,ea,Yt,oo,oa,ta,at,to,na,sa,Vn,ae,we,Jt,no,aa,Kt,ra,Rn,rt,la,Gn,so,Yn,lt,Y,it,ia,da,ao,ca,pa,ro,ha,ma,Jn,dt,ua,Kn,H,Xt,ct,fa,ga,Zt,pt,_a,ba,en,ht,va,ka,on,mt,ya,Xn,ut,wa,Zn,Te,lo,Ta,io,$a,Ba,Ca,co,za,po,Fa,Ea,es,ft,Ma,os,gt,ho,xa,mo,qa,Pa,ts,re,$e,tn,uo,Aa,nn,ja,ns,I,fo,Oa,le,La,_t,Sa,Na,go,Ia,Da,Wa,ie,Ha,bt,Qa,Ua,vt,Va,Ra,Ga,Be,ss,de,Ce,sn,_o,Ya,an,Ja,as,x,bo,Ka,rn,Xa,Za,vo,er,kt,or,tr,nr,ko,sr,yo,ar,rr,lr,Q,wo,ir,ce,dr,yt,cr,pr,ln,hr,mr,ur,ze,fr,Fe,rs,pe,Ee,dn,To,gr,cn,_r,ls,F,$o,br,Bo,vr,pn,kr,yr,wr,hn,Tr,$r,Me,Br,Co,Cr,mn,zr,Fr,Er,xe,Mr,zo,xr,wt,qr,Pr,is,he,qe,un,Fo,Ar,fn,jr,ds,q,Eo,Or,gn,Lr,Sr,Mo,Nr,Tt,Ir,Dr,Wr,xo,Hr,qo,Qr,Ur,Vr,U,Po,Rr,me,Gr,$t,Yr,Jr,_n,Kr,Xr,Zr,Pe,el,Ae,cs,ue,je,bn,Ao,ol,vn,tl,ps,E,jo,nl,kn,sl,al,Bt,Ct,rl,ll,il,D,dl,yn,cl,pl,wn,hl,ml,Tn,ul,fl,$n,gl,_l,bl,Oo,vl,zt,kl,yl,wl,Lo,Tl,So,$l,Bl,Cl,O,No,zl,fe,Fl,Ft,El,Ml,Bn,xl,ql,Pl,Oe,Al,Le,jl,Se,hs,ge,Ne,Cn,Io,Ol,zn,Ll,ms,P,Do,Sl,Fn,Nl,Il,Wo,Dl,Et,Wl,Hl,Ql,Ho,Ul,Qo,Vl,Rl,Gl,V,Uo,Yl,_e,Jl,Mt,Kl,Xl,En,Zl,ei,oi,Ie,ti,De,us,be,We,Mn,Vo,ni,xn,si,fs,A,Ro,ai,ve,ri,qn,li,ii,Pn,di,ci,pi,Go,hi,xt,mi,ui,fi,Yo,gi,Jo,_i,bi,vi,J,Ko,ki,ke,yi,qt,wi,Ti,An,$i,Bi,Ci,He,gs;return i=new ne({}),Ye=new ne({}),no=new ne({}),so=new bc({props:{pipeline:"text-generation"}}),uo=new ne({}),fo=new R({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.27.1/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.27.1/src/transformers/models/bloom/configuration_bloom.py#L42"}}),Be=new tt({props:{anchor:"transformers.BloomConfig.example",$$slots:{default:[vc]},$$scope:{ctx:C}}}),_o=new ne({}),bo=new R({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.27.1/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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L622"}}),wo=new R({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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/bloom/modeling_bloom.py#L672",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ze=new Wt({props:{$$slots:{default:[kc]},$$scope:{ctx:C}}}),Fe=new tt({props:{anchor:"transformers.BloomModel.forward.example",$$slots:{default:[yc]},$$scope:{ctx:C}}}),To=new ne({}),$o=new R({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:"**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.27.1/src/transformers/models/bloom/tokenization_bloom_fast.py#L49"}}),Me=new tt({props:{anchor:"transformers.BloomTokenizerFast.example",$$slots:{default:[wc]},$$scope:{ctx:C}}}),xe=new Wt({props:{$$slots:{default:[Tc]},$$scope:{ctx:C}}}),Fo=new ne({}),Eo=new R({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.27.1/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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L824"}}),Po=new R({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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L872",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new Wt({props:{$$slots:{default:[$c]},$$scope:{ctx:C}}}),Ae=new tt({props:{anchor:"transformers.BloomForCausalLM.forward.example",$$slots:{default:[Bc]},$$scope:{ctx:C}}}),Ao=new ne({}),jo=new R({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.27.1/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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L990"}}),No=new R({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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L1002",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.27.1/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>
`}}),Oe=new Wt({props:{$$slots:{default:[Cc]},$$scope:{ctx:C}}}),Le=new tt({props:{anchor:"transformers.BloomForSequenceClassification.forward.example",$$slots:{default:[zc]},$$scope:{ctx:C}}}),Se=new tt({props:{anchor:"transformers.BloomForSequenceClassification.forward.example-2",$$slots:{default:[Fc]},$$scope:{ctx:C}}}),Io=new ne({}),Do=new R({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.27.1/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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L1118"}}),Uo=new R({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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L1138",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new Wt({props:{$$slots:{default:[Ec]},$$scope:{ctx:C}}}),De=new tt({props:{anchor:"transformers.BloomForTokenClassification.forward.example",$$slots:{default:[Mc]},$$scope:{ctx:C}}}),Vo=new ne({}),Ro=new R({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.27.1/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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L1219"}}),Ko=new R({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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.27.1/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.27.1/src/transformers/models/bloom/modeling_bloom.py#L1230"}}),He=new Wt({props:{$$slots:{default:[xc]},$$scope:{ctx:C}}}),{c(){d=n("meta"),v=p(),g=n("h1"),u=n("a"),b=n("span"),k(i.$$.fragment),m=p(),z=n("span"),se=r("BLOOM"),N=p(),W=n("h2"),G=n("a"),Ht=n("span"),k(Ye.$$.fragment),Ws=p(),Qt=n("span"),Hs=r("Overview"),Qn=p(),ye=n("p"),Qs=r("The BLOOM model has been proposed with its various versions through the "),Je=n("a"),Us=r("BigScience Workshop"),Vs=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:`),Un=p(),M=n("ul"),Ut=n("li"),Ke=n("a"),Rs=r("bloom-560m"),Gs=p(),Vt=n("li"),Xe=n("a"),Ys=r("bloom-1b1"),Js=p(),Rt=n("li"),Ze=n("a"),Ks=r("bloom-1b7"),Xs=p(),Gt=n("li"),eo=n("a"),Zs=r("bloom-3b"),ea=p(),Yt=n("li"),oo=n("a"),oa=r("bloom-7b1"),ta=p(),at=n("li"),to=n("a"),na=r("bloom"),sa=r(" (176B parameters)"),Vn=p(),ae=n("h2"),we=n("a"),Jt=n("span"),k(no.$$.fragment),aa=p(),Kt=n("span"),ra=r("Resources"),Rn=p(),rt=n("p"),la=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."),Gn=p(),k(so.$$.fragment),Yn=p(),lt=n("ul"),Y=n("li"),it=n("a"),ia=r("BloomForCausalLM"),da=r(" is supported by this "),ao=n("a"),ca=r("causal language modeling example script"),pa=r(" and "),ro=n("a"),ha=r("notebook"),ma=r("."),Jn=p(),dt=n("p"),ua=r("See also:"),Kn=p(),H=n("ul"),Xt=n("li"),ct=n("a"),fa=r("Causal language modeling task guide"),ga=p(),Zt=n("li"),pt=n("a"),_a=r("Text classification task guide"),ba=p(),en=n("li"),ht=n("a"),va=r("Token classification task guide"),ka=p(),on=n("li"),mt=n("a"),ya=r("Question answering task guide"),Xn=p(),ut=n("p"),wa=r("\u26A1\uFE0F Inference"),Zn=p(),Te=n("ul"),lo=n("li"),Ta=r("A blog on "),io=n("a"),$a=r("Optimization story: Bloom inference"),Ba=r("."),Ca=p(),co=n("li"),za=r("A blog on "),po=n("a"),Fa=r("Incredibly Fast BLOOM Inference with DeepSpeed and Accelerate"),Ea=r("."),es=p(),ft=n("p"),Ma=r("\u2699\uFE0F Training"),os=p(),gt=n("ul"),ho=n("li"),xa=r("A blog on "),mo=n("a"),qa=r("The Technology Behind BLOOM Training"),Pa=r("."),ts=p(),re=n("h2"),$e=n("a"),tn=n("span"),k(uo.$$.fragment),Aa=p(),nn=n("span"),ja=r("BloomConfig"),ns=p(),I=n("div"),k(fo.$$.fragment),Oa=p(),le=n("p"),La=r("This is the configuration class to store the configuration of a "),_t=n("a"),Sa=r("BloomModel"),Na=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
`),go=n("a"),Ia=r("bigscience/bloom"),Da=r("."),Wa=p(),ie=n("p"),Ha=r("Configuration objects inherit from "),bt=n("a"),Qa=r("PretrainedConfig"),Ua=r(` and can be used to control the model outputs. Read the
documentation from `),vt=n("a"),Va=r("PretrainedConfig"),Ra=r(" for more information."),Ga=p(),k(Be.$$.fragment),ss=p(),de=n("h2"),Ce=n("a"),sn=n("span"),k(_o.$$.fragment),Ya=p(),an=n("span"),Ja=r("BloomModel"),as=p(),x=n("div"),k(bo.$$.fragment),Ka=p(),rn=n("p"),Xa=r("The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),Za=p(),vo=n("p"),er=r("This model inherits from "),kt=n("a"),or=r("PreTrainedModel"),tr=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.)`),nr=p(),ko=n("p"),sr=r("This model is also a PyTorch "),yo=n("a"),ar=r("torch.nn.Module"),rr=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lr=p(),Q=n("div"),k(wo.$$.fragment),ir=p(),ce=n("p"),dr=r("The "),yt=n("a"),cr=r("BloomModel"),pr=r(" forward method, overrides the "),ln=n("code"),hr=r("__call__"),mr=r(" special method."),ur=p(),k(ze.$$.fragment),fr=p(),k(Fe.$$.fragment),rs=p(),pe=n("h2"),Ee=n("a"),dn=n("span"),k(To.$$.fragment),gr=p(),cn=n("span"),_r=r("BloomTokenizerFast"),ls=p(),F=n("div"),k($o.$$.fragment),br=p(),Bo=n("p"),vr=r("Construct a \u201Cfast\u201D Bloom tokenizer (backed by HuggingFace\u2019s "),pn=n("em"),kr=r("tokenizers"),yr=r(` library). Based on byte-level
Byte-Pair-Encoding.`),wr=p(),hn=n("p"),Tr=r("This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),$r=p(),k(Me.$$.fragment),Br=p(),Co=n("p"),Cr=r("You can get around that behavior by passing "),mn=n("code"),zr=r("add_prefix_space=True"),Fr=r(` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),Er=p(),k(xe.$$.fragment),Mr=p(),zo=n("p"),xr=r("This tokenizer inherits from "),wt=n("a"),qr=r("PreTrainedTokenizerFast"),Pr=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),is=p(),he=n("h2"),qe=n("a"),un=n("span"),k(Fo.$$.fragment),Ar=p(),fn=n("span"),jr=r("BloomForCausalLM"),ds=p(),q=n("div"),k(Eo.$$.fragment),Or=p(),gn=n("p"),Lr=r(`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Sr=p(),Mo=n("p"),Nr=r("This model inherits from "),Tt=n("a"),Ir=r("PreTrainedModel"),Dr=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.)`),Wr=p(),xo=n("p"),Hr=r("This model is also a PyTorch "),qo=n("a"),Qr=r("torch.nn.Module"),Ur=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vr=p(),U=n("div"),k(Po.$$.fragment),Rr=p(),me=n("p"),Gr=r("The "),$t=n("a"),Yr=r("BloomForCausalLM"),Jr=r(" forward method, overrides the "),_n=n("code"),Kr=r("__call__"),Xr=r(" special method."),Zr=p(),k(Pe.$$.fragment),el=p(),k(Ae.$$.fragment),cs=p(),ue=n("h2"),je=n("a"),bn=n("span"),k(Ao.$$.fragment),ol=p(),vn=n("span"),tl=r("BloomForSequenceClassification"),ps=p(),E=n("div"),k(jo.$$.fragment),nl=p(),kn=n("p"),sl=r("The Bloom Model transformer with a sequence classification head on top (linear layer)."),al=p(),Bt=n("p"),Ct=n("a"),rl=r("BloomForSequenceClassification"),ll=r(` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),il=p(),D=n("p"),dl=r(`Since it does classification on the last token, it requires to know the position of the last token. If a
`),yn=n("code"),cl=r("pad_token_id"),pl=r(` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),wn=n("code"),hl=r("pad_token_id"),ml=r(` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),Tn=n("code"),ul=r("inputs_embeds"),fl=r(" are passed instead of "),$n=n("code"),gl=r("input_ids"),_l=r(`, it does the same (take the last value in
each row of the batch).`),bl=p(),Oo=n("p"),vl=r("This model inherits from "),zt=n("a"),kl=r("PreTrainedModel"),yl=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.)`),wl=p(),Lo=n("p"),Tl=r("This model is also a PyTorch "),So=n("a"),$l=r("torch.nn.Module"),Bl=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cl=p(),O=n("div"),k(No.$$.fragment),zl=p(),fe=n("p"),Fl=r("The "),Ft=n("a"),El=r("BloomForSequenceClassification"),Ml=r(" forward method, overrides the "),Bn=n("code"),xl=r("__call__"),ql=r(" special method."),Pl=p(),k(Oe.$$.fragment),Al=p(),k(Le.$$.fragment),jl=p(),k(Se.$$.fragment),hs=p(),ge=n("h2"),Ne=n("a"),Cn=n("span"),k(Io.$$.fragment),Ol=p(),zn=n("span"),Ll=r("BloomForTokenClassification"),ms=p(),P=n("div"),k(Do.$$.fragment),Sl=p(),Fn=n("p"),Nl=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.`),Il=p(),Wo=n("p"),Dl=r("This model inherits from "),Et=n("a"),Wl=r("PreTrainedModel"),Hl=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.)`),Ql=p(),Ho=n("p"),Ul=r("This model is also a PyTorch "),Qo=n("a"),Vl=r("torch.nn.Module"),Rl=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gl=p(),V=n("div"),k(Uo.$$.fragment),Yl=p(),_e=n("p"),Jl=r("The "),Mt=n("a"),Kl=r("BloomForTokenClassification"),Xl=r(" forward method, overrides the "),En=n("code"),Zl=r("__call__"),ei=r(" special method."),oi=p(),k(Ie.$$.fragment),ti=p(),k(De.$$.fragment),us=p(),be=n("h2"),We=n("a"),Mn=n("span"),k(Vo.$$.fragment),ni=p(),xn=n("span"),si=r("BloomForQuestionAnswering"),fs=p(),A=n("div"),k(Ro.$$.fragment),ai=p(),ve=n("p"),ri=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 `),qn=n("code"),li=r("span start logits"),ii=r(" and "),Pn=n("code"),di=r("span end logits"),ci=r(")."),pi=p(),Go=n("p"),hi=r("This model inherits from "),xt=n("a"),mi=r("PreTrainedModel"),ui=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.)`),fi=p(),Yo=n("p"),gi=r("This model is also a PyTorch "),Jo=n("a"),_i=r("torch.nn.Module"),bi=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vi=p(),J=n("div"),k(Ko.$$.fragment),ki=p(),ke=n("p"),yi=r("The "),qt=n("a"),wi=r("BloomForQuestionAnswering"),Ti=r(" forward method, overrides the "),An=n("code"),$i=r("__call__"),Bi=r(" special method."),Ci=p(),k(He.$$.fragment),this.h()},l(o){const f=gc('[data-svelte="svelte-1phssyn"]',document.head);d=s(f,"META",{name:!0,content:!0}),f.forEach(t),v=h(o),g=s(o,"H1",{class:!0});var Xo=a(g);u=s(Xo,"A",{id:!0,class:!0,href:!0});var jn=a(u);b=s(jn,"SPAN",{});var On=a(b);y(i.$$.fragment,On),On.forEach(t),jn.forEach(t),m=h(Xo),z=s(Xo,"SPAN",{});var Ln=a(z);se=l(Ln,"BLOOM"),Ln.forEach(t),Xo.forEach(t),N=h(o),W=s(o,"H2",{class:!0});var Zo=a(W);G=s(Zo,"A",{id:!0,class:!0,href:!0});var Sn=a(G);Ht=s(Sn,"SPAN",{});var Nn=a(Ht);y(Ye.$$.fragment,Nn),Nn.forEach(t),Sn.forEach(t),Ws=h(Zo),Qt=s(Zo,"SPAN",{});var In=a(Qt);Hs=l(In,"Overview"),In.forEach(t),Zo.forEach(t),Qn=h(o),ye=s(o,"P",{});var et=a(ye);Qs=l(et,"The BLOOM model has been proposed with its various versions through the "),Je=s(et,"A",{href:!0,rel:!0});var Dn=a(Je);Us=l(Dn,"BigScience Workshop"),Dn.forEach(t),Vs=l(et,`. 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:`),et.forEach(t),Un=h(o),M=s(o,"UL",{});var j=a(M);Ut=s(j,"LI",{});var Wn=a(Ut);Ke=s(Wn,"A",{href:!0,rel:!0});var Hn=a(Ke);Rs=l(Hn,"bloom-560m"),Hn.forEach(t),Wn.forEach(t),Gs=h(j),Vt=s(j,"LI",{});var Ei=a(Vt);Xe=s(Ei,"A",{href:!0,rel:!0});var Mi=a(Xe);Ys=l(Mi,"bloom-1b1"),Mi.forEach(t),Ei.forEach(t),Js=h(j),Rt=s(j,"LI",{});var xi=a(Rt);Ze=s(xi,"A",{href:!0,rel:!0});var qi=a(Ze);Ks=l(qi,"bloom-1b7"),qi.forEach(t),xi.forEach(t),Xs=h(j),Gt=s(j,"LI",{});var Pi=a(Gt);eo=s(Pi,"A",{href:!0,rel:!0});var Ai=a(eo);Zs=l(Ai,"bloom-3b"),Ai.forEach(t),Pi.forEach(t),ea=h(j),Yt=s(j,"LI",{});var ji=a(Yt);oo=s(ji,"A",{href:!0,rel:!0});var Oi=a(oo);oa=l(Oi,"bloom-7b1"),Oi.forEach(t),ji.forEach(t),ta=h(j),at=s(j,"LI",{});var zi=a(at);to=s(zi,"A",{href:!0,rel:!0});var Li=a(to);na=l(Li,"bloom"),Li.forEach(t),sa=l(zi," (176B parameters)"),zi.forEach(t),j.forEach(t),Vn=h(o),ae=s(o,"H2",{class:!0});var _s=a(ae);we=s(_s,"A",{id:!0,class:!0,href:!0});var Si=a(we);Jt=s(Si,"SPAN",{});var Ni=a(Jt);y(no.$$.fragment,Ni),Ni.forEach(t),Si.forEach(t),aa=h(_s),Kt=s(_s,"SPAN",{});var Ii=a(Kt);ra=l(Ii,"Resources"),Ii.forEach(t),_s.forEach(t),Rn=h(o),rt=s(o,"P",{});var Di=a(rt);la=l(Di,"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."),Di.forEach(t),Gn=h(o),y(so.$$.fragment,o),Yn=h(o),lt=s(o,"UL",{});var Wi=a(lt);Y=s(Wi,"LI",{});var ot=a(Y);it=s(ot,"A",{href:!0});var Hi=a(it);ia=l(Hi,"BloomForCausalLM"),Hi.forEach(t),da=l(ot," is supported by this "),ao=s(ot,"A",{href:!0,rel:!0});var Qi=a(ao);ca=l(Qi,"causal language modeling example script"),Qi.forEach(t),pa=l(ot," and "),ro=s(ot,"A",{href:!0,rel:!0});var Ui=a(ro);ha=l(Ui,"notebook"),Ui.forEach(t),ma=l(ot,"."),ot.forEach(t),Wi.forEach(t),Jn=h(o),dt=s(o,"P",{});var Vi=a(dt);ua=l(Vi,"See also:"),Vi.forEach(t),Kn=h(o),H=s(o,"UL",{});var Qe=a(H);Xt=s(Qe,"LI",{});var Ri=a(Xt);ct=s(Ri,"A",{href:!0});var Gi=a(ct);fa=l(Gi,"Causal language modeling task guide"),Gi.forEach(t),Ri.forEach(t),ga=h(Qe),Zt=s(Qe,"LI",{});var Yi=a(Zt);pt=s(Yi,"A",{href:!0});var Ji=a(pt);_a=l(Ji,"Text classification task guide"),Ji.forEach(t),Yi.forEach(t),ba=h(Qe),en=s(Qe,"LI",{});var Ki=a(en);ht=s(Ki,"A",{href:!0});var Xi=a(ht);va=l(Xi,"Token classification task guide"),Xi.forEach(t),Ki.forEach(t),ka=h(Qe),on=s(Qe,"LI",{});var Zi=a(on);mt=s(Zi,"A",{href:!0});var ed=a(mt);ya=l(ed,"Question answering task guide"),ed.forEach(t),Zi.forEach(t),Qe.forEach(t),Xn=h(o),ut=s(o,"P",{});var od=a(ut);wa=l(od,"\u26A1\uFE0F Inference"),od.forEach(t),Zn=h(o),Te=s(o,"UL",{});var bs=a(Te);lo=s(bs,"LI",{});var vs=a(lo);Ta=l(vs,"A blog on "),io=s(vs,"A",{href:!0,rel:!0});var td=a(io);$a=l(td,"Optimization story: Bloom inference"),td.forEach(t),Ba=l(vs,"."),vs.forEach(t),Ca=h(bs),co=s(bs,"LI",{});var ks=a(co);za=l(ks,"A blog on "),po=s(ks,"A",{href:!0,rel:!0});var nd=a(po);Fa=l(nd,"Incredibly Fast BLOOM Inference with DeepSpeed and Accelerate"),nd.forEach(t),Ea=l(ks,"."),ks.forEach(t),bs.forEach(t),es=h(o),ft=s(o,"P",{});var sd=a(ft);Ma=l(sd,"\u2699\uFE0F Training"),sd.forEach(t),os=h(o),gt=s(o,"UL",{});var ad=a(gt);ho=s(ad,"LI",{});var ys=a(ho);xa=l(ys,"A blog on "),mo=s(ys,"A",{href:!0,rel:!0});var rd=a(mo);qa=l(rd,"The Technology Behind BLOOM Training"),rd.forEach(t),Pa=l(ys,"."),ys.forEach(t),ad.forEach(t),ts=h(o),re=s(o,"H2",{class:!0});var ws=a(re);$e=s(ws,"A",{id:!0,class:!0,href:!0});var ld=a($e);tn=s(ld,"SPAN",{});var id=a(tn);y(uo.$$.fragment,id),id.forEach(t),ld.forEach(t),Aa=h(ws),nn=s(ws,"SPAN",{});var dd=a(nn);ja=l(dd,"BloomConfig"),dd.forEach(t),ws.forEach(t),ns=h(o),I=s(o,"DIV",{class:!0});var Ue=a(I);y(fo.$$.fragment,Ue),Oa=h(Ue),le=s(Ue,"P",{});var Pt=a(le);La=l(Pt,"This is the configuration class to store the configuration of a "),_t=s(Pt,"A",{href:!0});var cd=a(_t);Sa=l(cd,"BloomModel"),cd.forEach(t),Na=l(Pt,`. 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
`),go=s(Pt,"A",{href:!0,rel:!0});var pd=a(go);Ia=l(pd,"bigscience/bloom"),pd.forEach(t),Da=l(Pt,"."),Pt.forEach(t),Wa=h(Ue),ie=s(Ue,"P",{});var At=a(ie);Ha=l(At,"Configuration objects inherit from "),bt=s(At,"A",{href:!0});var hd=a(bt);Qa=l(hd,"PretrainedConfig"),hd.forEach(t),Ua=l(At,` and can be used to control the model outputs. Read the
documentation from `),vt=s(At,"A",{href:!0});var md=a(vt);Va=l(md,"PretrainedConfig"),md.forEach(t),Ra=l(At," for more information."),At.forEach(t),Ga=h(Ue),y(Be.$$.fragment,Ue),Ue.forEach(t),ss=h(o),de=s(o,"H2",{class:!0});var Ts=a(de);Ce=s(Ts,"A",{id:!0,class:!0,href:!0});var ud=a(Ce);sn=s(ud,"SPAN",{});var fd=a(sn);y(_o.$$.fragment,fd),fd.forEach(t),ud.forEach(t),Ya=h(Ts),an=s(Ts,"SPAN",{});var gd=a(an);Ja=l(gd,"BloomModel"),gd.forEach(t),Ts.forEach(t),as=h(o),x=s(o,"DIV",{class:!0});var K=a(x);y(bo.$$.fragment,K),Ka=h(K),rn=s(K,"P",{});var _d=a(rn);Xa=l(_d,"The bare Bloom Model transformer outputting raw hidden-states without any specific head on top."),_d.forEach(t),Za=h(K),vo=s(K,"P",{});var $s=a(vo);er=l($s,"This model inherits from "),kt=s($s,"A",{href:!0});var bd=a(kt);or=l(bd,"PreTrainedModel"),bd.forEach(t),tr=l($s,`. 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.)`),$s.forEach(t),nr=h(K),ko=s(K,"P",{});var Bs=a(ko);sr=l(Bs,"This model is also a PyTorch "),yo=s(Bs,"A",{href:!0,rel:!0});var vd=a(yo);ar=l(vd,"torch.nn.Module"),vd.forEach(t),rr=l(Bs,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bs.forEach(t),lr=h(K),Q=s(K,"DIV",{class:!0});var Ve=a(Q);y(wo.$$.fragment,Ve),ir=h(Ve),ce=s(Ve,"P",{});var jt=a(ce);dr=l(jt,"The "),yt=s(jt,"A",{href:!0});var kd=a(yt);cr=l(kd,"BloomModel"),kd.forEach(t),pr=l(jt," forward method, overrides the "),ln=s(jt,"CODE",{});var yd=a(ln);hr=l(yd,"__call__"),yd.forEach(t),mr=l(jt," special method."),jt.forEach(t),ur=h(Ve),y(ze.$$.fragment,Ve),fr=h(Ve),y(Fe.$$.fragment,Ve),Ve.forEach(t),K.forEach(t),rs=h(o),pe=s(o,"H2",{class:!0});var Cs=a(pe);Ee=s(Cs,"A",{id:!0,class:!0,href:!0});var wd=a(Ee);dn=s(wd,"SPAN",{});var Td=a(dn);y(To.$$.fragment,Td),Td.forEach(t),wd.forEach(t),gr=h(Cs),cn=s(Cs,"SPAN",{});var $d=a(cn);_r=l($d,"BloomTokenizerFast"),$d.forEach(t),Cs.forEach(t),ls=h(o),F=s(o,"DIV",{class:!0});var L=a(F);y($o.$$.fragment,L),br=h(L),Bo=s(L,"P",{});var zs=a(Bo);vr=l(zs,"Construct a \u201Cfast\u201D Bloom tokenizer (backed by HuggingFace\u2019s "),pn=s(zs,"EM",{});var Bd=a(pn);kr=l(Bd,"tokenizers"),Bd.forEach(t),yr=l(zs,` library). Based on byte-level
Byte-Pair-Encoding.`),zs.forEach(t),wr=h(L),hn=s(L,"P",{});var Cd=a(hn);Tr=l(Cd,"This tokenizer has been trained to treat spaces like parts of the tokens (a bit like sentencepiece) so a word will"),Cd.forEach(t),$r=h(L),y(Me.$$.fragment,L),Br=h(L),Co=s(L,"P",{});var Fs=a(Co);Cr=l(Fs,"You can get around that behavior by passing "),mn=s(Fs,"CODE",{});var zd=a(mn);zr=l(zd,"add_prefix_space=True"),zd.forEach(t),Fr=l(Fs,` when instantiating this tokenizer, but since
the model was not pretrained this way, it might yield a decrease in performance.`),Fs.forEach(t),Er=h(L),y(xe.$$.fragment,L),Mr=h(L),zo=s(L,"P",{});var Es=a(zo);xr=l(Es,"This tokenizer inherits from "),wt=s(Es,"A",{href:!0});var Fd=a(wt);qr=l(Fd,"PreTrainedTokenizerFast"),Fd.forEach(t),Pr=l(Es,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Es.forEach(t),L.forEach(t),is=h(o),he=s(o,"H2",{class:!0});var Ms=a(he);qe=s(Ms,"A",{id:!0,class:!0,href:!0});var Ed=a(qe);un=s(Ed,"SPAN",{});var Md=a(un);y(Fo.$$.fragment,Md),Md.forEach(t),Ed.forEach(t),Ar=h(Ms),fn=s(Ms,"SPAN",{});var xd=a(fn);jr=l(xd,"BloomForCausalLM"),xd.forEach(t),Ms.forEach(t),ds=h(o),q=s(o,"DIV",{class:!0});var X=a(q);y(Eo.$$.fragment,X),Or=h(X),gn=s(X,"P",{});var qd=a(gn);Lr=l(qd,`The Bloom Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),qd.forEach(t),Sr=h(X),Mo=s(X,"P",{});var xs=a(Mo);Nr=l(xs,"This model inherits from "),Tt=s(xs,"A",{href:!0});var Pd=a(Tt);Ir=l(Pd,"PreTrainedModel"),Pd.forEach(t),Dr=l(xs,`. 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.)`),xs.forEach(t),Wr=h(X),xo=s(X,"P",{});var qs=a(xo);Hr=l(qs,"This model is also a PyTorch "),qo=s(qs,"A",{href:!0,rel:!0});var Ad=a(qo);Qr=l(Ad,"torch.nn.Module"),Ad.forEach(t),Ur=l(qs,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qs.forEach(t),Vr=h(X),U=s(X,"DIV",{class:!0});var Re=a(U);y(Po.$$.fragment,Re),Rr=h(Re),me=s(Re,"P",{});var Ot=a(me);Gr=l(Ot,"The "),$t=s(Ot,"A",{href:!0});var jd=a($t);Yr=l(jd,"BloomForCausalLM"),jd.forEach(t),Jr=l(Ot," forward method, overrides the "),_n=s(Ot,"CODE",{});var Od=a(_n);Kr=l(Od,"__call__"),Od.forEach(t),Xr=l(Ot," special method."),Ot.forEach(t),Zr=h(Re),y(Pe.$$.fragment,Re),el=h(Re),y(Ae.$$.fragment,Re),Re.forEach(t),X.forEach(t),cs=h(o),ue=s(o,"H2",{class:!0});var Ps=a(ue);je=s(Ps,"A",{id:!0,class:!0,href:!0});var Ld=a(je);bn=s(Ld,"SPAN",{});var Sd=a(bn);y(Ao.$$.fragment,Sd),Sd.forEach(t),Ld.forEach(t),ol=h(Ps),vn=s(Ps,"SPAN",{});var Nd=a(vn);tl=l(Nd,"BloomForSequenceClassification"),Nd.forEach(t),Ps.forEach(t),ps=h(o),E=s(o,"DIV",{class:!0});var S=a(E);y(jo.$$.fragment,S),nl=h(S),kn=s(S,"P",{});var Id=a(kn);sl=l(Id,"The Bloom Model transformer with a sequence classification head on top (linear layer)."),Id.forEach(t),al=h(S),Bt=s(S,"P",{});var Fi=a(Bt);Ct=s(Fi,"A",{href:!0});var Dd=a(Ct);rl=l(Dd,"BloomForSequenceClassification"),Dd.forEach(t),ll=l(Fi,` uses the last token in order to do the classification, as other causal models
(e.g. GPT-1) do.`),Fi.forEach(t),il=h(S),D=s(S,"P",{});var Z=a(D);dl=l(Z,`Since it does classification on the last token, it requires to know the position of the last token. If a
`),yn=s(Z,"CODE",{});var Wd=a(yn);cl=l(Wd,"pad_token_id"),Wd.forEach(t),pl=l(Z,` is defined in the configuration, it finds the last token that is not a padding token in each row. If
no `),wn=s(Z,"CODE",{});var Hd=a(wn);hl=l(Hd,"pad_token_id"),Hd.forEach(t),ml=l(Z,` is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when `),Tn=s(Z,"CODE",{});var Qd=a(Tn);ul=l(Qd,"inputs_embeds"),Qd.forEach(t),fl=l(Z," are passed instead of "),$n=s(Z,"CODE",{});var Ud=a($n);gl=l(Ud,"input_ids"),Ud.forEach(t),_l=l(Z,`, it does the same (take the last value in
each row of the batch).`),Z.forEach(t),bl=h(S),Oo=s(S,"P",{});var As=a(Oo);vl=l(As,"This model inherits from "),zt=s(As,"A",{href:!0});var Vd=a(zt);kl=l(Vd,"PreTrainedModel"),Vd.forEach(t),yl=l(As,`. 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.)`),As.forEach(t),wl=h(S),Lo=s(S,"P",{});var js=a(Lo);Tl=l(js,"This model is also a PyTorch "),So=s(js,"A",{href:!0,rel:!0});var Rd=a(So);$l=l(Rd,"torch.nn.Module"),Rd.forEach(t),Bl=l(js,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),js.forEach(t),Cl=h(S),O=s(S,"DIV",{class:!0});var ee=a(O);y(No.$$.fragment,ee),zl=h(ee),fe=s(ee,"P",{});var Lt=a(fe);Fl=l(Lt,"The "),Ft=s(Lt,"A",{href:!0});var Gd=a(Ft);El=l(Gd,"BloomForSequenceClassification"),Gd.forEach(t),Ml=l(Lt," forward method, overrides the "),Bn=s(Lt,"CODE",{});var Yd=a(Bn);xl=l(Yd,"__call__"),Yd.forEach(t),ql=l(Lt," special method."),Lt.forEach(t),Pl=h(ee),y(Oe.$$.fragment,ee),Al=h(ee),y(Le.$$.fragment,ee),jl=h(ee),y(Se.$$.fragment,ee),ee.forEach(t),S.forEach(t),hs=h(o),ge=s(o,"H2",{class:!0});var Os=a(ge);Ne=s(Os,"A",{id:!0,class:!0,href:!0});var Jd=a(Ne);Cn=s(Jd,"SPAN",{});var Kd=a(Cn);y(Io.$$.fragment,Kd),Kd.forEach(t),Jd.forEach(t),Ol=h(Os),zn=s(Os,"SPAN",{});var Xd=a(zn);Ll=l(Xd,"BloomForTokenClassification"),Xd.forEach(t),Os.forEach(t),ms=h(o),P=s(o,"DIV",{class:!0});var oe=a(P);y(Do.$$.fragment,oe),Sl=h(oe),Fn=s(oe,"P",{});var Zd=a(Fn);Nl=l(Zd,`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.`),Zd.forEach(t),Il=h(oe),Wo=s(oe,"P",{});var Ls=a(Wo);Dl=l(Ls,"This model inherits from "),Et=s(Ls,"A",{href:!0});var ec=a(Et);Wl=l(ec,"PreTrainedModel"),ec.forEach(t),Hl=l(Ls,`. 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.)`),Ls.forEach(t),Ql=h(oe),Ho=s(oe,"P",{});var Ss=a(Ho);Ul=l(Ss,"This model is also a PyTorch "),Qo=s(Ss,"A",{href:!0,rel:!0});var oc=a(Qo);Vl=l(oc,"torch.nn.Module"),oc.forEach(t),Rl=l(Ss,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ss.forEach(t),Gl=h(oe),V=s(oe,"DIV",{class:!0});var Ge=a(V);y(Uo.$$.fragment,Ge),Yl=h(Ge),_e=s(Ge,"P",{});var St=a(_e);Jl=l(St,"The "),Mt=s(St,"A",{href:!0});var tc=a(Mt);Kl=l(tc,"BloomForTokenClassification"),tc.forEach(t),Xl=l(St," forward method, overrides the "),En=s(St,"CODE",{});var nc=a(En);Zl=l(nc,"__call__"),nc.forEach(t),ei=l(St," special method."),St.forEach(t),oi=h(Ge),y(Ie.$$.fragment,Ge),ti=h(Ge),y(De.$$.fragment,Ge),Ge.forEach(t),oe.forEach(t),us=h(o),be=s(o,"H2",{class:!0});var Ns=a(be);We=s(Ns,"A",{id:!0,class:!0,href:!0});var sc=a(We);Mn=s(sc,"SPAN",{});var ac=a(Mn);y(Vo.$$.fragment,ac),ac.forEach(t),sc.forEach(t),ni=h(Ns),xn=s(Ns,"SPAN",{});var rc=a(xn);si=l(rc,"BloomForQuestionAnswering"),rc.forEach(t),Ns.forEach(t),fs=h(o),A=s(o,"DIV",{class:!0});var te=a(A);y(Ro.$$.fragment,te),ai=h(te),ve=s(te,"P",{});var Nt=a(ve);ri=l(Nt,`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 `),qn=s(Nt,"CODE",{});var lc=a(qn);li=l(lc,"span start logits"),lc.forEach(t),ii=l(Nt," and "),Pn=s(Nt,"CODE",{});var ic=a(Pn);di=l(ic,"span end logits"),ic.forEach(t),ci=l(Nt,")."),Nt.forEach(t),pi=h(te),Go=s(te,"P",{});var Is=a(Go);hi=l(Is,"This model inherits from "),xt=s(Is,"A",{href:!0});var dc=a(xt);mi=l(dc,"PreTrainedModel"),dc.forEach(t),ui=l(Is,`. 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.)`),Is.forEach(t),fi=h(te),Yo=s(te,"P",{});var Ds=a(Yo);gi=l(Ds,"This model is also a PyTorch "),Jo=s(Ds,"A",{href:!0,rel:!0});var cc=a(Jo);_i=l(cc,"torch.nn.Module"),cc.forEach(t),bi=l(Ds,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ds.forEach(t),vi=h(te),J=s(te,"DIV",{class:!0});var It=a(J);y(Ko.$$.fragment,It),ki=h(It),ke=s(It,"P",{});var Dt=a(ke);yi=l(Dt,"The "),qt=s(Dt,"A",{href:!0});var pc=a(qt);wi=l(pc,"BloomForQuestionAnswering"),pc.forEach(t),Ti=l(Dt," forward method, overrides the "),An=s(Dt,"CODE",{});var hc=a(An);$i=l(hc,"__call__"),hc.forEach(t),Bi=l(Dt," special method."),Dt.forEach(t),Ci=h(It),y(He.$$.fragment,It),It.forEach(t),te.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Pc)),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(g,"class","relative group"),c(G,"id","overview"),c(G,"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(G,"href","#overview"),c(W,"class","relative group"),c(Je,"href","https://bigscience.huggingface.co/"),c(Je,"rel","nofollow"),c(Ke,"href","https://huggingface.co/bigscience/bloom-560m"),c(Ke,"rel","nofollow"),c(Xe,"href","https://huggingface.co/bigscience/bloom-1b1"),c(Xe,"rel","nofollow"),c(Ze,"href","https://huggingface.co/bigscience/bloom-1b7"),c(Ze,"rel","nofollow"),c(eo,"href","https://huggingface.co/bigscience/bloom-3b"),c(eo,"rel","nofollow"),c(oo,"href","https://huggingface.co/bigscience/bloom-7b1"),c(oo,"rel","nofollow"),c(to,"href","https://huggingface.co/bigscience/bloom"),c(to,"rel","nofollow"),c(we,"id","resources"),c(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(we,"href","#resources"),c(ae,"class","relative group"),c(it,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForCausalLM"),c(ao,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#gpt-2gpt-and-causal-language-modeling"),c(ao,"rel","nofollow"),c(ro,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(ro,"rel","nofollow"),c(ct,"href","./tasks/language_modeling"),c(pt,"href","./tasks/sequence_classification"),c(ht,"href","./tasks/token_classification"),c(mt,"href","./tasks/question_answering"),c(io,"href","https://huggingface.co/blog/bloom-inference-optimization"),c(io,"rel","nofollow"),c(po,"href","https://huggingface.co/blog/bloom-inference-pytorch-scripts"),c(po,"rel","nofollow"),c(mo,"href","https://huggingface.co/blog/bloom-megatron-deepspeed"),c(mo,"rel","nofollow"),c($e,"id","transformers.BloomConfig"),c($e,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c($e,"href","#transformers.BloomConfig"),c(re,"class","relative group"),c(_t,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomModel"),c(go,"href","https://huggingface.co/bigscience/bloom"),c(go,"rel","nofollow"),c(bt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),c(vt,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),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(Ce,"id","transformers.BloomModel"),c(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ce,"href","#transformers.BloomModel"),c(de,"class","relative group"),c(kt,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(yo,"rel","nofollow"),c(yt,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomModel"),c(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(Ee,"id","transformers.BloomTokenizerFast"),c(Ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ee,"href","#transformers.BloomTokenizerFast"),c(pe,"class","relative group"),c(wt,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(F,"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(he,"class","relative group"),c(Tt,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(qo,"rel","nofollow"),c($t,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForCausalLM"),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(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(je,"id","transformers.BloomForSequenceClassification"),c(je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(je,"href","#transformers.BloomForSequenceClassification"),c(ue,"class","relative group"),c(Ct,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForSequenceClassification"),c(zt,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(So,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(So,"rel","nofollow"),c(Ft,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForSequenceClassification"),c(O,"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(Ne,"id","transformers.BloomForTokenClassification"),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","#transformers.BloomForTokenClassification"),c(ge,"class","relative group"),c(Et,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(Qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Qo,"rel","nofollow"),c(Mt,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForTokenClassification"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(We,"id","transformers.BloomForQuestionAnswering"),c(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(We,"href","#transformers.BloomForQuestionAnswering"),c(be,"class","relative group"),c(xt,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),c(Jo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Jo,"rel","nofollow"),c(qt,"href","/docs/transformers/v4.27.1/en/model_doc/bloom#transformers.BloomForQuestionAnswering"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,f){e(document.head,d),_(o,v,f),_(o,g,f),e(g,u),e(u,b),w(i,b,null),e(g,m),e(g,z),e(z,se),_(o,N,f),_(o,W,f),e(W,G),e(G,Ht),w(Ye,Ht,null),e(W,Ws),e(W,Qt),e(Qt,Hs),_(o,Qn,f),_(o,ye,f),e(ye,Qs),e(ye,Je),e(Je,Us),e(ye,Vs),_(o,Un,f),_(o,M,f),e(M,Ut),e(Ut,Ke),e(Ke,Rs),e(M,Gs),e(M,Vt),e(Vt,Xe),e(Xe,Ys),e(M,Js),e(M,Rt),e(Rt,Ze),e(Ze,Ks),e(M,Xs),e(M,Gt),e(Gt,eo),e(eo,Zs),e(M,ea),e(M,Yt),e(Yt,oo),e(oo,oa),e(M,ta),e(M,at),e(at,to),e(to,na),e(at,sa),_(o,Vn,f),_(o,ae,f),e(ae,we),e(we,Jt),w(no,Jt,null),e(ae,aa),e(ae,Kt),e(Kt,ra),_(o,Rn,f),_(o,rt,f),e(rt,la),_(o,Gn,f),w(so,o,f),_(o,Yn,f),_(o,lt,f),e(lt,Y),e(Y,it),e(it,ia),e(Y,da),e(Y,ao),e(ao,ca),e(Y,pa),e(Y,ro),e(ro,ha),e(Y,ma),_(o,Jn,f),_(o,dt,f),e(dt,ua),_(o,Kn,f),_(o,H,f),e(H,Xt),e(Xt,ct),e(ct,fa),e(H,ga),e(H,Zt),e(Zt,pt),e(pt,_a),e(H,ba),e(H,en),e(en,ht),e(ht,va),e(H,ka),e(H,on),e(on,mt),e(mt,ya),_(o,Xn,f),_(o,ut,f),e(ut,wa),_(o,Zn,f),_(o,Te,f),e(Te,lo),e(lo,Ta),e(lo,io),e(io,$a),e(lo,Ba),e(Te,Ca),e(Te,co),e(co,za),e(co,po),e(po,Fa),e(co,Ea),_(o,es,f),_(o,ft,f),e(ft,Ma),_(o,os,f),_(o,gt,f),e(gt,ho),e(ho,xa),e(ho,mo),e(mo,qa),e(ho,Pa),_(o,ts,f),_(o,re,f),e(re,$e),e($e,tn),w(uo,tn,null),e(re,Aa),e(re,nn),e(nn,ja),_(o,ns,f),_(o,I,f),w(fo,I,null),e(I,Oa),e(I,le),e(le,La),e(le,_t),e(_t,Sa),e(le,Na),e(le,go),e(go,Ia),e(le,Da),e(I,Wa),e(I,ie),e(ie,Ha),e(ie,bt),e(bt,Qa),e(ie,Ua),e(ie,vt),e(vt,Va),e(ie,Ra),e(I,Ga),w(Be,I,null),_(o,ss,f),_(o,de,f),e(de,Ce),e(Ce,sn),w(_o,sn,null),e(de,Ya),e(de,an),e(an,Ja),_(o,as,f),_(o,x,f),w(bo,x,null),e(x,Ka),e(x,rn),e(rn,Xa),e(x,Za),e(x,vo),e(vo,er),e(vo,kt),e(kt,or),e(vo,tr),e(x,nr),e(x,ko),e(ko,sr),e(ko,yo),e(yo,ar),e(ko,rr),e(x,lr),e(x,Q),w(wo,Q,null),e(Q,ir),e(Q,ce),e(ce,dr),e(ce,yt),e(yt,cr),e(ce,pr),e(ce,ln),e(ln,hr),e(ce,mr),e(Q,ur),w(ze,Q,null),e(Q,fr),w(Fe,Q,null),_(o,rs,f),_(o,pe,f),e(pe,Ee),e(Ee,dn),w(To,dn,null),e(pe,gr),e(pe,cn),e(cn,_r),_(o,ls,f),_(o,F,f),w($o,F,null),e(F,br),e(F,Bo),e(Bo,vr),e(Bo,pn),e(pn,kr),e(Bo,yr),e(F,wr),e(F,hn),e(hn,Tr),e(F,$r),w(Me,F,null),e(F,Br),e(F,Co),e(Co,Cr),e(Co,mn),e(mn,zr),e(Co,Fr),e(F,Er),w(xe,F,null),e(F,Mr),e(F,zo),e(zo,xr),e(zo,wt),e(wt,qr),e(zo,Pr),_(o,is,f),_(o,he,f),e(he,qe),e(qe,un),w(Fo,un,null),e(he,Ar),e(he,fn),e(fn,jr),_(o,ds,f),_(o,q,f),w(Eo,q,null),e(q,Or),e(q,gn),e(gn,Lr),e(q,Sr),e(q,Mo),e(Mo,Nr),e(Mo,Tt),e(Tt,Ir),e(Mo,Dr),e(q,Wr),e(q,xo),e(xo,Hr),e(xo,qo),e(qo,Qr),e(xo,Ur),e(q,Vr),e(q,U),w(Po,U,null),e(U,Rr),e(U,me),e(me,Gr),e(me,$t),e($t,Yr),e(me,Jr),e(me,_n),e(_n,Kr),e(me,Xr),e(U,Zr),w(Pe,U,null),e(U,el),w(Ae,U,null),_(o,cs,f),_(o,ue,f),e(ue,je),e(je,bn),w(Ao,bn,null),e(ue,ol),e(ue,vn),e(vn,tl),_(o,ps,f),_(o,E,f),w(jo,E,null),e(E,nl),e(E,kn),e(kn,sl),e(E,al),e(E,Bt),e(Bt,Ct),e(Ct,rl),e(Bt,ll),e(E,il),e(E,D),e(D,dl),e(D,yn),e(yn,cl),e(D,pl),e(D,wn),e(wn,hl),e(D,ml),e(D,Tn),e(Tn,ul),e(D,fl),e(D,$n),e($n,gl),e(D,_l),e(E,bl),e(E,Oo),e(Oo,vl),e(Oo,zt),e(zt,kl),e(Oo,yl),e(E,wl),e(E,Lo),e(Lo,Tl),e(Lo,So),e(So,$l),e(Lo,Bl),e(E,Cl),e(E,O),w(No,O,null),e(O,zl),e(O,fe),e(fe,Fl),e(fe,Ft),e(Ft,El),e(fe,Ml),e(fe,Bn),e(Bn,xl),e(fe,ql),e(O,Pl),w(Oe,O,null),e(O,Al),w(Le,O,null),e(O,jl),w(Se,O,null),_(o,hs,f),_(o,ge,f),e(ge,Ne),e(Ne,Cn),w(Io,Cn,null),e(ge,Ol),e(ge,zn),e(zn,Ll),_(o,ms,f),_(o,P,f),w(Do,P,null),e(P,Sl),e(P,Fn),e(Fn,Nl),e(P,Il),e(P,Wo),e(Wo,Dl),e(Wo,Et),e(Et,Wl),e(Wo,Hl),e(P,Ql),e(P,Ho),e(Ho,Ul),e(Ho,Qo),e(Qo,Vl),e(Ho,Rl),e(P,Gl),e(P,V),w(Uo,V,null),e(V,Yl),e(V,_e),e(_e,Jl),e(_e,Mt),e(Mt,Kl),e(_e,Xl),e(_e,En),e(En,Zl),e(_e,ei),e(V,oi),w(Ie,V,null),e(V,ti),w(De,V,null),_(o,us,f),_(o,be,f),e(be,We),e(We,Mn),w(Vo,Mn,null),e(be,ni),e(be,xn),e(xn,si),_(o,fs,f),_(o,A,f),w(Ro,A,null),e(A,ai),e(A,ve),e(ve,ri),e(ve,qn),e(qn,li),e(ve,ii),e(ve,Pn),e(Pn,di),e(ve,ci),e(A,pi),e(A,Go),e(Go,hi),e(Go,xt),e(xt,mi),e(Go,ui),e(A,fi),e(A,Yo),e(Yo,gi),e(Yo,Jo),e(Jo,_i),e(Yo,bi),e(A,vi),e(A,J),w(Ko,J,null),e(J,ki),e(J,ke),e(ke,yi),e(ke,qt),e(qt,wi),e(ke,Ti),e(ke,An),e(An,$i),e(ke,Bi),e(J,Ci),w(He,J,null),gs=!0},p(o,[f]){const Xo={};f&2&&(Xo.$$scope={dirty:f,ctx:o}),Be.$set(Xo);const jn={};f&2&&(jn.$$scope={dirty:f,ctx:o}),ze.$set(jn);const On={};f&2&&(On.$$scope={dirty:f,ctx:o}),Fe.$set(On);const Ln={};f&2&&(Ln.$$scope={dirty:f,ctx:o}),Me.$set(Ln);const Zo={};f&2&&(Zo.$$scope={dirty:f,ctx:o}),xe.$set(Zo);const Sn={};f&2&&(Sn.$$scope={dirty:f,ctx:o}),Pe.$set(Sn);const Nn={};f&2&&(Nn.$$scope={dirty:f,ctx:o}),Ae.$set(Nn);const In={};f&2&&(In.$$scope={dirty:f,ctx:o}),Oe.$set(In);const et={};f&2&&(et.$$scope={dirty:f,ctx:o}),Le.$set(et);const Dn={};f&2&&(Dn.$$scope={dirty:f,ctx:o}),Se.$set(Dn);const j={};f&2&&(j.$$scope={dirty:f,ctx:o}),Ie.$set(j);const Wn={};f&2&&(Wn.$$scope={dirty:f,ctx:o}),De.$set(Wn);const Hn={};f&2&&(Hn.$$scope={dirty:f,ctx:o}),He.$set(Hn)},i(o){gs||(T(i.$$.fragment,o),T(Ye.$$.fragment,o),T(no.$$.fragment,o),T(so.$$.fragment,o),T(uo.$$.fragment,o),T(fo.$$.fragment,o),T(Be.$$.fragment,o),T(_o.$$.fragment,o),T(bo.$$.fragment,o),T(wo.$$.fragment,o),T(ze.$$.fragment,o),T(Fe.$$.fragment,o),T(To.$$.fragment,o),T($o.$$.fragment,o),T(Me.$$.fragment,o),T(xe.$$.fragment,o),T(Fo.$$.fragment,o),T(Eo.$$.fragment,o),T(Po.$$.fragment,o),T(Pe.$$.fragment,o),T(Ae.$$.fragment,o),T(Ao.$$.fragment,o),T(jo.$$.fragment,o),T(No.$$.fragment,o),T(Oe.$$.fragment,o),T(Le.$$.fragment,o),T(Se.$$.fragment,o),T(Io.$$.fragment,o),T(Do.$$.fragment,o),T(Uo.$$.fragment,o),T(Ie.$$.fragment,o),T(De.$$.fragment,o),T(Vo.$$.fragment,o),T(Ro.$$.fragment,o),T(Ko.$$.fragment,o),T(He.$$.fragment,o),gs=!0)},o(o){$(i.$$.fragment,o),$(Ye.$$.fragment,o),$(no.$$.fragment,o),$(so.$$.fragment,o),$(uo.$$.fragment,o),$(fo.$$.fragment,o),$(Be.$$.fragment,o),$(_o.$$.fragment,o),$(bo.$$.fragment,o),$(wo.$$.fragment,o),$(ze.$$.fragment,o),$(Fe.$$.fragment,o),$(To.$$.fragment,o),$($o.$$.fragment,o),$(Me.$$.fragment,o),$(xe.$$.fragment,o),$(Fo.$$.fragment,o),$(Eo.$$.fragment,o),$(Po.$$.fragment,o),$(Pe.$$.fragment,o),$(Ae.$$.fragment,o),$(Ao.$$.fragment,o),$(jo.$$.fragment,o),$(No.$$.fragment,o),$(Oe.$$.fragment,o),$(Le.$$.fragment,o),$(Se.$$.fragment,o),$(Io.$$.fragment,o),$(Do.$$.fragment,o),$(Uo.$$.fragment,o),$(Ie.$$.fragment,o),$(De.$$.fragment,o),$(Vo.$$.fragment,o),$(Ro.$$.fragment,o),$(Ko.$$.fragment,o),$(He.$$.fragment,o),gs=!1},d(o){t(d),o&&t(v),o&&t(g),B(i),o&&t(N),o&&t(W),B(Ye),o&&t(Qn),o&&t(ye),o&&t(Un),o&&t(M),o&&t(Vn),o&&t(ae),B(no),o&&t(Rn),o&&t(rt),o&&t(Gn),B(so,o),o&&t(Yn),o&&t(lt),o&&t(Jn),o&&t(dt),o&&t(Kn),o&&t(H),o&&t(Xn),o&&t(ut),o&&t(Zn),o&&t(Te),o&&t(es),o&&t(ft),o&&t(os),o&&t(gt),o&&t(ts),o&&t(re),B(uo),o&&t(ns),o&&t(I),B(fo),B(Be),o&&t(ss),o&&t(de),B(_o),o&&t(as),o&&t(x),B(bo),B(wo),B(ze),B(Fe),o&&t(rs),o&&t(pe),B(To),o&&t(ls),o&&t(F),B($o),B(Me),B(xe),o&&t(is),o&&t(he),B(Fo),o&&t(ds),o&&t(q),B(Eo),B(Po),B(Pe),B(Ae),o&&t(cs),o&&t(ue),B(Ao),o&&t(ps),o&&t(E),B(jo),B(No),B(Oe),B(Le),B(Se),o&&t(hs),o&&t(ge),B(Io),o&&t(ms),o&&t(P),B(Do),B(Uo),B(Ie),B(De),o&&t(us),o&&t(be),B(Vo),o&&t(fs),o&&t(A),B(Ro),B(Ko),B(He)}}}const Pc={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"}],title:"BLOOM"};function Ac(C){return _c(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wc extends mc{constructor(d){super();uc(this,d,Ac,qc,fc,{})}}export{Wc as default,Pc as metadata};
