import{S as Ta,i as wa,s as $a,e as n,k as h,w as k,t as s,M as Ba,c as a,d as o,m as u,a as r,x as y,h as i,b as d,G as t,g as m,y as T,q as w,o as $,B,v as Ga,L as zn}from"../../chunks/vendor-hf-doc-builder.js";import{T as ya}from"../../chunks/Tip-hf-doc-builder.js";import{D as qe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Mn}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Fe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function xa(z){let p,v;return p=new Mn({props:{code:`from transformers import BioGptModel, BioGptConfig

# Initializing a BioGPT microsoft/biogpt style configuration
configuration = BioGptConfig()

# Initializing a model from the microsoft/biogpt style configuration
model = BioGptModel(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> BioGptModel, BioGptConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BioGPT microsoft/biogpt style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BioGptConfig()

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){k(p.$$.fragment)},l(f){y(p.$$.fragment,f)},m(f,g){T(p,f,g),v=!0},p:zn,i(f){v||(w(p.$$.fragment,f),v=!0)},o(f){$(p.$$.fragment,f),v=!1},d(f){B(p,f)}}}function za(z){let p,v,f,g,b;return{c(){p=n("p"),v=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=s("Module"),b=s(`
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(l){p=a(l,"P",{});var _=r(p);v=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(_,"CODE",{});var C=r(f);g=i(C,"Module"),C.forEach(o),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.`),_.forEach(o)},m(l,_){m(l,p,_),t(p,v),t(p,f),t(f,g),t(p,b)},d(l){l&&o(p)}}}function Ma(z){let p,v,f,g,b;return g=new Mn({props:{code:`from transformers import AutoTokenizer, BioGptModel
import torch

tokenizer = AutoTokenizer.from_pretrained("microsoft/biogpt")
model = BioGptModel.from_pretrained("microsoft/biogpt")

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, BioGptModel
<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;microsoft/biogpt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BioGptModel.from_pretrained(<span class="hljs-string">&quot;microsoft/biogpt&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(){p=n("p"),v=s("Example:"),f=h(),k(g.$$.fragment)},l(l){p=a(l,"P",{});var _=r(p);v=i(_,"Example:"),_.forEach(o),f=u(l),y(g.$$.fragment,l)},m(l,_){m(l,p,_),t(p,v),m(l,f,_),T(g,l,_),b=!0},p:zn,i(l){b||(w(g.$$.fragment,l),b=!0)},o(l){$(g.$$.fragment,l),b=!1},d(l){l&&o(p),l&&o(f),B(g,l)}}}function Pa(z){let p,v,f,g,b;return{c(){p=n("p"),v=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),g=s("Module"),b=s(`
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(l){p=a(l,"P",{});var _=r(p);v=i(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(_,"CODE",{});var C=r(f);g=i(C,"Module"),C.forEach(o),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.`),_.forEach(o)},m(l,_){m(l,p,_),t(p,v),t(p,f),t(f,g),t(p,b)},d(l){l&&o(p)}}}function Ca(z){let p,v,f,g,b;return g=new Mn({props:{code:`import torch
from transformers import AutoTokenizer, BioGptForCausalLM

tokenizer = AutoTokenizer.from_pretrained("microsoft/biogpt")
model = BioGptForCausalLM.from_pretrained("microsoft/biogpt")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs, labels=inputs["input_ids"])
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BioGptForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;microsoft/biogpt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BioGptForCausalLM.from_pretrained(<span class="hljs-string">&quot;microsoft/biogpt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){p=n("p"),v=s("Example:"),f=h(),k(g.$$.fragment)},l(l){p=a(l,"P",{});var _=r(p);v=i(_,"Example:"),_.forEach(o),f=u(l),y(g.$$.fragment,l)},m(l,_){m(l,p,_),t(p,v),m(l,f,_),T(g,l,_),b=!0},p:zn,i(l){b||(w(g.$$.fragment,l),b=!0)},o(l){$(g.$$.fragment,l),b=!1},d(l){l&&o(p),l&&o(f),B(g,l)}}}function Ea(z){let p,v,f,g,b,l,_,C,Jt,Gt,L,V,ot,le,eo,nt,to,xt,Q,oo,ce,no,ao,zt,Ae,ro,Mt,Le,at,so,Pt,je,io,Ct,F,rt,lo,co,st,po,ho,pe,uo,it,mo,fo,Et,A,go,he,_o,vo,ue,bo,ko,qt,j,Y,dt,me,yo,lt,To,Ft,Oe,ct,Ie,wo,At,O,K,pt,fe,$o,ht,Bo,Lt,G,ge,Go,I,xo,De,zo,Mo,_e,Po,Co,Eo,D,qo,Ne,Fo,Ao,Se,Lo,jo,Oo,X,jt,N,Z,ut,ve,Io,mt,Do,Ot,x,be,No,ft,So,Wo,ke,Ho,We,Ro,Uo,Vo,He,ye,It,S,J,gt,Te,Qo,_t,Yo,Dt,E,we,Ko,$e,Xo,Be,Zo,Jo,en,M,Ge,tn,W,on,Re,nn,an,vt,rn,sn,dn,ee,ln,te,Nt,H,oe,bt,xe,cn,kt,pn,St,q,ze,hn,R,un,yt,mn,fn,Me,gn,_n,vn,P,Pe,bn,U,kn,Ue,yn,Tn,Tt,wn,$n,Bn,ne,Gn,ae,Wt;return l=new Fe({}),le=new Fe({}),me=new Fe({}),fe=new Fe({}),ge=new qe({props:{name:"class transformers.BioGptConfig",anchor:"transformers.BioGptConfig",parameters:[{name:"vocab_size",val:" = 42384"},{name:"hidden_size",val:" = 1024"},{name:"num_hidden_layers",val:" = 24"},{name:"num_attention_heads",val:" = 16"},{name:"intermediate_size",val:" = 4096"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 1024"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"scale_embedding",val:" = True"},{name:"use_cache",val:" = True"},{name:"layerdrop",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BioGptConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 42384) &#x2014;
Vocabulary size of the BioGPT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptModel">BioGptModel</a>.`,name:"vocab_size"},{anchor:"transformers.BioGptConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.BioGptConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.BioGptConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BioGptConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BioGptConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BioGptConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BioGptConfig.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.BioGptConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#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.BioGptConfig.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.BioGptConfig.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.BioGptConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.BioGptConfig.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.BioGptConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Please refer to the paper about LayerDrop: <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a> for further details`,name:"layerdrop"},{anchor:"transformers.BioGptConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.BioGptConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.BioGptConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.BioGptConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
End of stream token id.
Example &#x2014;`,name:"eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/biogpt/configuration_biogpt.py#L29"}}),X=new xn({props:{anchor:"transformers.BioGptConfig.example",$$slots:{default:[xa]},$$scope:{ctx:z}}}),ve=new Fe({}),be=new qe({props:{name:"class transformers.BioGptTokenizer",anchor:"transformers.BioGptTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BioGptTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.BioGptTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Merges file.`,name:"merges_file"},{anchor:"transformers.BioGptTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BioGptTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BioGptTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.BioGptTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.BioGptTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/biogpt/tokenization_biogpt.py#L56"}}),ye=new qe({props:{name:"save_vocabulary",anchor:"transformers.BioGptTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/biogpt/tokenization_biogpt.py#L326"}}),Te=new Fe({}),we=new qe({props:{name:"class transformers.BioGptModel",anchor:"transformers.BioGptModel",parameters:[{name:"config",val:": BioGptConfig"}],parametersDescription:[{anchor:"transformers.BioGptModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptConfig">~BioGptConfig</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/biogpt/modeling_biogpt.py#L440"}}),Ge=new qe({props:{name:"forward",anchor:"transformers.BioGptModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BioGptModel.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.BioGptModel.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.BioGptModel.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.BioGptModel.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BioGptModel.forward.past_key_values",description:`<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>) &#x2014;
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 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 in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential 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>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.BioGptModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BioGptModel.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.BioGptModel.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.BioGptModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/biogpt/modeling_biogpt.py#L487",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptConfig"
>BioGptConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ee=new ya({props:{$$slots:{default:[za]},$$scope:{ctx:z}}}),te=new xn({props:{anchor:"transformers.BioGptModel.forward.example",$$slots:{default:[Ma]},$$scope:{ctx:z}}}),xe=new Fe({}),ze=new qe({props:{name:"class transformers.BioGptForCausalLM",anchor:"transformers.BioGptForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BioGptForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptConfig">~BioGptConfig</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/biogpt/modeling_biogpt.py#L625"}}),Pe=new qe({props:{name:"forward",anchor:"transformers.BioGptForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BioGptForCausalLM.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.BioGptForCausalLM.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.BioGptForCausalLM.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.BioGptForCausalLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BioGptForCausalLM.forward.past_key_values",description:`<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>) &#x2014;
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 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 in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential 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>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): 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:"past_key_values"},{anchor:"transformers.BioGptForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BioGptForCausalLM.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.BioGptForCausalLM.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.BioGptForCausalLM.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.BioGptForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/biogpt/modeling_biogpt.py#L643",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptConfig"
>BioGptConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ne=new ya({props:{$$slots:{default:[Pa]},$$scope:{ctx:z}}}),ae=new xn({props:{anchor:"transformers.BioGptForCausalLM.forward.example",$$slots:{default:[Ca]},$$scope:{ctx:z}}}),{c(){p=n("meta"),v=h(),f=n("h1"),g=n("a"),b=n("span"),k(l.$$.fragment),_=h(),C=n("span"),Jt=s("BioGPT"),Gt=h(),L=n("h2"),V=n("a"),ot=n("span"),k(le.$$.fragment),eo=h(),nt=n("span"),to=s("Overview"),xt=h(),Q=n("p"),oo=s("The BioGPT model was proposed in "),ce=n("a"),no=s("BioGPT: generative pre-trained transformer for biomedical text generation and mining"),ao=s(" by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu. BioGPT is a domain-specific generative pre-trained Transformer language model for biomedical text generation and mining. BioGPT follows the Transformer language model backbone, and is pre-trained on 15M PubMed abstracts from scratch."),zt=h(),Ae=n("p"),ro=s("The abstract from the paper is the following:"),Mt=h(),Le=n("p"),at=n("em"),so=s("Pre-trained language models have attracted increasing attention in the biomedical domain, inspired by their great success in the general natural language domain. Among the two main branches of pre-trained language models in the general language domain, i.e. BERT (and its variants) and GPT (and its variants), the first one has been extensively studied in the biomedical domain, such as BioBERT and PubMedBERT. While they have achieved great success on a variety of discriminative downstream biomedical tasks, the lack of generation ability constrains their application scope. In this paper, we propose BioGPT, a domain-specific generative Transformer language model pre-trained on large-scale biomedical literature. We evaluate BioGPT on six biomedical natural language processing tasks and demonstrate that our model outperforms previous models on most tasks. Especially, we get 44.98%, 38.42% and 40.76% F1 score on BC5CDR, KD-DTI and DDI end-to-end relation extraction tasks, respectively, and 78.2% accuracy on PubMedQA, creating a new record. Our case study on text generation further demonstrates the advantage of BioGPT on biomedical literature to generate fluent descriptions for biomedical terms."),Pt=h(),je=n("p"),io=s("Tips:"),Ct=h(),F=n("ul"),rt=n("li"),lo=s("BioGPT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than the left."),co=h(),st=n("li"),po=s("BioGPT was trained with a causal language modeling (CLM) objective and is therefore powerful at predicting the next token in a sequence. Leveraging this feature allows BioGPT to generate syntactically coherent text as it can be observed in the run_generation.py example script."),ho=h(),pe=n("li"),uo=s("The model can take the "),it=n("code"),mo=s("past_key_values"),fo=s(" (for PyTorch) as input, which is the previously computed key/value attention pairs. Using this (past_key_values or past) value prevents the model from re-computing pre-computed values in the context of text generation. For PyTorch, see past_key_values argument of the BioGptForCausalLM.forward() method for more information on its usage."),Et=h(),A=n("p"),go=s("This model was contributed by "),he=n("a"),_o=s("kamalkraj"),vo=s(". The original code can be found "),ue=n("a"),bo=s("here"),ko=s("."),qt=h(),j=n("h2"),Y=n("a"),dt=n("span"),k(me.$$.fragment),yo=h(),lt=n("span"),To=s("Documentation resources"),Ft=h(),Oe=n("ul"),ct=n("li"),Ie=n("a"),wo=s("Causal language modeling task guide"),At=h(),O=n("h2"),K=n("a"),pt=n("span"),k(fe.$$.fragment),$o=h(),ht=n("span"),Bo=s("BioGptConfig"),Lt=h(),G=n("div"),k(ge.$$.fragment),Go=h(),I=n("p"),xo=s("This is the configuration class to store the configuration of a "),De=n("a"),zo=s("BioGptModel"),Mo=s(`. It is used to instantiate an
BioGPT 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 BioGPT
`),_e=n("a"),Po=s("microsoft/biogpt"),Co=s(" architecture."),Eo=h(),D=n("p"),qo=s("Configuration objects inherit from "),Ne=n("a"),Fo=s("PretrainedConfig"),Ao=s(` and can be used to control the model outputs. Read the
documentation from `),Se=n("a"),Lo=s("PretrainedConfig"),jo=s(" for more information."),Oo=h(),k(X.$$.fragment),jt=h(),N=n("h2"),Z=n("a"),ut=n("span"),k(ve.$$.fragment),Io=h(),mt=n("span"),Do=s("BioGptTokenizer"),Ot=h(),x=n("div"),k(be.$$.fragment),No=h(),ft=n("p"),So=s("Construct an FAIRSEQ Transformer tokenizer. Moses tokenization followed by Byte-Pair Encoding."),Wo=h(),ke=n("p"),Ho=s("This tokenizer inherits from "),We=n("a"),Ro=s("PreTrainedTokenizer"),Uo=s(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Vo=h(),He=n("div"),k(ye.$$.fragment),It=h(),S=n("h2"),J=n("a"),gt=n("span"),k(Te.$$.fragment),Qo=h(),_t=n("span"),Yo=s("BioGptModel"),Dt=h(),E=n("div"),k(we.$$.fragment),Ko=h(),$e=n("p"),Xo=s(`The bare BioGPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Be=n("a"),Zo=s("torch.nn.Module"),Jo=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),en=h(),M=n("div"),k(Ge.$$.fragment),tn=h(),W=n("p"),on=s("The "),Re=n("a"),nn=s("BioGptModel"),an=s(" forward method, overrides the "),vt=n("code"),rn=s("__call__"),sn=s(" special method."),dn=h(),k(ee.$$.fragment),ln=h(),k(te.$$.fragment),Nt=h(),H=n("h2"),oe=n("a"),bt=n("span"),k(xe.$$.fragment),cn=h(),kt=n("span"),pn=s("BioGptForCausalLM"),St=h(),q=n("div"),k(ze.$$.fragment),hn=h(),R=n("p"),un=s("BioGPT Model with a "),yt=n("code"),mn=s("language modeling"),fn=s(` head on top for CLM fine-tuning.
This model is a PyTorch `),Me=n("a"),gn=s("torch.nn.Module"),_n=s(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),vn=h(),P=n("div"),k(Pe.$$.fragment),bn=h(),U=n("p"),kn=s("The "),Ue=n("a"),yn=s("BioGptForCausalLM"),Tn=s(" forward method, overrides the "),Tt=n("code"),wn=s("__call__"),$n=s(" special method."),Bn=h(),k(ne.$$.fragment),Gn=h(),k(ae.$$.fragment),this.h()},l(e){const c=Ba('[data-svelte="svelte-1phssyn"]',document.head);p=a(c,"META",{name:!0,content:!0}),c.forEach(o),v=u(e),f=a(e,"H1",{class:!0});var Ce=r(f);g=a(Ce,"A",{id:!0,class:!0,href:!0});var wt=r(g);b=a(wt,"SPAN",{});var $t=r(b);y(l.$$.fragment,$t),$t.forEach(o),wt.forEach(o),_=u(Ce),C=a(Ce,"SPAN",{});var Bt=r(C);Jt=i(Bt,"BioGPT"),Bt.forEach(o),Ce.forEach(o),Gt=u(e),L=a(e,"H2",{class:!0});var Ee=r(L);V=a(Ee,"A",{id:!0,class:!0,href:!0});var Pn=r(V);ot=a(Pn,"SPAN",{});var Cn=r(ot);y(le.$$.fragment,Cn),Cn.forEach(o),Pn.forEach(o),eo=u(Ee),nt=a(Ee,"SPAN",{});var En=r(nt);to=i(En,"Overview"),En.forEach(o),Ee.forEach(o),xt=u(e),Q=a(e,"P",{});var Ht=r(Q);oo=i(Ht,"The BioGPT model was proposed in "),ce=a(Ht,"A",{href:!0,rel:!0});var qn=r(ce);no=i(qn,"BioGPT: generative pre-trained transformer for biomedical text generation and mining"),qn.forEach(o),ao=i(Ht," by Renqian Luo, Liai Sun, Yingce Xia, Tao Qin, Sheng Zhang, Hoifung Poon and Tie-Yan Liu. BioGPT is a domain-specific generative pre-trained Transformer language model for biomedical text generation and mining. BioGPT follows the Transformer language model backbone, and is pre-trained on 15M PubMed abstracts from scratch."),Ht.forEach(o),zt=u(e),Ae=a(e,"P",{});var Fn=r(Ae);ro=i(Fn,"The abstract from the paper is the following:"),Fn.forEach(o),Mt=u(e),Le=a(e,"P",{});var An=r(Le);at=a(An,"EM",{});var Ln=r(at);so=i(Ln,"Pre-trained language models have attracted increasing attention in the biomedical domain, inspired by their great success in the general natural language domain. Among the two main branches of pre-trained language models in the general language domain, i.e. BERT (and its variants) and GPT (and its variants), the first one has been extensively studied in the biomedical domain, such as BioBERT and PubMedBERT. While they have achieved great success on a variety of discriminative downstream biomedical tasks, the lack of generation ability constrains their application scope. In this paper, we propose BioGPT, a domain-specific generative Transformer language model pre-trained on large-scale biomedical literature. We evaluate BioGPT on six biomedical natural language processing tasks and demonstrate that our model outperforms previous models on most tasks. Especially, we get 44.98%, 38.42% and 40.76% F1 score on BC5CDR, KD-DTI and DDI end-to-end relation extraction tasks, respectively, and 78.2% accuracy on PubMedQA, creating a new record. Our case study on text generation further demonstrates the advantage of BioGPT on biomedical literature to generate fluent descriptions for biomedical terms."),Ln.forEach(o),An.forEach(o),Pt=u(e),je=a(e,"P",{});var jn=r(je);io=i(jn,"Tips:"),jn.forEach(o),Ct=u(e),F=a(e,"UL",{});var Ve=r(F);rt=a(Ve,"LI",{});var On=r(rt);lo=i(On,"BioGPT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than the left."),On.forEach(o),co=u(Ve),st=a(Ve,"LI",{});var In=r(st);po=i(In,"BioGPT was trained with a causal language modeling (CLM) objective and is therefore powerful at predicting the next token in a sequence. Leveraging this feature allows BioGPT to generate syntactically coherent text as it can be observed in the run_generation.py example script."),In.forEach(o),ho=u(Ve),pe=a(Ve,"LI",{});var Rt=r(pe);uo=i(Rt,"The model can take the "),it=a(Rt,"CODE",{});var Dn=r(it);mo=i(Dn,"past_key_values"),Dn.forEach(o),fo=i(Rt," (for PyTorch) as input, which is the previously computed key/value attention pairs. Using this (past_key_values or past) value prevents the model from re-computing pre-computed values in the context of text generation. For PyTorch, see past_key_values argument of the BioGptForCausalLM.forward() method for more information on its usage."),Rt.forEach(o),Ve.forEach(o),Et=u(e),A=a(e,"P",{});var Qe=r(A);go=i(Qe,"This model was contributed by "),he=a(Qe,"A",{href:!0,rel:!0});var Nn=r(he);_o=i(Nn,"kamalkraj"),Nn.forEach(o),vo=i(Qe,". The original code can be found "),ue=a(Qe,"A",{href:!0,rel:!0});var Sn=r(ue);bo=i(Sn,"here"),Sn.forEach(o),ko=i(Qe,"."),Qe.forEach(o),qt=u(e),j=a(e,"H2",{class:!0});var Ut=r(j);Y=a(Ut,"A",{id:!0,class:!0,href:!0});var Wn=r(Y);dt=a(Wn,"SPAN",{});var Hn=r(dt);y(me.$$.fragment,Hn),Hn.forEach(o),Wn.forEach(o),yo=u(Ut),lt=a(Ut,"SPAN",{});var Rn=r(lt);To=i(Rn,"Documentation resources"),Rn.forEach(o),Ut.forEach(o),Ft=u(e),Oe=a(e,"UL",{});var Un=r(Oe);ct=a(Un,"LI",{});var Vn=r(ct);Ie=a(Vn,"A",{href:!0});var Qn=r(Ie);wo=i(Qn,"Causal language modeling task guide"),Qn.forEach(o),Vn.forEach(o),Un.forEach(o),At=u(e),O=a(e,"H2",{class:!0});var Vt=r(O);K=a(Vt,"A",{id:!0,class:!0,href:!0});var Yn=r(K);pt=a(Yn,"SPAN",{});var Kn=r(pt);y(fe.$$.fragment,Kn),Kn.forEach(o),Yn.forEach(o),$o=u(Vt),ht=a(Vt,"SPAN",{});var Xn=r(ht);Bo=i(Xn,"BioGptConfig"),Xn.forEach(o),Vt.forEach(o),Lt=u(e),G=a(e,"DIV",{class:!0});var re=r(G);y(ge.$$.fragment,re),Go=u(re),I=a(re,"P",{});var Ye=r(I);xo=i(Ye,"This is the configuration class to store the configuration of a "),De=a(Ye,"A",{href:!0});var Zn=r(De);zo=i(Zn,"BioGptModel"),Zn.forEach(o),Mo=i(Ye,`. It is used to instantiate an
BioGPT 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 BioGPT
`),_e=a(Ye,"A",{href:!0,rel:!0});var Jn=r(_e);Po=i(Jn,"microsoft/biogpt"),Jn.forEach(o),Co=i(Ye," architecture."),Ye.forEach(o),Eo=u(re),D=a(re,"P",{});var Ke=r(D);qo=i(Ke,"Configuration objects inherit from "),Ne=a(Ke,"A",{href:!0});var ea=r(Ne);Fo=i(ea,"PretrainedConfig"),ea.forEach(o),Ao=i(Ke,` and can be used to control the model outputs. Read the
documentation from `),Se=a(Ke,"A",{href:!0});var ta=r(Se);Lo=i(ta,"PretrainedConfig"),ta.forEach(o),jo=i(Ke," for more information."),Ke.forEach(o),Oo=u(re),y(X.$$.fragment,re),re.forEach(o),jt=u(e),N=a(e,"H2",{class:!0});var Qt=r(N);Z=a(Qt,"A",{id:!0,class:!0,href:!0});var oa=r(Z);ut=a(oa,"SPAN",{});var na=r(ut);y(ve.$$.fragment,na),na.forEach(o),oa.forEach(o),Io=u(Qt),mt=a(Qt,"SPAN",{});var aa=r(mt);Do=i(aa,"BioGptTokenizer"),aa.forEach(o),Qt.forEach(o),Ot=u(e),x=a(e,"DIV",{class:!0});var se=r(x);y(be.$$.fragment,se),No=u(se),ft=a(se,"P",{});var ra=r(ft);So=i(ra,"Construct an FAIRSEQ Transformer tokenizer. Moses tokenization followed by Byte-Pair Encoding."),ra.forEach(o),Wo=u(se),ke=a(se,"P",{});var Yt=r(ke);Ho=i(Yt,"This tokenizer inherits from "),We=a(Yt,"A",{href:!0});var sa=r(We);Ro=i(sa,"PreTrainedTokenizer"),sa.forEach(o),Uo=i(Yt,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Yt.forEach(o),Vo=u(se),He=a(se,"DIV",{class:!0});var ia=r(He);y(ye.$$.fragment,ia),ia.forEach(o),se.forEach(o),It=u(e),S=a(e,"H2",{class:!0});var Kt=r(S);J=a(Kt,"A",{id:!0,class:!0,href:!0});var da=r(J);gt=a(da,"SPAN",{});var la=r(gt);y(Te.$$.fragment,la),la.forEach(o),da.forEach(o),Qo=u(Kt),_t=a(Kt,"SPAN",{});var ca=r(_t);Yo=i(ca,"BioGptModel"),ca.forEach(o),Kt.forEach(o),Dt=u(e),E=a(e,"DIV",{class:!0});var Xe=r(E);y(we.$$.fragment,Xe),Ko=u(Xe),$e=a(Xe,"P",{});var Xt=r($e);Xo=i(Xt,`The bare BioGPT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Be=a(Xt,"A",{href:!0,rel:!0});var pa=r(Be);Zo=i(pa,"torch.nn.Module"),pa.forEach(o),Jo=i(Xt,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xt.forEach(o),en=u(Xe),M=a(Xe,"DIV",{class:!0});var ie=r(M);y(Ge.$$.fragment,ie),tn=u(ie),W=a(ie,"P",{});var Ze=r(W);on=i(Ze,"The "),Re=a(Ze,"A",{href:!0});var ha=r(Re);nn=i(ha,"BioGptModel"),ha.forEach(o),an=i(Ze," forward method, overrides the "),vt=a(Ze,"CODE",{});var ua=r(vt);rn=i(ua,"__call__"),ua.forEach(o),sn=i(Ze," special method."),Ze.forEach(o),dn=u(ie),y(ee.$$.fragment,ie),ln=u(ie),y(te.$$.fragment,ie),ie.forEach(o),Xe.forEach(o),Nt=u(e),H=a(e,"H2",{class:!0});var Zt=r(H);oe=a(Zt,"A",{id:!0,class:!0,href:!0});var ma=r(oe);bt=a(ma,"SPAN",{});var fa=r(bt);y(xe.$$.fragment,fa),fa.forEach(o),ma.forEach(o),cn=u(Zt),kt=a(Zt,"SPAN",{});var ga=r(kt);pn=i(ga,"BioGptForCausalLM"),ga.forEach(o),Zt.forEach(o),St=u(e),q=a(e,"DIV",{class:!0});var Je=r(q);y(ze.$$.fragment,Je),hn=u(Je),R=a(Je,"P",{});var et=r(R);un=i(et,"BioGPT Model with a "),yt=a(et,"CODE",{});var _a=r(yt);mn=i(_a,"language modeling"),_a.forEach(o),fn=i(et,` head on top for CLM fine-tuning.
This model is a PyTorch `),Me=a(et,"A",{href:!0,rel:!0});var va=r(Me);gn=i(va,"torch.nn.Module"),va.forEach(o),_n=i(et,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),et.forEach(o),vn=u(Je),P=a(Je,"DIV",{class:!0});var de=r(P);y(Pe.$$.fragment,de),bn=u(de),U=a(de,"P",{});var tt=r(U);kn=i(tt,"The "),Ue=a(tt,"A",{href:!0});var ba=r(Ue);yn=i(ba,"BioGptForCausalLM"),ba.forEach(o),Tn=i(tt," forward method, overrides the "),Tt=a(tt,"CODE",{});var ka=r(Tt);wn=i(ka,"__call__"),ka.forEach(o),$n=i(tt," special method."),tt.forEach(o),Bn=u(de),y(ne.$$.fragment,de),Gn=u(de),y(ae.$$.fragment,de),de.forEach(o),Je.forEach(o),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(qa)),d(g,"id","biogpt"),d(g,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(g,"href","#biogpt"),d(f,"class","relative group"),d(V,"id","overview"),d(V,"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"),d(V,"href","#overview"),d(L,"class","relative group"),d(ce,"href","https://academic.oup.com/bib/advance-article/doi/10.1093/bib/bbac409/6713511?guestAccessKey=a66d9b5d-4f83-4017-bb52-405815c907b9"),d(ce,"rel","nofollow"),d(he,"href","https://huggingface.co/kamalkraj"),d(he,"rel","nofollow"),d(ue,"href","https://github.com/microsoft/BioGPT"),d(ue,"rel","nofollow"),d(Y,"id","documentation-resources"),d(Y,"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"),d(Y,"href","#documentation-resources"),d(j,"class","relative group"),d(Ie,"href","./tasks/language_modeling"),d(K,"id","transformers.BioGptConfig"),d(K,"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"),d(K,"href","#transformers.BioGptConfig"),d(O,"class","relative group"),d(De,"href","/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptModel"),d(_e,"href","https://huggingface.co/microsoft/biogpt"),d(_e,"rel","nofollow"),d(Ne,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(Se,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),d(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Z,"id","transformers.BioGptTokenizer"),d(Z,"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"),d(Z,"href","#transformers.BioGptTokenizer"),d(N,"class","relative group"),d(We,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"id","transformers.BioGptModel"),d(J,"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"),d(J,"href","#transformers.BioGptModel"),d(S,"class","relative group"),d(Be,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Be,"rel","nofollow"),d(Re,"href","/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptModel"),d(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(oe,"id","transformers.BioGptForCausalLM"),d(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(oe,"href","#transformers.BioGptForCausalLM"),d(H,"class","relative group"),d(Me,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Me,"rel","nofollow"),d(Ue,"href","/docs/transformers/v4.27.1/en/model_doc/biogpt#transformers.BioGptForCausalLM"),d(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,c){t(document.head,p),m(e,v,c),m(e,f,c),t(f,g),t(g,b),T(l,b,null),t(f,_),t(f,C),t(C,Jt),m(e,Gt,c),m(e,L,c),t(L,V),t(V,ot),T(le,ot,null),t(L,eo),t(L,nt),t(nt,to),m(e,xt,c),m(e,Q,c),t(Q,oo),t(Q,ce),t(ce,no),t(Q,ao),m(e,zt,c),m(e,Ae,c),t(Ae,ro),m(e,Mt,c),m(e,Le,c),t(Le,at),t(at,so),m(e,Pt,c),m(e,je,c),t(je,io),m(e,Ct,c),m(e,F,c),t(F,rt),t(rt,lo),t(F,co),t(F,st),t(st,po),t(F,ho),t(F,pe),t(pe,uo),t(pe,it),t(it,mo),t(pe,fo),m(e,Et,c),m(e,A,c),t(A,go),t(A,he),t(he,_o),t(A,vo),t(A,ue),t(ue,bo),t(A,ko),m(e,qt,c),m(e,j,c),t(j,Y),t(Y,dt),T(me,dt,null),t(j,yo),t(j,lt),t(lt,To),m(e,Ft,c),m(e,Oe,c),t(Oe,ct),t(ct,Ie),t(Ie,wo),m(e,At,c),m(e,O,c),t(O,K),t(K,pt),T(fe,pt,null),t(O,$o),t(O,ht),t(ht,Bo),m(e,Lt,c),m(e,G,c),T(ge,G,null),t(G,Go),t(G,I),t(I,xo),t(I,De),t(De,zo),t(I,Mo),t(I,_e),t(_e,Po),t(I,Co),t(G,Eo),t(G,D),t(D,qo),t(D,Ne),t(Ne,Fo),t(D,Ao),t(D,Se),t(Se,Lo),t(D,jo),t(G,Oo),T(X,G,null),m(e,jt,c),m(e,N,c),t(N,Z),t(Z,ut),T(ve,ut,null),t(N,Io),t(N,mt),t(mt,Do),m(e,Ot,c),m(e,x,c),T(be,x,null),t(x,No),t(x,ft),t(ft,So),t(x,Wo),t(x,ke),t(ke,Ho),t(ke,We),t(We,Ro),t(ke,Uo),t(x,Vo),t(x,He),T(ye,He,null),m(e,It,c),m(e,S,c),t(S,J),t(J,gt),T(Te,gt,null),t(S,Qo),t(S,_t),t(_t,Yo),m(e,Dt,c),m(e,E,c),T(we,E,null),t(E,Ko),t(E,$e),t($e,Xo),t($e,Be),t(Be,Zo),t($e,Jo),t(E,en),t(E,M),T(Ge,M,null),t(M,tn),t(M,W),t(W,on),t(W,Re),t(Re,nn),t(W,an),t(W,vt),t(vt,rn),t(W,sn),t(M,dn),T(ee,M,null),t(M,ln),T(te,M,null),m(e,Nt,c),m(e,H,c),t(H,oe),t(oe,bt),T(xe,bt,null),t(H,cn),t(H,kt),t(kt,pn),m(e,St,c),m(e,q,c),T(ze,q,null),t(q,hn),t(q,R),t(R,un),t(R,yt),t(yt,mn),t(R,fn),t(R,Me),t(Me,gn),t(R,_n),t(q,vn),t(q,P),T(Pe,P,null),t(P,bn),t(P,U),t(U,kn),t(U,Ue),t(Ue,yn),t(U,Tn),t(U,Tt),t(Tt,wn),t(U,$n),t(P,Bn),T(ne,P,null),t(P,Gn),T(ae,P,null),Wt=!0},p(e,[c]){const Ce={};c&2&&(Ce.$$scope={dirty:c,ctx:e}),X.$set(Ce);const wt={};c&2&&(wt.$$scope={dirty:c,ctx:e}),ee.$set(wt);const $t={};c&2&&($t.$$scope={dirty:c,ctx:e}),te.$set($t);const Bt={};c&2&&(Bt.$$scope={dirty:c,ctx:e}),ne.$set(Bt);const Ee={};c&2&&(Ee.$$scope={dirty:c,ctx:e}),ae.$set(Ee)},i(e){Wt||(w(l.$$.fragment,e),w(le.$$.fragment,e),w(me.$$.fragment,e),w(fe.$$.fragment,e),w(ge.$$.fragment,e),w(X.$$.fragment,e),w(ve.$$.fragment,e),w(be.$$.fragment,e),w(ye.$$.fragment,e),w(Te.$$.fragment,e),w(we.$$.fragment,e),w(Ge.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(xe.$$.fragment,e),w(ze.$$.fragment,e),w(Pe.$$.fragment,e),w(ne.$$.fragment,e),w(ae.$$.fragment,e),Wt=!0)},o(e){$(l.$$.fragment,e),$(le.$$.fragment,e),$(me.$$.fragment,e),$(fe.$$.fragment,e),$(ge.$$.fragment,e),$(X.$$.fragment,e),$(ve.$$.fragment,e),$(be.$$.fragment,e),$(ye.$$.fragment,e),$(Te.$$.fragment,e),$(we.$$.fragment,e),$(Ge.$$.fragment,e),$(ee.$$.fragment,e),$(te.$$.fragment,e),$(xe.$$.fragment,e),$(ze.$$.fragment,e),$(Pe.$$.fragment,e),$(ne.$$.fragment,e),$(ae.$$.fragment,e),Wt=!1},d(e){o(p),e&&o(v),e&&o(f),B(l),e&&o(Gt),e&&o(L),B(le),e&&o(xt),e&&o(Q),e&&o(zt),e&&o(Ae),e&&o(Mt),e&&o(Le),e&&o(Pt),e&&o(je),e&&o(Ct),e&&o(F),e&&o(Et),e&&o(A),e&&o(qt),e&&o(j),B(me),e&&o(Ft),e&&o(Oe),e&&o(At),e&&o(O),B(fe),e&&o(Lt),e&&o(G),B(ge),B(X),e&&o(jt),e&&o(N),B(ve),e&&o(Ot),e&&o(x),B(be),B(ye),e&&o(It),e&&o(S),B(Te),e&&o(Dt),e&&o(E),B(we),B(Ge),B(ee),B(te),e&&o(Nt),e&&o(H),B(xe),e&&o(St),e&&o(q),B(ze),B(Pe),B(ne),B(ae)}}}const qa={local:"biogpt",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.BioGptConfig",title:"BioGptConfig"},{local:"transformers.BioGptTokenizer",title:"BioGptTokenizer"},{local:"transformers.BioGptModel",title:"BioGptModel"},{local:"transformers.BioGptForCausalLM",title:"BioGptForCausalLM"}],title:"BioGPT"};function Fa(z){return Ga(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Na extends Ta{constructor(p){super();wa(this,p,Fa,Ea,$a,{})}}export{Na as default,qa as metadata};
