import{S as jf,i as Pf,s as Sf,e as n,k as m,w as v,t as i,M as Af,c as s,d as o,m as h,a,x as T,h as l,b as p,G as e,g as _,y,q as w,o as $,B as E,v as Lf,L as G}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ve}from"../../chunks/Tip-hf-doc-builder.js";import{D as z}from"../../chunks/Docstring-hf-doc-builder.js";import{C as J}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as V}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Z}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Nf(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import EsmModel, EsmConfig

# Initializing a ESM facebook/esm-1b style configuration >>> configuration = EsmConfig()

# Initializing a model from the configuration >>> model = ESMModel(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> EsmModel, EsmConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ESM facebook/esm-1b style configuration &gt;&gt;&gt; configuration = EsmConfig()</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the configuration &gt;&gt;&gt; model = ESMModel(configuration)</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration &gt;&gt;&gt; configuration = model.config</span>`}}),{c(){d=n("p"),k=i("Examples:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Examples:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Df(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function Of(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, EsmModel
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = EsmModel.from_pretrained("facebook/esm2_t6_8M_UR50D")

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

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = EsmForMaskedLM.from_pretrained("facebook/esm2_t6_8M_UR50D")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="pt")

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

# retrieve index of <mask>
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-<mask> tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, EsmForMaskedLM
<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;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = EsmForMaskedLM.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&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><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

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

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = EsmForSequenceClassification.from_pretrained("facebook/esm2_t6_8M_UR50D")

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 = EsmForSequenceClassification.from_pretrained("facebook/esm2_t6_8M_UR50D", 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, EsmForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = EsmForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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 = EsmForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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"),k=i("Example of single-label classification:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example of single-label classification:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Hf(F){let d,k,c,u,b;return u=new J({props:{code:`import torch
from transformers import AutoTokenizer, EsmForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = EsmForSequenceClassification.from_pretrained("facebook/esm2_t6_8M_UR50D", 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 = EsmForSequenceClassification.from_pretrained(
    "facebook/esm2_t6_8M_UR50D", 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, EsmForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = EsmForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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 = EsmForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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"),k=i("Example of multi-label classification:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example of multi-label classification:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Kf(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function Bf(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, EsmForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = EsmForTokenClassification.from_pretrained("facebook/esm2_t6_8M_UR50D")

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

model = EsmForProteinFolding.from_pretrained("facebook/esmfold_v1")
tokenizer = AutoTokenizer.from_pretrained("facebook/esmfold_v1")
inputs = tokenizer(["MLKNVQVQLV"], return_tensors="pt", add_special_tokens=False)  # A tiny random peptide
outputs = model(**inputs)
folded_positions = outputs.positions`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, EsmForProteinFolding

<span class="hljs-meta">&gt;&gt;&gt; </span>model = EsmForProteinFolding.from_pretrained(<span class="hljs-string">&quot;facebook/esmfold_v1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esmfold_v1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([<span class="hljs-string">&quot;MLKNVQVQLV&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>)  <span class="hljs-comment"># A tiny random peptide</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>folded_positions = outputs.positions`}}),{c(){d=n("p"),k=i("Example:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Gf(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function Jf(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, TFEsmModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = TFEsmModel.from_pretrained("facebook/esm2_t6_8M_UR50D")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
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, TFEsmModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFEsmModel.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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;tf&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"),k=i("Example:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Qf(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function Yf(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, TFEsmForMaskedLM
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = TFEsmForMaskedLM.from_pretrained("facebook/esm2_t6_8M_UR50D")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of <mask>
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFEsmForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFEsmForMaskedLM.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=n("p"),k=i("Example:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function Xf(F){let d,k;return d=new J({props:{code:`labels = tokenizer("The capital of France is Paris.", return_tensors="tf")["input_ids"]
# mask labels of non-<mask> tokens
labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){v(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,u){y(d,c,u),k=!0},p:G,i(c){k||(w(d.$$.fragment,c),k=!0)},o(c){$(d.$$.fragment,c),k=!1},d(c){E(d,c)}}}function eu(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function tu(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, TFEsmForSequenceClassification
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = TFEsmForSequenceClassification.from_pretrained("facebook/esm2_t6_8M_UR50D")

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

logits = model(**inputs).logits

predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFEsmForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFEsmForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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;tf&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=n("p"),k=i("Example:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function ou(F){let d,k;return d=new J({props:{code:'# To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`\nnum_labels = len(model.config.id2label)\nmodel = TFEsmForSequenceClassification.from_pretrained("facebook/esm2_t6_8M_UR50D", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss',highlighted:'<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>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFEsmForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){v(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,u){y(d,c,u),k=!0},p:G,i(c){k||(w(d.$$.fragment,c),k=!0)},o(c){$(d.$$.fragment,c),k=!1},d(c){E(d,c)}}}function nu(F){let d,k,c,u,b;return{c(){d=n("p"),k=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),c=n("code"),u=i("Module"),b=i(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Although the recipe for forward pass needs to be defined within this function, one should call the "),c=s(f,"CODE",{});var M=a(c);u=l(M,"Module"),M.forEach(o),b=l(f,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),f.forEach(o)},m(r,f){_(r,d,f),e(d,k),e(d,c),e(c,u),e(d,b)},d(r){r&&o(d)}}}function su(F){let d,k,c,u,b;return u=new J({props:{code:`from transformers import AutoTokenizer, TFEsmForTokenClassification
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t6_8M_UR50D")
model = TFEsmForTokenClassification.from_pretrained("facebook/esm2_t6_8M_UR50D")

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

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-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] for t in predicted_token_class_ids[0].numpy().tolist()]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFEsmForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFEsmForTokenClassification.from_pretrained(<span class="hljs-string">&quot;facebook/esm2_t6_8M_UR50D&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;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<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] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=n("p"),k=i("Example:"),c=m(),v(u.$$.fragment)},l(r){d=s(r,"P",{});var f=a(d);k=l(f,"Example:"),f.forEach(o),c=h(r),T(u.$$.fragment,r)},m(r,f){_(r,d,f),e(d,k),_(r,c,f),y(u,r,f),b=!0},p:G,i(r){b||(w(u.$$.fragment,r),b=!0)},o(r){$(u.$$.fragment,r),b=!1},d(r){r&&o(d),r&&o(c),E(u,r)}}}function au(F){let d,k;return d=new J({props:{code:`labels = predicted_token_class_ids
loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){v(d.$$.fragment)},l(c){T(d.$$.fragment,c)},m(c,u){y(d,c,u),k=!0},p:G,i(c){k||(w(d.$$.fragment,c),k=!0)},o(c){$(d.$$.fragment,c),k=!1},d(c){E(d,c)}}}function ru(F){let d,k,c,u,b,r,f,M,ni,Da,ye,Ze,ms,Ot,si,hs,ai,Oa,Ge,ri,It,ii,li,Ia,Je,di,Ut,ci,pi,Ua,gn,mi,Ra,_n,fs,hi,Wa,kn,fi,Ha,bn,us,ui,Ka,vn,gi,Ba,Tn,gs,_i,Va,Q,ki,Rt,bi,vi,Wt,Ti,yi,Ht,wi,$i,Za,ae,Ei,Kt,Fi,Mi,Bt,zi,qi,Ga,re,xi,Vt,Ci,ji,_s,Pi,Si,Ja,we,Qe,ks,Zt,Ai,bs,Li,Qa,ie,vs,yn,Ni,Di,Ts,wn,Oi,Ii,ys,$n,Ui,Ya,$e,Ye,ws,Gt,Ri,$s,Wi,Xa,j,Jt,Hi,Ee,Ki,Es,Bi,Vi,Qt,Zi,Gi,Ji,Fe,Qi,En,Yi,Xi,Fn,el,tl,ol,Xe,nl,et,Yt,sl,Xt,al,Mn,rl,il,er,Me,tt,Fs,eo,ll,Ms,dl,tr,x,to,cl,zs,pl,ml,zn,oo,hl,ot,no,fl,ze,ul,qs,gl,_l,xs,kl,bl,vl,le,so,Tl,qn,yl,xn,wl,$l,Cs,El,Fl,Cn,ao,or,qe,nt,js,ro,Ml,Ps,zl,nr,q,io,ql,Ss,xl,Cl,lo,jl,jn,Pl,Sl,Al,co,Ll,po,Nl,Dl,Ol,mo,Il,ho,Ul,Rl,Wl,C,Hl,As,Kl,Bl,Ls,Vl,Zl,Ns,Gl,Jl,Ds,Ql,Yl,Os,Xl,ed,Is,td,od,nd,Y,fo,sd,xe,ad,Pn,rd,id,Us,ld,dd,cd,st,pd,at,sr,Ce,rt,Rs,uo,md,Ws,hd,ar,P,go,fd,_o,ud,Hs,gd,_d,kd,ko,bd,Sn,vd,Td,yd,bo,wd,vo,$d,Ed,Fd,X,To,Md,je,zd,An,qd,xd,Ks,Cd,jd,Pd,it,Sd,lt,rr,Pe,dt,Bs,yo,Ad,Vs,Ld,ir,S,wo,Nd,Zs,Dd,Od,$o,Id,Ln,Ud,Rd,Wd,Eo,Hd,Fo,Kd,Bd,Vd,U,Mo,Zd,Se,Gd,Nn,Jd,Qd,Gs,Yd,Xd,ec,ct,tc,pt,oc,mt,lr,Ae,ht,Js,zo,nc,Qs,sc,dr,A,qo,ac,Ys,rc,ic,xo,lc,Dn,dc,cc,pc,Co,mc,jo,hc,fc,uc,ee,Po,gc,Le,_c,On,kc,bc,Xs,vc,Tc,yc,ft,wc,ut,cr,Ne,gt,ea,So,$c,ta,Ec,pr,L,Ao,Fc,oa,Mc,zc,Lo,qc,In,xc,Cc,jc,No,Pc,Do,Sc,Ac,Lc,te,Oo,Nc,De,Dc,Un,Oc,Ic,na,Uc,Rc,Wc,_t,Hc,kt,mr,Oe,bt,sa,Io,Kc,aa,Bc,hr,N,Uo,Vc,ra,Zc,Gc,Ro,Jc,Rn,Qc,Yc,Xc,Wo,ep,Ho,tp,op,np,oe,Ko,sp,Ie,ap,Wn,rp,ip,ia,lp,dp,cp,vt,pp,Tt,fr,Ue,yt,la,Bo,mp,da,hp,ur,D,Vo,fp,Zo,up,ca,gp,_p,kp,Go,bp,Hn,vp,Tp,yp,Jo,wp,Qo,$p,Ep,Fp,R,Yo,Mp,Re,zp,Kn,qp,xp,pa,Cp,jp,Pp,wt,Sp,$t,Ap,Et,gr,We,Ft,ma,Xo,Lp,ha,Np,_r,O,en,Dp,fa,Op,Ip,tn,Up,Bn,Rp,Wp,Hp,on,Kp,nn,Bp,Vp,Zp,W,sn,Gp,He,Jp,Vn,Qp,Yp,ua,Xp,em,tm,Mt,om,zt,nm,qt,kr,Ke,xt,ga,an,sm,_a,am,br,I,rn,rm,ka,im,lm,ln,dm,Zn,cm,pm,mm,dn,hm,cn,fm,um,gm,H,pn,_m,Be,km,Gn,bm,vm,ba,Tm,ym,wm,Ct,$m,jt,Em,Pt,vr;return r=new V({}),Ot=new V({}),Zt=new V({}),Gt=new V({}),Jt=new z({props:{name:"class transformers.EsmConfig",anchor:"transformers.EsmConfig",parameters:[{name:"vocab_size",val:" = None"},{name:"mask_token_id",val:" = None"},{name:"pad_token_id",val:" = None"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 1026"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"emb_layer_norm_before",val:" = None"},{name:"token_dropout",val:" = False"},{name:"is_folding_model",val:" = False"},{name:"esmfold_config",val:" = None"},{name:"vocab_list",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EsmConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Vocabulary size of the ESM model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <code>ESMModel</code>.`,name:"vocab_size"},{anchor:"transformers.EsmConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The index of the mask token in the vocabulary. This must be included in the config because of the
&#x201C;mask-dropout&#x201D; scaling trick, which will scale the inputs depending on the number of masked tokens.`,name:"mask_token_id"},{anchor:"transformers.EsmConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The index of the padding token in the vocabulary. This must be included in the config because certain parts
of the ESM code use this instead of the attention mask.`,name:"pad_token_id"},{anchor:"transformers.EsmConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.EsmConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.EsmConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.EsmConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.EsmConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.EsmConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.EsmConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1026) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.EsmConfig.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.EsmConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.EsmConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;, &quot;rotary&quot;</code>.
For positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.EsmConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.EsmConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.EsmConfig.emb_layer_norm_before",description:`<strong>emb_layer_norm_before</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to apply layer normalization after embeddings but before the main stem of the network.`,name:"emb_layer_norm_before"},{anchor:"transformers.EsmConfig.token_dropout",description:`<strong>token_dropout</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
When this is enabled, masked tokens are treated as if they had been dropped out by input dropout.`,name:"token_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/configuration_esm.py#L33"}}),Xe=new Z({props:{anchor:"transformers.EsmConfig.example",$$slots:{default:[Nf]},$$scope:{ctx:F}}}),Yt=new z({props:{name:"to_dict",anchor:"transformers.EsmConfig.to_dict",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/configuration_esm.py#L160",returnDescription:`
<p>Dictionary of all the attributes that make up this configuration instance,</p>
`,returnType:`
<p><code>Dict[str, any]</code></p>
`}}),eo=new V({}),to=new z({props:{name:"class transformers.EsmTokenizer",anchor:"transformers.EsmTokenizer",parameters:[{name:"vocab_file",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/tokenization_esm.py#L47"}}),oo=new z({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.EsmTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/tokenization_esm.py#L91"}}),no=new z({props:{name:"get_special_tokens_mask",anchor:"transformers.EsmTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List"},{name:"token_ids_1",val:": typing.Optional[typing.List] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.EsmTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids of the first sequence.`,name:"token_ids_0"},{anchor:"transformers.EsmTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of ids of the second sequence.`,name:"token_ids_1"},{anchor:"transformers.EsmTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/tokenization_esm.py#L100",returnDescription:`
<p>1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p>A list of integers in the range [0, 1]</p>
`}}),so=new z({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.EsmTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.EsmTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.EsmTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/tokenization_utils_base.py#L3029",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ao=new z({props:{name:"save_vocabulary",anchor:"transformers.EsmTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:""},{name:"filename_prefix",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/tokenization_esm.py#L131"}}),ro=new V({}),io=new z({props:{name:"class transformers.EsmModel",anchor:"transformers.EsmModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.EsmModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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/esm/modeling_esm.py#L773"}}),fo=new z({props:{name:"forward",anchor:"transformers.EsmModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = 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"}],parametersDescription:[{anchor:"transformers.EsmModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>((batch_size, sequence_length))</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.EsmModel.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.EsmModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>((batch_size, sequence_length))</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.EsmModel.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.EsmModel.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.`,name:"inputs_embeds"},{anchor:"transformers.EsmModel.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.EsmModel.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.EsmModel.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.EsmModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.EsmModel.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.EsmModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.EsmModel.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"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_esm.py#L823",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig"
>EsmConfig</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>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),st=new Ve({props:{$$slots:{default:[Df]},$$scope:{ctx:F}}}),at=new Z({props:{anchor:"transformers.EsmModel.forward.example",$$slots:{default:[Of]},$$scope:{ctx:F}}}),uo=new V({}),go=new z({props:{name:"class transformers.EsmForMaskedLM",anchor:"transformers.EsmForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.EsmForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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/esm/modeling_esm.py#L962"}}),To=new z({props:{name:"forward",anchor:"transformers.EsmForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",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.EsmForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.EsmForMaskedLM.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.EsmForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.EsmForMaskedLM.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.EsmForMaskedLM.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.`,name:"inputs_embeds"},{anchor:"transformers.EsmForMaskedLM.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.EsmForMaskedLM.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.EsmForMaskedLM.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.EsmForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.EsmForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_esm.py#L986",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</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/esm#transformers.EsmConfig"
>EsmConfig</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 Masked language modeling (MLM) loss.</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),it=new Ve({props:{$$slots:{default:[If]},$$scope:{ctx:F}}}),lt=new Z({props:{anchor:"transformers.EsmForMaskedLM.forward.example",$$slots:{default:[Uf]},$$scope:{ctx:F}}}),yo=new V({}),wo=new z({props:{name:"class transformers.EsmForSequenceClassification",anchor:"transformers.EsmForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.EsmForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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/esm/modeling_esm.py#L1080"}}),Mo=new z({props:{name:"forward",anchor:"transformers.EsmForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",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.EsmForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.EsmForSequenceClassification.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.EsmForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.EsmForSequenceClassification.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.EsmForSequenceClassification.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.`,name:"inputs_embeds"},{anchor:"transformers.EsmForSequenceClassification.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.EsmForSequenceClassification.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.EsmForSequenceClassification.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.EsmForSequenceClassification.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/esm/modeling_esm.py#L1093",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</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/esm#transformers.EsmConfig"
>EsmConfig</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>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.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ct=new Ve({props:{$$slots:{default:[Rf]},$$scope:{ctx:F}}}),pt=new Z({props:{anchor:"transformers.EsmForSequenceClassification.forward.example",$$slots:{default:[Wf]},$$scope:{ctx:F}}}),mt=new Z({props:{anchor:"transformers.EsmForSequenceClassification.forward.example-2",$$slots:{default:[Hf]},$$scope:{ctx:F}}}),zo=new V({}),qo=new z({props:{name:"class transformers.EsmForTokenClassification",anchor:"transformers.EsmForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.EsmForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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/esm/modeling_esm.py#L1174"}}),Po=new z({props:{name:"forward",anchor:"transformers.EsmForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",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.EsmForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.EsmForTokenClassification.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.EsmForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.EsmForTokenClassification.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.EsmForTokenClassification.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.`,name:"inputs_embeds"},{anchor:"transformers.EsmForTokenClassification.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.EsmForTokenClassification.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.EsmForTokenClassification.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.EsmForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_esm.py#L1188",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/esm#transformers.EsmConfig"
>EsmConfig</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>
`}}),ft=new Ve({props:{$$slots:{default:[Kf]},$$scope:{ctx:F}}}),ut=new Z({props:{anchor:"transformers.EsmForTokenClassification.forward.example",$$slots:{default:[Bf]},$$scope:{ctx:F}}}),So=new V({}),Ao=new z({props:{name:"class transformers.EsmForProteinFolding",anchor:"transformers.EsmForProteinFolding",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.EsmForProteinFolding.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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/esm/modeling_esmfold.py#L2020"}}),Oo=new z({props:{name:"forward",anchor:"transformers.EsmForProteinFolding.forward",parameters:[{name:"input_ids",val:": Tensor"},{name:"attention_mask",val:": Tensor = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"masking_pattern",val:": typing.Optional[torch.Tensor] = None"},{name:"num_recycles",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"transformers.EsmForProteinFolding.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.EsmForProteinFolding.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.EsmForProteinFolding.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.EsmForProteinFolding.forward.masking_pattern",description:`<strong>masking_pattern</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Locations of tokens to mask during training as a form of regularization. Mask values selected in <code>[0, 1]</code>.`,name:"masking_pattern"},{anchor:"transformers.EsmForProteinFolding.forward.num_recycles",description:`<strong>num_recycles</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Number of times to recycle the input sequence. If <code>None</code>, defaults to <code>config.num_recycles</code>. &#x201C;Recycling&#x201D;
consists of passing the output of the folding trunk back in as input to the trunk. During training, the
number of recycles should vary with each batch, to ensure that the model learns to output valid predictions
after each recycle. During inference, num_recycles should be set to the highest value that the model was
trained with for maximum accuracy. Accordingly, when this value is set to <code>None</code>, config.max_recycles is
used.`,name:"num_recycles"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_esmfold.py#L2082",returnDescription:`
<p>A <code>transformers.models.esm.modeling_esmfold.EsmForProteinFoldingOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.esm.configuration_esm.EsmConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>frames</strong> (<code>torch.FloatTensor</code>) \u2014 Output frames.</li>
<li><strong>sidechain_frames</strong> (<code>torch.FloatTensor</code>) \u2014 Output sidechain frames.</li>
<li><strong>unnormalized_angles</strong> (<code>torch.FloatTensor</code>) \u2014 Predicted unnormalized backbone and side chain torsion angles.</li>
<li><strong>angles</strong> (<code>torch.FloatTensor</code>) \u2014 Predicted backbone and side chain torsion angles.</li>
<li><strong>positions</strong> (<code>torch.FloatTensor</code>) \u2014 Predicted positions of the backbone and side chain atoms.</li>
<li><strong>states</strong> (<code>torch.FloatTensor</code>) \u2014 Hidden states from the protein folding trunk.</li>
<li><strong>s_s</strong> (<code>torch.FloatTensor</code>) \u2014 Per-residue embeddings derived by concatenating the hidden states of each layer of the ESM-2 LM stem.</li>
<li><strong>s_z</strong> (<code>torch.FloatTensor</code>) \u2014 Pairwise residue embeddings.</li>
<li><strong>distogram_logits</strong> (<code>torch.FloatTensor</code>) \u2014 Input logits to the distogram used to compute residue distances.</li>
<li><strong>lm_logits</strong> (<code>torch.FloatTensor</code>) \u2014 Logits output by the ESM-2 protein language model stem.</li>
<li><strong>aatype</strong> (<code>torch.FloatTensor</code>) \u2014 Input amino acids (AlphaFold2 indices).</li>
<li><strong>atom14_atom_exists</strong> (<code>torch.FloatTensor</code>) \u2014 Whether each atom exists in the atom14 representation.</li>
<li><strong>residx_atom14_to_atom37</strong> (<code>torch.FloatTensor</code>) \u2014 Mapping between atoms in the atom14 and atom37 representations.</li>
<li><strong>residx_atom37_to_atom14</strong> (<code>torch.FloatTensor</code>) \u2014 Mapping between atoms in the atom37 and atom14 representations.</li>
<li><strong>atom37_atom_exists</strong> (<code>torch.FloatTensor</code>) \u2014 Whether each atom exists in the atom37 representation.</li>
<li><strong>residue_index</strong> (<code>torch.FloatTensor</code>) \u2014 The index of each residue in the protein chain. Unless internal padding tokens are used, this will just be
a sequence of integers from 0 to <code>sequence_length</code>.</li>
<li><strong>lddt_head</strong> (<code>torch.FloatTensor</code>) \u2014 Raw outputs from the lddt head used to compute plddt.</li>
<li><strong>plddt</strong> (<code>torch.FloatTensor</code>) \u2014 Per-residue confidence scores. Regions of low confidence may indicate areas where the model\u2019s prediction is
uncertain, or where the protein structure is disordered.</li>
<li><strong>ptm_logits</strong> (<code>torch.FloatTensor</code>) \u2014 Raw logits used for computing ptm.</li>
<li><strong>ptm</strong> (<code>torch.FloatTensor</code>) \u2014 TM-score output representing the model\u2019s high-level confidence in the overall structure.</li>
<li><strong>aligned_confidence_probs</strong> (<code>torch.FloatTensor</code>) \u2014 Per-residue confidence scores for the aligned structure.</li>
<li><strong>predicted_aligned_error</strong> (<code>torch.FloatTensor</code>) \u2014 Predicted error between the model\u2019s prediction and the ground truth.</li>
<li><strong>max_predicted_aligned_error</strong> (<code>torch.FloatTensor</code>) \u2014 Per-sample maximum predicted error.</li>
</ul>
`,returnType:`
<p><code>transformers.models.esm.modeling_esmfold.EsmForProteinFoldingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_t=new Ve({props:{$$slots:{default:[Vf]},$$scope:{ctx:F}}}),kt=new Z({props:{anchor:"transformers.EsmForProteinFolding.forward.example",$$slots:{default:[Zf]},$$scope:{ctx:F}}}),Io=new V({}),Uo=new z({props:{name:"class transformers.TFEsmModel",anchor:"transformers.TFEsmModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFEsmModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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.TFPreTrainedModel.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/esm/modeling_tf_esm.py#L986"}}),Ko=new z({props:{name:"call",anchor:"transformers.TFEsmModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"past_key_values",val:": typing.Union[typing.Tuple[typing.Tuple[typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor]]], NoneType] = 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:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFEsmModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.TFEsmModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFEsmModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFEsmModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</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.TFEsmModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.`,name:"inputs_embeds"},{anchor:"transformers.TFEsmModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFEsmModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFEsmModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFEsmModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFEsmModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFEsmModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFEsmModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#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>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_tf_esm.py#L992",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</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/esm#transformers.EsmConfig"
>EsmConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</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>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vt=new Ve({props:{$$slots:{default:[Gf]},$$scope:{ctx:F}}}),Tt=new Z({props:{anchor:"transformers.TFEsmModel.call.example",$$slots:{default:[Jf]},$$scope:{ctx:F}}}),Bo=new V({}),Vo=new z({props:{name:"class transformers.TFEsmForMaskedLM",anchor:"transformers.TFEsmForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFEsmForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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.TFPreTrainedModel.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/esm/modeling_tf_esm.py#L1090"}}),Yo=new z({props:{name:"call",anchor:"transformers.TFEsmForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_hidden_states",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"encoder_attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFEsmForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.TFEsmForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFEsmForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFEsmForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</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.TFEsmForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.`,name:"inputs_embeds"},{anchor:"transformers.TFEsmForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFEsmForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFEsmForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFEsmForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.TFEsmForMaskedLM.call.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_tf_esm.py#L1115",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</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/esm#transformers.EsmConfig"
>EsmConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),wt=new Ve({props:{$$slots:{default:[Qf]},$$scope:{ctx:F}}}),$t=new Z({props:{anchor:"transformers.TFEsmForMaskedLM.call.example",$$slots:{default:[Yf]},$$scope:{ctx:F}}}),Et=new Z({props:{anchor:"transformers.TFEsmForMaskedLM.call.example-2",$$slots:{default:[Xf]},$$scope:{ctx:F}}}),Xo=new V({}),en=new z({props:{name:"class transformers.TFEsmForSequenceClassification",anchor:"transformers.TFEsmForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFEsmForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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.TFPreTrainedModel.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/esm/modeling_tf_esm.py#L1249"}}),sn=new z({props:{name:"call",anchor:"transformers.TFEsmForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFEsmForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.TFEsmForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFEsmForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFEsmForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</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.TFEsmForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.`,name:"inputs_embeds"},{anchor:"transformers.TFEsmForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFEsmForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFEsmForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFEsmForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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/esm/modeling_tf_esm.py#L1260",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</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/esm#transformers.EsmConfig"
>EsmConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</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>tf.Tensor</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>hidden_states</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Mt=new Ve({props:{$$slots:{default:[eu]},$$scope:{ctx:F}}}),zt=new Z({props:{anchor:"transformers.TFEsmForSequenceClassification.call.example",$$slots:{default:[tu]},$$scope:{ctx:F}}}),qt=new Z({props:{anchor:"transformers.TFEsmForSequenceClassification.call.example-2",$$slots:{default:[ou]},$$scope:{ctx:F}}}),an=new V({}),rn=new z({props:{name:"class transformers.TFEsmForTokenClassification",anchor:"transformers.TFEsmForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFEsmForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmConfig">EsmConfig</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.TFPreTrainedModel.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/esm/modeling_tf_esm.py#L1343"}}),pn=new z({props:{name:"call",anchor:"transformers.TFEsmForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFEsmForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</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.TFEsmForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFEsmForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFEsmForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</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.TFEsmForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.`,name:"inputs_embeds"},{anchor:"transformers.TFEsmForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.TFEsmForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.TFEsmForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFEsmForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/esm/modeling_tf_esm.py#L1355",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</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/esm#transformers.EsmConfig"
>EsmConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ct=new Ve({props:{$$slots:{default:[nu]},$$scope:{ctx:F}}}),jt=new Z({props:{anchor:"transformers.TFEsmForTokenClassification.call.example",$$slots:{default:[su]},$$scope:{ctx:F}}}),Pt=new Z({props:{anchor:"transformers.TFEsmForTokenClassification.call.example-2",$$slots:{default:[au]},$$scope:{ctx:F}}}),{c(){d=n("meta"),k=m(),c=n("h1"),u=n("a"),b=n("span"),v(r.$$.fragment),f=m(),M=n("span"),ni=i("ESM"),Da=m(),ye=n("h2"),Ze=n("a"),ms=n("span"),v(Ot.$$.fragment),si=m(),hs=n("span"),ai=i("Overview"),Oa=i(`

This page provides code and pre-trained weights for Transformer protein language models from Meta AI's Fundamental 
AI Research Team, providing the state-of-the-art ESMFold and ESM-2, and the previously released ESM-1b and ESM-1v.
Transformer protein language models were introduced in the paper [Biological structure and function emerge from scaling
unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by 
Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, 
C. Lawrence Zitnick, Jerry Ma, and Rob Fergus.
The first version of this paper was [preprinted in 2019](https://www.biorxiv.org/content/10.1101/622803v1?versioned=true).
`),Ge=n("p"),ri=i(`ESM-2 outperforms all tested single-sequence protein language models across a range of structure prediction tasks,
and enables atomic resolution structure prediction.
It was released with the paper `),It=n("a"),ii=i(`Language models of protein sequences at the scale of evolution enable accurate
structure prediction`),li=i(` by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie,
Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido and Alexander Rives.`),Ia=m(),Je=n("p"),di=i(`Also introduced in this paper was ESMFold. It uses an ESM-2 stem with a head that can predict folded protein
structures with state-of-the-art accuracy. Unlike `),Ut=n("a"),ci=i("AlphaFold2"),pi=i(`,
it relies on the token embeddings from the large pre-trained protein language model stem and does not perform a multiple
sequence alignment (MSA) step at inference time, which means that ESMFold checkpoints are fully \u201Cstandalone\u201D -
they do not require a database of known protein sequences and structures with associated external query tools
to make predictions, and are much faster as a result.`),Ua=m(),gn=n("p"),mi=i(`The abstract from
\u201CBiological structure and function emerge from scaling unsupervised learning to 250
million protein sequences\u201D is`),Ra=m(),_n=n("p"),fs=n("em"),hi=i(`In the field of artificial intelligence, a combination of scale in data and model capacity enabled by unsupervised
learning has led to major advances in representation learning and statistical generation. In the life sciences, the
anticipated growth of sequencing promises unprecedented data on natural sequence diversity. Protein language modeling
at the scale of evolution is a logical step toward predictive and generative artificial intelligence for biology. To
this end, we use unsupervised learning to train a deep contextual language model on 86 billion amino acids across 250
million protein sequences spanning evolutionary diversity. The resulting model contains information about biological
properties in its representations. The representations are learned from sequence data alone. The learned representation
space has a multiscale organization reflecting structure from the level of biochemical properties of amino acids to
remote homology of proteins. Information about secondary and tertiary structure is encoded in the representations and
can be identified by linear projections. Representation learning produces features that generalize across a range of
applications, enabling state-of-the-art supervised prediction of mutational effect and secondary structure and
improving state-of-the-art features for long-range contact prediction.`),Wa=m(),kn=n("p"),fi=i(`The abstract from
\u201CLanguage models of protein sequences at the scale of evolution enable accurate structure prediction\u201D is`),Ha=m(),bn=n("p"),us=n("em"),ui=i(`Large language models have recently been shown to develop emergent capabilities with scale, going beyond
simple pattern matching to perform higher level reasoning and generate lifelike images and text. While
language models trained on protein sequences have been studied at a smaller scale, little is known about
what they learn about biology as they are scaled up. In this work we train models up to 15 billion parameters,
the largest language models of proteins to be evaluated to date. We find that as models are scaled they learn
information enabling the prediction of the three-dimensional structure of a protein at the resolution of
individual atoms. We present ESMFold for high accuracy end-to-end atomic level structure prediction directly
from the individual sequence of a protein. ESMFold has similar accuracy to AlphaFold2 and RoseTTAFold for
sequences with low perplexity that are well understood by the language model. ESMFold inference is an
order of magnitude faster than AlphaFold2, enabling exploration of the structural space of metagenomic
proteins in practical timescales.`),Ka=m(),vn=n("p"),gi=i("Tips:"),Ba=m(),Tn=n("ul"),gs=n("li"),_i=i("ESM models are trained with a masked language modeling (MLM) objective."),Va=m(),Q=n("p"),ki=i("The original code can be found "),Rt=n("a"),bi=i("here"),vi=i(` and was
was developed by the Fundamental AI Research team at Meta AI.
ESM-1b, ESM-1v and ESM-2 were contributed to huggingface by `),Wt=n("a"),Ti=i("jasonliu"),yi=i(`
and `),Ht=n("a"),wi=i("Matt"),$i=i("."),Za=m(),ae=n("p"),Ei=i("ESMFold was contributed to huggingface by "),Kt=n("a"),Fi=i("Matt"),Mi=i(` and
`),Bt=n("a"),zi=i("Sylvain"),qi=i(`, with a big thank you to Nikita Smetanin, Roshan Rao and Tom Sercu for their
help throughout the process!`),Ga=m(),re=n("p"),xi=i("The HuggingFace port of ESMFold uses portions of the "),Vt=n("a"),Ci=i("openfold"),ji=i(` library.
The `),_s=n("code"),Pi=i("openfold"),Si=i(" library is licensed under the Apache License 2.0."),Ja=m(),we=n("h2"),Qe=n("a"),ks=n("span"),v(Zt.$$.fragment),Ai=m(),bs=n("span"),Li=i("Documentation resources"),Qa=m(),ie=n("ul"),vs=n("li"),yn=n("a"),Ni=i("Text classification task guide"),Di=m(),Ts=n("li"),wn=n("a"),Oi=i("Token classification task guide"),Ii=m(),ys=n("li"),$n=n("a"),Ui=i("Masked language modeling task guide"),Ya=m(),$e=n("h2"),Ye=n("a"),ws=n("span"),v(Gt.$$.fragment),Ri=m(),$s=n("span"),Wi=i("EsmConfig"),Xa=m(),j=n("div"),v(Jt.$$.fragment),Hi=m(),Ee=n("p"),Ki=i("This is the configuration class to store the configuration of a "),Es=n("code"),Bi=i("ESMModel"),Vi=i(`. It is used to instantiate a ESM model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the ESM
`),Qt=n("a"),Zi=i("facebook/esm-1b"),Gi=i(" architecture."),Ji=m(),Fe=n("p"),Qi=i("Configuration objects inherit from "),En=n("a"),Yi=i("PretrainedConfig"),Xi=i(` and can be used to control the model outputs. Read the
documentation from `),Fn=n("a"),el=i("PretrainedConfig"),tl=i(" for more information."),ol=m(),v(Xe.$$.fragment),nl=m(),et=n("div"),v(Yt.$$.fragment),sl=m(),Xt=n("p"),al=i("Serializes this instance to a Python dictionary. Override the default "),Mn=n("a"),rl=i("to_dict()"),il=i("."),er=m(),Me=n("h2"),tt=n("a"),Fs=n("span"),v(eo.$$.fragment),ll=m(),Ms=n("span"),dl=i("EsmTokenizer"),tr=m(),x=n("div"),v(to.$$.fragment),cl=m(),zs=n("p"),pl=i("Constructs an ESM tokenizer."),ml=m(),zn=n("div"),v(oo.$$.fragment),hl=m(),ot=n("div"),v(no.$$.fragment),fl=m(),ze=n("p"),ul=i(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),qs=n("code"),gl=i("prepare_for_model"),_l=i(" or "),xs=n("code"),kl=i("encode_plus"),bl=i(" methods."),vl=m(),le=n("div"),v(so.$$.fragment),Tl=m(),qn=n("p"),yl=i("Create the token type IDs corresponding to the sequences passed. "),xn=n("a"),wl=i(`What are token type
IDs?`),$l=m(),Cs=n("p"),El=i("Should be overridden in a subclass if the model has a special way of building those."),Fl=m(),Cn=n("div"),v(ao.$$.fragment),or=m(),qe=n("h2"),nt=n("a"),js=n("span"),v(ro.$$.fragment),Ml=m(),Ps=n("span"),zl=i("EsmModel"),nr=m(),q=n("div"),v(io.$$.fragment),ql=m(),Ss=n("p"),xl=i("The bare ESM Model transformer outputting raw hidden-states without any specific head on top."),Cl=m(),lo=n("p"),jl=i("This model inherits from "),jn=n("a"),Pl=i("PreTrainedModel"),Sl=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Al=m(),co=n("p"),Ll=i("This model is also a PyTorch "),po=n("a"),Nl=i("torch.nn.Module"),Dl=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ol=m(),mo=n("p"),Il=i(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ho=n("a"),Ul=i(`Attention is
all you need`),Rl=i(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Wl=m(),C=n("p"),Hl=i("To behave as an decoder the model needs to be initialized with the "),As=n("code"),Kl=i("is_decoder"),Bl=i(` argument of the configuration set
to `),Ls=n("code"),Vl=i("True"),Zl=i(". To be used in a Seq2Seq model, the model needs to initialized with both "),Ns=n("code"),Gl=i("is_decoder"),Jl=i(` argument and
`),Ds=n("code"),Ql=i("add_cross_attention"),Yl=i(" set to "),Os=n("code"),Xl=i("True"),ed=i("; an "),Is=n("code"),td=i("encoder_hidden_states"),od=i(" is then expected as an input to the forward pass."),nd=m(),Y=n("div"),v(fo.$$.fragment),sd=m(),xe=n("p"),ad=i("The "),Pn=n("a"),rd=i("EsmModel"),id=i(" forward method, overrides the "),Us=n("code"),ld=i("__call__"),dd=i(" special method."),cd=m(),v(st.$$.fragment),pd=m(),v(at.$$.fragment),sr=m(),Ce=n("h2"),rt=n("a"),Rs=n("span"),v(uo.$$.fragment),md=m(),Ws=n("span"),hd=i("EsmForMaskedLM"),ar=m(),P=n("div"),v(go.$$.fragment),fd=m(),_o=n("p"),ud=i("ESM Model with a "),Hs=n("code"),gd=i("language modeling"),_d=i(" head on top."),kd=m(),ko=n("p"),bd=i("This model inherits from "),Sn=n("a"),vd=i("PreTrainedModel"),Td=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yd=m(),bo=n("p"),wd=i("This model is also a PyTorch "),vo=n("a"),$d=i("torch.nn.Module"),Ed=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fd=m(),X=n("div"),v(To.$$.fragment),Md=m(),je=n("p"),zd=i("The "),An=n("a"),qd=i("EsmForMaskedLM"),xd=i(" forward method, overrides the "),Ks=n("code"),Cd=i("__call__"),jd=i(" special method."),Pd=m(),v(it.$$.fragment),Sd=m(),v(lt.$$.fragment),rr=m(),Pe=n("h2"),dt=n("a"),Bs=n("span"),v(yo.$$.fragment),Ad=m(),Vs=n("span"),Ld=i("EsmForSequenceClassification"),ir=m(),S=n("div"),v(wo.$$.fragment),Nd=m(),Zs=n("p"),Dd=i(`ESM Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Od=m(),$o=n("p"),Id=i("This model inherits from "),Ln=n("a"),Ud=i("PreTrainedModel"),Rd=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wd=m(),Eo=n("p"),Hd=i("This model is also a PyTorch "),Fo=n("a"),Kd=i("torch.nn.Module"),Bd=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vd=m(),U=n("div"),v(Mo.$$.fragment),Zd=m(),Se=n("p"),Gd=i("The "),Nn=n("a"),Jd=i("EsmForSequenceClassification"),Qd=i(" forward method, overrides the "),Gs=n("code"),Yd=i("__call__"),Xd=i(" special method."),ec=m(),v(ct.$$.fragment),tc=m(),v(pt.$$.fragment),oc=m(),v(mt.$$.fragment),lr=m(),Ae=n("h2"),ht=n("a"),Js=n("span"),v(zo.$$.fragment),nc=m(),Qs=n("span"),sc=i("EsmForTokenClassification"),dr=m(),A=n("div"),v(qo.$$.fragment),ac=m(),Ys=n("p"),rc=i(`ESM 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.`),ic=m(),xo=n("p"),lc=i("This model inherits from "),Dn=n("a"),dc=i("PreTrainedModel"),cc=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pc=m(),Co=n("p"),mc=i("This model is also a PyTorch "),jo=n("a"),hc=i("torch.nn.Module"),fc=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),uc=m(),ee=n("div"),v(Po.$$.fragment),gc=m(),Le=n("p"),_c=i("The "),On=n("a"),kc=i("EsmForTokenClassification"),bc=i(" forward method, overrides the "),Xs=n("code"),vc=i("__call__"),Tc=i(" special method."),yc=m(),v(ft.$$.fragment),wc=m(),v(ut.$$.fragment),cr=m(),Ne=n("h2"),gt=n("a"),ea=n("span"),v(So.$$.fragment),$c=m(),ta=n("span"),Ec=i("EsmForProteinFolding"),pr=m(),L=n("div"),v(Ao.$$.fragment),Fc=m(),oa=n("p"),Mc=i(`ESMForProteinFolding is the HuggingFace port of the original ESMFold model. It consists of an ESM-2 \u201Cstem\u201D followed
by a protein folding \u201Chead\u201D, although unlike most other output heads, this \u201Chead\u201D is similar in size and runtime to
the rest of the model combined! It outputs a dictionary containing predicted structural information about the input
protein(s).`),zc=m(),Lo=n("p"),qc=i("This model inherits from "),In=n("a"),xc=i("PreTrainedModel"),Cc=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),jc=m(),No=n("p"),Pc=i("This model is also a PyTorch "),Do=n("a"),Sc=i("torch.nn.Module"),Ac=i(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lc=m(),te=n("div"),v(Oo.$$.fragment),Nc=m(),De=n("p"),Dc=i("The "),Un=n("a"),Oc=i("EsmForProteinFolding"),Ic=i(" forward method, overrides the "),na=n("code"),Uc=i("__call__"),Rc=i(" special method."),Wc=m(),v(_t.$$.fragment),Hc=m(),v(kt.$$.fragment),mr=m(),Oe=n("h2"),bt=n("a"),sa=n("span"),v(Io.$$.fragment),Kc=m(),aa=n("span"),Bc=i("TFEsmModel"),hr=m(),N=n("div"),v(Uo.$$.fragment),Vc=m(),ra=n("p"),Zc=i("The bare ESM Model transformer outputting raw hidden-states without any specific head on top."),Gc=m(),Ro=n("p"),Jc=i("This model inherits from "),Rn=n("a"),Qc=i("TFPreTrainedModel"),Yc=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xc=m(),Wo=n("p"),ep=i("This model is also a Keras "),Ho=n("a"),tp=i("Model"),op=i(` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),np=m(),oe=n("div"),v(Ko.$$.fragment),sp=m(),Ie=n("p"),ap=i("The "),Wn=n("a"),rp=i("TFEsmModel"),ip=i(" forward method, overrides the "),ia=n("code"),lp=i("__call__"),dp=i(" special method."),cp=m(),v(vt.$$.fragment),pp=m(),v(Tt.$$.fragment),fr=m(),Ue=n("h2"),yt=n("a"),la=n("span"),v(Bo.$$.fragment),mp=m(),da=n("span"),hp=i("TFEsmForMaskedLM"),ur=m(),D=n("div"),v(Vo.$$.fragment),fp=m(),Zo=n("p"),up=i("ESM Model with a "),ca=n("code"),gp=i("language modeling"),_p=i(" head on top."),kp=m(),Go=n("p"),bp=i("This model inherits from "),Hn=n("a"),vp=i("TFPreTrainedModel"),Tp=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yp=m(),Jo=n("p"),wp=i("This model is also a Keras "),Qo=n("a"),$p=i("Model"),Ep=i(` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),Fp=m(),R=n("div"),v(Yo.$$.fragment),Mp=m(),Re=n("p"),zp=i("The "),Kn=n("a"),qp=i("TFEsmForMaskedLM"),xp=i(" forward method, overrides the "),pa=n("code"),Cp=i("__call__"),jp=i(" special method."),Pp=m(),v(wt.$$.fragment),Sp=m(),v($t.$$.fragment),Ap=m(),v(Et.$$.fragment),gr=m(),We=n("h2"),Ft=n("a"),ma=n("span"),v(Xo.$$.fragment),Lp=m(),ha=n("span"),Np=i("TFEsmForSequenceClassification"),_r=m(),O=n("div"),v(en.$$.fragment),Dp=m(),fa=n("p"),Op=i(`ESM Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Ip=m(),tn=n("p"),Up=i("This model inherits from "),Bn=n("a"),Rp=i("TFPreTrainedModel"),Wp=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Hp=m(),on=n("p"),Kp=i("This model is also a Keras "),nn=n("a"),Bp=i("Model"),Vp=i(` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),Zp=m(),W=n("div"),v(sn.$$.fragment),Gp=m(),He=n("p"),Jp=i("The "),Vn=n("a"),Qp=i("TFEsmForSequenceClassification"),Yp=i(" forward method, overrides the "),ua=n("code"),Xp=i("__call__"),em=i(" special method."),tm=m(),v(Mt.$$.fragment),om=m(),v(zt.$$.fragment),nm=m(),v(qt.$$.fragment),kr=m(),Ke=n("h2"),xt=n("a"),ga=n("span"),v(an.$$.fragment),sm=m(),_a=n("span"),am=i("TFEsmForTokenClassification"),br=m(),I=n("div"),v(rn.$$.fragment),rm=m(),ka=n("p"),im=i(`ESM 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.`),lm=m(),ln=n("p"),dm=i("This model inherits from "),Zn=n("a"),cm=i("TFPreTrainedModel"),pm=i(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mm=m(),dn=n("p"),hm=i("This model is also a Keras "),cn=n("a"),fm=i("Model"),um=i(` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),gm=m(),H=n("div"),v(pn.$$.fragment),_m=m(),Be=n("p"),km=i("The "),Gn=n("a"),bm=i("TFEsmForTokenClassification"),vm=i(" forward method, overrides the "),ba=n("code"),Tm=i("__call__"),ym=i(" special method."),wm=m(),v(Ct.$$.fragment),$m=m(),v(jt.$$.fragment),Em=m(),v(Pt.$$.fragment),this.h()},l(t){const g=Af('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(o),k=h(t),c=s(t,"H1",{class:!0});var mn=a(c);u=s(mn,"A",{id:!0,class:!0,href:!0});var va=a(u);b=s(va,"SPAN",{});var Ta=a(b);T(r.$$.fragment,Ta),Ta.forEach(o),va.forEach(o),f=h(mn),M=s(mn,"SPAN",{});var ya=a(M);ni=l(ya,"ESM"),ya.forEach(o),mn.forEach(o),Da=h(t),ye=s(t,"H2",{class:!0});var hn=a(ye);Ze=s(hn,"A",{id:!0,class:!0,href:!0});var wa=a(Ze);ms=s(wa,"SPAN",{});var $a=a(ms);T(Ot.$$.fragment,$a),$a.forEach(o),wa.forEach(o),si=h(hn),hs=s(hn,"SPAN",{});var Ea=a(hs);ai=l(Ea,"Overview"),Ea.forEach(o),hn.forEach(o),Oa=l(t,`

This page provides code and pre-trained weights for Transformer protein language models from Meta AI's Fundamental 
AI Research Team, providing the state-of-the-art ESMFold and ESM-2, and the previously released ESM-1b and ESM-1v.
Transformer protein language models were introduced in the paper [Biological structure and function emerge from scaling
unsupervised learning to 250 million protein sequences](https://www.pnas.org/content/118/15/e2016239118) by 
Alexander Rives, Joshua Meier, Tom Sercu, Siddharth Goyal, Zeming Lin, Jason Liu, Demi Guo, Myle Ott, 
C. Lawrence Zitnick, Jerry Ma, and Rob Fergus.
The first version of this paper was [preprinted in 2019](https://www.biorxiv.org/content/10.1101/622803v1?versioned=true).
`),Ge=s(t,"P",{});var fn=a(Ge);ri=l(fn,`ESM-2 outperforms all tested single-sequence protein language models across a range of structure prediction tasks,
and enables atomic resolution structure prediction.
It was released with the paper `),It=s(fn,"A",{href:!0,rel:!0});var Fa=a(It);ii=l(Fa,`Language models of protein sequences at the scale of evolution enable accurate
structure prediction`),Fa.forEach(o),li=l(fn,` by Zeming Lin, Halil Akin, Roshan Rao, Brian Hie,
Zhongkai Zhu, Wenting Lu, Allan dos Santos Costa, Maryam Fazel-Zarandi, Tom Sercu, Sal Candido and Alexander Rives.`),fn.forEach(o),Ia=h(t),Je=s(t,"P",{});var un=a(Je);di=l(un,`Also introduced in this paper was ESMFold. It uses an ESM-2 stem with a head that can predict folded protein
structures with state-of-the-art accuracy. Unlike `),Ut=s(un,"A",{href:!0,rel:!0});var Ma=a(Ut);ci=l(Ma,"AlphaFold2"),Ma.forEach(o),pi=l(un,`,
it relies on the token embeddings from the large pre-trained protein language model stem and does not perform a multiple
sequence alignment (MSA) step at inference time, which means that ESMFold checkpoints are fully \u201Cstandalone\u201D -
they do not require a database of known protein sequences and structures with associated external query tools
to make predictions, and are much faster as a result.`),un.forEach(o),Ua=h(t),gn=s(t,"P",{});var za=a(gn);mi=l(za,`The abstract from
\u201CBiological structure and function emerge from scaling unsupervised learning to 250
million protein sequences\u201D is`),za.forEach(o),Ra=h(t),_n=s(t,"P",{});var qa=a(_n);fs=s(qa,"EM",{});var xa=a(fs);hi=l(xa,`In the field of artificial intelligence, a combination of scale in data and model capacity enabled by unsupervised
learning has led to major advances in representation learning and statistical generation. In the life sciences, the
anticipated growth of sequencing promises unprecedented data on natural sequence diversity. Protein language modeling
at the scale of evolution is a logical step toward predictive and generative artificial intelligence for biology. To
this end, we use unsupervised learning to train a deep contextual language model on 86 billion amino acids across 250
million protein sequences spanning evolutionary diversity. The resulting model contains information about biological
properties in its representations. The representations are learned from sequence data alone. The learned representation
space has a multiscale organization reflecting structure from the level of biochemical properties of amino acids to
remote homology of proteins. Information about secondary and tertiary structure is encoded in the representations and
can be identified by linear projections. Representation learning produces features that generalize across a range of
applications, enabling state-of-the-art supervised prediction of mutational effect and secondary structure and
improving state-of-the-art features for long-range contact prediction.`),xa.forEach(o),qa.forEach(o),Wa=h(t),kn=s(t,"P",{});var Ca=a(kn);fi=l(Ca,`The abstract from
\u201CLanguage models of protein sequences at the scale of evolution enable accurate structure prediction\u201D is`),Ca.forEach(o),Ha=h(t),bn=s(t,"P",{});var ja=a(bn);us=s(ja,"EM",{});var Pa=a(us);ui=l(Pa,`Large language models have recently been shown to develop emergent capabilities with scale, going beyond
simple pattern matching to perform higher level reasoning and generate lifelike images and text. While
language models trained on protein sequences have been studied at a smaller scale, little is known about
what they learn about biology as they are scaled up. In this work we train models up to 15 billion parameters,
the largest language models of proteins to be evaluated to date. We find that as models are scaled they learn
information enabling the prediction of the three-dimensional structure of a protein at the resolution of
individual atoms. We present ESMFold for high accuracy end-to-end atomic level structure prediction directly
from the individual sequence of a protein. ESMFold has similar accuracy to AlphaFold2 and RoseTTAFold for
sequences with low perplexity that are well understood by the language model. ESMFold inference is an
order of magnitude faster than AlphaFold2, enabling exploration of the structural space of metagenomic
proteins in practical timescales.`),Pa.forEach(o),ja.forEach(o),Ka=h(t),vn=s(t,"P",{});var Sa=a(vn);gi=l(Sa,"Tips:"),Sa.forEach(o),Ba=h(t),Tn=s(t,"UL",{});var Aa=a(Tn);gs=s(Aa,"LI",{});var La=a(gs);_i=l(La,"ESM models are trained with a masked language modeling (MLM) objective."),La.forEach(o),Aa.forEach(o),Va=h(t),Q=s(t,"P",{});var se=a(Q);ki=l(se,"The original code can be found "),Rt=s(se,"A",{href:!0,rel:!0});var Na=a(Rt);bi=l(Na,"here"),Na.forEach(o),vi=l(se,` and was
was developed by the Fundamental AI Research team at Meta AI.
ESM-1b, ESM-1v and ESM-2 were contributed to huggingface by `),Wt=s(se,"A",{href:!0,rel:!0});var Mm=a(Wt);Ti=l(Mm,"jasonliu"),Mm.forEach(o),yi=l(se,`
and `),Ht=s(se,"A",{href:!0,rel:!0});var zm=a(Ht);wi=l(zm,"Matt"),zm.forEach(o),$i=l(se,"."),se.forEach(o),Za=h(t),ae=s(t,"P",{});var Jn=a(ae);Ei=l(Jn,"ESMFold was contributed to huggingface by "),Kt=s(Jn,"A",{href:!0,rel:!0});var qm=a(Kt);Fi=l(qm,"Matt"),qm.forEach(o),Mi=l(Jn,` and
`),Bt=s(Jn,"A",{href:!0,rel:!0});var xm=a(Bt);zi=l(xm,"Sylvain"),xm.forEach(o),qi=l(Jn,`, with a big thank you to Nikita Smetanin, Roshan Rao and Tom Sercu for their
help throughout the process!`),Jn.forEach(o),Ga=h(t),re=s(t,"P",{});var Qn=a(re);xi=l(Qn,"The HuggingFace port of ESMFold uses portions of the "),Vt=s(Qn,"A",{href:!0,rel:!0});var Cm=a(Vt);Ci=l(Cm,"openfold"),Cm.forEach(o),ji=l(Qn,` library.
The `),_s=s(Qn,"CODE",{});var jm=a(_s);Pi=l(jm,"openfold"),jm.forEach(o),Si=l(Qn," library is licensed under the Apache License 2.0."),Qn.forEach(o),Ja=h(t),we=s(t,"H2",{class:!0});var Tr=a(we);Qe=s(Tr,"A",{id:!0,class:!0,href:!0});var Pm=a(Qe);ks=s(Pm,"SPAN",{});var Sm=a(ks);T(Zt.$$.fragment,Sm),Sm.forEach(o),Pm.forEach(o),Ai=h(Tr),bs=s(Tr,"SPAN",{});var Am=a(bs);Li=l(Am,"Documentation resources"),Am.forEach(o),Tr.forEach(o),Qa=h(t),ie=s(t,"UL",{});var Yn=a(ie);vs=s(Yn,"LI",{});var Lm=a(vs);yn=s(Lm,"A",{href:!0});var Nm=a(yn);Ni=l(Nm,"Text classification task guide"),Nm.forEach(o),Lm.forEach(o),Di=h(Yn),Ts=s(Yn,"LI",{});var Dm=a(Ts);wn=s(Dm,"A",{href:!0});var Om=a(wn);Oi=l(Om,"Token classification task guide"),Om.forEach(o),Dm.forEach(o),Ii=h(Yn),ys=s(Yn,"LI",{});var Im=a(ys);$n=s(Im,"A",{href:!0});var Um=a($n);Ui=l(Um,"Masked language modeling task guide"),Um.forEach(o),Im.forEach(o),Yn.forEach(o),Ya=h(t),$e=s(t,"H2",{class:!0});var yr=a($e);Ye=s(yr,"A",{id:!0,class:!0,href:!0});var Rm=a(Ye);ws=s(Rm,"SPAN",{});var Wm=a(ws);T(Gt.$$.fragment,Wm),Wm.forEach(o),Rm.forEach(o),Ri=h(yr),$s=s(yr,"SPAN",{});var Hm=a($s);Wi=l(Hm,"EsmConfig"),Hm.forEach(o),yr.forEach(o),Xa=h(t),j=s(t,"DIV",{class:!0});var de=a(j);T(Jt.$$.fragment,de),Hi=h(de),Ee=s(de,"P",{});var Xn=a(Ee);Ki=l(Xn,"This is the configuration class to store the configuration of a "),Es=s(Xn,"CODE",{});var Km=a(Es);Bi=l(Km,"ESMModel"),Km.forEach(o),Vi=l(Xn,`. It is used to instantiate a ESM model
according to the specified arguments, defining the model architecture. Instantiating a configuration with the
defaults will yield a similar configuration to that of the ESM
`),Qt=s(Xn,"A",{href:!0,rel:!0});var Bm=a(Qt);Zi=l(Bm,"facebook/esm-1b"),Bm.forEach(o),Gi=l(Xn," architecture."),Xn.forEach(o),Ji=h(de),Fe=s(de,"P",{});var es=a(Fe);Qi=l(es,"Configuration objects inherit from "),En=s(es,"A",{href:!0});var Vm=a(En);Yi=l(Vm,"PretrainedConfig"),Vm.forEach(o),Xi=l(es,` and can be used to control the model outputs. Read the
documentation from `),Fn=s(es,"A",{href:!0});var Zm=a(Fn);el=l(Zm,"PretrainedConfig"),Zm.forEach(o),tl=l(es," for more information."),es.forEach(o),ol=h(de),T(Xe.$$.fragment,de),nl=h(de),et=s(de,"DIV",{class:!0});var wr=a(et);T(Yt.$$.fragment,wr),sl=h(wr),Xt=s(wr,"P",{});var $r=a(Xt);al=l($r,"Serializes this instance to a Python dictionary. Override the default "),Mn=s($r,"A",{href:!0});var Gm=a(Mn);rl=l(Gm,"to_dict()"),Gm.forEach(o),il=l($r,"."),$r.forEach(o),wr.forEach(o),de.forEach(o),er=h(t),Me=s(t,"H2",{class:!0});var Er=a(Me);tt=s(Er,"A",{id:!0,class:!0,href:!0});var Jm=a(tt);Fs=s(Jm,"SPAN",{});var Qm=a(Fs);T(eo.$$.fragment,Qm),Qm.forEach(o),Jm.forEach(o),ll=h(Er),Ms=s(Er,"SPAN",{});var Ym=a(Ms);dl=l(Ym,"EsmTokenizer"),Ym.forEach(o),Er.forEach(o),tr=h(t),x=s(t,"DIV",{class:!0});var ne=a(x);T(to.$$.fragment,ne),cl=h(ne),zs=s(ne,"P",{});var Xm=a(zs);pl=l(Xm,"Constructs an ESM tokenizer."),Xm.forEach(o),ml=h(ne),zn=s(ne,"DIV",{class:!0});var eh=a(zn);T(oo.$$.fragment,eh),eh.forEach(o),hl=h(ne),ot=s(ne,"DIV",{class:!0});var Fr=a(ot);T(no.$$.fragment,Fr),fl=h(Fr),ze=s(Fr,"P",{});var ts=a(ze);ul=l(ts,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),qs=s(ts,"CODE",{});var th=a(qs);gl=l(th,"prepare_for_model"),th.forEach(o),_l=l(ts," or "),xs=s(ts,"CODE",{});var oh=a(xs);kl=l(oh,"encode_plus"),oh.forEach(o),bl=l(ts," methods."),ts.forEach(o),Fr.forEach(o),vl=h(ne),le=s(ne,"DIV",{class:!0});var os=a(le);T(so.$$.fragment,os),Tl=h(os),qn=s(os,"P",{});var Fm=a(qn);yl=l(Fm,"Create the token type IDs corresponding to the sequences passed. "),xn=s(Fm,"A",{href:!0});var nh=a(xn);wl=l(nh,`What are token type
IDs?`),nh.forEach(o),Fm.forEach(o),$l=h(os),Cs=s(os,"P",{});var sh=a(Cs);El=l(sh,"Should be overridden in a subclass if the model has a special way of building those."),sh.forEach(o),os.forEach(o),Fl=h(ne),Cn=s(ne,"DIV",{class:!0});var ah=a(Cn);T(ao.$$.fragment,ah),ah.forEach(o),ne.forEach(o),or=h(t),qe=s(t,"H2",{class:!0});var Mr=a(qe);nt=s(Mr,"A",{id:!0,class:!0,href:!0});var rh=a(nt);js=s(rh,"SPAN",{});var ih=a(js);T(ro.$$.fragment,ih),ih.forEach(o),rh.forEach(o),Ml=h(Mr),Ps=s(Mr,"SPAN",{});var lh=a(Ps);zl=l(lh,"EsmModel"),lh.forEach(o),Mr.forEach(o),nr=h(t),q=s(t,"DIV",{class:!0});var K=a(q);T(io.$$.fragment,K),ql=h(K),Ss=s(K,"P",{});var dh=a(Ss);xl=l(dh,"The bare ESM Model transformer outputting raw hidden-states without any specific head on top."),dh.forEach(o),Cl=h(K),lo=s(K,"P",{});var zr=a(lo);jl=l(zr,"This model inherits from "),jn=s(zr,"A",{href:!0});var ch=a(jn);Pl=l(ch,"PreTrainedModel"),ch.forEach(o),Sl=l(zr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zr.forEach(o),Al=h(K),co=s(K,"P",{});var qr=a(co);Ll=l(qr,"This model is also a PyTorch "),po=s(qr,"A",{href:!0,rel:!0});var ph=a(po);Nl=l(ph,"torch.nn.Module"),ph.forEach(o),Dl=l(qr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qr.forEach(o),Ol=h(K),mo=s(K,"P",{});var xr=a(mo);Il=l(xr,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ho=s(xr,"A",{href:!0,rel:!0});var mh=a(ho);Ul=l(mh,`Attention is
all you need`),mh.forEach(o),Rl=l(xr,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),xr.forEach(o),Wl=h(K),C=s(K,"P",{});var B=a(C);Hl=l(B,"To behave as an decoder the model needs to be initialized with the "),As=s(B,"CODE",{});var hh=a(As);Kl=l(hh,"is_decoder"),hh.forEach(o),Bl=l(B,` argument of the configuration set
to `),Ls=s(B,"CODE",{});var fh=a(Ls);Vl=l(fh,"True"),fh.forEach(o),Zl=l(B,". To be used in a Seq2Seq model, the model needs to initialized with both "),Ns=s(B,"CODE",{});var uh=a(Ns);Gl=l(uh,"is_decoder"),uh.forEach(o),Jl=l(B,` argument and
`),Ds=s(B,"CODE",{});var gh=a(Ds);Ql=l(gh,"add_cross_attention"),gh.forEach(o),Yl=l(B," set to "),Os=s(B,"CODE",{});var _h=a(Os);Xl=l(_h,"True"),_h.forEach(o),ed=l(B,"; an "),Is=s(B,"CODE",{});var kh=a(Is);td=l(kh,"encoder_hidden_states"),kh.forEach(o),od=l(B," is then expected as an input to the forward pass."),B.forEach(o),nd=h(K),Y=s(K,"DIV",{class:!0});var St=a(Y);T(fo.$$.fragment,St),sd=h(St),xe=s(St,"P",{});var ns=a(xe);ad=l(ns,"The "),Pn=s(ns,"A",{href:!0});var bh=a(Pn);rd=l(bh,"EsmModel"),bh.forEach(o),id=l(ns," forward method, overrides the "),Us=s(ns,"CODE",{});var vh=a(Us);ld=l(vh,"__call__"),vh.forEach(o),dd=l(ns," special method."),ns.forEach(o),cd=h(St),T(st.$$.fragment,St),pd=h(St),T(at.$$.fragment,St),St.forEach(o),K.forEach(o),sr=h(t),Ce=s(t,"H2",{class:!0});var Cr=a(Ce);rt=s(Cr,"A",{id:!0,class:!0,href:!0});var Th=a(rt);Rs=s(Th,"SPAN",{});var yh=a(Rs);T(uo.$$.fragment,yh),yh.forEach(o),Th.forEach(o),md=h(Cr),Ws=s(Cr,"SPAN",{});var wh=a(Ws);hd=l(wh,"EsmForMaskedLM"),wh.forEach(o),Cr.forEach(o),ar=h(t),P=s(t,"DIV",{class:!0});var ce=a(P);T(go.$$.fragment,ce),fd=h(ce),_o=s(ce,"P",{});var jr=a(_o);ud=l(jr,"ESM Model with a "),Hs=s(jr,"CODE",{});var $h=a(Hs);gd=l($h,"language modeling"),$h.forEach(o),_d=l(jr," head on top."),jr.forEach(o),kd=h(ce),ko=s(ce,"P",{});var Pr=a(ko);bd=l(Pr,"This model inherits from "),Sn=s(Pr,"A",{href:!0});var Eh=a(Sn);vd=l(Eh,"PreTrainedModel"),Eh.forEach(o),Td=l(Pr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pr.forEach(o),yd=h(ce),bo=s(ce,"P",{});var Sr=a(bo);wd=l(Sr,"This model is also a PyTorch "),vo=s(Sr,"A",{href:!0,rel:!0});var Fh=a(vo);$d=l(Fh,"torch.nn.Module"),Fh.forEach(o),Ed=l(Sr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sr.forEach(o),Fd=h(ce),X=s(ce,"DIV",{class:!0});var At=a(X);T(To.$$.fragment,At),Md=h(At),je=s(At,"P",{});var ss=a(je);zd=l(ss,"The "),An=s(ss,"A",{href:!0});var Mh=a(An);qd=l(Mh,"EsmForMaskedLM"),Mh.forEach(o),xd=l(ss," forward method, overrides the "),Ks=s(ss,"CODE",{});var zh=a(Ks);Cd=l(zh,"__call__"),zh.forEach(o),jd=l(ss," special method."),ss.forEach(o),Pd=h(At),T(it.$$.fragment,At),Sd=h(At),T(lt.$$.fragment,At),At.forEach(o),ce.forEach(o),rr=h(t),Pe=s(t,"H2",{class:!0});var Ar=a(Pe);dt=s(Ar,"A",{id:!0,class:!0,href:!0});var qh=a(dt);Bs=s(qh,"SPAN",{});var xh=a(Bs);T(yo.$$.fragment,xh),xh.forEach(o),qh.forEach(o),Ad=h(Ar),Vs=s(Ar,"SPAN",{});var Ch=a(Vs);Ld=l(Ch,"EsmForSequenceClassification"),Ch.forEach(o),Ar.forEach(o),ir=h(t),S=s(t,"DIV",{class:!0});var pe=a(S);T(wo.$$.fragment,pe),Nd=h(pe),Zs=s(pe,"P",{});var jh=a(Zs);Dd=l(jh,`ESM Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),jh.forEach(o),Od=h(pe),$o=s(pe,"P",{});var Lr=a($o);Id=l(Lr,"This model inherits from "),Ln=s(Lr,"A",{href:!0});var Ph=a(Ln);Ud=l(Ph,"PreTrainedModel"),Ph.forEach(o),Rd=l(Lr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Lr.forEach(o),Wd=h(pe),Eo=s(pe,"P",{});var Nr=a(Eo);Hd=l(Nr,"This model is also a PyTorch "),Fo=s(Nr,"A",{href:!0,rel:!0});var Sh=a(Fo);Kd=l(Sh,"torch.nn.Module"),Sh.forEach(o),Bd=l(Nr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nr.forEach(o),Vd=h(pe),U=s(pe,"DIV",{class:!0});var me=a(U);T(Mo.$$.fragment,me),Zd=h(me),Se=s(me,"P",{});var as=a(Se);Gd=l(as,"The "),Nn=s(as,"A",{href:!0});var Ah=a(Nn);Jd=l(Ah,"EsmForSequenceClassification"),Ah.forEach(o),Qd=l(as," forward method, overrides the "),Gs=s(as,"CODE",{});var Lh=a(Gs);Yd=l(Lh,"__call__"),Lh.forEach(o),Xd=l(as," special method."),as.forEach(o),ec=h(me),T(ct.$$.fragment,me),tc=h(me),T(pt.$$.fragment,me),oc=h(me),T(mt.$$.fragment,me),me.forEach(o),pe.forEach(o),lr=h(t),Ae=s(t,"H2",{class:!0});var Dr=a(Ae);ht=s(Dr,"A",{id:!0,class:!0,href:!0});var Nh=a(ht);Js=s(Nh,"SPAN",{});var Dh=a(Js);T(zo.$$.fragment,Dh),Dh.forEach(o),Nh.forEach(o),nc=h(Dr),Qs=s(Dr,"SPAN",{});var Oh=a(Qs);sc=l(Oh,"EsmForTokenClassification"),Oh.forEach(o),Dr.forEach(o),dr=h(t),A=s(t,"DIV",{class:!0});var he=a(A);T(qo.$$.fragment,he),ac=h(he),Ys=s(he,"P",{});var Ih=a(Ys);rc=l(Ih,`ESM 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.`),Ih.forEach(o),ic=h(he),xo=s(he,"P",{});var Or=a(xo);lc=l(Or,"This model inherits from "),Dn=s(Or,"A",{href:!0});var Uh=a(Dn);dc=l(Uh,"PreTrainedModel"),Uh.forEach(o),cc=l(Or,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Or.forEach(o),pc=h(he),Co=s(he,"P",{});var Ir=a(Co);mc=l(Ir,"This model is also a PyTorch "),jo=s(Ir,"A",{href:!0,rel:!0});var Rh=a(jo);hc=l(Rh,"torch.nn.Module"),Rh.forEach(o),fc=l(Ir,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ir.forEach(o),uc=h(he),ee=s(he,"DIV",{class:!0});var Lt=a(ee);T(Po.$$.fragment,Lt),gc=h(Lt),Le=s(Lt,"P",{});var rs=a(Le);_c=l(rs,"The "),On=s(rs,"A",{href:!0});var Wh=a(On);kc=l(Wh,"EsmForTokenClassification"),Wh.forEach(o),bc=l(rs," forward method, overrides the "),Xs=s(rs,"CODE",{});var Hh=a(Xs);vc=l(Hh,"__call__"),Hh.forEach(o),Tc=l(rs," special method."),rs.forEach(o),yc=h(Lt),T(ft.$$.fragment,Lt),wc=h(Lt),T(ut.$$.fragment,Lt),Lt.forEach(o),he.forEach(o),cr=h(t),Ne=s(t,"H2",{class:!0});var Ur=a(Ne);gt=s(Ur,"A",{id:!0,class:!0,href:!0});var Kh=a(gt);ea=s(Kh,"SPAN",{});var Bh=a(ea);T(So.$$.fragment,Bh),Bh.forEach(o),Kh.forEach(o),$c=h(Ur),ta=s(Ur,"SPAN",{});var Vh=a(ta);Ec=l(Vh,"EsmForProteinFolding"),Vh.forEach(o),Ur.forEach(o),pr=h(t),L=s(t,"DIV",{class:!0});var fe=a(L);T(Ao.$$.fragment,fe),Fc=h(fe),oa=s(fe,"P",{});var Zh=a(oa);Mc=l(Zh,`ESMForProteinFolding is the HuggingFace port of the original ESMFold model. It consists of an ESM-2 \u201Cstem\u201D followed
by a protein folding \u201Chead\u201D, although unlike most other output heads, this \u201Chead\u201D is similar in size and runtime to
the rest of the model combined! It outputs a dictionary containing predicted structural information about the input
protein(s).`),Zh.forEach(o),zc=h(fe),Lo=s(fe,"P",{});var Rr=a(Lo);qc=l(Rr,"This model inherits from "),In=s(Rr,"A",{href:!0});var Gh=a(In);xc=l(Gh,"PreTrainedModel"),Gh.forEach(o),Cc=l(Rr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Rr.forEach(o),jc=h(fe),No=s(fe,"P",{});var Wr=a(No);Pc=l(Wr,"This model is also a PyTorch "),Do=s(Wr,"A",{href:!0,rel:!0});var Jh=a(Do);Sc=l(Jh,"torch.nn.Module"),Jh.forEach(o),Ac=l(Wr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Wr.forEach(o),Lc=h(fe),te=s(fe,"DIV",{class:!0});var Nt=a(te);T(Oo.$$.fragment,Nt),Nc=h(Nt),De=s(Nt,"P",{});var is=a(De);Dc=l(is,"The "),Un=s(is,"A",{href:!0});var Qh=a(Un);Oc=l(Qh,"EsmForProteinFolding"),Qh.forEach(o),Ic=l(is," forward method, overrides the "),na=s(is,"CODE",{});var Yh=a(na);Uc=l(Yh,"__call__"),Yh.forEach(o),Rc=l(is," special method."),is.forEach(o),Wc=h(Nt),T(_t.$$.fragment,Nt),Hc=h(Nt),T(kt.$$.fragment,Nt),Nt.forEach(o),fe.forEach(o),mr=h(t),Oe=s(t,"H2",{class:!0});var Hr=a(Oe);bt=s(Hr,"A",{id:!0,class:!0,href:!0});var Xh=a(bt);sa=s(Xh,"SPAN",{});var ef=a(sa);T(Io.$$.fragment,ef),ef.forEach(o),Xh.forEach(o),Kc=h(Hr),aa=s(Hr,"SPAN",{});var tf=a(aa);Bc=l(tf,"TFEsmModel"),tf.forEach(o),Hr.forEach(o),hr=h(t),N=s(t,"DIV",{class:!0});var ue=a(N);T(Uo.$$.fragment,ue),Vc=h(ue),ra=s(ue,"P",{});var of=a(ra);Zc=l(of,"The bare ESM Model transformer outputting raw hidden-states without any specific head on top."),of.forEach(o),Gc=h(ue),Ro=s(ue,"P",{});var Kr=a(Ro);Jc=l(Kr,"This model inherits from "),Rn=s(Kr,"A",{href:!0});var nf=a(Rn);Qc=l(nf,"TFPreTrainedModel"),nf.forEach(o),Yc=l(Kr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kr.forEach(o),Xc=h(ue),Wo=s(ue,"P",{});var Br=a(Wo);ep=l(Br,"This model is also a Keras "),Ho=s(Br,"A",{href:!0,rel:!0});var sf=a(Ho);tp=l(sf,"Model"),sf.forEach(o),op=l(Br,` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),Br.forEach(o),np=h(ue),oe=s(ue,"DIV",{class:!0});var Dt=a(oe);T(Ko.$$.fragment,Dt),sp=h(Dt),Ie=s(Dt,"P",{});var ls=a(Ie);ap=l(ls,"The "),Wn=s(ls,"A",{href:!0});var af=a(Wn);rp=l(af,"TFEsmModel"),af.forEach(o),ip=l(ls," forward method, overrides the "),ia=s(ls,"CODE",{});var rf=a(ia);lp=l(rf,"__call__"),rf.forEach(o),dp=l(ls," special method."),ls.forEach(o),cp=h(Dt),T(vt.$$.fragment,Dt),pp=h(Dt),T(Tt.$$.fragment,Dt),Dt.forEach(o),ue.forEach(o),fr=h(t),Ue=s(t,"H2",{class:!0});var Vr=a(Ue);yt=s(Vr,"A",{id:!0,class:!0,href:!0});var lf=a(yt);la=s(lf,"SPAN",{});var df=a(la);T(Bo.$$.fragment,df),df.forEach(o),lf.forEach(o),mp=h(Vr),da=s(Vr,"SPAN",{});var cf=a(da);hp=l(cf,"TFEsmForMaskedLM"),cf.forEach(o),Vr.forEach(o),ur=h(t),D=s(t,"DIV",{class:!0});var ge=a(D);T(Vo.$$.fragment,ge),fp=h(ge),Zo=s(ge,"P",{});var Zr=a(Zo);up=l(Zr,"ESM Model with a "),ca=s(Zr,"CODE",{});var pf=a(ca);gp=l(pf,"language modeling"),pf.forEach(o),_p=l(Zr," head on top."),Zr.forEach(o),kp=h(ge),Go=s(ge,"P",{});var Gr=a(Go);bp=l(Gr,"This model inherits from "),Hn=s(Gr,"A",{href:!0});var mf=a(Hn);vp=l(mf,"TFPreTrainedModel"),mf.forEach(o),Tp=l(Gr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gr.forEach(o),yp=h(ge),Jo=s(ge,"P",{});var Jr=a(Jo);wp=l(Jr,"This model is also a Keras "),Qo=s(Jr,"A",{href:!0,rel:!0});var hf=a(Qo);$p=l(hf,"Model"),hf.forEach(o),Ep=l(Jr,` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),Jr.forEach(o),Fp=h(ge),R=s(ge,"DIV",{class:!0});var _e=a(R);T(Yo.$$.fragment,_e),Mp=h(_e),Re=s(_e,"P",{});var ds=a(Re);zp=l(ds,"The "),Kn=s(ds,"A",{href:!0});var ff=a(Kn);qp=l(ff,"TFEsmForMaskedLM"),ff.forEach(o),xp=l(ds," forward method, overrides the "),pa=s(ds,"CODE",{});var uf=a(pa);Cp=l(uf,"__call__"),uf.forEach(o),jp=l(ds," special method."),ds.forEach(o),Pp=h(_e),T(wt.$$.fragment,_e),Sp=h(_e),T($t.$$.fragment,_e),Ap=h(_e),T(Et.$$.fragment,_e),_e.forEach(o),ge.forEach(o),gr=h(t),We=s(t,"H2",{class:!0});var Qr=a(We);Ft=s(Qr,"A",{id:!0,class:!0,href:!0});var gf=a(Ft);ma=s(gf,"SPAN",{});var _f=a(ma);T(Xo.$$.fragment,_f),_f.forEach(o),gf.forEach(o),Lp=h(Qr),ha=s(Qr,"SPAN",{});var kf=a(ha);Np=l(kf,"TFEsmForSequenceClassification"),kf.forEach(o),Qr.forEach(o),_r=h(t),O=s(t,"DIV",{class:!0});var ke=a(O);T(en.$$.fragment,ke),Dp=h(ke),fa=s(ke,"P",{});var bf=a(fa);Op=l(bf,`ESM Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),bf.forEach(o),Ip=h(ke),tn=s(ke,"P",{});var Yr=a(tn);Up=l(Yr,"This model inherits from "),Bn=s(Yr,"A",{href:!0});var vf=a(Bn);Rp=l(vf,"TFPreTrainedModel"),vf.forEach(o),Wp=l(Yr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yr.forEach(o),Hp=h(ke),on=s(ke,"P",{});var Xr=a(on);Kp=l(Xr,"This model is also a Keras "),nn=s(Xr,"A",{href:!0,rel:!0});var Tf=a(nn);Bp=l(Tf,"Model"),Tf.forEach(o),Vp=l(Xr,` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),Xr.forEach(o),Zp=h(ke),W=s(ke,"DIV",{class:!0});var be=a(W);T(sn.$$.fragment,be),Gp=h(be),He=s(be,"P",{});var cs=a(He);Jp=l(cs,"The "),Vn=s(cs,"A",{href:!0});var yf=a(Vn);Qp=l(yf,"TFEsmForSequenceClassification"),yf.forEach(o),Yp=l(cs," forward method, overrides the "),ua=s(cs,"CODE",{});var wf=a(ua);Xp=l(wf,"__call__"),wf.forEach(o),em=l(cs," special method."),cs.forEach(o),tm=h(be),T(Mt.$$.fragment,be),om=h(be),T(zt.$$.fragment,be),nm=h(be),T(qt.$$.fragment,be),be.forEach(o),ke.forEach(o),kr=h(t),Ke=s(t,"H2",{class:!0});var ei=a(Ke);xt=s(ei,"A",{id:!0,class:!0,href:!0});var $f=a(xt);ga=s($f,"SPAN",{});var Ef=a(ga);T(an.$$.fragment,Ef),Ef.forEach(o),$f.forEach(o),sm=h(ei),_a=s(ei,"SPAN",{});var Ff=a(_a);am=l(Ff,"TFEsmForTokenClassification"),Ff.forEach(o),ei.forEach(o),br=h(t),I=s(t,"DIV",{class:!0});var ve=a(I);T(rn.$$.fragment,ve),rm=h(ve),ka=s(ve,"P",{});var Mf=a(ka);im=l(Mf,`ESM 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.`),Mf.forEach(o),lm=h(ve),ln=s(ve,"P",{});var ti=a(ln);dm=l(ti,"This model inherits from "),Zn=s(ti,"A",{href:!0});var zf=a(Zn);cm=l(zf,"TFPreTrainedModel"),zf.forEach(o),pm=l(ti,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),ti.forEach(o),mm=h(ve),dn=s(ve,"P",{});var oi=a(dn);hm=l(oi,"This model is also a Keras "),cn=s(oi,"A",{href:!0,rel:!0});var qf=a(cn);fm=l(qf,"Model"),qf.forEach(o),um=l(oi,` subclass. Use it as a
regular Keras model and refer to the TF/Keras documentation for all matters related to general usage and behavior.`),oi.forEach(o),gm=h(ve),H=s(ve,"DIV",{class:!0});var Te=a(H);T(pn.$$.fragment,Te),_m=h(Te),Be=s(Te,"P",{});var ps=a(Be);km=l(ps,"The "),Gn=s(ps,"A",{href:!0});var xf=a(Gn);bm=l(xf,"TFEsmForTokenClassification"),xf.forEach(o),vm=l(ps," forward method, overrides the "),ba=s(ps,"CODE",{});var Cf=a(ba);Tm=l(Cf,"__call__"),Cf.forEach(o),ym=l(ps," special method."),ps.forEach(o),wm=h(Te),T(Ct.$$.fragment,Te),$m=h(Te),T(jt.$$.fragment,Te),Em=h(Te),T(Pt.$$.fragment,Te),Te.forEach(o),ve.forEach(o),this.h()},h(){p(d,"name","hf:doc:metadata"),p(d,"content",JSON.stringify(iu)),p(u,"id","esm"),p(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"),p(u,"href","#esm"),p(c,"class","relative group"),p(Ze,"id","overview"),p(Ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ze,"href","#overview"),p(ye,"class","relative group"),p(It,"href","https://doi.org/10.1101/2022.07.20.500902"),p(It,"rel","nofollow"),p(Ut,"href","https://www.nature.com/articles/s41586-021-03819-2"),p(Ut,"rel","nofollow"),p(Rt,"href","https://github.com/facebookresearch/esm"),p(Rt,"rel","nofollow"),p(Wt,"href","https://huggingface.co/jasonliu"),p(Wt,"rel","nofollow"),p(Ht,"href","https://huggingface.co/Rocketknight1"),p(Ht,"rel","nofollow"),p(Kt,"href","https://huggingface.co/Rocketknight1"),p(Kt,"rel","nofollow"),p(Bt,"href","https://huggingface.co/sgugger"),p(Bt,"rel","nofollow"),p(Vt,"href","https://github.com/aqlaboratory/openfold"),p(Vt,"rel","nofollow"),p(Qe,"id","documentation-resources"),p(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"),p(Qe,"href","#documentation-resources"),p(we,"class","relative group"),p(yn,"href","./tasks/sequence_classification"),p(wn,"href","./tasks/token_classification"),p($n,"href","./tasks/masked_language_modeling"),p(Ye,"id","transformers.EsmConfig"),p(Ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ye,"href","#transformers.EsmConfig"),p($e,"class","relative group"),p(Qt,"href","https://huggingface.co/facebook/esm-1b"),p(Qt,"rel","nofollow"),p(En,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(Fn,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(Mn,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig.to_dict"),p(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(tt,"id","transformers.EsmTokenizer"),p(tt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(tt,"href","#transformers.EsmTokenizer"),p(Me,"class","relative group"),p(zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xn,"href","../glossary#token-type-ids"),p(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(nt,"id","transformers.EsmModel"),p(nt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(nt,"href","#transformers.EsmModel"),p(qe,"class","relative group"),p(jn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(po,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(po,"rel","nofollow"),p(ho,"href","https://arxiv.org/abs/1706.03762"),p(ho,"rel","nofollow"),p(Pn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmModel"),p(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(rt,"id","transformers.EsmForMaskedLM"),p(rt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(rt,"href","#transformers.EsmForMaskedLM"),p(Ce,"class","relative group"),p(Sn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(vo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(vo,"rel","nofollow"),p(An,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmForMaskedLM"),p(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(dt,"id","transformers.EsmForSequenceClassification"),p(dt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(dt,"href","#transformers.EsmForSequenceClassification"),p(Pe,"class","relative group"),p(Ln,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Fo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Fo,"rel","nofollow"),p(Nn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmForSequenceClassification"),p(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(ht,"id","transformers.EsmForTokenClassification"),p(ht,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(ht,"href","#transformers.EsmForTokenClassification"),p(Ae,"class","relative group"),p(Dn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(jo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(jo,"rel","nofollow"),p(On,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmForTokenClassification"),p(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(gt,"id","transformers.EsmForProteinFolding"),p(gt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(gt,"href","#transformers.EsmForProteinFolding"),p(Ne,"class","relative group"),p(In,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Do,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Do,"rel","nofollow"),p(Un,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.EsmForProteinFolding"),p(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(bt,"id","transformers.TFEsmModel"),p(bt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(bt,"href","#transformers.TFEsmModel"),p(Oe,"class","relative group"),p(Rn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(Ho,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(Ho,"rel","nofollow"),p(Wn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.TFEsmModel"),p(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(yt,"id","transformers.TFEsmForMaskedLM"),p(yt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(yt,"href","#transformers.TFEsmForMaskedLM"),p(Ue,"class","relative group"),p(Hn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(Qo,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(Qo,"rel","nofollow"),p(Kn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.TFEsmForMaskedLM"),p(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Ft,"id","transformers.TFEsmForSequenceClassification"),p(Ft,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Ft,"href","#transformers.TFEsmForSequenceClassification"),p(We,"class","relative group"),p(Bn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(nn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(nn,"rel","nofollow"),p(Vn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.TFEsmForSequenceClassification"),p(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(xt,"id","transformers.TFEsmForTokenClassification"),p(xt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(xt,"href","#transformers.TFEsmForTokenClassification"),p(Ke,"class","relative group"),p(Zn,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),p(cn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),p(cn,"rel","nofollow"),p(Gn,"href","/docs/transformers/v4.27.1/en/model_doc/esm#transformers.TFEsmForTokenClassification"),p(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),_(t,k,g),_(t,c,g),e(c,u),e(u,b),y(r,b,null),e(c,f),e(c,M),e(M,ni),_(t,Da,g),_(t,ye,g),e(ye,Ze),e(Ze,ms),y(Ot,ms,null),e(ye,si),e(ye,hs),e(hs,ai),_(t,Oa,g),_(t,Ge,g),e(Ge,ri),e(Ge,It),e(It,ii),e(Ge,li),_(t,Ia,g),_(t,Je,g),e(Je,di),e(Je,Ut),e(Ut,ci),e(Je,pi),_(t,Ua,g),_(t,gn,g),e(gn,mi),_(t,Ra,g),_(t,_n,g),e(_n,fs),e(fs,hi),_(t,Wa,g),_(t,kn,g),e(kn,fi),_(t,Ha,g),_(t,bn,g),e(bn,us),e(us,ui),_(t,Ka,g),_(t,vn,g),e(vn,gi),_(t,Ba,g),_(t,Tn,g),e(Tn,gs),e(gs,_i),_(t,Va,g),_(t,Q,g),e(Q,ki),e(Q,Rt),e(Rt,bi),e(Q,vi),e(Q,Wt),e(Wt,Ti),e(Q,yi),e(Q,Ht),e(Ht,wi),e(Q,$i),_(t,Za,g),_(t,ae,g),e(ae,Ei),e(ae,Kt),e(Kt,Fi),e(ae,Mi),e(ae,Bt),e(Bt,zi),e(ae,qi),_(t,Ga,g),_(t,re,g),e(re,xi),e(re,Vt),e(Vt,Ci),e(re,ji),e(re,_s),e(_s,Pi),e(re,Si),_(t,Ja,g),_(t,we,g),e(we,Qe),e(Qe,ks),y(Zt,ks,null),e(we,Ai),e(we,bs),e(bs,Li),_(t,Qa,g),_(t,ie,g),e(ie,vs),e(vs,yn),e(yn,Ni),e(ie,Di),e(ie,Ts),e(Ts,wn),e(wn,Oi),e(ie,Ii),e(ie,ys),e(ys,$n),e($n,Ui),_(t,Ya,g),_(t,$e,g),e($e,Ye),e(Ye,ws),y(Gt,ws,null),e($e,Ri),e($e,$s),e($s,Wi),_(t,Xa,g),_(t,j,g),y(Jt,j,null),e(j,Hi),e(j,Ee),e(Ee,Ki),e(Ee,Es),e(Es,Bi),e(Ee,Vi),e(Ee,Qt),e(Qt,Zi),e(Ee,Gi),e(j,Ji),e(j,Fe),e(Fe,Qi),e(Fe,En),e(En,Yi),e(Fe,Xi),e(Fe,Fn),e(Fn,el),e(Fe,tl),e(j,ol),y(Xe,j,null),e(j,nl),e(j,et),y(Yt,et,null),e(et,sl),e(et,Xt),e(Xt,al),e(Xt,Mn),e(Mn,rl),e(Xt,il),_(t,er,g),_(t,Me,g),e(Me,tt),e(tt,Fs),y(eo,Fs,null),e(Me,ll),e(Me,Ms),e(Ms,dl),_(t,tr,g),_(t,x,g),y(to,x,null),e(x,cl),e(x,zs),e(zs,pl),e(x,ml),e(x,zn),y(oo,zn,null),e(x,hl),e(x,ot),y(no,ot,null),e(ot,fl),e(ot,ze),e(ze,ul),e(ze,qs),e(qs,gl),e(ze,_l),e(ze,xs),e(xs,kl),e(ze,bl),e(x,vl),e(x,le),y(so,le,null),e(le,Tl),e(le,qn),e(qn,yl),e(qn,xn),e(xn,wl),e(le,$l),e(le,Cs),e(Cs,El),e(x,Fl),e(x,Cn),y(ao,Cn,null),_(t,or,g),_(t,qe,g),e(qe,nt),e(nt,js),y(ro,js,null),e(qe,Ml),e(qe,Ps),e(Ps,zl),_(t,nr,g),_(t,q,g),y(io,q,null),e(q,ql),e(q,Ss),e(Ss,xl),e(q,Cl),e(q,lo),e(lo,jl),e(lo,jn),e(jn,Pl),e(lo,Sl),e(q,Al),e(q,co),e(co,Ll),e(co,po),e(po,Nl),e(co,Dl),e(q,Ol),e(q,mo),e(mo,Il),e(mo,ho),e(ho,Ul),e(mo,Rl),e(q,Wl),e(q,C),e(C,Hl),e(C,As),e(As,Kl),e(C,Bl),e(C,Ls),e(Ls,Vl),e(C,Zl),e(C,Ns),e(Ns,Gl),e(C,Jl),e(C,Ds),e(Ds,Ql),e(C,Yl),e(C,Os),e(Os,Xl),e(C,ed),e(C,Is),e(Is,td),e(C,od),e(q,nd),e(q,Y),y(fo,Y,null),e(Y,sd),e(Y,xe),e(xe,ad),e(xe,Pn),e(Pn,rd),e(xe,id),e(xe,Us),e(Us,ld),e(xe,dd),e(Y,cd),y(st,Y,null),e(Y,pd),y(at,Y,null),_(t,sr,g),_(t,Ce,g),e(Ce,rt),e(rt,Rs),y(uo,Rs,null),e(Ce,md),e(Ce,Ws),e(Ws,hd),_(t,ar,g),_(t,P,g),y(go,P,null),e(P,fd),e(P,_o),e(_o,ud),e(_o,Hs),e(Hs,gd),e(_o,_d),e(P,kd),e(P,ko),e(ko,bd),e(ko,Sn),e(Sn,vd),e(ko,Td),e(P,yd),e(P,bo),e(bo,wd),e(bo,vo),e(vo,$d),e(bo,Ed),e(P,Fd),e(P,X),y(To,X,null),e(X,Md),e(X,je),e(je,zd),e(je,An),e(An,qd),e(je,xd),e(je,Ks),e(Ks,Cd),e(je,jd),e(X,Pd),y(it,X,null),e(X,Sd),y(lt,X,null),_(t,rr,g),_(t,Pe,g),e(Pe,dt),e(dt,Bs),y(yo,Bs,null),e(Pe,Ad),e(Pe,Vs),e(Vs,Ld),_(t,ir,g),_(t,S,g),y(wo,S,null),e(S,Nd),e(S,Zs),e(Zs,Dd),e(S,Od),e(S,$o),e($o,Id),e($o,Ln),e(Ln,Ud),e($o,Rd),e(S,Wd),e(S,Eo),e(Eo,Hd),e(Eo,Fo),e(Fo,Kd),e(Eo,Bd),e(S,Vd),e(S,U),y(Mo,U,null),e(U,Zd),e(U,Se),e(Se,Gd),e(Se,Nn),e(Nn,Jd),e(Se,Qd),e(Se,Gs),e(Gs,Yd),e(Se,Xd),e(U,ec),y(ct,U,null),e(U,tc),y(pt,U,null),e(U,oc),y(mt,U,null),_(t,lr,g),_(t,Ae,g),e(Ae,ht),e(ht,Js),y(zo,Js,null),e(Ae,nc),e(Ae,Qs),e(Qs,sc),_(t,dr,g),_(t,A,g),y(qo,A,null),e(A,ac),e(A,Ys),e(Ys,rc),e(A,ic),e(A,xo),e(xo,lc),e(xo,Dn),e(Dn,dc),e(xo,cc),e(A,pc),e(A,Co),e(Co,mc),e(Co,jo),e(jo,hc),e(Co,fc),e(A,uc),e(A,ee),y(Po,ee,null),e(ee,gc),e(ee,Le),e(Le,_c),e(Le,On),e(On,kc),e(Le,bc),e(Le,Xs),e(Xs,vc),e(Le,Tc),e(ee,yc),y(ft,ee,null),e(ee,wc),y(ut,ee,null),_(t,cr,g),_(t,Ne,g),e(Ne,gt),e(gt,ea),y(So,ea,null),e(Ne,$c),e(Ne,ta),e(ta,Ec),_(t,pr,g),_(t,L,g),y(Ao,L,null),e(L,Fc),e(L,oa),e(oa,Mc),e(L,zc),e(L,Lo),e(Lo,qc),e(Lo,In),e(In,xc),e(Lo,Cc),e(L,jc),e(L,No),e(No,Pc),e(No,Do),e(Do,Sc),e(No,Ac),e(L,Lc),e(L,te),y(Oo,te,null),e(te,Nc),e(te,De),e(De,Dc),e(De,Un),e(Un,Oc),e(De,Ic),e(De,na),e(na,Uc),e(De,Rc),e(te,Wc),y(_t,te,null),e(te,Hc),y(kt,te,null),_(t,mr,g),_(t,Oe,g),e(Oe,bt),e(bt,sa),y(Io,sa,null),e(Oe,Kc),e(Oe,aa),e(aa,Bc),_(t,hr,g),_(t,N,g),y(Uo,N,null),e(N,Vc),e(N,ra),e(ra,Zc),e(N,Gc),e(N,Ro),e(Ro,Jc),e(Ro,Rn),e(Rn,Qc),e(Ro,Yc),e(N,Xc),e(N,Wo),e(Wo,ep),e(Wo,Ho),e(Ho,tp),e(Wo,op),e(N,np),e(N,oe),y(Ko,oe,null),e(oe,sp),e(oe,Ie),e(Ie,ap),e(Ie,Wn),e(Wn,rp),e(Ie,ip),e(Ie,ia),e(ia,lp),e(Ie,dp),e(oe,cp),y(vt,oe,null),e(oe,pp),y(Tt,oe,null),_(t,fr,g),_(t,Ue,g),e(Ue,yt),e(yt,la),y(Bo,la,null),e(Ue,mp),e(Ue,da),e(da,hp),_(t,ur,g),_(t,D,g),y(Vo,D,null),e(D,fp),e(D,Zo),e(Zo,up),e(Zo,ca),e(ca,gp),e(Zo,_p),e(D,kp),e(D,Go),e(Go,bp),e(Go,Hn),e(Hn,vp),e(Go,Tp),e(D,yp),e(D,Jo),e(Jo,wp),e(Jo,Qo),e(Qo,$p),e(Jo,Ep),e(D,Fp),e(D,R),y(Yo,R,null),e(R,Mp),e(R,Re),e(Re,zp),e(Re,Kn),e(Kn,qp),e(Re,xp),e(Re,pa),e(pa,Cp),e(Re,jp),e(R,Pp),y(wt,R,null),e(R,Sp),y($t,R,null),e(R,Ap),y(Et,R,null),_(t,gr,g),_(t,We,g),e(We,Ft),e(Ft,ma),y(Xo,ma,null),e(We,Lp),e(We,ha),e(ha,Np),_(t,_r,g),_(t,O,g),y(en,O,null),e(O,Dp),e(O,fa),e(fa,Op),e(O,Ip),e(O,tn),e(tn,Up),e(tn,Bn),e(Bn,Rp),e(tn,Wp),e(O,Hp),e(O,on),e(on,Kp),e(on,nn),e(nn,Bp),e(on,Vp),e(O,Zp),e(O,W),y(sn,W,null),e(W,Gp),e(W,He),e(He,Jp),e(He,Vn),e(Vn,Qp),e(He,Yp),e(He,ua),e(ua,Xp),e(He,em),e(W,tm),y(Mt,W,null),e(W,om),y(zt,W,null),e(W,nm),y(qt,W,null),_(t,kr,g),_(t,Ke,g),e(Ke,xt),e(xt,ga),y(an,ga,null),e(Ke,sm),e(Ke,_a),e(_a,am),_(t,br,g),_(t,I,g),y(rn,I,null),e(I,rm),e(I,ka),e(ka,im),e(I,lm),e(I,ln),e(ln,dm),e(ln,Zn),e(Zn,cm),e(ln,pm),e(I,mm),e(I,dn),e(dn,hm),e(dn,cn),e(cn,fm),e(dn,um),e(I,gm),e(I,H),y(pn,H,null),e(H,_m),e(H,Be),e(Be,km),e(Be,Gn),e(Gn,bm),e(Be,vm),e(Be,ba),e(ba,Tm),e(Be,ym),e(H,wm),y(Ct,H,null),e(H,$m),y(jt,H,null),e(H,Em),y(Pt,H,null),vr=!0},p(t,[g]){const mn={};g&2&&(mn.$$scope={dirty:g,ctx:t}),Xe.$set(mn);const va={};g&2&&(va.$$scope={dirty:g,ctx:t}),st.$set(va);const Ta={};g&2&&(Ta.$$scope={dirty:g,ctx:t}),at.$set(Ta);const ya={};g&2&&(ya.$$scope={dirty:g,ctx:t}),it.$set(ya);const hn={};g&2&&(hn.$$scope={dirty:g,ctx:t}),lt.$set(hn);const wa={};g&2&&(wa.$$scope={dirty:g,ctx:t}),ct.$set(wa);const $a={};g&2&&($a.$$scope={dirty:g,ctx:t}),pt.$set($a);const Ea={};g&2&&(Ea.$$scope={dirty:g,ctx:t}),mt.$set(Ea);const fn={};g&2&&(fn.$$scope={dirty:g,ctx:t}),ft.$set(fn);const Fa={};g&2&&(Fa.$$scope={dirty:g,ctx:t}),ut.$set(Fa);const un={};g&2&&(un.$$scope={dirty:g,ctx:t}),_t.$set(un);const Ma={};g&2&&(Ma.$$scope={dirty:g,ctx:t}),kt.$set(Ma);const za={};g&2&&(za.$$scope={dirty:g,ctx:t}),vt.$set(za);const qa={};g&2&&(qa.$$scope={dirty:g,ctx:t}),Tt.$set(qa);const xa={};g&2&&(xa.$$scope={dirty:g,ctx:t}),wt.$set(xa);const Ca={};g&2&&(Ca.$$scope={dirty:g,ctx:t}),$t.$set(Ca);const ja={};g&2&&(ja.$$scope={dirty:g,ctx:t}),Et.$set(ja);const Pa={};g&2&&(Pa.$$scope={dirty:g,ctx:t}),Mt.$set(Pa);const Sa={};g&2&&(Sa.$$scope={dirty:g,ctx:t}),zt.$set(Sa);const Aa={};g&2&&(Aa.$$scope={dirty:g,ctx:t}),qt.$set(Aa);const La={};g&2&&(La.$$scope={dirty:g,ctx:t}),Ct.$set(La);const se={};g&2&&(se.$$scope={dirty:g,ctx:t}),jt.$set(se);const Na={};g&2&&(Na.$$scope={dirty:g,ctx:t}),Pt.$set(Na)},i(t){vr||(w(r.$$.fragment,t),w(Ot.$$.fragment,t),w(Zt.$$.fragment,t),w(Gt.$$.fragment,t),w(Jt.$$.fragment,t),w(Xe.$$.fragment,t),w(Yt.$$.fragment,t),w(eo.$$.fragment,t),w(to.$$.fragment,t),w(oo.$$.fragment,t),w(no.$$.fragment,t),w(so.$$.fragment,t),w(ao.$$.fragment,t),w(ro.$$.fragment,t),w(io.$$.fragment,t),w(fo.$$.fragment,t),w(st.$$.fragment,t),w(at.$$.fragment,t),w(uo.$$.fragment,t),w(go.$$.fragment,t),w(To.$$.fragment,t),w(it.$$.fragment,t),w(lt.$$.fragment,t),w(yo.$$.fragment,t),w(wo.$$.fragment,t),w(Mo.$$.fragment,t),w(ct.$$.fragment,t),w(pt.$$.fragment,t),w(mt.$$.fragment,t),w(zo.$$.fragment,t),w(qo.$$.fragment,t),w(Po.$$.fragment,t),w(ft.$$.fragment,t),w(ut.$$.fragment,t),w(So.$$.fragment,t),w(Ao.$$.fragment,t),w(Oo.$$.fragment,t),w(_t.$$.fragment,t),w(kt.$$.fragment,t),w(Io.$$.fragment,t),w(Uo.$$.fragment,t),w(Ko.$$.fragment,t),w(vt.$$.fragment,t),w(Tt.$$.fragment,t),w(Bo.$$.fragment,t),w(Vo.$$.fragment,t),w(Yo.$$.fragment,t),w(wt.$$.fragment,t),w($t.$$.fragment,t),w(Et.$$.fragment,t),w(Xo.$$.fragment,t),w(en.$$.fragment,t),w(sn.$$.fragment,t),w(Mt.$$.fragment,t),w(zt.$$.fragment,t),w(qt.$$.fragment,t),w(an.$$.fragment,t),w(rn.$$.fragment,t),w(pn.$$.fragment,t),w(Ct.$$.fragment,t),w(jt.$$.fragment,t),w(Pt.$$.fragment,t),vr=!0)},o(t){$(r.$$.fragment,t),$(Ot.$$.fragment,t),$(Zt.$$.fragment,t),$(Gt.$$.fragment,t),$(Jt.$$.fragment,t),$(Xe.$$.fragment,t),$(Yt.$$.fragment,t),$(eo.$$.fragment,t),$(to.$$.fragment,t),$(oo.$$.fragment,t),$(no.$$.fragment,t),$(so.$$.fragment,t),$(ao.$$.fragment,t),$(ro.$$.fragment,t),$(io.$$.fragment,t),$(fo.$$.fragment,t),$(st.$$.fragment,t),$(at.$$.fragment,t),$(uo.$$.fragment,t),$(go.$$.fragment,t),$(To.$$.fragment,t),$(it.$$.fragment,t),$(lt.$$.fragment,t),$(yo.$$.fragment,t),$(wo.$$.fragment,t),$(Mo.$$.fragment,t),$(ct.$$.fragment,t),$(pt.$$.fragment,t),$(mt.$$.fragment,t),$(zo.$$.fragment,t),$(qo.$$.fragment,t),$(Po.$$.fragment,t),$(ft.$$.fragment,t),$(ut.$$.fragment,t),$(So.$$.fragment,t),$(Ao.$$.fragment,t),$(Oo.$$.fragment,t),$(_t.$$.fragment,t),$(kt.$$.fragment,t),$(Io.$$.fragment,t),$(Uo.$$.fragment,t),$(Ko.$$.fragment,t),$(vt.$$.fragment,t),$(Tt.$$.fragment,t),$(Bo.$$.fragment,t),$(Vo.$$.fragment,t),$(Yo.$$.fragment,t),$(wt.$$.fragment,t),$($t.$$.fragment,t),$(Et.$$.fragment,t),$(Xo.$$.fragment,t),$(en.$$.fragment,t),$(sn.$$.fragment,t),$(Mt.$$.fragment,t),$(zt.$$.fragment,t),$(qt.$$.fragment,t),$(an.$$.fragment,t),$(rn.$$.fragment,t),$(pn.$$.fragment,t),$(Ct.$$.fragment,t),$(jt.$$.fragment,t),$(Pt.$$.fragment,t),vr=!1},d(t){o(d),t&&o(k),t&&o(c),E(r),t&&o(Da),t&&o(ye),E(Ot),t&&o(Oa),t&&o(Ge),t&&o(Ia),t&&o(Je),t&&o(Ua),t&&o(gn),t&&o(Ra),t&&o(_n),t&&o(Wa),t&&o(kn),t&&o(Ha),t&&o(bn),t&&o(Ka),t&&o(vn),t&&o(Ba),t&&o(Tn),t&&o(Va),t&&o(Q),t&&o(Za),t&&o(ae),t&&o(Ga),t&&o(re),t&&o(Ja),t&&o(we),E(Zt),t&&o(Qa),t&&o(ie),t&&o(Ya),t&&o($e),E(Gt),t&&o(Xa),t&&o(j),E(Jt),E(Xe),E(Yt),t&&o(er),t&&o(Me),E(eo),t&&o(tr),t&&o(x),E(to),E(oo),E(no),E(so),E(ao),t&&o(or),t&&o(qe),E(ro),t&&o(nr),t&&o(q),E(io),E(fo),E(st),E(at),t&&o(sr),t&&o(Ce),E(uo),t&&o(ar),t&&o(P),E(go),E(To),E(it),E(lt),t&&o(rr),t&&o(Pe),E(yo),t&&o(ir),t&&o(S),E(wo),E(Mo),E(ct),E(pt),E(mt),t&&o(lr),t&&o(Ae),E(zo),t&&o(dr),t&&o(A),E(qo),E(Po),E(ft),E(ut),t&&o(cr),t&&o(Ne),E(So),t&&o(pr),t&&o(L),E(Ao),E(Oo),E(_t),E(kt),t&&o(mr),t&&o(Oe),E(Io),t&&o(hr),t&&o(N),E(Uo),E(Ko),E(vt),E(Tt),t&&o(fr),t&&o(Ue),E(Bo),t&&o(ur),t&&o(D),E(Vo),E(Yo),E(wt),E($t),E(Et),t&&o(gr),t&&o(We),E(Xo),t&&o(_r),t&&o(O),E(en),E(sn),E(Mt),E(zt),E(qt),t&&o(kr),t&&o(Ke),E(an),t&&o(br),t&&o(I),E(rn),E(pn),E(Ct),E(jt),E(Pt)}}}const iu={local:"esm",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.EsmConfig",title:"EsmConfig"},{local:"transformers.EsmTokenizer",title:"EsmTokenizer"},{local:"transformers.EsmModel",title:"EsmModel"},{local:"transformers.EsmForMaskedLM",title:"EsmForMaskedLM"},{local:"transformers.EsmForSequenceClassification",title:"EsmForSequenceClassification"},{local:"transformers.EsmForTokenClassification",title:"EsmForTokenClassification"},{local:"transformers.EsmForProteinFolding",title:"EsmForProteinFolding"},{local:"transformers.TFEsmModel",title:"TFEsmModel"},{local:"transformers.TFEsmForMaskedLM",title:"TFEsmForMaskedLM"},{local:"transformers.TFEsmForSequenceClassification",title:"TFEsmForSequenceClassification"},{local:"transformers.TFEsmForTokenClassification",title:"TFEsmForTokenClassification"}],title:"ESM"};function lu(F){return Lf(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class uu extends jf{constructor(d){super();Pf(this,d,lu,ru,Sf,{})}}export{uu as default,iu as metadata};
