Buckets:
| import{s as Mt,o as Ut,n as Me}from"../chunks/scheduler.25b97de1.js";import{S as wt,i as vt,g as p,s as r,r as h,A as kt,h as m,f as a,c as i,j as P,u,x as M,k as V,y as c,a as l,v as g,d as f,t as _,w as T}from"../chunks/index.d9030fc9.js";import{T as Jt}from"../chunks/Tip.baa67368.js";import{D as me}from"../chunks/Docstring.ffac8efa.js";import{C as we}from"../chunks/CodeBlock.e6cd0d95.js";import{E as qe}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as L,E as xt}from"../chunks/EditOnGithub.91d95064.js";function $t(w){let t,b;return t=new we({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hKYXBhbmVzZUNvbmZpZyUyQyUyMEdQVE5lb1hKYXBhbmVzZU1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEdQVE5lb1hKYXBhbmVzZSUyMGdwdC1uZW94LWphcGFuZXNlLTIuN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwR1BUTmVvWEphcGFuZXNlQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGdwdC1uZW94LWphcGFuZXNlLTIuN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEdQVE5lb1hKYXBhbmVzZU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXJapaneseConfig, GPTNeoXJapaneseModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a GPTNeoXJapanese gpt-neox-japanese-2.7b style configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = GPTNeoXJapaneseConfig() | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a model (with random weights) from the gpt-neox-japanese-2.7b style configuration</span> | |
| <span class="hljs-meta">>>> </span>model = GPTNeoXJapaneseModel(configuration) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Accessing the model configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = model.config`,wrap:!1}}),{c(){h(t.$$.fragment)},l(s){u(t.$$.fragment,s)},m(s,d){g(t,s,d),b=!0},p:Me,i(s){b||(f(t.$$.fragment,s),b=!0)},o(s){_(t.$$.fragment,s),b=!1},d(s){T(t,s)}}}function Nt(w){let t,b="Example:",s,d,y;return d=new we({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hKYXBhbmVzZVRva2VuaXplciUwQSUwQXRva2VuaXplciUyMCUzRCUyMEdQVE5lb1hKYXBhbmVzZVRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQSUyMyUyMFlvdSUyMGNhbiUyMGNvbmZpcm0lMjBib3RoJTIwJUU2JTg1JUI2JUU1JUJGJTlDJTIwYW5kJTIwJUU2JTg1JUI2JUU2JTg3JTg5JTIwYXJlJTIwZW5jb2RlZCUyMHRvJTIwMTc3NDklMEF0b2tlbml6ZXIoJTIyJUU1JTkwJUJFJUU4JUJDJUE5JUUzJTgxJUFGJUU3JThDJUFCJUUzJTgxJUE3JUUzJTgxJTgyJUUzJTgyJThCJUYwJTlGJTkwJUFGJUUzJTgwJTgyJUU1JUFFJTlGJUUzJTgxJUFGJUU2JTg1JUI2JUU1JUJGJTlDKCVFNiU4NSVCNiVFNiU4NyU4OSklRTUlQTQlQTclRTUlQUQlQTYlRTUlODclQkElRTglQkElQUIlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTBBJTIzJTIwQm90aCUyMCVFNiU4NSVCNiVFNSVCRiU5QyUyMGFuZCUyMCVFNiU4NSVCNiVFNiU4NyU4OSUyMGFyZSUyMGRlY29kZWQlMjB0byUyMCVFNiU4NSVCNiVFNSVCRiU5QyUwQXRva2VuaXplci5kZWNvZGUodG9rZW5pemVyKCUyMiVFNSU5MCVCRSVFOCVCQyVBOSVFMyU4MSVBRiVFNyU4QyVBQiVFMyU4MSVBNyVFMyU4MSU4MiVFMyU4MiU4QiVGMCU5RiU5MCVBRiVFMyU4MCU4MiVFNSVBRSU5RiVFMyU4MSVBRiVFNiU4NSVCNiVFNSVCRiU5QyglRTYlODUlQjYlRTYlODclODkpJUU1JUE0JUE3JUU1JUFEJUE2JUU1JTg3JUJBJUU4JUJBJUFCJTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXJapaneseTokenizer | |
| <span class="hljs-meta">>>> </span>tokenizer = GPTNeoXJapaneseTokenizer.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># You can confirm both 慶応 and 慶應 are encoded to 17749</span> | |
| <span class="hljs-meta">>>> </span>tokenizer(<span class="hljs-string">"吾輩は猫である🐯。実は慶応(慶應)大学出身"</span>)[<span class="hljs-string">"input_ids"</span>] | |
| [<span class="hljs-number">30014</span>, <span class="hljs-number">26883</span>, <span class="hljs-number">26638</span>, <span class="hljs-number">27228</span>, <span class="hljs-number">25</span>, <span class="hljs-number">26650</span>, <span class="hljs-number">31732</span>, <span class="hljs-number">31679</span>, <span class="hljs-number">27809</span>, <span class="hljs-number">26638</span>, <span class="hljs-number">17749</span>, <span class="hljs-number">31592</span>, <span class="hljs-number">17749</span>, <span class="hljs-number">31593</span>, <span class="hljs-number">321</span>, <span class="hljs-number">1281</span>] | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Both 慶応 and 慶應 are decoded to 慶応</span> | |
| <span class="hljs-meta">>>> </span>tokenizer.decode(tokenizer(<span class="hljs-string">"吾輩は猫である🐯。実は慶応(慶應)大学出身"</span>)[<span class="hljs-string">"input_ids"</span>]) | |
| <span class="hljs-string">'吾輩は猫である🐯。実は慶応(慶応)大学出身'</span>`,wrap:!1}}),{c(){t=p("p"),t.textContent=b,s=r(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-11lpom8"&&(t.textContent=b),s=i(o),u(d.$$.fragment,o)},m(o,J){l(o,t,J),l(o,s,J),g(d,o,J),y=!0},p:Me,i(o){y||(f(d.$$.fragment,o),y=!0)},o(o){_(d.$$.fragment,o),y=!1},d(o){o&&(a(t),a(s)),T(d,o)}}}function Ct(w){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){t=p("p"),t.innerHTML=b},l(s){t=m(s,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(s,d){l(s,t,d)},p:Me,d(s){s&&a(t)}}}function jt(w){let t,b="Example:",s,d,y;return d=new we({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YSmFwYW5lc2VNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQW1vZGVsJTIwJTNEJTIwR1BUTmVvWEphcGFuZXNlTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmFiZWphJTJGZ3B0LW5lb3gtamFwYW5lc2UtMi43YiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyJUU2JTk3JUE1JUU2JTlDJUFDJUU4JUFBJTlFJUUzJTgxJUFFR1BULW5lb3glRTMlODElOENIdWdnaW5nJTIwRmFjZSVFMyU4MSVBNyVFNCVCRCVCRiVFMyU4MSU4OCVFMyU4MSVCRSVFMyU4MSU5OSVGMCU5RiU5OCU4MCUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXJapaneseModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>model = GPTNeoXJapaneseModel.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"日本語のGPT-neoxがHugging Faceで使えます😀"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){t=p("p"),t.textContent=b,s=r(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-11lpom8"&&(t.textContent=b),s=i(o),u(d.$$.fragment,o)},m(o,J){l(o,t,J),l(o,s,J),g(d,o,J),y=!0},p:Me,i(o){y||(f(d.$$.fragment,o),y=!0)},o(o){_(d.$$.fragment,o),y=!1},d(o){o&&(a(t),a(s)),T(d,o)}}}function Gt(w){let t,b=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){t=p("p"),t.innerHTML=b},l(s){t=m(s,"P",{"data-svelte-h":!0}),M(t)!=="svelte-fincs2"&&(t.innerHTML=b)},m(s,d){l(s,t,d)},p:Me,d(s){s&&a(t)}}}function Xt(w){let t,b="Example:",s,d,y;return d=new we({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBHUFROZW9YSmFwYW5lc2VGb3JDYXVzYWxMTSUyQyUyMEdQVE5lb1hKYXBhbmVzZUNvbmZpZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQWNvbmZpZyUyMCUzRCUyMEdQVE5lb1hKYXBhbmVzZUNvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQWNvbmZpZy5pc19kZWNvZGVyJTIwJTNEJTIwVHJ1ZSUwQW1vZGVsJTIwJTNEJTIwR1BUTmVvWEphcGFuZXNlRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmFiZWphJTJGZ3B0LW5lb3gtamFwYW5lc2UtMi43YiUyMiUyQyUyMGNvbmZpZyUzRGNvbmZpZyklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyJUU2JTk3JUE1JUU2JTlDJUFDJUU4JUFBJTlFJUUzJTgxJUFFR1BULW5lb3glRTMlODElOENIdWdnaW5nJTIwRmFjZSVFMyU4MSVBNyVFNCVCRCVCRiVFMyU4MSU4OCVFMyU4MSVCRSVFMyU4MSU5OSVGMCU5RiU5OCU4MCUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, GPTNeoXJapaneseForCausalLM, GPTNeoXJapaneseConfig | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>config = GPTNeoXJapaneseConfig.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>config.is_decoder = <span class="hljs-literal">True</span> | |
| <span class="hljs-meta">>>> </span>model = GPTNeoXJapaneseForCausalLM.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>, config=config) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"日本語のGPT-neoxがHugging Faceで使えます😀"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>prediction_logits = outputs.logits`,wrap:!1}}),{c(){t=p("p"),t.textContent=b,s=r(),h(d.$$.fragment)},l(o){t=m(o,"P",{"data-svelte-h":!0}),M(t)!=="svelte-11lpom8"&&(t.textContent=b),s=i(o),u(d.$$.fragment,o)},m(o,J){l(o,t,J),l(o,s,J),g(d,o,J),y=!0},p:Me,i(o){y||(f(d.$$.fragment,o),y=!0)},o(o){_(d.$$.fragment,o),y=!1},d(o){o&&(a(t),a(s)),T(d,o)}}}function zt(w){let t,b,s,d,y,o,J,ve,S,lt=`We introduce GPT-NeoX-Japanese, which is an autoregressive language model for Japanese, trained on top of <a href="https://github.com/EleutherAI/gpt-neox" rel="nofollow">https://github.com/EleutherAI/gpt-neox</a>. | |
| Japanese is a unique language with its large vocabulary and a combination of hiragana, katakana, and kanji writing scripts. | |
| To address this distinct structure of the Japanese language, we use a <a href="https://github.com/tanreinama/Japanese-BPEEncoder_V2" rel="nofollow">special sub-word tokenizer</a>. We are very grateful to <em>tanreinama</em> for open-sourcing this incredibly helpful tokenizer. | |
| Following the recommendations from Google’s research on <a href="https://ai.googleblog.com/2022/04/pathways-language-model-palm-scaling-to.html" rel="nofollow">PaLM</a>, we have removed bias parameters from transformer blocks, achieving better model performance. Please refer <a href="https://medium.com/ml-abeja/training-a-better-gpt-2-93b157662ae4" rel="nofollow">this article</a> in detail.`,ke,Q,dt='Development of the model was led by <a href="https://github.com/SO0529" rel="nofollow">Shinya Otani</a>, <a href="https://github.com/spider-man-tm" rel="nofollow">Takayoshi Makabe</a>, <a href="https://github.com/Anuj040" rel="nofollow">Anuj Arora</a>, and <a href="https://github.com/go5paopao" rel="nofollow">Kyo Hattori</a> from <a href="https://www.abejainc.com/" rel="nofollow">ABEJA, Inc.</a>. For more information on this model-building activity, please refer <a href="https://tech-blog.abeja.asia/entry/abeja-gpt-project-202207" rel="nofollow">here (ja)</a>.',xe,H,$e,O,ct="The <code>generate()</code> method can be used to generate text using GPT NeoX Japanese model.",Ne,Y,Ce,A,je,D,pt='<li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',Ge,K,Xe,v,ee,Re,he,mt=`This is the configuration class to store the configuration of a <code>GPTNeoXModelJapanese</code>. It is used to instantiate | |
| a GPTNeoX 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 GPTNeoXJapanese | |
| <a href="https://huggingface.co/abeja/gpt-neox-japanese-2.7b" rel="nofollow">abeja/gpt-neox-japanese-2.7b</a> architecture.`,Le,ue,ht=`Configuration objects inherit from <a href="/docs/transformers/pr_34752/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the | |
| documentation from <a href="/docs/transformers/pr_34752/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information. Default configs is set as 2.7B model`,Se,F,ze,te,Pe,U,ne,Qe,ge,ut=`This tokenizer inherits from <a href="/docs/transformers/pr_34752/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> and is based on Japanese special Sub-Word-Encoding that is | |
| used in this repository (<a href="https://github.com/tanreinama/Japanese-BPEEncoder_V2" rel="nofollow">https://github.com/tanreinama/Japanese-BPEEncoder_V2</a>). Check the repository for details. | |
| Japanese has a relatively large vocabulary and there is no separation between words. Furthermore, the language is a | |
| combination of hiragana, katakana, and kanji, and variants such as “1” and “①” are often used. In order to cope | |
| with these, this tokenizer has the following features`,He,fe,gt=`<li>Subword-by-subword segmentation, which is intermediate between byte strings and morphological analysis.</li> <li>BPEs are created for each Kanji, Hiragana, and Katakana character, and there are no BPEs that cross character | |
| types, such as Kanji + Hiragana or Hiragana + Katakana.</li> <li>All-byte encoding that does not require <unk>.</li> <li>Independent of UTF codes such as 2-byte and 3-byte characters</li> <li>Conversion of heterographs to the same token_id</li> <li>Emoji and Emoticon are grouped into 12 types as special tags.</li>`,Oe,Z,Ye,I,oe,Ae,_e,ft="Converts a sequence of tokens (string) in a single string.",Ve,ae,Fe,N,se,De,Te,_t=`The bare GPTNeoXJapanese Model transformer outputting raw hidden-states without any specific head on top. | |
| This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use | |
| it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and | |
| behavior.`,Ke,x,re,et,be,Tt='The <a href="/docs/transformers/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseModel">GPTNeoXJapaneseModel</a> forward method, overrides the <code>__call__</code> special method.',tt,W,nt,E,Ze,ie,Ie,C,le,ot,ye,bt=`GPTNeoXJapanese Model with a <code>language modeling</code> head on top for Classifier Model fine-tuning. | |
| This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use | |
| it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and | |
| behavior.`,at,$,de,st,Je,yt='The <a href="/docs/transformers/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseForCausalLM">GPTNeoXJapaneseForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',rt,B,it,q,We,ce,Ee,Ue,Be;return y=new L({props:{title:"GPT-NeoX-Japanese",local:"gpt-neox-japanese",headingTag:"h1"}}),J=new L({props:{title:"Overview",local:"overview",headingTag:"h2"}}),H=new L({props:{title:"Usage example",local:"usage-example",headingTag:"h3"}}),Y=new we({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEdQVE5lb1hKYXBhbmVzZUZvckNhdXNhbExNJTJDJTIwR1BUTmVvWEphcGFuZXNlVG9rZW5pemVyJTBBJTBBbW9kZWwlMjAlM0QlMjBHUFROZW9YSmFwYW5lc2VGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEdQVE5lb1hKYXBhbmVzZVRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWJlamElMkZncHQtbmVveC1qYXBhbmVzZS0yLjdiJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMiVFNCVCQSVCQSVFMyU4MSVBOEFJJUUzJTgxJThDJUU1JThEJTk0JUU4JUFBJUJGJUUzJTgxJTk5JUUzJTgyJThCJUUzJTgxJTlGJUUzJTgyJTgxJUUzJTgxJUFCJUUzJTgxJUFGJUUzJTgwJTgxJTIyJTBBJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLmlucHV0X2lkcyUwQSUwQWdlbl90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSglMEElMjAlMjAlMjAlMjBpbnB1dF9pZHMlMkMlMEElMjAlMjAlMjAlMjBkb19zYW1wbGUlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdGVtcGVyYXR1cmUlM0QwLjklMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNEMTAwJTJDJTBBKSUwQWdlbl90ZXh0JTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTVCMCU1RCUwQSUwQXByaW50KGdlbl90ZXh0KQ==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPTNeoXJapaneseForCausalLM, GPTNeoXJapaneseTokenizer | |
| <span class="hljs-meta">>>> </span>model = GPTNeoXJapaneseForCausalLM.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer = GPTNeoXJapaneseTokenizer.from_pretrained(<span class="hljs-string">"abeja/gpt-neox-japanese-2.7b"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"人とAIが協調するためには、"</span> | |
| <span class="hljs-meta">>>> </span>input_ids = tokenizer(prompt, return_tensors=<span class="hljs-string">"pt"</span>).input_ids | |
| <span class="hljs-meta">>>> </span>gen_tokens = model.generate( | |
| <span class="hljs-meta">... </span> input_ids, | |
| <span class="hljs-meta">... </span> do_sample=<span class="hljs-literal">True</span>, | |
| <span class="hljs-meta">... </span> temperature=<span class="hljs-number">0.9</span>, | |
| <span class="hljs-meta">... </span> max_length=<span class="hljs-number">100</span>, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>gen_text = tokenizer.batch_decode(gen_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>] | |
| <span class="hljs-meta">>>> </span><span class="hljs-built_in">print</span>(gen_text) | |
| 人とAIが協調するためには、AIと人が共存し、AIを正しく理解する必要があります。`,wrap:!1}}),A=new L({props:{title:"Resources",local:"resources",headingTag:"h2"}}),K=new L({props:{title:"GPTNeoXJapaneseConfig",local:"transformers.GPTNeoXJapaneseConfig",headingTag:"h2"}}),ee=new me({props:{name:"class transformers.GPTNeoXJapaneseConfig",anchor:"transformers.GPTNeoXJapaneseConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 2560"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"intermediate_multiple_size",val:" = 4"},{name:"hidden_act",val:" = 'gelu'"},{name:"rotary_pct",val:" = 1.0"},{name:"rotary_emb_base",val:" = 10000"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{name:"use_cache",val:" = True"},{name:"bos_token_id",val:" = 31996"},{name:"eos_token_id",val:" = 31999"},{name:"rope_scaling",val:" = None"},{name:"attention_dropout",val:" = 0.1"},{name:"hidden_dropout",val:" = 0.0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) — | |
| Vocabulary size of the GPTNeoXJapanese model. Defines the number of different tokens that can be | |
| represented by the <code>inputs_ids</code> passed when calling <code>GPTNeoXJapanese</code>.`,name:"vocab_size"},{anchor:"transformers.GPTNeoXJapaneseConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2560) — | |
| Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.GPTNeoXJapaneseConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) — | |
| Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.GPTNeoXJapaneseConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) — | |
| Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.GPTNeoXJapaneseConfig.intermediate_multiple_size",description:`<strong>intermediate_multiple_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) — | |
| Dimension of the “intermediate” layer in the Transformer encoder is calculated by hidden_size * | |
| intermediate_multiple_size.`,name:"intermediate_multiple_size"},{anchor:"transformers.GPTNeoXJapaneseConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>"gelu"</code>) — | |
| The non-linear activation function (function or string) in the encoder and pooler.`,name:"hidden_act"},{anchor:"transformers.GPTNeoXJapaneseConfig.rotary_pct",description:`<strong>rotary_pct</strong> (<code>float</code>, <em>optional</em>, defaults to 1.00) — | |
| percentage of hidden dimensions to allocate to rotary embeddings`,name:"rotary_pct"},{anchor:"transformers.GPTNeoXJapaneseConfig.rotary_emb_base",description:`<strong>rotary_emb_base</strong> (<code>int</code>, <em>optional</em>, defaults to 10000) — | |
| base for computing rotary embeddings frequency`,name:"rotary_emb_base"},{anchor:"transformers.GPTNeoXJapaneseConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) — | |
| The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.GPTNeoXJapaneseConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) — | |
| The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.GPTNeoXJapaneseConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) — | |
| The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.GPTNeoXJapaneseConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| 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.GPTNeoXJapaneseConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) — | |
| Dictionary containing the scaling configuration for the RoPE embeddings. NOTE: if you apply new rope type | |
| and you expect the model to work on longer <code>max_position_embeddings</code>, we recommend you to update this value | |
| accordingly. | |
| Expected contents: | |
| <code>rope_type</code> (<code>str</code>): | |
| The sub-variant of RoPE to use. Can be one of [‘default’, ‘linear’, ‘dynamic’, ‘yarn’, ‘longrope’, | |
| ‘llama3’], with ‘default’ being the original RoPE implementation. | |
| <code>factor</code> (<code>float</code>, <em>optional</em>): | |
| Used with all rope types except ‘default’. The scaling factor to apply to the RoPE embeddings. In | |
| most scaling types, a <code>factor</code> of x will enable the model to handle sequences of length x <em> | |
| original maximum pre-trained length. | |
| <code>original_max_position_embeddings</code> (<code>int</code>, </em>optional<em>): | |
| Used with ‘dynamic’, ‘longrope’ and ‘llama3’. The original max position embeddings used during | |
| pretraining. | |
| <code>attention_factor</code> (<code>float</code>, </em>optional<em>): | |
| Used with ‘yarn’ and ‘longrope’. The scaling factor to be applied on the attention | |
| computation. If unspecified, it defaults to value recommended by the implementation, using the | |
| <code>factor</code> field to infer the suggested value. | |
| <code>beta_fast</code> (<code>float</code>, </em>optional<em>): | |
| Only used with ‘yarn’. Parameter to set the boundary for extrapolation (only) in the linear | |
| ramp function. If unspecified, it defaults to 32. | |
| <code>beta_slow</code> (<code>float</code>, </em>optional<em>): | |
| Only used with ‘yarn’. Parameter to set the boundary for interpolation (only) in the linear | |
| ramp function. If unspecified, it defaults to 1. | |
| <code>short_factor</code> (<code>List[float]</code>, </em>optional<em>): | |
| Only used with ‘longrope’. The scaling factor to be applied to short contexts (< | |
| <code>original_max_position_embeddings</code>). Must be a list of numbers with the same length as the hidden | |
| size divided by the number of attention heads divided by 2 | |
| <code>long_factor</code> (<code>List[float]</code>, </em>optional<em>): | |
| Only used with ‘longrope’. The scaling factor to be applied to long contexts (< | |
| <code>original_max_position_embeddings</code>). Must be a list of numbers with the same length as the hidden | |
| size divided by the number of attention heads divided by 2 | |
| <code>low_freq_factor</code> (<code>float</code>, </em>optional<em>): | |
| Only used with ‘llama3’. Scaling factor applied to low frequency components of the RoPE | |
| <code>high_freq_factor</code> (<code>float</code>, </em>optional*): | |
| Only used with ‘llama3’. Scaling factor applied to high frequency components of the RoPE`,name:"rope_scaling"},{anchor:"transformers.GPTNeoXJapaneseConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) — | |
| The dropout ratio for the attention.`,name:"attention_dropout"},{anchor:"transformers.GPTNeoXJapaneseConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) — | |
| The dropout ratio for the hidden layer. | |
| Example —`,name:"hidden_dropout"}],source:"https://github.com/huggingface/transformers/blob/vr_34752/src/transformers/models/gpt_neox_japanese/configuration_gpt_neox_japanese.py#L25"}}),F=new qe({props:{anchor:"transformers.GPTNeoXJapaneseConfig.example",$$slots:{default:[$t]},$$scope:{ctx:w}}}),te=new L({props:{title:"GPTNeoXJapaneseTokenizer",local:"transformers.GPTNeoXJapaneseTokenizer",headingTag:"h2"}}),ne=new me({props:{name:"class transformers.GPTNeoXJapaneseTokenizer",anchor:"transformers.GPTNeoXJapaneseTokenizer",parameters:[{name:"vocab_file",val:""},{name:"emoji_file",val:""},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"pad_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|startoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"do_clean_text",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) — | |
| File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.GPTNeoXJapaneseTokenizer.emoji_file",description:`<strong>emoji_file</strong> (<code>str</code>) — | |
| File containing the emoji.`,name:"emoji_file"},{anchor:"transformers.GPTNeoXJapaneseTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"<|endoftext|>"</code>) — | |
| 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.GPTNeoXJapaneseTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"<|endoftext|>"</code>) — | |
| The token used for padding`,name:"pad_token"},{anchor:"transformers.GPTNeoXJapaneseTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"<|startoftext|>"</code>) — | |
| The beginning of sequence token.`,name:"bos_token"},{anchor:"transformers.GPTNeoXJapaneseTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>"<|endoftext|>"</code>) — | |
| The end of sequence token.`,name:"eos_token"},{anchor:"transformers.GPTNeoXJapaneseTokenizer.do_clean_text",description:`<strong>do_clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether or not to clean text for URL, EMAIL, TEL, Japanese DATE and Japanese PRICE.`,name:"do_clean_text"}],source:"https://github.com/huggingface/transformers/blob/vr_34752/src/transformers/models/gpt_neox_japanese/tokenization_gpt_neox_japanese.py#L54"}}),Z=new qe({props:{anchor:"transformers.GPTNeoXJapaneseTokenizer.example",$$slots:{default:[Nt]},$$scope:{ctx:w}}}),oe=new me({props:{name:"convert_tokens_to_string",anchor:"transformers.GPTNeoXJapaneseTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_34752/src/transformers/models/gpt_neox_japanese/tokenization_gpt_neox_japanese.py#L159"}}),ae=new L({props:{title:"GPTNeoXJapaneseModel",local:"transformers.GPTNeoXJapaneseModel",headingTag:"h2"}}),se=new me({props:{name:"class transformers.GPTNeoXJapaneseModel",anchor:"transformers.GPTNeoXJapaneseModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseConfig">~GPTNeoXJapaneseConfig</a>) — 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/pr_34752/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/vr_34752/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py#L539"}}),re=new me({props:{name:"forward",anchor:"transformers.GPTNeoXJapaneseModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) — | |
| Indices of input sequence tokens in the vocabulary.</p> | |
| <p>Indices can be obtained using <a href="/docs/transformers/pr_34752/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>.`,name:"input_ids"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| 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>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p> | |
| <ul> | |
| <li>0 corresponds to a <em>sentence A</em> token,</li> | |
| <li>1 corresponds to a <em>sentence B</em> token.</li> | |
| </ul>`,name:"token_type_ids"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.GPTNeoXJapaneseModel.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>) — | |
| 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.GPTNeoXJapaneseModel.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>) — | |
| 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’s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) — | |
| Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention | |
| blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code> | |
| returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p> | |
| <p>Two formats are allowed:</p> | |
| <ul> | |
| <li>a <a href="/docs/transformers/pr_34752/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li> | |
| <li>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>). This is also known as the legacy | |
| cache format.</li> | |
| </ul> | |
| <p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the | |
| legacy cache format will be returned.</p> | |
| <p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don’t | |
| have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code> | |
| of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_34752/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXJapaneseModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) — | |
| Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>, | |
| this tensor is not affected by padding. It is used to update the cache in the correct position and to infer | |
| the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_34752/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py#L564",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_34752/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast" | |
| >transformers.modeling_outputs.BaseModelOutputWithPast</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/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseConfig" | |
| >GPTNeoXJapaneseConfig</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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_34752/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast" | |
| >transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),W=new Jt({props:{$$slots:{default:[Ct]},$$scope:{ctx:w}}}),E=new qe({props:{anchor:"transformers.GPTNeoXJapaneseModel.forward.example",$$slots:{default:[jt]},$$scope:{ctx:w}}}),ie=new L({props:{title:"GPTNeoXJapaneseForCausalLM",local:"transformers.GPTNeoXJapaneseForCausalLM",headingTag:"h2"}}),le=new me({props:{name:"class transformers.GPTNeoXJapaneseForCausalLM",anchor:"transformers.GPTNeoXJapaneseForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseConfig">~GPTNeoXJapaneseConfig</a>) — 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/pr_34752/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/vr_34752/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py#L815"}}),de=new me({props:{name:"forward",anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],parametersDescription:[{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) — | |
| Indices of input sequence tokens in the vocabulary.</p> | |
| <p>Indices can be obtained using <a href="/docs/transformers/pr_34752/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>.`,name:"input_ids"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| 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>`,name:"attention_mask"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p> | |
| <ul> | |
| <li>0 corresponds to a <em>sentence A</em> token,</li> | |
| <li>1 corresponds to a <em>sentence B</em> token.</li> | |
| </ul>`,name:"token_type_ids"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.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>) — | |
| 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.GPTNeoXJapaneseForCausalLM.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>) — | |
| 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’s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) — | |
| Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention | |
| blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code> | |
| returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p> | |
| <p>Two formats are allowed:</p> | |
| <ul> | |
| <li>a <a href="/docs/transformers/pr_34752/en/internal/generation_utils#transformers.Cache">Cache</a> instance;</li> | |
| <li>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>). This is also known as the legacy | |
| cache format.</li> | |
| </ul> | |
| <p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the | |
| legacy cache format will be returned.</p> | |
| <p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don’t | |
| have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code> | |
| of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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.GPTNeoXJapaneseForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_34752/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) — | |
| Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>, | |
| this tensor is not affected by padding. It is used to update the cache in the correct position and to infer | |
| the complete sequence length.`,name:"cache_position"},{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Labels for computing the left-to-right language modeling loss (next word prediction). 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 n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/vr_34752/src/transformers/models/gpt_neox_japanese/modeling_gpt_neox_japanese.py#L838",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_34752/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast" | |
| >transformers.modeling_outputs.CausalLMOutputWithPast</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/pr_34752/en/model_doc/gpt_neox_japanese#transformers.GPTNeoXJapaneseConfig" | |
| >GPTNeoXJapaneseConfig</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) — 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>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p> | |
| </li> | |
| <li> | |
| <p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape | |
| <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p> | |
| <p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see | |
| <code>past_key_values</code> input) to speed up sequential decoding.</p> | |
| </li> | |
| <li> | |
| <p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_34752/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast" | |
| >transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),B=new Jt({props:{$$slots:{default:[Gt]},$$scope:{ctx:w}}}),q=new qe({props:{anchor:"transformers.GPTNeoXJapaneseForCausalLM.forward.example",$$slots:{default:[Xt]},$$scope:{ctx:w}}}),ce=new xt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/gpt_neox_japanese.md"}}),{c(){t=p("meta"),b=r(),s=p("p"),d=r(),h(y.$$.fragment),o=r(),h(J.$$.fragment),ve=r(),S=p("p"),S.innerHTML=lt,ke=r(),Q=p("p"),Q.innerHTML=dt,xe=r(),h(H.$$.fragment),$e=r(),O=p("p"),O.innerHTML=ct,Ne=r(),h(Y.$$.fragment),Ce=r(),h(A.$$.fragment),je=r(),D=p("ul"),D.innerHTML=pt,Ge=r(),h(K.$$.fragment),Xe=r(),v=p("div"),h(ee.$$.fragment),Re=r(),he=p("p"),he.innerHTML=mt,Le=r(),ue=p("p"),ue.innerHTML=ht,Se=r(),h(F.$$.fragment),ze=r(),h(te.$$.fragment),Pe=r(),U=p("div"),h(ne.$$.fragment),Qe=r(),ge=p("p"),ge.innerHTML=ut,He=r(),fe=p("ul"),fe.innerHTML=gt,Oe=r(),h(Z.$$.fragment),Ye=r(),I=p("div"),h(oe.$$.fragment),Ae=r(),_e=p("p"),_e.textContent=ft,Ve=r(),h(ae.$$.fragment),Fe=r(),N=p("div"),h(se.$$.fragment),De=r(),Te=p("p"),Te.innerHTML=_t,Ke=r(),x=p("div"),h(re.$$.fragment),et=r(),be=p("p"),be.innerHTML=Tt,tt=r(),h(W.$$.fragment),nt=r(),h(E.$$.fragment),Ze=r(),h(ie.$$.fragment),Ie=r(),C=p("div"),h(le.$$.fragment),ot=r(),ye=p("p"),ye.innerHTML=bt,at=r(),$=p("div"),h(de.$$.fragment),st=r(),Je=p("p"),Je.innerHTML=yt,rt=r(),h(B.$$.fragment),it=r(),h(q.$$.fragment),We=r(),h(ce.$$.fragment),Ee=r(),Ue=p("p"),this.h()},l(e){const n=kt("svelte-u9bgzb",document.head);t=m(n,"META",{name:!0,content:!0}),n.forEach(a),b=i(e),s=m(e,"P",{}),P(s).forEach(a),d=i(e),u(y.$$.fragment,e),o=i(e),u(J.$$.fragment,e),ve=i(e),S=m(e,"P",{"data-svelte-h":!0}),M(S)!=="svelte-vnhg7c"&&(S.innerHTML=lt),ke=i(e),Q=m(e,"P",{"data-svelte-h":!0}),M(Q)!=="svelte-18p40hn"&&(Q.innerHTML=dt),xe=i(e),u(H.$$.fragment,e),$e=i(e),O=m(e,"P",{"data-svelte-h":!0}),M(O)!=="svelte-znvtjx"&&(O.innerHTML=ct),Ne=i(e),u(Y.$$.fragment,e),Ce=i(e),u(A.$$.fragment,e),je=i(e),D=m(e,"UL",{"data-svelte-h":!0}),M(D)!=="svelte-162aebv"&&(D.innerHTML=pt),Ge=i(e),u(K.$$.fragment,e),Xe=i(e),v=m(e,"DIV",{class:!0});var j=P(v);u(ee.$$.fragment,j),Re=i(j),he=m(j,"P",{"data-svelte-h":!0}),M(he)!=="svelte-6p1ri7"&&(he.innerHTML=mt),Le=i(j),ue=m(j,"P",{"data-svelte-h":!0}),M(ue)!=="svelte-jq6bfh"&&(ue.innerHTML=ht),Se=i(j),u(F.$$.fragment,j),j.forEach(a),ze=i(e),u(te.$$.fragment,e),Pe=i(e),U=m(e,"DIV",{class:!0});var k=P(U);u(ne.$$.fragment,k),Qe=i(k),ge=m(k,"P",{"data-svelte-h":!0}),M(ge)!=="svelte-1rnqiwt"&&(ge.innerHTML=ut),He=i(k),fe=m(k,"UL",{"data-svelte-h":!0}),M(fe)!=="svelte-9px4ih"&&(fe.innerHTML=gt),Oe=i(k),u(Z.$$.fragment,k),Ye=i(k),I=m(k,"DIV",{class:!0});var pe=P(I);u(oe.$$.fragment,pe),Ae=i(pe),_e=m(pe,"P",{"data-svelte-h":!0}),M(_e)!=="svelte-b3k2yi"&&(_e.textContent=ft),pe.forEach(a),k.forEach(a),Ve=i(e),u(ae.$$.fragment,e),Fe=i(e),N=m(e,"DIV",{class:!0});var X=P(N);u(se.$$.fragment,X),De=i(X),Te=m(X,"P",{"data-svelte-h":!0}),M(Te)!=="svelte-17on1em"&&(Te.innerHTML=_t),Ke=i(X),x=m(X,"DIV",{class:!0});var G=P(x);u(re.$$.fragment,G),et=i(G),be=m(G,"P",{"data-svelte-h":!0}),M(be)!=="svelte-1tqbqs2"&&(be.innerHTML=Tt),tt=i(G),u(W.$$.fragment,G),nt=i(G),u(E.$$.fragment,G),G.forEach(a),X.forEach(a),Ze=i(e),u(ie.$$.fragment,e),Ie=i(e),C=m(e,"DIV",{class:!0});var z=P(C);u(le.$$.fragment,z),ot=i(z),ye=m(z,"P",{"data-svelte-h":!0}),M(ye)!=="svelte-1ycm5h2"&&(ye.innerHTML=bt),at=i(z),$=m(z,"DIV",{class:!0});var R=P($);u(de.$$.fragment,R),st=i(R),Je=m(R,"P",{"data-svelte-h":!0}),M(Je)!=="svelte-19ln1hq"&&(Je.innerHTML=yt),rt=i(R),u(B.$$.fragment,R),it=i(R),u(q.$$.fragment,R),R.forEach(a),z.forEach(a),We=i(e),u(ce.$$.fragment,e),Ee=i(e),Ue=m(e,"P",{}),P(Ue).forEach(a),this.h()},h(){V(t,"name","hf:doc:metadata"),V(t,"content",Pt),V(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),V(C,"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,n){c(document.head,t),l(e,b,n),l(e,s,n),l(e,d,n),g(y,e,n),l(e,o,n),g(J,e,n),l(e,ve,n),l(e,S,n),l(e,ke,n),l(e,Q,n),l(e,xe,n),g(H,e,n),l(e,$e,n),l(e,O,n),l(e,Ne,n),g(Y,e,n),l(e,Ce,n),g(A,e,n),l(e,je,n),l(e,D,n),l(e,Ge,n),g(K,e,n),l(e,Xe,n),l(e,v,n),g(ee,v,null),c(v,Re),c(v,he),c(v,Le),c(v,ue),c(v,Se),g(F,v,null),l(e,ze,n),g(te,e,n),l(e,Pe,n),l(e,U,n),g(ne,U,null),c(U,Qe),c(U,ge),c(U,He),c(U,fe),c(U,Oe),g(Z,U,null),c(U,Ye),c(U,I),g(oe,I,null),c(I,Ae),c(I,_e),l(e,Ve,n),g(ae,e,n),l(e,Fe,n),l(e,N,n),g(se,N,null),c(N,De),c(N,Te),c(N,Ke),c(N,x),g(re,x,null),c(x,et),c(x,be),c(x,tt),g(W,x,null),c(x,nt),g(E,x,null),l(e,Ze,n),g(ie,e,n),l(e,Ie,n),l(e,C,n),g(le,C,null),c(C,ot),c(C,ye),c(C,at),c(C,$),g(de,$,null),c($,st),c($,Je),c($,rt),g(B,$,null),c($,it),g(q,$,null),l(e,We,n),g(ce,e,n),l(e,Ee,n),l(e,Ue,n),Be=!0},p(e,[n]){const j={};n&2&&(j.$$scope={dirty:n,ctx:e}),F.$set(j);const k={};n&2&&(k.$$scope={dirty:n,ctx:e}),Z.$set(k);const pe={};n&2&&(pe.$$scope={dirty:n,ctx:e}),W.$set(pe);const X={};n&2&&(X.$$scope={dirty:n,ctx:e}),E.$set(X);const G={};n&2&&(G.$$scope={dirty:n,ctx:e}),B.$set(G);const z={};n&2&&(z.$$scope={dirty:n,ctx:e}),q.$set(z)},i(e){Be||(f(y.$$.fragment,e),f(J.$$.fragment,e),f(H.$$.fragment,e),f(Y.$$.fragment,e),f(A.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(F.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),f(Z.$$.fragment,e),f(oe.$$.fragment,e),f(ae.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(W.$$.fragment,e),f(E.$$.fragment,e),f(ie.$$.fragment,e),f(le.$$.fragment,e),f(de.$$.fragment,e),f(B.$$.fragment,e),f(q.$$.fragment,e),f(ce.$$.fragment,e),Be=!0)},o(e){_(y.$$.fragment,e),_(J.$$.fragment,e),_(H.$$.fragment,e),_(Y.$$.fragment,e),_(A.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(F.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(Z.$$.fragment,e),_(oe.$$.fragment,e),_(ae.$$.fragment,e),_(se.$$.fragment,e),_(re.$$.fragment,e),_(W.$$.fragment,e),_(E.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(de.$$.fragment,e),_(B.$$.fragment,e),_(q.$$.fragment,e),_(ce.$$.fragment,e),Be=!1},d(e){e&&(a(b),a(s),a(d),a(o),a(ve),a(S),a(ke),a(Q),a(xe),a($e),a(O),a(Ne),a(Ce),a(je),a(D),a(Ge),a(Xe),a(v),a(ze),a(Pe),a(U),a(Ve),a(Fe),a(N),a(Ze),a(Ie),a(C),a(We),a(Ee),a(Ue)),a(t),T(y,e),T(J,e),T(H,e),T(Y,e),T(A,e),T(K,e),T(ee),T(F),T(te,e),T(ne),T(Z),T(oe),T(ae,e),T(se),T(re),T(W),T(E),T(ie,e),T(le),T(de),T(B),T(q),T(ce,e)}}}const Pt='{"title":"GPT-NeoX-Japanese","local":"gpt-neox-japanese","sections":[{"title":"Overview","local":"overview","sections":[{"title":"Usage example","local":"usage-example","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"GPTNeoXJapaneseConfig","local":"transformers.GPTNeoXJapaneseConfig","sections":[],"depth":2},{"title":"GPTNeoXJapaneseTokenizer","local":"transformers.GPTNeoXJapaneseTokenizer","sections":[],"depth":2},{"title":"GPTNeoXJapaneseModel","local":"transformers.GPTNeoXJapaneseModel","sections":[],"depth":2},{"title":"GPTNeoXJapaneseForCausalLM","local":"transformers.GPTNeoXJapaneseForCausalLM","sections":[],"depth":2}],"depth":1}';function Vt(w){return Ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rt extends wt{constructor(t){super(),vt(this,t,Vt,zt,Mt,{})}}export{Rt as component}; | |
Xet Storage Details
- Size:
- 61.6 kB
- Xet hash:
- b11564705e7922a5dd360bd30a0155bef2fb1d7969489d36579513c385236cc5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.