import{S as nw,i as sw,s as aw,e as s,k as m,w,t as o,M as rw,c as a,d as t,m as p,a as r,x as v,h as n,b as g,G as e,g as _,y as M,q as C,o as $,B as F,v as iw,L as He}from"../../chunks/vendor-hf-doc-builder.js";import{T as De}from"../../chunks/Tip-hf-doc-builder.js";import{D as se}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ke}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ye}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function lw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENhbWVtYmVydENvbmZpZyUyQyUyMENhbWVtYmVydE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENhbWVtYmVydCUyMGNhbWVtYmVydC1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMENhbWVtYmVydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjYW1lbWJlcnQtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwQ2FtZW1iZXJ0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CamembertConfig, CamembertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Camembert camembert-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CamembertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the camembert-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function dw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function cw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDYW1lbWJlcnRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FtZW1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBDYW1lbWJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyY2FtZW1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertModel
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertModel.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function mw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function pw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDYW1lbWJlcnRGb3JDYXVzYWxMTSUyQyUyMEF1dG9Db25maWclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQWNvbmZpZyUyMCUzRCUyMEF1dG9Db25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQWNvbmZpZy5pc19kZWNvZGVyJTIwJTNEJTIwVHJ1ZSUwQW1vZGVsJTIwJTNEJTIwQ2FtZW1iZXJ0Rm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyJTJDJTIwY29uZmlnJTNEY29uZmlnKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBcHJlZGljdGlvbl9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForCausalLM, AutoConfig
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForCausalLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>, config=config)

<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>prediction_logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function hw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function uw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDYW1lbWJlcnRGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FtZW1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBDYW1lbWJlcnRGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyY2FtZW1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTNDbWFzayUzRS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDbWFzayUzRSUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0ZWRfdG9rZW5faWQpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTNDbWFzayUzRSUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKG91dHB1dHMubG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForMaskedLM
<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;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.1</span>`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function fw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function gw(J){let d,y,h,u,T;return u=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENhbWVtYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiklMEFtb2RlbCUyMCUzRCUyMENhbWVtYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmNhcmRpZmZubHAlMkZ0d2l0dGVyLXJvYmVydGEtYmFzZS1lbW90aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEFtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWQlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBDYW1lbWJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, CamembertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){d=s("p"),y=o("Example of single-label classification:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example of single-label classification:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function _w(J){let d,y,h,u,T;return u=new Ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENhbWVtYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiklMEFtb2RlbCUyMCUzRCUyMENhbWVtYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmNhcmRpZmZubHAlMkZ0d2l0dGVyLXJvYmVydGEtYmFzZS1lbW90aW9uJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBDYW1lbWJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, CamembertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Tw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function kw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDYW1lbWJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJKZWFuLUJhcHRpc3RlJTJGcm9iZXJ0YS1sYXJnZS1uZXItZW5nbGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMENhbWVtYmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMkplYW4tQmFwdGlzdGUlMkZyb2JlcnRhLWxhcmdlLW5lci1lbmdsaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzJTBBcm91bmQobG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForTokenClassification
<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;Jean-Baptiste/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;Jean-Baptiste/roberta-large-ner-english&quot;</span>)

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function ww(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function vw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDYW1lbWJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGVlcHNldCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBDYW1lbWJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZGVlcHNldCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RfYW5zd2VyX3Rva2VucyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlKSUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CamembertForQuestionAnswering
<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;deepset/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CamembertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;deepset/roberta-base-squad2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; puppet&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Mw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Cw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function $w(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydE1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYW1lbWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ2FtZW1iZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertModel.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Fw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Ew(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function jw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvckNhdXNhbExNJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYW1lbWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ2FtZW1iZXJ0Rm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForCausalLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForCausalLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function zw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Jw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function Uw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvck1hc2tlZExNJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYW1lbWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ2FtZW1iZXJ0Rm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCUzQ21hc2slM0UuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDbWFzayUzRSUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0ZWRfdG9rZW5faWQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(outputs.loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.1</span>`}}),{c(){w(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),y=!0},p:He,i(h){y||(C(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){F(d,h)}}}function xw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Nw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function Iw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmNhcmRpZmZubHAlMkZ0d2l0dGVyLXJvYmVydGEtYmFzZS1lbW90aW9uJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZDYW1lbWJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBJTBBbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChsb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEFtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWQlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Zw(J){let d,y;return d=new Ke({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZDYW1lbWJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRmLmNvbnN0YW50KDEpJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzJTBBcm91bmQoZmxvYXQobG9zcyklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){w(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),y=!0},p:He,i(h){y||(C(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){F(d,h)}}}function qw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Bw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function Rw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYW1lbWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ2FtZW1iZXJ0Rm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMmNhbWVtYmVydC1iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;camembert-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Gw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Aw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function Vw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnlkc2hpZWglMkZyb2JlcnRhLWxhcmdlLW5lci1lbmdsaXNoJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZDYW1lbWJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ5ZHNoaWVoJTJGcm9iZXJ0YS1sYXJnZS1uZXItZW5nbGlzaCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-large-ner-english&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>]`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Lw(J){let d,y;return d=new Ke({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){w(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),y=!0},p:He,i(h){y||(C(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){F(d,h)}}}function Xw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),T=o(" accept two formats as input:"),l=m(),c=s("ul"),z=s("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),pe=m(),B=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),H=m(),k=s("p"),Te=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=s("code"),ke=o("model.fit()"),he=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=s("code"),we=o("model.fit()"),ie=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),O=s("code"),ve=o("fit()"),ue=o(" and "),A=s("code"),Me=o("predict()"),fe=o(`, such as when creating your own layers or models with
the Keras `),V=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),te=m(),U=s("ul"),N=s("li"),ge=o("a single Tensor with "),L=s("code"),le=o("input_ids"),$e=o(" only and nothing else: "),X=s("code"),Fe=o("model(input_ids)"),Ee=m(),x=s("li"),oe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),de=o("model([input_ids, attention_mask])"),je=o(" or "),Q=s("code"),ce=o("model([input_ids, attention_mask, token_type_ids])"),ze=m(),Z=s("li"),_e=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=s("code"),re=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),K=m(),W=s("p"),Je=o(`Note that when creating models and layers with
`),I=s("a"),Ue=o("subclassing"),be=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=a(f,"P",{});var E=r(d);y=n(E,"TensorFlow models and layers in "),h=a(E,"CODE",{});var xe=r(h);u=n(xe,"transformers"),xe.forEach(t),T=n(E," accept two formats as input:"),E.forEach(t),l=p(f),c=a(f,"UL",{});var ne=r(c);z=a(ne,"LI",{});var Ae=r(z);ye=n(Ae,"having all inputs as keyword arguments (like PyTorch models), or"),Ae.forEach(t),pe=p(ne),B=a(ne,"LI",{});var Be=r(B);ae=n(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),ne.forEach(t),H=p(f),k=a(f,"P",{});var j=r(k);Te=n(j,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),S=a(j,"CODE",{});var Ve=r(S);ke=n(Ve,"model.fit()"),Ve.forEach(t),he=n(j,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),G=a(j,"CODE",{});var Le=r(G);we=n(Le,"model.fit()"),Le.forEach(t),ie=n(j,` supports! If, however, you want to use the second
format outside of Keras methods like `),O=a(j,"CODE",{});var Re=r(O);ve=n(Re,"fit()"),Re.forEach(t),ue=n(j," and "),A=a(j,"CODE",{});var Ne=r(A);Me=n(Ne,"predict()"),Ne.forEach(t),fe=n(j,`, such as when creating your own layers or models with
the Keras `),V=a(j,"CODE",{});var Xe=r(V);me=n(Xe,"Functional"),Xe.forEach(t),Ce=n(j,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),j.forEach(t),te=p(f),U=a(f,"UL",{});var q=r(U);N=a(q,"LI",{});var P=r(N);ge=n(P,"a single Tensor with "),L=a(P,"CODE",{});var Ie=r(L);le=n(Ie,"input_ids"),Ie.forEach(t),$e=n(P," only and nothing else: "),X=a(P,"CODE",{});var Se=r(X);Fe=n(Se,"model(input_ids)"),Se.forEach(t),P.forEach(t),Ee=p(q),x=a(q,"LI",{});var Y=r(x);oe=n(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(Y,"CODE",{});var Ge=r(D);de=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),je=n(Y," or "),Q=a(Y,"CODE",{});var Ze=r(Q);ce=n(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),ze=p(q),Z=a(q,"LI",{});var We=r(Z);_e=n(We,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),R=a(We,"CODE",{});var Pe=r(R);re=n(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),We.forEach(t),q.forEach(t),K=p(f),W=a(f,"P",{});var ee=r(W);Je=n(ee,`Note that when creating models and layers with
`),I=a(ee,"A",{href:!0,rel:!0});var qe=r(I);Ue=n(qe,"subclassing"),qe.forEach(t),be=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){g(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(I,"rel","nofollow")},m(f,E){_(f,d,E),e(d,y),e(d,h),e(h,u),e(d,T),_(f,l,E),_(f,c,E),e(c,z),e(z,ye),e(c,pe),e(c,B),e(B,ae),_(f,H,E),_(f,k,E),e(k,Te),e(k,S),e(S,ke),e(k,he),e(k,G),e(G,we),e(k,ie),e(k,O),e(O,ve),e(k,ue),e(k,A),e(A,Me),e(k,fe),e(k,V),e(V,me),e(k,Ce),_(f,te,E),_(f,U,E),e(U,N),e(N,ge),e(N,L),e(L,le),e(N,$e),e(N,X),e(X,Fe),e(U,Ee),e(U,x),e(x,oe),e(x,D),e(D,de),e(x,je),e(x,Q),e(Q,ce),e(U,ze),e(U,Z),e(Z,_e),e(Z,R),e(R,re),_(f,K,E),_(f,W,E),e(W,Je),e(W,I),e(I,Ue),e(W,be)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(H),f&&t(k),f&&t(te),f&&t(U),f&&t(K),f&&t(W)}}}function Sw(J){let d,y,h,u,T;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),T=o(`
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){d=a(l,"P",{});var c=r(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var z=r(h);u=n(z,"Module"),z.forEach(t),T=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,y),e(d,h),e(h,u),e(d,T)},d(l){l&&t(d)}}}function Pw(J){let d,y,h,u,T;return u=new Ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNhbWVtYmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ5ZHNoaWVoJTJGcm9iZXJ0YS1iYXNlLXNxdWFkMiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ2FtZW1iZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMnlkc2hpZWglMkZyb2JlcnRhLWJhc2Utc3F1YWQyJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFCamembertForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFCamembertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-base-squad2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27; puppet&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),h=m(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);y=n(c,"Example:"),c.forEach(t),h=p(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,y),_(l,h,c),M(u,l,c),T=!0},p:He,i(l){T||(C(u.$$.fragment,l),T=!0)},o(l){$(u.$$.fragment,l),T=!1},d(l){l&&t(d),l&&t(h),F(u,l)}}}function Ow(J){let d,y;return d=new Ke({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){w(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),y=!0},p:He,i(h){y||(C(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){F(d,h)}}}function Dw(J){let d,y,h,u,T,l,c,z,ye,pe,B,ae,H,k,Te,S,ke,he,G,we,ie,O,ve,ue,A,Me,fe,V,me,Ce,te,U,N,ge,L,le,$e,X,Fe,Ee,x,oe,D,de,je,Q,ce,ze,Z,_e,R,re,K,W,Je,I,Ue,be,f,E,xe,ne,Ae,Be,j,Ve,Le,Re,Ne,Xe,q,P,Ie,Se,Y,Ge,Ze,We,Pe,ee,qe,_m,Wd,ro,Go,Mi,ds,bm,Ci,ym,xd,Ct,cs,Tm,Vt,km,_r,wm,vm,br,Mm,Cm,ms,$m,Fm,Em,io,jm,yr,zm,Jm,Tr,Um,Wm,xm,Ao,Nd,lo,Vo,$i,ps,Nm,Fi,Im,Id,et,hs,Zm,Lt,qm,kr,Bm,Rm,wr,Gm,Am,us,Vm,Lm,Xm,fs,Sm,vr,Pm,Om,Dm,Xt,gs,Qm,Ei,Ym,Hm,_s,Mr,Km,ji,ep,tp,Cr,op,zi,np,sp,Lo,bs,ap,ys,rp,Ji,ip,lp,dp,Xo,Ts,cp,Ui,mp,pp,$r,ks,Zd,co,So,Wi,ws,hp,xi,up,qd,ct,vs,fp,$t,gp,Ni,_p,bp,Fr,yp,Tp,Er,kp,wp,Ms,vp,Mp,Cp,Cs,$p,jr,Fp,Ep,jp,St,$s,zp,Ii,Jp,Up,Fs,zr,Wp,Zi,xp,Np,Jr,Ip,qi,Zp,qp,Po,Es,Bp,Bi,Rp,Bd,mo,Oo,Ri,js,Gp,Gi,Ap,Rd,Oe,zs,Vp,Ai,Lp,Xp,Js,Sp,Ur,Pp,Op,Dp,Us,Qp,Ws,Yp,Hp,Kp,xs,eh,Vi,th,oh,nh,tt,sh,Li,ah,rh,Xi,ih,lh,Si,dh,ch,Pi,mh,ph,Oi,hh,uh,Di,fh,gh,_h,Do,bh,Qi,yh,Th,Ns,kh,wh,Ft,Is,vh,po,Mh,Wr,Ch,$h,Yi,Fh,Eh,jh,Qo,zh,Yo,Gd,ho,Ho,Hi,Zs,Jh,Ki,Uh,Ad,mt,qs,Wh,Bs,xh,el,Nh,Ih,Zh,Rs,qh,xr,Bh,Rh,Gh,Gs,Ah,As,Vh,Lh,Xh,Et,Vs,Sh,uo,Ph,Nr,Oh,Dh,tl,Qh,Yh,Hh,Ko,Kh,en,Vd,fo,tn,ol,Ls,eu,nl,tu,Ld,pt,Xs,ou,Ss,nu,sl,su,au,ru,Ps,iu,Ir,lu,du,cu,Os,mu,Ds,pu,hu,uu,jt,Qs,fu,go,gu,Zr,_u,bu,al,yu,Tu,ku,on,wu,nn,Xd,_o,sn,rl,Ys,vu,il,Mu,Sd,ht,Hs,Cu,ll,$u,Fu,Ks,Eu,qr,ju,zu,Ju,ea,Uu,ta,Wu,xu,Nu,bt,oa,Iu,bo,Zu,Br,qu,Bu,dl,Ru,Gu,Au,an,Vu,rn,Lu,ln,Pd,yo,dn,cl,na,Xu,ml,Su,Od,ut,sa,Pu,pl,Ou,Du,aa,Qu,Rr,Yu,Hu,Ku,ra,ef,ia,tf,of,nf,zt,la,sf,To,af,Gr,rf,lf,hl,df,cf,mf,cn,pf,mn,Dd,ko,pn,ul,da,hf,fl,uf,Qd,ft,ca,ff,gl,gf,_f,ma,bf,Ar,yf,Tf,kf,pa,wf,ha,vf,Mf,Cf,Jt,ua,$f,wo,Ff,Vr,Ef,jf,_l,zf,Jf,Uf,hn,Wf,un,Yd,vo,fn,bl,fa,xf,yl,Nf,Hd,gt,ga,If,gn,Zf,Tl,qf,Bf,kl,Rf,Gf,_a,Af,Lr,Vf,Lf,Xf,ba,Sf,ya,Pf,Of,Df,Ut,Ta,Qf,Mo,Yf,Xr,Hf,Kf,wl,eg,tg,og,_n,ng,bn,Kd,Co,yn,vl,ka,sg,Ml,ag,ec,ot,wa,rg,Cl,ig,lg,va,dg,Sr,cg,mg,pg,Ma,hg,Ca,ug,fg,gg,Tn,_g,Wt,$a,bg,$o,yg,Pr,Tg,kg,$l,wg,vg,Mg,kn,Cg,wn,tc,Fo,vn,Fl,Fa,$g,El,Fg,oc,nt,Ea,Eg,ja,jg,jl,zg,Jg,Ug,za,Wg,Or,xg,Ng,Ig,Ja,Zg,Ua,qg,Bg,Rg,Mn,Gg,xt,Wa,Ag,Eo,Vg,Dr,Lg,Xg,zl,Sg,Pg,Og,Cn,Dg,$n,nc,jo,Fn,Jl,xa,Qg,Ul,Yg,sc,st,Na,Hg,Ia,Kg,Wl,e_,t_,o_,Za,n_,Qr,s_,a_,r_,qa,i_,Ba,l_,d_,c_,En,m_,yt,Ra,p_,zo,h_,Yr,u_,f_,xl,g_,__,b_,jn,y_,zn,T_,Jn,ac,Jo,Un,Nl,Ga,k_,Il,w_,rc,at,Aa,v_,Zl,M_,C_,Va,$_,Hr,F_,E_,j_,La,z_,Xa,J_,U_,W_,Wn,x_,Tt,Sa,N_,Uo,I_,Kr,Z_,q_,ql,B_,R_,G_,xn,A_,Nn,V_,In,ic,Wo,Zn,Bl,Pa,L_,Rl,X_,lc,rt,Oa,S_,Gl,P_,O_,Da,D_,ei,Q_,Y_,H_,Qa,K_,Ya,eb,tb,ob,qn,nb,Nt,Ha,sb,xo,ab,ti,rb,ib,Al,lb,db,cb,Bn,mb,Rn,dc,No,Gn,Vl,Ka,pb,Ll,hb,cc,it,er,ub,Xl,fb,gb,tr,_b,oi,bb,yb,Tb,or,kb,nr,wb,vb,Mb,An,Cb,kt,sr,$b,Io,Fb,ni,Eb,jb,Sl,zb,Jb,Ub,Vn,Wb,Ln,xb,Xn,mc,Zo,Sn,Pl,ar,Nb,Ol,Ib,pc,lt,rr,Zb,qo,qb,Dl,Bb,Rb,Ql,Gb,Ab,Vb,ir,Lb,si,Xb,Sb,Pb,lr,Ob,dr,Db,Qb,Yb,Pn,Hb,wt,cr,Kb,Bo,ey,ai,ty,oy,Yl,ny,sy,ay,On,ry,Dn,iy,Qn,hc;return l=new Qe({}),k=new Qe({}),W=new Qe({}),ds=new Qe({}),cs=new se({props:{name:"class transformers.CamembertConfig",anchor:"transformers.CamembertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{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:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertModel">CamembertModel</a> or <a href="/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertModel">TFCamembertModel</a>.`,name:"vocab_size"},{anchor:"transformers.CamembertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.CamembertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.CamembertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CamembertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.CamembertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.CamembertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.CamembertConfig.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.CamembertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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.CamembertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertModel">CamembertModel</a> or <a href="/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertModel">TFCamembertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.CamembertConfig.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.CamembertConfig.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.CamembertConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.CamembertConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.CamembertConfig.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.CamembertConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/configuration_camembert.py#L39"}}),Ao=new Ye({props:{anchor:"transformers.CamembertConfig.example",$$slots:{default:[lw]},$$scope:{ctx:J}}}),ps=new Qe({}),hs=new se({props:{name:"class transformers.CamembertTokenizer",anchor:"transformers.CamembertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<s>NOTUSED', '</s>NOTUSED']"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.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.CamembertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.CamembertTokenizer.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.CamembertTokenizer.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"},{anchor:"transformers.CamembertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.CamembertTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.CamembertTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.CamembertTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert.py#L45"}}),gs=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CamembertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CamembertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CamembertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert.py#L161",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),bs=new se({props:{name:"get_special_tokens_mask",anchor:"transformers.CamembertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.CamembertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CamembertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.CamembertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert.py#L187",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ts=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CamembertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CamembertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CamembertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert.py#L214",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ks=new se({props:{name:"save_vocabulary",anchor:"transformers.CamembertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert.py#L298"}}),ws=new Qe({}),vs=new se({props:{name:"class transformers.CamembertTokenizerFast",anchor:"transformers.CamembertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<s>NOTUSED', '</s>NOTUSED']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CamembertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.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.CamembertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.CamembertTokenizerFast.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.CamembertTokenizerFast.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"},{anchor:"transformers.CamembertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.CamembertTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert_fast.py#L53"}}),$s=new se({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CamembertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CamembertTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.CamembertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert_fast.py#L145",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Es=new se({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CamembertTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.CamembertTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.CamembertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/tokenization_camembert_fast.py#L171",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),js=new Qe({}),zs=new se({props:{name:"class transformers.CamembertModel",anchor:"transformers.CamembertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.CamembertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L742"}}),Is=new se({props:{name:"forward",anchor:"transformers.CamembertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertModel.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.CamembertModel.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertModel.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.CamembertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertModel.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.CamembertModel.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.CamembertModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.CamembertModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.CamembertModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.CamembertModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L787",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qo=new De({props:{$$slots:{default:[dw]},$$scope:{ctx:J}}}),Yo=new Ye({props:{anchor:"transformers.CamembertModel.forward.example",$$slots:{default:[cw]},$$scope:{ctx:J}}}),Zs=new Qe({}),qs=new se({props:{name:"class transformers.CamembertForCausalLM",anchor:"transformers.CamembertForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L1410"}}),Vs=new se({props:{name:"forward",anchor:"transformers.CamembertForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForCausalLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForCausalLM.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.CamembertForCausalLM.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForCausalLM.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.CamembertForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForCausalLM.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.CamembertForCausalLM.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.CamembertForCausalLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.CamembertForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.CamembertForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the 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 in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.CamembertForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.CamembertForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L1431",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ko=new De({props:{$$slots:{default:[mw]},$$scope:{ctx:J}}}),en=new Ye({props:{anchor:"transformers.CamembertForCausalLM.forward.example",$$slots:{default:[pw]},$$scope:{ctx:J}}}),Ls=new Qe({}),Xs=new se({props:{name:"class transformers.CamembertForMaskedLM",anchor:"transformers.CamembertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L930"}}),Qs=new se({props:{name:"forward",anchor:"transformers.CamembertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForMaskedLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForMaskedLM.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.CamembertForMaskedLM.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForMaskedLM.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.CamembertForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForMaskedLM.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.CamembertForMaskedLM.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.CamembertForMaskedLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.CamembertForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L954",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),on=new De({props:{$$slots:{default:[hw]},$$scope:{ctx:J}}}),nn=new Ye({props:{anchor:"transformers.CamembertForMaskedLM.forward.example",$$slots:{default:[uw]},$$scope:{ctx:J}}}),Ys=new Qe({}),Hs=new se({props:{name:"class transformers.CamembertForSequenceClassification",anchor:"transformers.CamembertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L1031"}}),oa=new se({props:{name:"forward",anchor:"transformers.CamembertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForSequenceClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForSequenceClassification.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.CamembertForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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.CamembertForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L1043",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),an=new De({props:{$$slots:{default:[fw]},$$scope:{ctx:J}}}),rn=new Ye({props:{anchor:"transformers.CamembertForSequenceClassification.forward.example",$$slots:{default:[gw]},$$scope:{ctx:J}}}),ln=new Ye({props:{anchor:"transformers.CamembertForSequenceClassification.forward.example-2",$$slots:{default:[_w]},$$scope:{ctx:J}}}),na=new Qe({}),sa=new se({props:{name:"class transformers.CamembertForMultipleChoice",anchor:"transformers.CamembertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L1131"}}),la=new se({props:{name:"forward",anchor:"transformers.CamembertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"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.CamembertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.CamembertForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForMultipleChoice.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.CamembertForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForMultipleChoice.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.CamembertForMultipleChoice.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.CamembertForMultipleChoice.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),cn=new De({props:{$$slots:{default:[bw]},$$scope:{ctx:J}}}),mn=new Ye({props:{anchor:"transformers.CamembertForMultipleChoice.forward.example",$$slots:{default:[yw]},$$scope:{ctx:J}}}),da=new Qe({}),ca=new se({props:{name:"class transformers.CamembertForTokenClassification",anchor:"transformers.CamembertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L1226"}}),ua=new se({props:{name:"forward",anchor:"transformers.CamembertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForTokenClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForTokenClassification.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.CamembertForTokenClassification.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForTokenClassification.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.CamembertForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForTokenClassification.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.CamembertForTokenClassification.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.CamembertForTokenClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),hn=new De({props:{$$slots:{default:[Tw]},$$scope:{ctx:J}}}),un=new Ye({props:{anchor:"transformers.CamembertForTokenClassification.forward.example",$$slots:{default:[kw]},$$scope:{ctx:J}}}),fa=new Qe({}),ga=new se({props:{name:"class transformers.CamembertForQuestionAnswering",anchor:"transformers.CamembertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CamembertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_camembert.py#L1312"}}),Ta=new se({props:{name:"forward",anchor:"transformers.CamembertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.CamembertForQuestionAnswering.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.CamembertForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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.CamembertForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CamembertForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.CamembertForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_camembert.py#L1323",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</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/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</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 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new De({props:{$$slots:{default:[ww]},$$scope:{ctx:J}}}),bn=new Ye({props:{anchor:"transformers.CamembertForQuestionAnswering.forward.example",$$slots:{default:[vw]},$$scope:{ctx:J}}}),ka=new Qe({}),wa=new se({props:{name:"class transformers.TFCamembertModel",anchor:"transformers.TFCamembertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L880"}}),Tn=new De({props:{$$slots:{default:[Mw]},$$scope:{ctx:J}}}),$a=new se({props:{name:"call",anchor:"transformers.TFCamembertModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFCamembertModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFCamembertModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFCamembertModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L885",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),kn=new De({props:{$$slots:{default:[Cw]},$$scope:{ctx:J}}}),wn=new Ye({props:{anchor:"transformers.TFCamembertModel.call.example",$$slots:{default:[$w]},$$scope:{ctx:J}}}),Fa=new Qe({}),Ea=new se({props:{name:"class transformers.TFCamembertForCausalLM",anchor:"transformers.TFCamembertForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1464"}}),Mn=new De({props:{$$slots:{default:[Fw]},$$scope:{ctx:J}}}),Wa=new se({props:{name:"call",anchor:"transformers.TFCamembertForCausalLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForCausalLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForCausalLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFCamembertForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFCamembertForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFCamembertForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFCamembertForCausalLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1497",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Cn=new De({props:{$$slots:{default:[Ew]},$$scope:{ctx:J}}}),$n=new Ye({props:{anchor:"transformers.TFCamembertForCausalLM.call.example",$$slots:{default:[jw]},$$scope:{ctx:J}}}),xa=new Qe({}),Na=new se({props:{name:"class transformers.TFCamembertForMaskedLM",anchor:"transformers.TFCamembertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1007"}}),En=new De({props:{$$slots:{default:[zw]},$$scope:{ctx:J}}}),Ra=new se({props:{name:"call",anchor:"transformers.TFCamembertForMaskedLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1024",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jn=new De({props:{$$slots:{default:[Jw]},$$scope:{ctx:J}}}),zn=new Ye({props:{anchor:"transformers.TFCamembertForMaskedLM.call.example",$$slots:{default:[Uw]},$$scope:{ctx:J}}}),Jn=new Ye({props:{anchor:"transformers.TFCamembertForMaskedLM.call.example-2",$$slots:{default:[Ww]},$$scope:{ctx:J}}}),Ga=new Qe({}),Aa=new se({props:{name:"class transformers.TFCamembertForSequenceClassification",anchor:"transformers.TFCamembertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1121"}}),Wn=new De({props:{$$slots:{default:[xw]},$$scope:{ctx:J}}}),Sa=new se({props:{name:"call",anchor:"transformers.TFCamembertForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1132",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),xn=new De({props:{$$slots:{default:[Nw]},$$scope:{ctx:J}}}),Nn=new Ye({props:{anchor:"transformers.TFCamembertForSequenceClassification.call.example",$$slots:{default:[Iw]},$$scope:{ctx:J}}}),In=new Ye({props:{anchor:"transformers.TFCamembertForSequenceClassification.call.example-2",$$slots:{default:[Zw]},$$scope:{ctx:J}}}),Pa=new Qe({}),Oa=new se({props:{name:"class transformers.TFCamembertForMultipleChoice",anchor:"transformers.TFCamembertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1282"}}),qn=new De({props:{$$slots:{default:[qw]},$$scope:{ctx:J}}}),Ha=new se({props:{name:"call",anchor:"transformers.TFCamembertForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, 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.TFCamembertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1296",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bn=new De({props:{$$slots:{default:[Bw]},$$scope:{ctx:J}}}),Rn=new Ye({props:{anchor:"transformers.TFCamembertForMultipleChoice.call.example",$$slots:{default:[Rw]},$$scope:{ctx:J}}}),Ka=new Qe({}),er=new se({props:{name:"class transformers.TFCamembertForTokenClassification",anchor:"transformers.TFCamembertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1198"}}),An=new De({props:{$$slots:{default:[Gw]},$$scope:{ctx:J}}}),sr=new se({props:{name:"call",anchor:"transformers.TFCamembertForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1216",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new De({props:{$$slots:{default:[Aw]},$$scope:{ctx:J}}}),Ln=new Ye({props:{anchor:"transformers.TFCamembertForTokenClassification.call.example",$$slots:{default:[Vw]},$$scope:{ctx:J}}}),Xn=new Ye({props:{anchor:"transformers.TFCamembertForTokenClassification.call.example-2",$$slots:{default:[Lw]},$$scope:{ctx:J}}}),ar=new Qe({}),rr=new se({props:{name:"class transformers.TFCamembertForQuestionAnswering",anchor:"transformers.TFCamembertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFCamembertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig">CamembertConfig</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/main/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/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1375"}}),Pn=new De({props:{$$slots:{default:[Xw]},$$scope:{ctx:J}}}),cr=new se({props:{name:"call",anchor:"transformers.TFCamembertForQuestionAnswering.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFCamembertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFCamembertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/camembert/modeling_tf_camembert.py#L1388",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertConfig"
>CamembertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),On=new De({props:{$$slots:{default:[Sw]},$$scope:{ctx:J}}}),Dn=new Ye({props:{anchor:"transformers.TFCamembertForQuestionAnswering.call.example",$$slots:{default:[Pw]},$$scope:{ctx:J}}}),Qn=new Ye({props:{anchor:"transformers.TFCamembertForQuestionAnswering.call.example-2",$$slots:{default:[Ow]},$$scope:{ctx:J}}}),{c(){d=s("meta"),y=m(),h=s("h1"),u=s("a"),T=s("span"),w(l.$$.fragment),c=m(),z=s("span"),ye=o("CamemBERT"),pe=m(),B=s("h2"),ae=s("a"),H=s("span"),w(k.$$.fragment),Te=m(),S=s("span"),ke=o("Overview"),he=m(),G=s("p"),we=o("The CamemBERT model was proposed in "),ie=s("a"),O=o("CamemBERT: a Tasty French Language Model"),ve=o(` by
Louis Martin, Benjamin Muller, Pedro Javier Ortiz Su\xE1rez, Yoann Dupont, Laurent Romary, \xC9ric Villemonte de la
Clergerie, Djam\xE9 Seddah, and Beno\xEEt Sagot. It is based on Facebook\u2019s RoBERTa model released in 2019. It is a model
trained on 138GB of French text.`),ue=m(),A=s("p"),Me=o("The abstract from the paper is the following:"),fe=m(),V=s("p"),me=s("em"),Ce=o(`Pretrained language models are now ubiquitous in Natural Language Processing. Despite their success, most available
models have either been trained on English data or on the concatenation of data in multiple languages. This makes
practical use of such models \u2014in all languages except English\u2014 very limited. Aiming to address this issue for French,
we release CamemBERT, a French version of the Bi-directional Encoders for Transformers (BERT). We measure the
performance of CamemBERT compared to multilingual models in multiple downstream tasks, namely part-of-speech tagging,
dependency parsing, named-entity recognition, and natural language inference. CamemBERT improves the state of the art
for most of the tasks considered. We release the pretrained model for CamemBERT hoping to foster research and
downstream applications for French NLP.`),te=m(),U=s("p"),N=o("Tips:"),ge=m(),L=s("ul"),le=s("li"),$e=o("This implementation is the same as RoBERTa. Refer to the "),X=s("a"),Fe=o("documentation of RoBERTa"),Ee=o(` for usage examples
as well as the information relative to the inputs and outputs.`),x=m(),oe=s("p"),D=o("This model was contributed by "),de=s("a"),je=o("camembert"),Q=o(". The original code can be found "),ce=s("a"),ze=o("here"),Z=o("."),_e=m(),R=s("h2"),re=s("a"),K=s("span"),w(W.$$.fragment),Je=m(),I=s("span"),Ue=o("Documentation resources"),be=m(),f=s("ul"),E=s("li"),xe=s("a"),ne=o("Text classification task guide"),Ae=m(),Be=s("li"),j=s("a"),Ve=o("Token classification task guide"),Le=m(),Re=s("li"),Ne=s("a"),Xe=o("Question answering task guide"),q=m(),P=s("li"),Ie=s("a"),Se=o("Causal language modeling task guide"),Y=m(),Ge=s("li"),Ze=s("a"),We=o("Masked language modeling task guide"),Pe=m(),ee=s("li"),qe=s("a"),_m=o("Multiple choice task guide"),Wd=m(),ro=s("h2"),Go=s("a"),Mi=s("span"),w(ds.$$.fragment),bm=m(),Ci=s("span"),ym=o("CamembertConfig"),xd=m(),Ct=s("div"),w(cs.$$.fragment),Tm=m(),Vt=s("p"),km=o("This is the configuration class to store the configuration of a "),_r=s("a"),wm=o("CamembertModel"),vm=o(" or a "),br=s("a"),Mm=o("TFCamembertModel"),Cm=o(`. It is
used to instantiate a Camembert 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 Camembert
`),ms=s("a"),$m=o("camembert-base"),Fm=o(" architecture."),Em=m(),io=s("p"),jm=o("Configuration objects inherit from "),yr=s("a"),zm=o("PretrainedConfig"),Jm=o(` and can be used to control the model outputs. Read the
documentation from `),Tr=s("a"),Um=o("PretrainedConfig"),Wm=o(" for more information."),xm=m(),w(Ao.$$.fragment),Nd=m(),lo=s("h2"),Vo=s("a"),$i=s("span"),w(ps.$$.fragment),Nm=m(),Fi=s("span"),Im=o("CamembertTokenizer"),Id=m(),et=s("div"),w(hs.$$.fragment),Zm=m(),Lt=s("p"),qm=o("Adapted from "),kr=s("a"),Bm=o("RobertaTokenizer"),Rm=o(" and "),wr=s("a"),Gm=o("XLNetTokenizer"),Am=o(`. Construct a CamemBERT tokenizer. Based on
`),us=s("a"),Vm=o("SentencePiece"),Lm=o("."),Xm=m(),fs=s("p"),Sm=o("This tokenizer inherits from "),vr=s("a"),Pm=o("PreTrainedTokenizer"),Om=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dm=m(),Xt=s("div"),w(gs.$$.fragment),Qm=m(),Ei=s("p"),Ym=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),Hm=m(),_s=s("ul"),Mr=s("li"),Km=o("single sequence: "),ji=s("code"),ep=o("<s> X </s>"),tp=m(),Cr=s("li"),op=o("pair of sequences: "),zi=s("code"),np=o("<s> A </s></s> B </s>"),sp=m(),Lo=s("div"),w(bs.$$.fragment),ap=m(),ys=s("p"),rp=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ji=s("code"),ip=o("prepare_for_model"),lp=o(" method."),dp=m(),Xo=s("div"),w(Ts.$$.fragment),cp=m(),Ui=s("p"),mp=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),pp=m(),$r=s("div"),w(ks.$$.fragment),Zd=m(),co=s("h2"),So=s("a"),Wi=s("span"),w(ws.$$.fragment),hp=m(),xi=s("span"),up=o("CamembertTokenizerFast"),qd=m(),ct=s("div"),w(vs.$$.fragment),fp=m(),$t=s("p"),gp=o("Construct a \u201Cfast\u201D CamemBERT tokenizer (backed by HuggingFace\u2019s "),Ni=s("em"),_p=o("tokenizers"),bp=o(` library). Adapted from
`),Fr=s("a"),yp=o("RobertaTokenizer"),Tp=o(" and "),Er=s("a"),kp=o("XLNetTokenizer"),wp=o(`. Based on
`),Ms=s("a"),vp=o("BPE"),Mp=o("."),Cp=m(),Cs=s("p"),$p=o("This tokenizer inherits from "),jr=s("a"),Fp=o("PreTrainedTokenizerFast"),Ep=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),jp=m(),St=s("div"),w($s.$$.fragment),zp=m(),Ii=s("p"),Jp=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),Up=m(),Fs=s("ul"),zr=s("li"),Wp=o("single sequence: "),Zi=s("code"),xp=o("<s> X </s>"),Np=m(),Jr=s("li"),Ip=o("pair of sequences: "),qi=s("code"),Zp=o("<s> A </s></s> B </s>"),qp=m(),Po=s("div"),w(Es.$$.fragment),Bp=m(),Bi=s("p"),Rp=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Bd=m(),mo=s("h2"),Oo=s("a"),Ri=s("span"),w(js.$$.fragment),Gp=m(),Gi=s("span"),Ap=o("CamembertModel"),Rd=m(),Oe=s("div"),w(zs.$$.fragment),Vp=m(),Ai=s("p"),Lp=o("The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),Xp=m(),Js=s("p"),Sp=o("This model inherits from "),Ur=s("a"),Pp=o("PreTrainedModel"),Op=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Dp=m(),Us=s("p"),Qp=o("This model is also a PyTorch "),Ws=s("a"),Yp=o("torch.nn.Module"),Hp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kp=m(),xs=s("p"),eh=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Vi=s("em"),th=o(`Attention is
all you need`),oh=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),nh=m(),tt=s("p"),sh=o("To behave as a decoder the model needs to be initialized with the "),Li=s("code"),ah=o("is_decoder"),rh=o(` argument of the configuration set to
`),Xi=s("code"),ih=o("True"),lh=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Si=s("code"),dh=o("is_decoder"),ch=o(` argument and
`),Pi=s("code"),mh=o("add_cross_attention"),ph=o(" set to "),Oi=s("code"),hh=o("True"),uh=o("; an "),Di=s("code"),fh=o("encoder_hidden_states"),gh=o(" is then expected as an input to the forward pass."),_h=m(),Do=s("p"),bh=o(".. _"),Qi=s("em"),yh=o("Attention is all you need"),Th=o(": "),Ns=s("a"),kh=o("https://arxiv.org/abs/1706.03762"),wh=m(),Ft=s("div"),w(Is.$$.fragment),vh=m(),po=s("p"),Mh=o("The "),Wr=s("a"),Ch=o("CamembertModel"),$h=o(" forward method, overrides the "),Yi=s("code"),Fh=o("__call__"),Eh=o(" special method."),jh=m(),w(Qo.$$.fragment),zh=m(),w(Yo.$$.fragment),Gd=m(),ho=s("h2"),Ho=s("a"),Hi=s("span"),w(Zs.$$.fragment),Jh=m(),Ki=s("span"),Uh=o("CamembertForCausalLM"),Ad=m(),mt=s("div"),w(qs.$$.fragment),Wh=m(),Bs=s("p"),xh=o("CamemBERT Model with a "),el=s("code"),Nh=o("language modeling"),Ih=o(" head on top for CLM fine-tuning."),Zh=m(),Rs=s("p"),qh=o("This model inherits from "),xr=s("a"),Bh=o("PreTrainedModel"),Rh=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gh=m(),Gs=s("p"),Ah=o("This model is also a PyTorch "),As=s("a"),Vh=o("torch.nn.Module"),Lh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xh=m(),Et=s("div"),w(Vs.$$.fragment),Sh=m(),uo=s("p"),Ph=o("The "),Nr=s("a"),Oh=o("CamembertForCausalLM"),Dh=o(" forward method, overrides the "),tl=s("code"),Qh=o("__call__"),Yh=o(" special method."),Hh=m(),w(Ko.$$.fragment),Kh=m(),w(en.$$.fragment),Vd=m(),fo=s("h2"),tn=s("a"),ol=s("span"),w(Ls.$$.fragment),eu=m(),nl=s("span"),tu=o("CamembertForMaskedLM"),Ld=m(),pt=s("div"),w(Xs.$$.fragment),ou=m(),Ss=s("p"),nu=o("CamemBERT Model with a "),sl=s("code"),su=o("language modeling"),au=o(" head on top."),ru=m(),Ps=s("p"),iu=o("This model inherits from "),Ir=s("a"),lu=o("PreTrainedModel"),du=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cu=m(),Os=s("p"),mu=o("This model is also a PyTorch "),Ds=s("a"),pu=o("torch.nn.Module"),hu=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),uu=m(),jt=s("div"),w(Qs.$$.fragment),fu=m(),go=s("p"),gu=o("The "),Zr=s("a"),_u=o("CamembertForMaskedLM"),bu=o(" forward method, overrides the "),al=s("code"),yu=o("__call__"),Tu=o(" special method."),ku=m(),w(on.$$.fragment),wu=m(),w(nn.$$.fragment),Xd=m(),_o=s("h2"),sn=s("a"),rl=s("span"),w(Ys.$$.fragment),vu=m(),il=s("span"),Mu=o("CamembertForSequenceClassification"),Sd=m(),ht=s("div"),w(Hs.$$.fragment),Cu=m(),ll=s("p"),$u=o(`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Fu=m(),Ks=s("p"),Eu=o("This model inherits from "),qr=s("a"),ju=o("PreTrainedModel"),zu=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ju=m(),ea=s("p"),Uu=o("This model is also a PyTorch "),ta=s("a"),Wu=o("torch.nn.Module"),xu=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nu=m(),bt=s("div"),w(oa.$$.fragment),Iu=m(),bo=s("p"),Zu=o("The "),Br=s("a"),qu=o("CamembertForSequenceClassification"),Bu=o(" forward method, overrides the "),dl=s("code"),Ru=o("__call__"),Gu=o(" special method."),Au=m(),w(an.$$.fragment),Vu=m(),w(rn.$$.fragment),Lu=m(),w(ln.$$.fragment),Pd=m(),yo=s("h2"),dn=s("a"),cl=s("span"),w(na.$$.fragment),Xu=m(),ml=s("span"),Su=o("CamembertForMultipleChoice"),Od=m(),ut=s("div"),w(sa.$$.fragment),Pu=m(),pl=s("p"),Ou=o(`CamemBERT Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Du=m(),aa=s("p"),Qu=o("This model inherits from "),Rr=s("a"),Yu=o("PreTrainedModel"),Hu=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ku=m(),ra=s("p"),ef=o("This model is also a PyTorch "),ia=s("a"),tf=o("torch.nn.Module"),of=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nf=m(),zt=s("div"),w(la.$$.fragment),sf=m(),To=s("p"),af=o("The "),Gr=s("a"),rf=o("CamembertForMultipleChoice"),lf=o(" forward method, overrides the "),hl=s("code"),df=o("__call__"),cf=o(" special method."),mf=m(),w(cn.$$.fragment),pf=m(),w(mn.$$.fragment),Dd=m(),ko=s("h2"),pn=s("a"),ul=s("span"),w(da.$$.fragment),hf=m(),fl=s("span"),uf=o("CamembertForTokenClassification"),Qd=m(),ft=s("div"),w(ca.$$.fragment),ff=m(),gl=s("p"),gf=o(`CamemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),_f=m(),ma=s("p"),bf=o("This model inherits from "),Ar=s("a"),yf=o("PreTrainedModel"),Tf=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kf=m(),pa=s("p"),wf=o("This model is also a PyTorch "),ha=s("a"),vf=o("torch.nn.Module"),Mf=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cf=m(),Jt=s("div"),w(ua.$$.fragment),$f=m(),wo=s("p"),Ff=o("The "),Vr=s("a"),Ef=o("CamembertForTokenClassification"),jf=o(" forward method, overrides the "),_l=s("code"),zf=o("__call__"),Jf=o(" special method."),Uf=m(),w(hn.$$.fragment),Wf=m(),w(un.$$.fragment),Yd=m(),vo=s("h2"),fn=s("a"),bl=s("span"),w(fa.$$.fragment),xf=m(),yl=s("span"),Nf=o("CamembertForQuestionAnswering"),Hd=m(),gt=s("div"),w(ga.$$.fragment),If=m(),gn=s("p"),Zf=o(`CamemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Tl=s("code"),qf=o("span start logits"),Bf=o(" and "),kl=s("code"),Rf=o("span end logits"),Gf=m(),_a=s("p"),Af=o("This model inherits from "),Lr=s("a"),Vf=o("PreTrainedModel"),Lf=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xf=m(),ba=s("p"),Sf=o("This model is also a PyTorch "),ya=s("a"),Pf=o("torch.nn.Module"),Of=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Df=m(),Ut=s("div"),w(Ta.$$.fragment),Qf=m(),Mo=s("p"),Yf=o("The "),Xr=s("a"),Hf=o("CamembertForQuestionAnswering"),Kf=o(" forward method, overrides the "),wl=s("code"),eg=o("__call__"),tg=o(" special method."),og=m(),w(_n.$$.fragment),ng=m(),w(bn.$$.fragment),Kd=m(),Co=s("h2"),yn=s("a"),vl=s("span"),w(ka.$$.fragment),sg=m(),Ml=s("span"),ag=o("TFCamembertModel"),ec=m(),ot=s("div"),w(wa.$$.fragment),rg=m(),Cl=s("p"),ig=o("The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),lg=m(),va=s("p"),dg=o("This model inherits from "),Sr=s("a"),cg=o("TFPreTrainedModel"),mg=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pg=m(),Ma=s("p"),hg=o("This model is also a "),Ca=s("a"),ug=o("tf.keras.Model"),fg=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),gg=m(),w(Tn.$$.fragment),_g=m(),Wt=s("div"),w($a.$$.fragment),bg=m(),$o=s("p"),yg=o("The "),Pr=s("a"),Tg=o("TFCamembertModel"),kg=o(" forward method, overrides the "),$l=s("code"),wg=o("__call__"),vg=o(" special method."),Mg=m(),w(kn.$$.fragment),Cg=m(),w(wn.$$.fragment),tc=m(),Fo=s("h2"),vn=s("a"),Fl=s("span"),w(Fa.$$.fragment),$g=m(),El=s("span"),Fg=o("TFCamembertForCasualLM"),oc=m(),nt=s("div"),w(Ea.$$.fragment),Eg=m(),ja=s("p"),jg=o("CamemBERT Model with a "),jl=s("code"),zg=o("language modeling"),Jg=o(" head on top for CLM fine-tuning."),Ug=m(),za=s("p"),Wg=o("This model inherits from "),Or=s("a"),xg=o("TFPreTrainedModel"),Ng=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ig=m(),Ja=s("p"),Zg=o("This model is also a "),Ua=s("a"),qg=o("tf.keras.Model"),Bg=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Rg=m(),w(Mn.$$.fragment),Gg=m(),xt=s("div"),w(Wa.$$.fragment),Ag=m(),Eo=s("p"),Vg=o("The "),Dr=s("a"),Lg=o("TFCamembertForCausalLM"),Xg=o(" forward method, overrides the "),zl=s("code"),Sg=o("__call__"),Pg=o(" special method."),Og=m(),w(Cn.$$.fragment),Dg=m(),w($n.$$.fragment),nc=m(),jo=s("h2"),Fn=s("a"),Jl=s("span"),w(xa.$$.fragment),Qg=m(),Ul=s("span"),Yg=o("TFCamembertForMaskedLM"),sc=m(),st=s("div"),w(Na.$$.fragment),Hg=m(),Ia=s("p"),Kg=o("CamemBERT Model with a "),Wl=s("code"),e_=o("language modeling"),t_=o(" head on top."),o_=m(),Za=s("p"),n_=o("This model inherits from "),Qr=s("a"),s_=o("TFPreTrainedModel"),a_=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),r_=m(),qa=s("p"),i_=o("This model is also a "),Ba=s("a"),l_=o("tf.keras.Model"),d_=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),c_=m(),w(En.$$.fragment),m_=m(),yt=s("div"),w(Ra.$$.fragment),p_=m(),zo=s("p"),h_=o("The "),Yr=s("a"),u_=o("TFCamembertForMaskedLM"),f_=o(" forward method, overrides the "),xl=s("code"),g_=o("__call__"),__=o(" special method."),b_=m(),w(jn.$$.fragment),y_=m(),w(zn.$$.fragment),T_=m(),w(Jn.$$.fragment),ac=m(),Jo=s("h2"),Un=s("a"),Nl=s("span"),w(Ga.$$.fragment),k_=m(),Il=s("span"),w_=o("TFCamembertForSequenceClassification"),rc=m(),at=s("div"),w(Aa.$$.fragment),v_=m(),Zl=s("p"),M_=o(`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),C_=m(),Va=s("p"),$_=o("This model inherits from "),Hr=s("a"),F_=o("TFPreTrainedModel"),E_=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),j_=m(),La=s("p"),z_=o("This model is also a "),Xa=s("a"),J_=o("tf.keras.Model"),U_=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),W_=m(),w(Wn.$$.fragment),x_=m(),Tt=s("div"),w(Sa.$$.fragment),N_=m(),Uo=s("p"),I_=o("The "),Kr=s("a"),Z_=o("TFCamembertForSequenceClassification"),q_=o(" forward method, overrides the "),ql=s("code"),B_=o("__call__"),R_=o(" special method."),G_=m(),w(xn.$$.fragment),A_=m(),w(Nn.$$.fragment),V_=m(),w(In.$$.fragment),ic=m(),Wo=s("h2"),Zn=s("a"),Bl=s("span"),w(Pa.$$.fragment),L_=m(),Rl=s("span"),X_=o("TFCamembertForMultipleChoice"),lc=m(),rt=s("div"),w(Oa.$$.fragment),S_=m(),Gl=s("p"),P_=o(`CamemBERT Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),O_=m(),Da=s("p"),D_=o("This model inherits from "),ei=s("a"),Q_=o("TFPreTrainedModel"),Y_=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),H_=m(),Qa=s("p"),K_=o("This model is also a "),Ya=s("a"),eb=o("tf.keras.Model"),tb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ob=m(),w(qn.$$.fragment),nb=m(),Nt=s("div"),w(Ha.$$.fragment),sb=m(),xo=s("p"),ab=o("The "),ti=s("a"),rb=o("TFCamembertForMultipleChoice"),ib=o(" forward method, overrides the "),Al=s("code"),lb=o("__call__"),db=o(" special method."),cb=m(),w(Bn.$$.fragment),mb=m(),w(Rn.$$.fragment),dc=m(),No=s("h2"),Gn=s("a"),Vl=s("span"),w(Ka.$$.fragment),pb=m(),Ll=s("span"),hb=o("TFCamembertForTokenClassification"),cc=m(),it=s("div"),w(er.$$.fragment),ub=m(),Xl=s("p"),fb=o(`CamemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),gb=m(),tr=s("p"),_b=o("This model inherits from "),oi=s("a"),bb=o("TFPreTrainedModel"),yb=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tb=m(),or=s("p"),kb=o("This model is also a "),nr=s("a"),wb=o("tf.keras.Model"),vb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Mb=m(),w(An.$$.fragment),Cb=m(),kt=s("div"),w(sr.$$.fragment),$b=m(),Io=s("p"),Fb=o("The "),ni=s("a"),Eb=o("TFCamembertForTokenClassification"),jb=o(" forward method, overrides the "),Sl=s("code"),zb=o("__call__"),Jb=o(" special method."),Ub=m(),w(Vn.$$.fragment),Wb=m(),w(Ln.$$.fragment),xb=m(),w(Xn.$$.fragment),mc=m(),Zo=s("h2"),Sn=s("a"),Pl=s("span"),w(ar.$$.fragment),Nb=m(),Ol=s("span"),Ib=o("TFCamembertForQuestionAnswering"),pc=m(),lt=s("div"),w(rr.$$.fragment),Zb=m(),qo=s("p"),qb=o(`CamemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Dl=s("code"),Bb=o("span start logits"),Rb=o(" and "),Ql=s("code"),Gb=o("span end logits"),Ab=o(")."),Vb=m(),ir=s("p"),Lb=o("This model inherits from "),si=s("a"),Xb=o("TFPreTrainedModel"),Sb=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Pb=m(),lr=s("p"),Ob=o("This model is also a "),dr=s("a"),Db=o("tf.keras.Model"),Qb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Yb=m(),w(Pn.$$.fragment),Hb=m(),wt=s("div"),w(cr.$$.fragment),Kb=m(),Bo=s("p"),ey=o("The "),ai=s("a"),ty=o("TFCamembertForQuestionAnswering"),oy=o(" forward method, overrides the "),Yl=s("code"),ny=o("__call__"),sy=o(" special method."),ay=m(),w(On.$$.fragment),ry=m(),w(Dn.$$.fragment),iy=m(),w(Qn.$$.fragment),this.h()},l(i){const b=rw('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),y=p(i),h=a(i,"H1",{class:!0});var mr=r(h);u=a(mr,"A",{id:!0,class:!0,href:!0});var Hl=r(u);T=a(Hl,"SPAN",{});var Kl=r(T);v(l.$$.fragment,Kl),Kl.forEach(t),Hl.forEach(t),c=p(mr),z=a(mr,"SPAN",{});var ed=r(z);ye=n(ed,"CamemBERT"),ed.forEach(t),mr.forEach(t),pe=p(i),B=a(i,"H2",{class:!0});var pr=r(B);ae=a(pr,"A",{id:!0,class:!0,href:!0});var td=r(ae);H=a(td,"SPAN",{});var od=r(H);v(k.$$.fragment,od),od.forEach(t),td.forEach(t),Te=p(pr),S=a(pr,"SPAN",{});var nd=r(S);ke=n(nd,"Overview"),nd.forEach(t),pr.forEach(t),he=p(i),G=a(i,"P",{});var hr=r(G);we=n(hr,"The CamemBERT model was proposed in "),ie=a(hr,"A",{href:!0,rel:!0});var sd=r(ie);O=n(sd,"CamemBERT: a Tasty French Language Model"),sd.forEach(t),ve=n(hr,` by
Louis Martin, Benjamin Muller, Pedro Javier Ortiz Su\xE1rez, Yoann Dupont, Laurent Romary, \xC9ric Villemonte de la
Clergerie, Djam\xE9 Seddah, and Beno\xEEt Sagot. It is based on Facebook\u2019s RoBERTa model released in 2019. It is a model
trained on 138GB of French text.`),hr.forEach(t),ue=p(i),A=a(i,"P",{});var ad=r(A);Me=n(ad,"The abstract from the paper is the following:"),ad.forEach(t),fe=p(i),V=a(i,"P",{});var rd=r(V);me=a(rd,"EM",{});var id=r(me);Ce=n(id,`Pretrained language models are now ubiquitous in Natural Language Processing. Despite their success, most available
models have either been trained on English data or on the concatenation of data in multiple languages. This makes
practical use of such models \u2014in all languages except English\u2014 very limited. Aiming to address this issue for French,
we release CamemBERT, a French version of the Bi-directional Encoders for Transformers (BERT). We measure the
performance of CamemBERT compared to multilingual models in multiple downstream tasks, namely part-of-speech tagging,
dependency parsing, named-entity recognition, and natural language inference. CamemBERT improves the state of the art
for most of the tasks considered. We release the pretrained model for CamemBERT hoping to foster research and
downstream applications for French NLP.`),id.forEach(t),rd.forEach(t),te=p(i),U=a(i,"P",{});var ld=r(U);N=n(ld,"Tips:"),ld.forEach(t),ge=p(i),L=a(i,"UL",{});var dd=r(L);le=a(dd,"LI",{});var ur=r(le);$e=n(ur,"This implementation is the same as RoBERTa. Refer to the "),X=a(ur,"A",{href:!0});var cd=r(X);Fe=n(cd,"documentation of RoBERTa"),cd.forEach(t),Ee=n(ur,` for usage examples
as well as the information relative to the inputs and outputs.`),ur.forEach(t),dd.forEach(t),x=p(i),oe=a(i,"P",{});var Ro=r(oe);D=n(Ro,"This model was contributed by "),de=a(Ro,"A",{href:!0,rel:!0});var md=r(de);je=n(md,"camembert"),md.forEach(t),Q=n(Ro,". The original code can be found "),ce=a(Ro,"A",{href:!0,rel:!0});var pd=r(ce);ze=n(pd,"here"),pd.forEach(t),Z=n(Ro,"."),Ro.forEach(t),_e=p(i),R=a(i,"H2",{class:!0});var fr=r(R);re=a(fr,"A",{id:!0,class:!0,href:!0});var hd=r(re);K=a(hd,"SPAN",{});var ud=r(K);v(W.$$.fragment,ud),ud.forEach(t),hd.forEach(t),Je=p(fr),I=a(fr,"SPAN",{});var fd=r(I);Ue=n(fd,"Documentation resources"),fd.forEach(t),fr.forEach(t),be=p(i),f=a(i,"UL",{});var _t=r(f);E=a(_t,"LI",{});var gd=r(E);xe=a(gd,"A",{href:!0});var _d=r(xe);ne=n(_d,"Text classification task guide"),_d.forEach(t),gd.forEach(t),Ae=p(_t),Be=a(_t,"LI",{});var bd=r(Be);j=a(bd,"A",{href:!0});var yd=r(j);Ve=n(yd,"Token classification task guide"),yd.forEach(t),bd.forEach(t),Le=p(_t),Re=a(_t,"LI",{});var Td=r(Re);Ne=a(Td,"A",{href:!0});var kd=r(Ne);Xe=n(kd,"Question answering task guide"),kd.forEach(t),Td.forEach(t),q=p(_t),P=a(_t,"LI",{});var wd=r(P);Ie=a(wd,"A",{href:!0});var vd=r(Ie);Se=n(vd,"Causal language modeling task guide"),vd.forEach(t),wd.forEach(t),Y=p(_t),Ge=a(_t,"LI",{});var Md=r(Ge);Ze=a(Md,"A",{href:!0});var Cd=r(Ze);We=n(Cd,"Masked language modeling task guide"),Cd.forEach(t),Md.forEach(t),Pe=p(_t),ee=a(_t,"LI",{});var $d=r(ee);qe=a($d,"A",{href:!0});var Fd=r(qe);_m=n(Fd,"Multiple choice task guide"),Fd.forEach(t),$d.forEach(t),_t.forEach(t),Wd=p(i),ro=a(i,"H2",{class:!0});var gr=r(ro);Go=a(gr,"A",{id:!0,class:!0,href:!0});var Ed=r(Go);Mi=a(Ed,"SPAN",{});var jd=r(Mi);v(ds.$$.fragment,jd),jd.forEach(t),Ed.forEach(t),bm=p(gr),Ci=a(gr,"SPAN",{});var zd=r(Ci);ym=n(zd,"CamembertConfig"),zd.forEach(t),gr.forEach(t),xd=p(i),Ct=a(i,"DIV",{class:!0});var Yn=r(Ct);v(cs.$$.fragment,Yn),Tm=p(Yn),Vt=a(Yn,"P",{});var Hn=r(Vt);km=n(Hn,"This is the configuration class to store the configuration of a "),_r=a(Hn,"A",{href:!0});var py=r(_r);wm=n(py,"CamembertModel"),py.forEach(t),vm=n(Hn," or a "),br=a(Hn,"A",{href:!0});var hy=r(br);Mm=n(hy,"TFCamembertModel"),hy.forEach(t),Cm=n(Hn,`. It is
used to instantiate a Camembert 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 Camembert
`),ms=a(Hn,"A",{href:!0,rel:!0});var uy=r(ms);$m=n(uy,"camembert-base"),uy.forEach(t),Fm=n(Hn," architecture."),Hn.forEach(t),Em=p(Yn),io=a(Yn,"P",{});var ri=r(io);jm=n(ri,"Configuration objects inherit from "),yr=a(ri,"A",{href:!0});var fy=r(yr);zm=n(fy,"PretrainedConfig"),fy.forEach(t),Jm=n(ri,` and can be used to control the model outputs. Read the
documentation from `),Tr=a(ri,"A",{href:!0});var gy=r(Tr);Um=n(gy,"PretrainedConfig"),gy.forEach(t),Wm=n(ri," for more information."),ri.forEach(t),xm=p(Yn),v(Ao.$$.fragment,Yn),Yn.forEach(t),Nd=p(i),lo=a(i,"H2",{class:!0});var uc=r(lo);Vo=a(uc,"A",{id:!0,class:!0,href:!0});var _y=r(Vo);$i=a(_y,"SPAN",{});var by=r($i);v(ps.$$.fragment,by),by.forEach(t),_y.forEach(t),Nm=p(uc),Fi=a(uc,"SPAN",{});var yy=r(Fi);Im=n(yy,"CamembertTokenizer"),yy.forEach(t),uc.forEach(t),Id=p(i),et=a(i,"DIV",{class:!0});var vt=r(et);v(hs.$$.fragment,vt),Zm=p(vt),Lt=a(vt,"P",{});var Kn=r(Lt);qm=n(Kn,"Adapted from "),kr=a(Kn,"A",{href:!0});var Ty=r(kr);Bm=n(Ty,"RobertaTokenizer"),Ty.forEach(t),Rm=n(Kn," and "),wr=a(Kn,"A",{href:!0});var ky=r(wr);Gm=n(ky,"XLNetTokenizer"),ky.forEach(t),Am=n(Kn,`. Construct a CamemBERT tokenizer. Based on
`),us=a(Kn,"A",{href:!0,rel:!0});var wy=r(us);Vm=n(wy,"SentencePiece"),wy.forEach(t),Lm=n(Kn,"."),Kn.forEach(t),Xm=p(vt),fs=a(vt,"P",{});var fc=r(fs);Sm=n(fc,"This tokenizer inherits from "),vr=a(fc,"A",{href:!0});var vy=r(vr);Pm=n(vy,"PreTrainedTokenizer"),vy.forEach(t),Om=n(fc,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),fc.forEach(t),Dm=p(vt),Xt=a(vt,"DIV",{class:!0});var ii=r(Xt);v(gs.$$.fragment,ii),Qm=p(ii),Ei=a(ii,"P",{});var My=r(Ei);Ym=n(My,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),My.forEach(t),Hm=p(ii),_s=a(ii,"UL",{});var gc=r(_s);Mr=a(gc,"LI",{});var ly=r(Mr);Km=n(ly,"single sequence: "),ji=a(ly,"CODE",{});var Cy=r(ji);ep=n(Cy,"<s> X </s>"),Cy.forEach(t),ly.forEach(t),tp=p(gc),Cr=a(gc,"LI",{});var dy=r(Cr);op=n(dy,"pair of sequences: "),zi=a(dy,"CODE",{});var $y=r(zi);np=n($y,"<s> A </s></s> B </s>"),$y.forEach(t),dy.forEach(t),gc.forEach(t),ii.forEach(t),sp=p(vt),Lo=a(vt,"DIV",{class:!0});var _c=r(Lo);v(bs.$$.fragment,_c),ap=p(_c),ys=a(_c,"P",{});var bc=r(ys);rp=n(bc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ji=a(bc,"CODE",{});var Fy=r(Ji);ip=n(Fy,"prepare_for_model"),Fy.forEach(t),lp=n(bc," method."),bc.forEach(t),_c.forEach(t),dp=p(vt),Xo=a(vt,"DIV",{class:!0});var yc=r(Xo);v(Ts.$$.fragment,yc),cp=p(yc),Ui=a(yc,"P",{});var Ey=r(Ui);mp=n(Ey,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Ey.forEach(t),yc.forEach(t),pp=p(vt),$r=a(vt,"DIV",{class:!0});var jy=r($r);v(ks.$$.fragment,jy),jy.forEach(t),vt.forEach(t),Zd=p(i),co=a(i,"H2",{class:!0});var Tc=r(co);So=a(Tc,"A",{id:!0,class:!0,href:!0});var zy=r(So);Wi=a(zy,"SPAN",{});var Jy=r(Wi);v(ws.$$.fragment,Jy),Jy.forEach(t),zy.forEach(t),hp=p(Tc),xi=a(Tc,"SPAN",{});var Uy=r(xi);up=n(Uy,"CamembertTokenizerFast"),Uy.forEach(t),Tc.forEach(t),qd=p(i),ct=a(i,"DIV",{class:!0});var Pt=r(ct);v(vs.$$.fragment,Pt),fp=p(Pt),$t=a(Pt,"P",{});var Ot=r($t);gp=n(Ot,"Construct a \u201Cfast\u201D CamemBERT tokenizer (backed by HuggingFace\u2019s "),Ni=a(Ot,"EM",{});var Wy=r(Ni);_p=n(Wy,"tokenizers"),Wy.forEach(t),bp=n(Ot,` library). Adapted from
`),Fr=a(Ot,"A",{href:!0});var xy=r(Fr);yp=n(xy,"RobertaTokenizer"),xy.forEach(t),Tp=n(Ot," and "),Er=a(Ot,"A",{href:!0});var Ny=r(Er);kp=n(Ny,"XLNetTokenizer"),Ny.forEach(t),wp=n(Ot,`. Based on
`),Ms=a(Ot,"A",{href:!0,rel:!0});var Iy=r(Ms);vp=n(Iy,"BPE"),Iy.forEach(t),Mp=n(Ot,"."),Ot.forEach(t),Cp=p(Pt),Cs=a(Pt,"P",{});var kc=r(Cs);$p=n(kc,"This tokenizer inherits from "),jr=a(kc,"A",{href:!0});var Zy=r(jr);Fp=n(Zy,"PreTrainedTokenizerFast"),Zy.forEach(t),Ep=n(kc,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),kc.forEach(t),jp=p(Pt),St=a(Pt,"DIV",{class:!0});var li=r(St);v($s.$$.fragment,li),zp=p(li),Ii=a(li,"P",{});var qy=r(Ii);Jp=n(qy,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An CamemBERT sequence has the following format:`),qy.forEach(t),Up=p(li),Fs=a(li,"UL",{});var wc=r(Fs);zr=a(wc,"LI",{});var cy=r(zr);Wp=n(cy,"single sequence: "),Zi=a(cy,"CODE",{});var By=r(Zi);xp=n(By,"<s> X </s>"),By.forEach(t),cy.forEach(t),Np=p(wc),Jr=a(wc,"LI",{});var my=r(Jr);Ip=n(my,"pair of sequences: "),qi=a(my,"CODE",{});var Ry=r(qi);Zp=n(Ry,"<s> A </s></s> B </s>"),Ry.forEach(t),my.forEach(t),wc.forEach(t),li.forEach(t),qp=p(Pt),Po=a(Pt,"DIV",{class:!0});var vc=r(Po);v(Es.$$.fragment,vc),Bp=p(vc),Bi=a(vc,"P",{});var Gy=r(Bi);Rp=n(Gy,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. CamemBERT, like
RoBERTa, does not make use of token type ids, therefore a list of zeros is returned.`),Gy.forEach(t),vc.forEach(t),Pt.forEach(t),Bd=p(i),mo=a(i,"H2",{class:!0});var Mc=r(mo);Oo=a(Mc,"A",{id:!0,class:!0,href:!0});var Ay=r(Oo);Ri=a(Ay,"SPAN",{});var Vy=r(Ri);v(js.$$.fragment,Vy),Vy.forEach(t),Ay.forEach(t),Gp=p(Mc),Gi=a(Mc,"SPAN",{});var Ly=r(Gi);Ap=n(Ly,"CamembertModel"),Ly.forEach(t),Mc.forEach(t),Rd=p(i),Oe=a(i,"DIV",{class:!0});var dt=r(Oe);v(zs.$$.fragment,dt),Vp=p(dt),Ai=a(dt,"P",{});var Xy=r(Ai);Lp=n(Xy,"The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),Xy.forEach(t),Xp=p(dt),Js=a(dt,"P",{});var Cc=r(Js);Sp=n(Cc,"This model inherits from "),Ur=a(Cc,"A",{href:!0});var Sy=r(Ur);Pp=n(Sy,"PreTrainedModel"),Sy.forEach(t),Op=n(Cc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Cc.forEach(t),Dp=p(dt),Us=a(dt,"P",{});var $c=r(Us);Qp=n($c,"This model is also a PyTorch "),Ws=a($c,"A",{href:!0,rel:!0});var Py=r(Ws);Yp=n(Py,"torch.nn.Module"),Py.forEach(t),Hp=n($c,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$c.forEach(t),Kp=p(dt),xs=a(dt,"P",{});var Fc=r(xs);eh=n(Fc,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Vi=a(Fc,"EM",{});var Oy=r(Vi);th=n(Oy,`Attention is
all you need`),Oy.forEach(t),oh=n(Fc,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Fc.forEach(t),nh=p(dt),tt=a(dt,"P",{});var Mt=r(tt);sh=n(Mt,"To behave as a decoder the model needs to be initialized with the "),Li=a(Mt,"CODE",{});var Dy=r(Li);ah=n(Dy,"is_decoder"),Dy.forEach(t),rh=n(Mt,` argument of the configuration set to
`),Xi=a(Mt,"CODE",{});var Qy=r(Xi);ih=n(Qy,"True"),Qy.forEach(t),lh=n(Mt,". To be used in a Seq2Seq model, the model needs to initialized with both "),Si=a(Mt,"CODE",{});var Yy=r(Si);dh=n(Yy,"is_decoder"),Yy.forEach(t),ch=n(Mt,` argument and
`),Pi=a(Mt,"CODE",{});var Hy=r(Pi);mh=n(Hy,"add_cross_attention"),Hy.forEach(t),ph=n(Mt," set to "),Oi=a(Mt,"CODE",{});var Ky=r(Oi);hh=n(Ky,"True"),Ky.forEach(t),uh=n(Mt,"; an "),Di=a(Mt,"CODE",{});var eT=r(Di);fh=n(eT,"encoder_hidden_states"),eT.forEach(t),gh=n(Mt," is then expected as an input to the forward pass."),Mt.forEach(t),_h=p(dt),Do=a(dt,"P",{});var Jd=r(Do);bh=n(Jd,".. _"),Qi=a(Jd,"EM",{});var tT=r(Qi);yh=n(tT,"Attention is all you need"),tT.forEach(t),Th=n(Jd,": "),Ns=a(Jd,"A",{href:!0,rel:!0});var oT=r(Ns);kh=n(oT,"https://arxiv.org/abs/1706.03762"),oT.forEach(t),Jd.forEach(t),wh=p(dt),Ft=a(dt,"DIV",{class:!0});var es=r(Ft);v(Is.$$.fragment,es),vh=p(es),po=a(es,"P",{});var di=r(po);Mh=n(di,"The "),Wr=a(di,"A",{href:!0});var nT=r(Wr);Ch=n(nT,"CamembertModel"),nT.forEach(t),$h=n(di," forward method, overrides the "),Yi=a(di,"CODE",{});var sT=r(Yi);Fh=n(sT,"__call__"),sT.forEach(t),Eh=n(di," special method."),di.forEach(t),jh=p(es),v(Qo.$$.fragment,es),zh=p(es),v(Yo.$$.fragment,es),es.forEach(t),dt.forEach(t),Gd=p(i),ho=a(i,"H2",{class:!0});var Ec=r(ho);Ho=a(Ec,"A",{id:!0,class:!0,href:!0});var aT=r(Ho);Hi=a(aT,"SPAN",{});var rT=r(Hi);v(Zs.$$.fragment,rT),rT.forEach(t),aT.forEach(t),Jh=p(Ec),Ki=a(Ec,"SPAN",{});var iT=r(Ki);Uh=n(iT,"CamembertForCausalLM"),iT.forEach(t),Ec.forEach(t),Ad=p(i),mt=a(i,"DIV",{class:!0});var Dt=r(mt);v(qs.$$.fragment,Dt),Wh=p(Dt),Bs=a(Dt,"P",{});var jc=r(Bs);xh=n(jc,"CamemBERT Model with a "),el=a(jc,"CODE",{});var lT=r(el);Nh=n(lT,"language modeling"),lT.forEach(t),Ih=n(jc," head on top for CLM fine-tuning."),jc.forEach(t),Zh=p(Dt),Rs=a(Dt,"P",{});var zc=r(Rs);qh=n(zc,"This model inherits from "),xr=a(zc,"A",{href:!0});var dT=r(xr);Bh=n(dT,"PreTrainedModel"),dT.forEach(t),Rh=n(zc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zc.forEach(t),Gh=p(Dt),Gs=a(Dt,"P",{});var Jc=r(Gs);Ah=n(Jc,"This model is also a PyTorch "),As=a(Jc,"A",{href:!0,rel:!0});var cT=r(As);Vh=n(cT,"torch.nn.Module"),cT.forEach(t),Lh=n(Jc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Jc.forEach(t),Xh=p(Dt),Et=a(Dt,"DIV",{class:!0});var ts=r(Et);v(Vs.$$.fragment,ts),Sh=p(ts),uo=a(ts,"P",{});var ci=r(uo);Ph=n(ci,"The "),Nr=a(ci,"A",{href:!0});var mT=r(Nr);Oh=n(mT,"CamembertForCausalLM"),mT.forEach(t),Dh=n(ci," forward method, overrides the "),tl=a(ci,"CODE",{});var pT=r(tl);Qh=n(pT,"__call__"),pT.forEach(t),Yh=n(ci," special method."),ci.forEach(t),Hh=p(ts),v(Ko.$$.fragment,ts),Kh=p(ts),v(en.$$.fragment,ts),ts.forEach(t),Dt.forEach(t),Vd=p(i),fo=a(i,"H2",{class:!0});var Uc=r(fo);tn=a(Uc,"A",{id:!0,class:!0,href:!0});var hT=r(tn);ol=a(hT,"SPAN",{});var uT=r(ol);v(Ls.$$.fragment,uT),uT.forEach(t),hT.forEach(t),eu=p(Uc),nl=a(Uc,"SPAN",{});var fT=r(nl);tu=n(fT,"CamembertForMaskedLM"),fT.forEach(t),Uc.forEach(t),Ld=p(i),pt=a(i,"DIV",{class:!0});var Qt=r(pt);v(Xs.$$.fragment,Qt),ou=p(Qt),Ss=a(Qt,"P",{});var Wc=r(Ss);nu=n(Wc,"CamemBERT Model with a "),sl=a(Wc,"CODE",{});var gT=r(sl);su=n(gT,"language modeling"),gT.forEach(t),au=n(Wc," head on top."),Wc.forEach(t),ru=p(Qt),Ps=a(Qt,"P",{});var xc=r(Ps);iu=n(xc,"This model inherits from "),Ir=a(xc,"A",{href:!0});var _T=r(Ir);lu=n(_T,"PreTrainedModel"),_T.forEach(t),du=n(xc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),xc.forEach(t),cu=p(Qt),Os=a(Qt,"P",{});var Nc=r(Os);mu=n(Nc,"This model is also a PyTorch "),Ds=a(Nc,"A",{href:!0,rel:!0});var bT=r(Ds);pu=n(bT,"torch.nn.Module"),bT.forEach(t),hu=n(Nc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nc.forEach(t),uu=p(Qt),jt=a(Qt,"DIV",{class:!0});var os=r(jt);v(Qs.$$.fragment,os),fu=p(os),go=a(os,"P",{});var mi=r(go);gu=n(mi,"The "),Zr=a(mi,"A",{href:!0});var yT=r(Zr);_u=n(yT,"CamembertForMaskedLM"),yT.forEach(t),bu=n(mi," forward method, overrides the "),al=a(mi,"CODE",{});var TT=r(al);yu=n(TT,"__call__"),TT.forEach(t),Tu=n(mi," special method."),mi.forEach(t),ku=p(os),v(on.$$.fragment,os),wu=p(os),v(nn.$$.fragment,os),os.forEach(t),Qt.forEach(t),Xd=p(i),_o=a(i,"H2",{class:!0});var Ic=r(_o);sn=a(Ic,"A",{id:!0,class:!0,href:!0});var kT=r(sn);rl=a(kT,"SPAN",{});var wT=r(rl);v(Ys.$$.fragment,wT),wT.forEach(t),kT.forEach(t),vu=p(Ic),il=a(Ic,"SPAN",{});var vT=r(il);Mu=n(vT,"CamembertForSequenceClassification"),vT.forEach(t),Ic.forEach(t),Sd=p(i),ht=a(i,"DIV",{class:!0});var Yt=r(ht);v(Hs.$$.fragment,Yt),Cu=p(Yt),ll=a(Yt,"P",{});var MT=r(ll);$u=n(MT,`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),MT.forEach(t),Fu=p(Yt),Ks=a(Yt,"P",{});var Zc=r(Ks);Eu=n(Zc,"This model inherits from "),qr=a(Zc,"A",{href:!0});var CT=r(qr);ju=n(CT,"PreTrainedModel"),CT.forEach(t),zu=n(Zc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Zc.forEach(t),Ju=p(Yt),ea=a(Yt,"P",{});var qc=r(ea);Uu=n(qc,"This model is also a PyTorch "),ta=a(qc,"A",{href:!0,rel:!0});var $T=r(ta);Wu=n($T,"torch.nn.Module"),$T.forEach(t),xu=n(qc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qc.forEach(t),Nu=p(Yt),bt=a(Yt,"DIV",{class:!0});var Ht=r(bt);v(oa.$$.fragment,Ht),Iu=p(Ht),bo=a(Ht,"P",{});var pi=r(bo);Zu=n(pi,"The "),Br=a(pi,"A",{href:!0});var FT=r(Br);qu=n(FT,"CamembertForSequenceClassification"),FT.forEach(t),Bu=n(pi," forward method, overrides the "),dl=a(pi,"CODE",{});var ET=r(dl);Ru=n(ET,"__call__"),ET.forEach(t),Gu=n(pi," special method."),pi.forEach(t),Au=p(Ht),v(an.$$.fragment,Ht),Vu=p(Ht),v(rn.$$.fragment,Ht),Lu=p(Ht),v(ln.$$.fragment,Ht),Ht.forEach(t),Yt.forEach(t),Pd=p(i),yo=a(i,"H2",{class:!0});var Bc=r(yo);dn=a(Bc,"A",{id:!0,class:!0,href:!0});var jT=r(dn);cl=a(jT,"SPAN",{});var zT=r(cl);v(na.$$.fragment,zT),zT.forEach(t),jT.forEach(t),Xu=p(Bc),ml=a(Bc,"SPAN",{});var JT=r(ml);Su=n(JT,"CamembertForMultipleChoice"),JT.forEach(t),Bc.forEach(t),Od=p(i),ut=a(i,"DIV",{class:!0});var Kt=r(ut);v(sa.$$.fragment,Kt),Pu=p(Kt),pl=a(Kt,"P",{});var UT=r(pl);Ou=n(UT,`CamemBERT Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),UT.forEach(t),Du=p(Kt),aa=a(Kt,"P",{});var Rc=r(aa);Qu=n(Rc,"This model inherits from "),Rr=a(Rc,"A",{href:!0});var WT=r(Rr);Yu=n(WT,"PreTrainedModel"),WT.forEach(t),Hu=n(Rc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Rc.forEach(t),Ku=p(Kt),ra=a(Kt,"P",{});var Gc=r(ra);ef=n(Gc,"This model is also a PyTorch "),ia=a(Gc,"A",{href:!0,rel:!0});var xT=r(ia);tf=n(xT,"torch.nn.Module"),xT.forEach(t),of=n(Gc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Gc.forEach(t),nf=p(Kt),zt=a(Kt,"DIV",{class:!0});var ns=r(zt);v(la.$$.fragment,ns),sf=p(ns),To=a(ns,"P",{});var hi=r(To);af=n(hi,"The "),Gr=a(hi,"A",{href:!0});var NT=r(Gr);rf=n(NT,"CamembertForMultipleChoice"),NT.forEach(t),lf=n(hi," forward method, overrides the "),hl=a(hi,"CODE",{});var IT=r(hl);df=n(IT,"__call__"),IT.forEach(t),cf=n(hi," special method."),hi.forEach(t),mf=p(ns),v(cn.$$.fragment,ns),pf=p(ns),v(mn.$$.fragment,ns),ns.forEach(t),Kt.forEach(t),Dd=p(i),ko=a(i,"H2",{class:!0});var Ac=r(ko);pn=a(Ac,"A",{id:!0,class:!0,href:!0});var ZT=r(pn);ul=a(ZT,"SPAN",{});var qT=r(ul);v(da.$$.fragment,qT),qT.forEach(t),ZT.forEach(t),hf=p(Ac),fl=a(Ac,"SPAN",{});var BT=r(fl);uf=n(BT,"CamembertForTokenClassification"),BT.forEach(t),Ac.forEach(t),Qd=p(i),ft=a(i,"DIV",{class:!0});var eo=r(ft);v(ca.$$.fragment,eo),ff=p(eo),gl=a(eo,"P",{});var RT=r(gl);gf=n(RT,`CamemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),RT.forEach(t),_f=p(eo),ma=a(eo,"P",{});var Vc=r(ma);bf=n(Vc,"This model inherits from "),Ar=a(Vc,"A",{href:!0});var GT=r(Ar);yf=n(GT,"PreTrainedModel"),GT.forEach(t),Tf=n(Vc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vc.forEach(t),kf=p(eo),pa=a(eo,"P",{});var Lc=r(pa);wf=n(Lc,"This model is also a PyTorch "),ha=a(Lc,"A",{href:!0,rel:!0});var AT=r(ha);vf=n(AT,"torch.nn.Module"),AT.forEach(t),Mf=n(Lc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lc.forEach(t),Cf=p(eo),Jt=a(eo,"DIV",{class:!0});var ss=r(Jt);v(ua.$$.fragment,ss),$f=p(ss),wo=a(ss,"P",{});var ui=r(wo);Ff=n(ui,"The "),Vr=a(ui,"A",{href:!0});var VT=r(Vr);Ef=n(VT,"CamembertForTokenClassification"),VT.forEach(t),jf=n(ui," forward method, overrides the "),_l=a(ui,"CODE",{});var LT=r(_l);zf=n(LT,"__call__"),LT.forEach(t),Jf=n(ui," special method."),ui.forEach(t),Uf=p(ss),v(hn.$$.fragment,ss),Wf=p(ss),v(un.$$.fragment,ss),ss.forEach(t),eo.forEach(t),Yd=p(i),vo=a(i,"H2",{class:!0});var Xc=r(vo);fn=a(Xc,"A",{id:!0,class:!0,href:!0});var XT=r(fn);bl=a(XT,"SPAN",{});var ST=r(bl);v(fa.$$.fragment,ST),ST.forEach(t),XT.forEach(t),xf=p(Xc),yl=a(Xc,"SPAN",{});var PT=r(yl);Nf=n(PT,"CamembertForQuestionAnswering"),PT.forEach(t),Xc.forEach(t),Hd=p(i),gt=a(i,"DIV",{class:!0});var to=r(gt);v(ga.$$.fragment,to),If=p(to),gn=a(to,"P",{});var Ud=r(gn);Zf=n(Ud,`CamemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Tl=a(Ud,"CODE",{});var OT=r(Tl);qf=n(OT,"span start logits"),OT.forEach(t),Bf=n(Ud," and "),kl=a(Ud,"CODE",{});var DT=r(kl);Rf=n(DT,"span end logits"),DT.forEach(t),Ud.forEach(t),Gf=p(to),_a=a(to,"P",{});var Sc=r(_a);Af=n(Sc,"This model inherits from "),Lr=a(Sc,"A",{href:!0});var QT=r(Lr);Vf=n(QT,"PreTrainedModel"),QT.forEach(t),Lf=n(Sc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Sc.forEach(t),Xf=p(to),ba=a(to,"P",{});var Pc=r(ba);Sf=n(Pc,"This model is also a PyTorch "),ya=a(Pc,"A",{href:!0,rel:!0});var YT=r(ya);Pf=n(YT,"torch.nn.Module"),YT.forEach(t),Of=n(Pc,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pc.forEach(t),Df=p(to),Ut=a(to,"DIV",{class:!0});var as=r(Ut);v(Ta.$$.fragment,as),Qf=p(as),Mo=a(as,"P",{});var fi=r(Mo);Yf=n(fi,"The "),Xr=a(fi,"A",{href:!0});var HT=r(Xr);Hf=n(HT,"CamembertForQuestionAnswering"),HT.forEach(t),Kf=n(fi," forward method, overrides the "),wl=a(fi,"CODE",{});var KT=r(wl);eg=n(KT,"__call__"),KT.forEach(t),tg=n(fi," special method."),fi.forEach(t),og=p(as),v(_n.$$.fragment,as),ng=p(as),v(bn.$$.fragment,as),as.forEach(t),to.forEach(t),Kd=p(i),Co=a(i,"H2",{class:!0});var Oc=r(Co);yn=a(Oc,"A",{id:!0,class:!0,href:!0});var ek=r(yn);vl=a(ek,"SPAN",{});var tk=r(vl);v(ka.$$.fragment,tk),tk.forEach(t),ek.forEach(t),sg=p(Oc),Ml=a(Oc,"SPAN",{});var ok=r(Ml);ag=n(ok,"TFCamembertModel"),ok.forEach(t),Oc.forEach(t),ec=p(i),ot=a(i,"DIV",{class:!0});var It=r(ot);v(wa.$$.fragment,It),rg=p(It),Cl=a(It,"P",{});var nk=r(Cl);ig=n(nk,"The bare CamemBERT Model transformer outputting raw hidden-states without any specific head on top."),nk.forEach(t),lg=p(It),va=a(It,"P",{});var Dc=r(va);dg=n(Dc,"This model inherits from "),Sr=a(Dc,"A",{href:!0});var sk=r(Sr);cg=n(sk,"TFPreTrainedModel"),sk.forEach(t),mg=n(Dc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Dc.forEach(t),pg=p(It),Ma=a(It,"P",{});var Qc=r(Ma);hg=n(Qc,"This model is also a "),Ca=a(Qc,"A",{href:!0,rel:!0});var ak=r(Ca);ug=n(ak,"tf.keras.Model"),ak.forEach(t),fg=n(Qc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Qc.forEach(t),gg=p(It),v(Tn.$$.fragment,It),_g=p(It),Wt=a(It,"DIV",{class:!0});var rs=r(Wt);v($a.$$.fragment,rs),bg=p(rs),$o=a(rs,"P",{});var gi=r($o);yg=n(gi,"The "),Pr=a(gi,"A",{href:!0});var rk=r(Pr);Tg=n(rk,"TFCamembertModel"),rk.forEach(t),kg=n(gi," forward method, overrides the "),$l=a(gi,"CODE",{});var ik=r($l);wg=n(ik,"__call__"),ik.forEach(t),vg=n(gi," special method."),gi.forEach(t),Mg=p(rs),v(kn.$$.fragment,rs),Cg=p(rs),v(wn.$$.fragment,rs),rs.forEach(t),It.forEach(t),tc=p(i),Fo=a(i,"H2",{class:!0});var Yc=r(Fo);vn=a(Yc,"A",{id:!0,class:!0,href:!0});var lk=r(vn);Fl=a(lk,"SPAN",{});var dk=r(Fl);v(Fa.$$.fragment,dk),dk.forEach(t),lk.forEach(t),$g=p(Yc),El=a(Yc,"SPAN",{});var ck=r(El);Fg=n(ck,"TFCamembertForCasualLM"),ck.forEach(t),Yc.forEach(t),oc=p(i),nt=a(i,"DIV",{class:!0});var Zt=r(nt);v(Ea.$$.fragment,Zt),Eg=p(Zt),ja=a(Zt,"P",{});var Hc=r(ja);jg=n(Hc,"CamemBERT Model with a "),jl=a(Hc,"CODE",{});var mk=r(jl);zg=n(mk,"language modeling"),mk.forEach(t),Jg=n(Hc," head on top for CLM fine-tuning."),Hc.forEach(t),Ug=p(Zt),za=a(Zt,"P",{});var Kc=r(za);Wg=n(Kc,"This model inherits from "),Or=a(Kc,"A",{href:!0});var pk=r(Or);xg=n(pk,"TFPreTrainedModel"),pk.forEach(t),Ng=n(Kc,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kc.forEach(t),Ig=p(Zt),Ja=a(Zt,"P",{});var em=r(Ja);Zg=n(em,"This model is also a "),Ua=a(em,"A",{href:!0,rel:!0});var hk=r(Ua);qg=n(hk,"tf.keras.Model"),hk.forEach(t),Bg=n(em,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),em.forEach(t),Rg=p(Zt),v(Mn.$$.fragment,Zt),Gg=p(Zt),xt=a(Zt,"DIV",{class:!0});var is=r(xt);v(Wa.$$.fragment,is),Ag=p(is),Eo=a(is,"P",{});var _i=r(Eo);Vg=n(_i,"The "),Dr=a(_i,"A",{href:!0});var uk=r(Dr);Lg=n(uk,"TFCamembertForCausalLM"),uk.forEach(t),Xg=n(_i," forward method, overrides the "),zl=a(_i,"CODE",{});var fk=r(zl);Sg=n(fk,"__call__"),fk.forEach(t),Pg=n(_i," special method."),_i.forEach(t),Og=p(is),v(Cn.$$.fragment,is),Dg=p(is),v($n.$$.fragment,is),is.forEach(t),Zt.forEach(t),nc=p(i),jo=a(i,"H2",{class:!0});var tm=r(jo);Fn=a(tm,"A",{id:!0,class:!0,href:!0});var gk=r(Fn);Jl=a(gk,"SPAN",{});var _k=r(Jl);v(xa.$$.fragment,_k),_k.forEach(t),gk.forEach(t),Qg=p(tm),Ul=a(tm,"SPAN",{});var bk=r(Ul);Yg=n(bk,"TFCamembertForMaskedLM"),bk.forEach(t),tm.forEach(t),sc=p(i),st=a(i,"DIV",{class:!0});var qt=r(st);v(Na.$$.fragment,qt),Hg=p(qt),Ia=a(qt,"P",{});var om=r(Ia);Kg=n(om,"CamemBERT Model with a "),Wl=a(om,"CODE",{});var yk=r(Wl);e_=n(yk,"language modeling"),yk.forEach(t),t_=n(om," head on top."),om.forEach(t),o_=p(qt),Za=a(qt,"P",{});var nm=r(Za);n_=n(nm,"This model inherits from "),Qr=a(nm,"A",{href:!0});var Tk=r(Qr);s_=n(Tk,"TFPreTrainedModel"),Tk.forEach(t),a_=n(nm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),nm.forEach(t),r_=p(qt),qa=a(qt,"P",{});var sm=r(qa);i_=n(sm,"This model is also a "),Ba=a(sm,"A",{href:!0,rel:!0});var kk=r(Ba);l_=n(kk,"tf.keras.Model"),kk.forEach(t),d_=n(sm,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),sm.forEach(t),c_=p(qt),v(En.$$.fragment,qt),m_=p(qt),yt=a(qt,"DIV",{class:!0});var oo=r(yt);v(Ra.$$.fragment,oo),p_=p(oo),zo=a(oo,"P",{});var bi=r(zo);h_=n(bi,"The "),Yr=a(bi,"A",{href:!0});var wk=r(Yr);u_=n(wk,"TFCamembertForMaskedLM"),wk.forEach(t),f_=n(bi," forward method, overrides the "),xl=a(bi,"CODE",{});var vk=r(xl);g_=n(vk,"__call__"),vk.forEach(t),__=n(bi," special method."),bi.forEach(t),b_=p(oo),v(jn.$$.fragment,oo),y_=p(oo),v(zn.$$.fragment,oo),T_=p(oo),v(Jn.$$.fragment,oo),oo.forEach(t),qt.forEach(t),ac=p(i),Jo=a(i,"H2",{class:!0});var am=r(Jo);Un=a(am,"A",{id:!0,class:!0,href:!0});var Mk=r(Un);Nl=a(Mk,"SPAN",{});var Ck=r(Nl);v(Ga.$$.fragment,Ck),Ck.forEach(t),Mk.forEach(t),k_=p(am),Il=a(am,"SPAN",{});var $k=r(Il);w_=n($k,"TFCamembertForSequenceClassification"),$k.forEach(t),am.forEach(t),rc=p(i),at=a(i,"DIV",{class:!0});var Bt=r(at);v(Aa.$$.fragment,Bt),v_=p(Bt),Zl=a(Bt,"P",{});var Fk=r(Zl);M_=n(Fk,`CamemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Fk.forEach(t),C_=p(Bt),Va=a(Bt,"P",{});var rm=r(Va);$_=n(rm,"This model inherits from "),Hr=a(rm,"A",{href:!0});var Ek=r(Hr);F_=n(Ek,"TFPreTrainedModel"),Ek.forEach(t),E_=n(rm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rm.forEach(t),j_=p(Bt),La=a(Bt,"P",{});var im=r(La);z_=n(im,"This model is also a "),Xa=a(im,"A",{href:!0,rel:!0});var jk=r(Xa);J_=n(jk,"tf.keras.Model"),jk.forEach(t),U_=n(im,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),im.forEach(t),W_=p(Bt),v(Wn.$$.fragment,Bt),x_=p(Bt),Tt=a(Bt,"DIV",{class:!0});var no=r(Tt);v(Sa.$$.fragment,no),N_=p(no),Uo=a(no,"P",{});var yi=r(Uo);I_=n(yi,"The "),Kr=a(yi,"A",{href:!0});var zk=r(Kr);Z_=n(zk,"TFCamembertForSequenceClassification"),zk.forEach(t),q_=n(yi," forward method, overrides the "),ql=a(yi,"CODE",{});var Jk=r(ql);B_=n(Jk,"__call__"),Jk.forEach(t),R_=n(yi," special method."),yi.forEach(t),G_=p(no),v(xn.$$.fragment,no),A_=p(no),v(Nn.$$.fragment,no),V_=p(no),v(In.$$.fragment,no),no.forEach(t),Bt.forEach(t),ic=p(i),Wo=a(i,"H2",{class:!0});var lm=r(Wo);Zn=a(lm,"A",{id:!0,class:!0,href:!0});var Uk=r(Zn);Bl=a(Uk,"SPAN",{});var Wk=r(Bl);v(Pa.$$.fragment,Wk),Wk.forEach(t),Uk.forEach(t),L_=p(lm),Rl=a(lm,"SPAN",{});var xk=r(Rl);X_=n(xk,"TFCamembertForMultipleChoice"),xk.forEach(t),lm.forEach(t),lc=p(i),rt=a(i,"DIV",{class:!0});var Rt=r(rt);v(Oa.$$.fragment,Rt),S_=p(Rt),Gl=a(Rt,"P",{});var Nk=r(Gl);P_=n(Nk,`CamemBERT Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Nk.forEach(t),O_=p(Rt),Da=a(Rt,"P",{});var dm=r(Da);D_=n(dm,"This model inherits from "),ei=a(dm,"A",{href:!0});var Ik=r(ei);Q_=n(Ik,"TFPreTrainedModel"),Ik.forEach(t),Y_=n(dm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dm.forEach(t),H_=p(Rt),Qa=a(Rt,"P",{});var cm=r(Qa);K_=n(cm,"This model is also a "),Ya=a(cm,"A",{href:!0,rel:!0});var Zk=r(Ya);eb=n(Zk,"tf.keras.Model"),Zk.forEach(t),tb=n(cm,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cm.forEach(t),ob=p(Rt),v(qn.$$.fragment,Rt),nb=p(Rt),Nt=a(Rt,"DIV",{class:!0});var ls=r(Nt);v(Ha.$$.fragment,ls),sb=p(ls),xo=a(ls,"P",{});var Ti=r(xo);ab=n(Ti,"The "),ti=a(Ti,"A",{href:!0});var qk=r(ti);rb=n(qk,"TFCamembertForMultipleChoice"),qk.forEach(t),ib=n(Ti," forward method, overrides the "),Al=a(Ti,"CODE",{});var Bk=r(Al);lb=n(Bk,"__call__"),Bk.forEach(t),db=n(Ti," special method."),Ti.forEach(t),cb=p(ls),v(Bn.$$.fragment,ls),mb=p(ls),v(Rn.$$.fragment,ls),ls.forEach(t),Rt.forEach(t),dc=p(i),No=a(i,"H2",{class:!0});var mm=r(No);Gn=a(mm,"A",{id:!0,class:!0,href:!0});var Rk=r(Gn);Vl=a(Rk,"SPAN",{});var Gk=r(Vl);v(Ka.$$.fragment,Gk),Gk.forEach(t),Rk.forEach(t),pb=p(mm),Ll=a(mm,"SPAN",{});var Ak=r(Ll);hb=n(Ak,"TFCamembertForTokenClassification"),Ak.forEach(t),mm.forEach(t),cc=p(i),it=a(i,"DIV",{class:!0});var Gt=r(it);v(er.$$.fragment,Gt),ub=p(Gt),Xl=a(Gt,"P",{});var Vk=r(Xl);fb=n(Vk,`CamemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks.`),Vk.forEach(t),gb=p(Gt),tr=a(Gt,"P",{});var pm=r(tr);_b=n(pm,"This model inherits from "),oi=a(pm,"A",{href:!0});var Lk=r(oi);bb=n(Lk,"TFPreTrainedModel"),Lk.forEach(t),yb=n(pm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pm.forEach(t),Tb=p(Gt),or=a(Gt,"P",{});var hm=r(or);kb=n(hm,"This model is also a "),nr=a(hm,"A",{href:!0,rel:!0});var Xk=r(nr);wb=n(Xk,"tf.keras.Model"),Xk.forEach(t),vb=n(hm,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),hm.forEach(t),Mb=p(Gt),v(An.$$.fragment,Gt),Cb=p(Gt),kt=a(Gt,"DIV",{class:!0});var so=r(kt);v(sr.$$.fragment,so),$b=p(so),Io=a(so,"P",{});var ki=r(Io);Fb=n(ki,"The "),ni=a(ki,"A",{href:!0});var Sk=r(ni);Eb=n(Sk,"TFCamembertForTokenClassification"),Sk.forEach(t),jb=n(ki," forward method, overrides the "),Sl=a(ki,"CODE",{});var Pk=r(Sl);zb=n(Pk,"__call__"),Pk.forEach(t),Jb=n(ki," special method."),ki.forEach(t),Ub=p(so),v(Vn.$$.fragment,so),Wb=p(so),v(Ln.$$.fragment,so),xb=p(so),v(Xn.$$.fragment,so),so.forEach(t),Gt.forEach(t),mc=p(i),Zo=a(i,"H2",{class:!0});var um=r(Zo);Sn=a(um,"A",{id:!0,class:!0,href:!0});var Ok=r(Sn);Pl=a(Ok,"SPAN",{});var Dk=r(Pl);v(ar.$$.fragment,Dk),Dk.forEach(t),Ok.forEach(t),Nb=p(um),Ol=a(um,"SPAN",{});var Qk=r(Ol);Ib=n(Qk,"TFCamembertForQuestionAnswering"),Qk.forEach(t),um.forEach(t),pc=p(i),lt=a(i,"DIV",{class:!0});var At=r(lt);v(rr.$$.fragment,At),Zb=p(At),qo=a(At,"P",{});var wi=r(qo);qb=n(wi,`CamemBERT Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Dl=a(wi,"CODE",{});var Yk=r(Dl);Bb=n(Yk,"span start logits"),Yk.forEach(t),Rb=n(wi," and "),Ql=a(wi,"CODE",{});var Hk=r(Ql);Gb=n(Hk,"span end logits"),Hk.forEach(t),Ab=n(wi,")."),wi.forEach(t),Vb=p(At),ir=a(At,"P",{});var fm=r(ir);Lb=n(fm,"This model inherits from "),si=a(fm,"A",{href:!0});var Kk=r(si);Xb=n(Kk,"TFPreTrainedModel"),Kk.forEach(t),Sb=n(fm,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fm.forEach(t),Pb=p(At),lr=a(At,"P",{});var gm=r(lr);Ob=n(gm,"This model is also a "),dr=a(gm,"A",{href:!0,rel:!0});var ew=r(dr);Db=n(ew,"tf.keras.Model"),ew.forEach(t),Qb=n(gm,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),gm.forEach(t),Yb=p(At),v(Pn.$$.fragment,At),Hb=p(At),wt=a(At,"DIV",{class:!0});var ao=r(wt);v(cr.$$.fragment,ao),Kb=p(ao),Bo=a(ao,"P",{});var vi=r(Bo);ey=n(vi,"The "),ai=a(vi,"A",{href:!0});var tw=r(ai);ty=n(tw,"TFCamembertForQuestionAnswering"),tw.forEach(t),oy=n(vi," forward method, overrides the "),Yl=a(vi,"CODE",{});var ow=r(Yl);ny=n(ow,"__call__"),ow.forEach(t),sy=n(vi," special method."),vi.forEach(t),ay=p(ao),v(On.$$.fragment,ao),ry=p(ao),v(Dn.$$.fragment,ao),iy=p(ao),v(Qn.$$.fragment,ao),ao.forEach(t),At.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(Qw)),g(u,"id","camembert"),g(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(u,"href","#camembert"),g(h,"class","relative group"),g(ae,"id","overview"),g(ae,"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"),g(ae,"href","#overview"),g(B,"class","relative group"),g(ie,"href","https://arxiv.org/abs/1911.03894"),g(ie,"rel","nofollow"),g(X,"href","roberta"),g(de,"href","https://huggingface.co/camembert"),g(de,"rel","nofollow"),g(ce,"href","https://camembert-model.fr/"),g(ce,"rel","nofollow"),g(re,"id","documentation-resources"),g(re,"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"),g(re,"href","#documentation-resources"),g(R,"class","relative group"),g(xe,"href","../tasks/sequence_classification"),g(j,"href","../tasks/token_classification"),g(Ne,"href","../tasks/question_answering"),g(Ie,"href","../tasks/language_modeling"),g(Ze,"href","../tasks/masked_language_modeling"),g(qe,"href","../tasks/multiple_choice"),g(Go,"id","transformers.CamembertConfig"),g(Go,"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"),g(Go,"href","#transformers.CamembertConfig"),g(ro,"class","relative group"),g(_r,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertModel"),g(br,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertModel"),g(ms,"href","https://huggingface.co/camembert-base"),g(ms,"rel","nofollow"),g(yr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),g(Tr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),g(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Vo,"id","transformers.CamembertTokenizer"),g(Vo,"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"),g(Vo,"href","#transformers.CamembertTokenizer"),g(lo,"class","relative group"),g(kr,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer"),g(wr,"href","/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer"),g(us,"href","https://github.com/google/sentencepiece"),g(us,"rel","nofollow"),g(vr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),g(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g($r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(So,"id","transformers.CamembertTokenizerFast"),g(So,"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"),g(So,"href","#transformers.CamembertTokenizerFast"),g(co,"class","relative group"),g(Fr,"href","/docs/transformers/main/en/model_doc/roberta#transformers.RobertaTokenizer"),g(Er,"href","/docs/transformers/main/en/model_doc/xlnet#transformers.XLNetTokenizer"),g(Ms,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),g(Ms,"rel","nofollow"),g(jr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),g(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Oo,"id","transformers.CamembertModel"),g(Oo,"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"),g(Oo,"href","#transformers.CamembertModel"),g(mo,"class","relative group"),g(Ur,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(Ws,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ws,"rel","nofollow"),g(Ns,"href","https://arxiv.org/abs/1706.03762"),g(Ns,"rel","nofollow"),g(Wr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertModel"),g(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ho,"id","transformers.CamembertForCausalLM"),g(Ho,"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"),g(Ho,"href","#transformers.CamembertForCausalLM"),g(ho,"class","relative group"),g(xr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(As,"rel","nofollow"),g(Nr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForCausalLM"),g(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(tn,"id","transformers.CamembertForMaskedLM"),g(tn,"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"),g(tn,"href","#transformers.CamembertForMaskedLM"),g(fo,"class","relative group"),g(Ir,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(Ds,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ds,"rel","nofollow"),g(Zr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForMaskedLM"),g(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(sn,"id","transformers.CamembertForSequenceClassification"),g(sn,"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"),g(sn,"href","#transformers.CamembertForSequenceClassification"),g(_o,"class","relative group"),g(qr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ta,"rel","nofollow"),g(Br,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForSequenceClassification"),g(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(dn,"id","transformers.CamembertForMultipleChoice"),g(dn,"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"),g(dn,"href","#transformers.CamembertForMultipleChoice"),g(yo,"class","relative group"),g(Rr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(ia,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ia,"rel","nofollow"),g(Gr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForMultipleChoice"),g(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(pn,"id","transformers.CamembertForTokenClassification"),g(pn,"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"),g(pn,"href","#transformers.CamembertForTokenClassification"),g(ko,"class","relative group"),g(Ar,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(ha,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ha,"rel","nofollow"),g(Vr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForTokenClassification"),g(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(fn,"id","transformers.CamembertForQuestionAnswering"),g(fn,"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"),g(fn,"href","#transformers.CamembertForQuestionAnswering"),g(vo,"class","relative group"),g(Lr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),g(ya,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ya,"rel","nofollow"),g(Xr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.CamembertForQuestionAnswering"),g(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(yn,"id","transformers.TFCamembertModel"),g(yn,"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"),g(yn,"href","#transformers.TFCamembertModel"),g(Co,"class","relative group"),g(Sr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ca,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ca,"rel","nofollow"),g(Pr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertModel"),g(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(vn,"id","transformers.TFCamembertForCausalLM"),g(vn,"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"),g(vn,"href","#transformers.TFCamembertForCausalLM"),g(Fo,"class","relative group"),g(Or,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ua,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ua,"rel","nofollow"),g(Dr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForCausalLM"),g(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Fn,"id","transformers.TFCamembertForMaskedLM"),g(Fn,"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"),g(Fn,"href","#transformers.TFCamembertForMaskedLM"),g(jo,"class","relative group"),g(Qr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ba,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ba,"rel","nofollow"),g(Yr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForMaskedLM"),g(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Un,"id","transformers.TFCamembertForSequenceClassification"),g(Un,"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"),g(Un,"href","#transformers.TFCamembertForSequenceClassification"),g(Jo,"class","relative group"),g(Hr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Xa,"rel","nofollow"),g(Kr,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForSequenceClassification"),g(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Zn,"id","transformers.TFCamembertForMultipleChoice"),g(Zn,"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"),g(Zn,"href","#transformers.TFCamembertForMultipleChoice"),g(Wo,"class","relative group"),g(ei,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ya,"rel","nofollow"),g(ti,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForMultipleChoice"),g(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Gn,"id","transformers.TFCamembertForTokenClassification"),g(Gn,"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"),g(Gn,"href","#transformers.TFCamembertForTokenClassification"),g(No,"class","relative group"),g(oi,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(nr,"rel","nofollow"),g(ni,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForTokenClassification"),g(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Sn,"id","transformers.TFCamembertForQuestionAnswering"),g(Sn,"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"),g(Sn,"href","#transformers.TFCamembertForQuestionAnswering"),g(Zo,"class","relative group"),g(si,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(dr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(dr,"rel","nofollow"),g(ai,"href","/docs/transformers/main/en/model_doc/camembert#transformers.TFCamembertForQuestionAnswering"),g(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,b){e(document.head,d),_(i,y,b),_(i,h,b),e(h,u),e(u,T),M(l,T,null),e(h,c),e(h,z),e(z,ye),_(i,pe,b),_(i,B,b),e(B,ae),e(ae,H),M(k,H,null),e(B,Te),e(B,S),e(S,ke),_(i,he,b),_(i,G,b),e(G,we),e(G,ie),e(ie,O),e(G,ve),_(i,ue,b),_(i,A,b),e(A,Me),_(i,fe,b),_(i,V,b),e(V,me),e(me,Ce),_(i,te,b),_(i,U,b),e(U,N),_(i,ge,b),_(i,L,b),e(L,le),e(le,$e),e(le,X),e(X,Fe),e(le,Ee),_(i,x,b),_(i,oe,b),e(oe,D),e(oe,de),e(de,je),e(oe,Q),e(oe,ce),e(ce,ze),e(oe,Z),_(i,_e,b),_(i,R,b),e(R,re),e(re,K),M(W,K,null),e(R,Je),e(R,I),e(I,Ue),_(i,be,b),_(i,f,b),e(f,E),e(E,xe),e(xe,ne),e(f,Ae),e(f,Be),e(Be,j),e(j,Ve),e(f,Le),e(f,Re),e(Re,Ne),e(Ne,Xe),e(f,q),e(f,P),e(P,Ie),e(Ie,Se),e(f,Y),e(f,Ge),e(Ge,Ze),e(Ze,We),e(f,Pe),e(f,ee),e(ee,qe),e(qe,_m),_(i,Wd,b),_(i,ro,b),e(ro,Go),e(Go,Mi),M(ds,Mi,null),e(ro,bm),e(ro,Ci),e(Ci,ym),_(i,xd,b),_(i,Ct,b),M(cs,Ct,null),e(Ct,Tm),e(Ct,Vt),e(Vt,km),e(Vt,_r),e(_r,wm),e(Vt,vm),e(Vt,br),e(br,Mm),e(Vt,Cm),e(Vt,ms),e(ms,$m),e(Vt,Fm),e(Ct,Em),e(Ct,io),e(io,jm),e(io,yr),e(yr,zm),e(io,Jm),e(io,Tr),e(Tr,Um),e(io,Wm),e(Ct,xm),M(Ao,Ct,null),_(i,Nd,b),_(i,lo,b),e(lo,Vo),e(Vo,$i),M(ps,$i,null),e(lo,Nm),e(lo,Fi),e(Fi,Im),_(i,Id,b),_(i,et,b),M(hs,et,null),e(et,Zm),e(et,Lt),e(Lt,qm),e(Lt,kr),e(kr,Bm),e(Lt,Rm),e(Lt,wr),e(wr,Gm),e(Lt,Am),e(Lt,us),e(us,Vm),e(Lt,Lm),e(et,Xm),e(et,fs),e(fs,Sm),e(fs,vr),e(vr,Pm),e(fs,Om),e(et,Dm),e(et,Xt),M(gs,Xt,null),e(Xt,Qm),e(Xt,Ei),e(Ei,Ym),e(Xt,Hm),e(Xt,_s),e(_s,Mr),e(Mr,Km),e(Mr,ji),e(ji,ep),e(_s,tp),e(_s,Cr),e(Cr,op),e(Cr,zi),e(zi,np),e(et,sp),e(et,Lo),M(bs,Lo,null),e(Lo,ap),e(Lo,ys),e(ys,rp),e(ys,Ji),e(Ji,ip),e(ys,lp),e(et,dp),e(et,Xo),M(Ts,Xo,null),e(Xo,cp),e(Xo,Ui),e(Ui,mp),e(et,pp),e(et,$r),M(ks,$r,null),_(i,Zd,b),_(i,co,b),e(co,So),e(So,Wi),M(ws,Wi,null),e(co,hp),e(co,xi),e(xi,up),_(i,qd,b),_(i,ct,b),M(vs,ct,null),e(ct,fp),e(ct,$t),e($t,gp),e($t,Ni),e(Ni,_p),e($t,bp),e($t,Fr),e(Fr,yp),e($t,Tp),e($t,Er),e(Er,kp),e($t,wp),e($t,Ms),e(Ms,vp),e($t,Mp),e(ct,Cp),e(ct,Cs),e(Cs,$p),e(Cs,jr),e(jr,Fp),e(Cs,Ep),e(ct,jp),e(ct,St),M($s,St,null),e(St,zp),e(St,Ii),e(Ii,Jp),e(St,Up),e(St,Fs),e(Fs,zr),e(zr,Wp),e(zr,Zi),e(Zi,xp),e(Fs,Np),e(Fs,Jr),e(Jr,Ip),e(Jr,qi),e(qi,Zp),e(ct,qp),e(ct,Po),M(Es,Po,null),e(Po,Bp),e(Po,Bi),e(Bi,Rp),_(i,Bd,b),_(i,mo,b),e(mo,Oo),e(Oo,Ri),M(js,Ri,null),e(mo,Gp),e(mo,Gi),e(Gi,Ap),_(i,Rd,b),_(i,Oe,b),M(zs,Oe,null),e(Oe,Vp),e(Oe,Ai),e(Ai,Lp),e(Oe,Xp),e(Oe,Js),e(Js,Sp),e(Js,Ur),e(Ur,Pp),e(Js,Op),e(Oe,Dp),e(Oe,Us),e(Us,Qp),e(Us,Ws),e(Ws,Yp),e(Us,Hp),e(Oe,Kp),e(Oe,xs),e(xs,eh),e(xs,Vi),e(Vi,th),e(xs,oh),e(Oe,nh),e(Oe,tt),e(tt,sh),e(tt,Li),e(Li,ah),e(tt,rh),e(tt,Xi),e(Xi,ih),e(tt,lh),e(tt,Si),e(Si,dh),e(tt,ch),e(tt,Pi),e(Pi,mh),e(tt,ph),e(tt,Oi),e(Oi,hh),e(tt,uh),e(tt,Di),e(Di,fh),e(tt,gh),e(Oe,_h),e(Oe,Do),e(Do,bh),e(Do,Qi),e(Qi,yh),e(Do,Th),e(Do,Ns),e(Ns,kh),e(Oe,wh),e(Oe,Ft),M(Is,Ft,null),e(Ft,vh),e(Ft,po),e(po,Mh),e(po,Wr),e(Wr,Ch),e(po,$h),e(po,Yi),e(Yi,Fh),e(po,Eh),e(Ft,jh),M(Qo,Ft,null),e(Ft,zh),M(Yo,Ft,null),_(i,Gd,b),_(i,ho,b),e(ho,Ho),e(Ho,Hi),M(Zs,Hi,null),e(ho,Jh),e(ho,Ki),e(Ki,Uh),_(i,Ad,b),_(i,mt,b),M(qs,mt,null),e(mt,Wh),e(mt,Bs),e(Bs,xh),e(Bs,el),e(el,Nh),e(Bs,Ih),e(mt,Zh),e(mt,Rs),e(Rs,qh),e(Rs,xr),e(xr,Bh),e(Rs,Rh),e(mt,Gh),e(mt,Gs),e(Gs,Ah),e(Gs,As),e(As,Vh),e(Gs,Lh),e(mt,Xh),e(mt,Et),M(Vs,Et,null),e(Et,Sh),e(Et,uo),e(uo,Ph),e(uo,Nr),e(Nr,Oh),e(uo,Dh),e(uo,tl),e(tl,Qh),e(uo,Yh),e(Et,Hh),M(Ko,Et,null),e(Et,Kh),M(en,Et,null),_(i,Vd,b),_(i,fo,b),e(fo,tn),e(tn,ol),M(Ls,ol,null),e(fo,eu),e(fo,nl),e(nl,tu),_(i,Ld,b),_(i,pt,b),M(Xs,pt,null),e(pt,ou),e(pt,Ss),e(Ss,nu),e(Ss,sl),e(sl,su),e(Ss,au),e(pt,ru),e(pt,Ps),e(Ps,iu),e(Ps,Ir),e(Ir,lu),e(Ps,du),e(pt,cu),e(pt,Os),e(Os,mu),e(Os,Ds),e(Ds,pu),e(Os,hu),e(pt,uu),e(pt,jt),M(Qs,jt,null),e(jt,fu),e(jt,go),e(go,gu),e(go,Zr),e(Zr,_u),e(go,bu),e(go,al),e(al,yu),e(go,Tu),e(jt,ku),M(on,jt,null),e(jt,wu),M(nn,jt,null),_(i,Xd,b),_(i,_o,b),e(_o,sn),e(sn,rl),M(Ys,rl,null),e(_o,vu),e(_o,il),e(il,Mu),_(i,Sd,b),_(i,ht,b),M(Hs,ht,null),e(ht,Cu),e(ht,ll),e(ll,$u),e(ht,Fu),e(ht,Ks),e(Ks,Eu),e(Ks,qr),e(qr,ju),e(Ks,zu),e(ht,Ju),e(ht,ea),e(ea,Uu),e(ea,ta),e(ta,Wu),e(ea,xu),e(ht,Nu),e(ht,bt),M(oa,bt,null),e(bt,Iu),e(bt,bo),e(bo,Zu),e(bo,Br),e(Br,qu),e(bo,Bu),e(bo,dl),e(dl,Ru),e(bo,Gu),e(bt,Au),M(an,bt,null),e(bt,Vu),M(rn,bt,null),e(bt,Lu),M(ln,bt,null),_(i,Pd,b),_(i,yo,b),e(yo,dn),e(dn,cl),M(na,cl,null),e(yo,Xu),e(yo,ml),e(ml,Su),_(i,Od,b),_(i,ut,b),M(sa,ut,null),e(ut,Pu),e(ut,pl),e(pl,Ou),e(ut,Du),e(ut,aa),e(aa,Qu),e(aa,Rr),e(Rr,Yu),e(aa,Hu),e(ut,Ku),e(ut,ra),e(ra,ef),e(ra,ia),e(ia,tf),e(ra,of),e(ut,nf),e(ut,zt),M(la,zt,null),e(zt,sf),e(zt,To),e(To,af),e(To,Gr),e(Gr,rf),e(To,lf),e(To,hl),e(hl,df),e(To,cf),e(zt,mf),M(cn,zt,null),e(zt,pf),M(mn,zt,null),_(i,Dd,b),_(i,ko,b),e(ko,pn),e(pn,ul),M(da,ul,null),e(ko,hf),e(ko,fl),e(fl,uf),_(i,Qd,b),_(i,ft,b),M(ca,ft,null),e(ft,ff),e(ft,gl),e(gl,gf),e(ft,_f),e(ft,ma),e(ma,bf),e(ma,Ar),e(Ar,yf),e(ma,Tf),e(ft,kf),e(ft,pa),e(pa,wf),e(pa,ha),e(ha,vf),e(pa,Mf),e(ft,Cf),e(ft,Jt),M(ua,Jt,null),e(Jt,$f),e(Jt,wo),e(wo,Ff),e(wo,Vr),e(Vr,Ef),e(wo,jf),e(wo,_l),e(_l,zf),e(wo,Jf),e(Jt,Uf),M(hn,Jt,null),e(Jt,Wf),M(un,Jt,null),_(i,Yd,b),_(i,vo,b),e(vo,fn),e(fn,bl),M(fa,bl,null),e(vo,xf),e(vo,yl),e(yl,Nf),_(i,Hd,b),_(i,gt,b),M(ga,gt,null),e(gt,If),e(gt,gn),e(gn,Zf),e(gn,Tl),e(Tl,qf),e(gn,Bf),e(gn,kl),e(kl,Rf),e(gt,Gf),e(gt,_a),e(_a,Af),e(_a,Lr),e(Lr,Vf),e(_a,Lf),e(gt,Xf),e(gt,ba),e(ba,Sf),e(ba,ya),e(ya,Pf),e(ba,Of),e(gt,Df),e(gt,Ut),M(Ta,Ut,null),e(Ut,Qf),e(Ut,Mo),e(Mo,Yf),e(Mo,Xr),e(Xr,Hf),e(Mo,Kf),e(Mo,wl),e(wl,eg),e(Mo,tg),e(Ut,og),M(_n,Ut,null),e(Ut,ng),M(bn,Ut,null),_(i,Kd,b),_(i,Co,b),e(Co,yn),e(yn,vl),M(ka,vl,null),e(Co,sg),e(Co,Ml),e(Ml,ag),_(i,ec,b),_(i,ot,b),M(wa,ot,null),e(ot,rg),e(ot,Cl),e(Cl,ig),e(ot,lg),e(ot,va),e(va,dg),e(va,Sr),e(Sr,cg),e(va,mg),e(ot,pg),e(ot,Ma),e(Ma,hg),e(Ma,Ca),e(Ca,ug),e(Ma,fg),e(ot,gg),M(Tn,ot,null),e(ot,_g),e(ot,Wt),M($a,Wt,null),e(Wt,bg),e(Wt,$o),e($o,yg),e($o,Pr),e(Pr,Tg),e($o,kg),e($o,$l),e($l,wg),e($o,vg),e(Wt,Mg),M(kn,Wt,null),e(Wt,Cg),M(wn,Wt,null),_(i,tc,b),_(i,Fo,b),e(Fo,vn),e(vn,Fl),M(Fa,Fl,null),e(Fo,$g),e(Fo,El),e(El,Fg),_(i,oc,b),_(i,nt,b),M(Ea,nt,null),e(nt,Eg),e(nt,ja),e(ja,jg),e(ja,jl),e(jl,zg),e(ja,Jg),e(nt,Ug),e(nt,za),e(za,Wg),e(za,Or),e(Or,xg),e(za,Ng),e(nt,Ig),e(nt,Ja),e(Ja,Zg),e(Ja,Ua),e(Ua,qg),e(Ja,Bg),e(nt,Rg),M(Mn,nt,null),e(nt,Gg),e(nt,xt),M(Wa,xt,null),e(xt,Ag),e(xt,Eo),e(Eo,Vg),e(Eo,Dr),e(Dr,Lg),e(Eo,Xg),e(Eo,zl),e(zl,Sg),e(Eo,Pg),e(xt,Og),M(Cn,xt,null),e(xt,Dg),M($n,xt,null),_(i,nc,b),_(i,jo,b),e(jo,Fn),e(Fn,Jl),M(xa,Jl,null),e(jo,Qg),e(jo,Ul),e(Ul,Yg),_(i,sc,b),_(i,st,b),M(Na,st,null),e(st,Hg),e(st,Ia),e(Ia,Kg),e(Ia,Wl),e(Wl,e_),e(Ia,t_),e(st,o_),e(st,Za),e(Za,n_),e(Za,Qr),e(Qr,s_),e(Za,a_),e(st,r_),e(st,qa),e(qa,i_),e(qa,Ba),e(Ba,l_),e(qa,d_),e(st,c_),M(En,st,null),e(st,m_),e(st,yt),M(Ra,yt,null),e(yt,p_),e(yt,zo),e(zo,h_),e(zo,Yr),e(Yr,u_),e(zo,f_),e(zo,xl),e(xl,g_),e(zo,__),e(yt,b_),M(jn,yt,null),e(yt,y_),M(zn,yt,null),e(yt,T_),M(Jn,yt,null),_(i,ac,b),_(i,Jo,b),e(Jo,Un),e(Un,Nl),M(Ga,Nl,null),e(Jo,k_),e(Jo,Il),e(Il,w_),_(i,rc,b),_(i,at,b),M(Aa,at,null),e(at,v_),e(at,Zl),e(Zl,M_),e(at,C_),e(at,Va),e(Va,$_),e(Va,Hr),e(Hr,F_),e(Va,E_),e(at,j_),e(at,La),e(La,z_),e(La,Xa),e(Xa,J_),e(La,U_),e(at,W_),M(Wn,at,null),e(at,x_),e(at,Tt),M(Sa,Tt,null),e(Tt,N_),e(Tt,Uo),e(Uo,I_),e(Uo,Kr),e(Kr,Z_),e(Uo,q_),e(Uo,ql),e(ql,B_),e(Uo,R_),e(Tt,G_),M(xn,Tt,null),e(Tt,A_),M(Nn,Tt,null),e(Tt,V_),M(In,Tt,null),_(i,ic,b),_(i,Wo,b),e(Wo,Zn),e(Zn,Bl),M(Pa,Bl,null),e(Wo,L_),e(Wo,Rl),e(Rl,X_),_(i,lc,b),_(i,rt,b),M(Oa,rt,null),e(rt,S_),e(rt,Gl),e(Gl,P_),e(rt,O_),e(rt,Da),e(Da,D_),e(Da,ei),e(ei,Q_),e(Da,Y_),e(rt,H_),e(rt,Qa),e(Qa,K_),e(Qa,Ya),e(Ya,eb),e(Qa,tb),e(rt,ob),M(qn,rt,null),e(rt,nb),e(rt,Nt),M(Ha,Nt,null),e(Nt,sb),e(Nt,xo),e(xo,ab),e(xo,ti),e(ti,rb),e(xo,ib),e(xo,Al),e(Al,lb),e(xo,db),e(Nt,cb),M(Bn,Nt,null),e(Nt,mb),M(Rn,Nt,null),_(i,dc,b),_(i,No,b),e(No,Gn),e(Gn,Vl),M(Ka,Vl,null),e(No,pb),e(No,Ll),e(Ll,hb),_(i,cc,b),_(i,it,b),M(er,it,null),e(it,ub),e(it,Xl),e(Xl,fb),e(it,gb),e(it,tr),e(tr,_b),e(tr,oi),e(oi,bb),e(tr,yb),e(it,Tb),e(it,or),e(or,kb),e(or,nr),e(nr,wb),e(or,vb),e(it,Mb),M(An,it,null),e(it,Cb),e(it,kt),M(sr,kt,null),e(kt,$b),e(kt,Io),e(Io,Fb),e(Io,ni),e(ni,Eb),e(Io,jb),e(Io,Sl),e(Sl,zb),e(Io,Jb),e(kt,Ub),M(Vn,kt,null),e(kt,Wb),M(Ln,kt,null),e(kt,xb),M(Xn,kt,null),_(i,mc,b),_(i,Zo,b),e(Zo,Sn),e(Sn,Pl),M(ar,Pl,null),e(Zo,Nb),e(Zo,Ol),e(Ol,Ib),_(i,pc,b),_(i,lt,b),M(rr,lt,null),e(lt,Zb),e(lt,qo),e(qo,qb),e(qo,Dl),e(Dl,Bb),e(qo,Rb),e(qo,Ql),e(Ql,Gb),e(qo,Ab),e(lt,Vb),e(lt,ir),e(ir,Lb),e(ir,si),e(si,Xb),e(ir,Sb),e(lt,Pb),e(lt,lr),e(lr,Ob),e(lr,dr),e(dr,Db),e(lr,Qb),e(lt,Yb),M(Pn,lt,null),e(lt,Hb),e(lt,wt),M(cr,wt,null),e(wt,Kb),e(wt,Bo),e(Bo,ey),e(Bo,ai),e(ai,ty),e(Bo,oy),e(Bo,Yl),e(Yl,ny),e(Bo,sy),e(wt,ay),M(On,wt,null),e(wt,ry),M(Dn,wt,null),e(wt,iy),M(Qn,wt,null),hc=!0},p(i,[b]){const mr={};b&2&&(mr.$$scope={dirty:b,ctx:i}),Ao.$set(mr);const Hl={};b&2&&(Hl.$$scope={dirty:b,ctx:i}),Qo.$set(Hl);const Kl={};b&2&&(Kl.$$scope={dirty:b,ctx:i}),Yo.$set(Kl);const ed={};b&2&&(ed.$$scope={dirty:b,ctx:i}),Ko.$set(ed);const pr={};b&2&&(pr.$$scope={dirty:b,ctx:i}),en.$set(pr);const td={};b&2&&(td.$$scope={dirty:b,ctx:i}),on.$set(td);const od={};b&2&&(od.$$scope={dirty:b,ctx:i}),nn.$set(od);const nd={};b&2&&(nd.$$scope={dirty:b,ctx:i}),an.$set(nd);const hr={};b&2&&(hr.$$scope={dirty:b,ctx:i}),rn.$set(hr);const sd={};b&2&&(sd.$$scope={dirty:b,ctx:i}),ln.$set(sd);const ad={};b&2&&(ad.$$scope={dirty:b,ctx:i}),cn.$set(ad);const rd={};b&2&&(rd.$$scope={dirty:b,ctx:i}),mn.$set(rd);const id={};b&2&&(id.$$scope={dirty:b,ctx:i}),hn.$set(id);const ld={};b&2&&(ld.$$scope={dirty:b,ctx:i}),un.$set(ld);const dd={};b&2&&(dd.$$scope={dirty:b,ctx:i}),_n.$set(dd);const ur={};b&2&&(ur.$$scope={dirty:b,ctx:i}),bn.$set(ur);const cd={};b&2&&(cd.$$scope={dirty:b,ctx:i}),Tn.$set(cd);const Ro={};b&2&&(Ro.$$scope={dirty:b,ctx:i}),kn.$set(Ro);const md={};b&2&&(md.$$scope={dirty:b,ctx:i}),wn.$set(md);const pd={};b&2&&(pd.$$scope={dirty:b,ctx:i}),Mn.$set(pd);const fr={};b&2&&(fr.$$scope={dirty:b,ctx:i}),Cn.$set(fr);const hd={};b&2&&(hd.$$scope={dirty:b,ctx:i}),$n.$set(hd);const ud={};b&2&&(ud.$$scope={dirty:b,ctx:i}),En.$set(ud);const fd={};b&2&&(fd.$$scope={dirty:b,ctx:i}),jn.$set(fd);const _t={};b&2&&(_t.$$scope={dirty:b,ctx:i}),zn.$set(_t);const gd={};b&2&&(gd.$$scope={dirty:b,ctx:i}),Jn.$set(gd);const _d={};b&2&&(_d.$$scope={dirty:b,ctx:i}),Wn.$set(_d);const bd={};b&2&&(bd.$$scope={dirty:b,ctx:i}),xn.$set(bd);const yd={};b&2&&(yd.$$scope={dirty:b,ctx:i}),Nn.$set(yd);const Td={};b&2&&(Td.$$scope={dirty:b,ctx:i}),In.$set(Td);const kd={};b&2&&(kd.$$scope={dirty:b,ctx:i}),qn.$set(kd);const wd={};b&2&&(wd.$$scope={dirty:b,ctx:i}),Bn.$set(wd);const vd={};b&2&&(vd.$$scope={dirty:b,ctx:i}),Rn.$set(vd);const Md={};b&2&&(Md.$$scope={dirty:b,ctx:i}),An.$set(Md);const Cd={};b&2&&(Cd.$$scope={dirty:b,ctx:i}),Vn.$set(Cd);const $d={};b&2&&($d.$$scope={dirty:b,ctx:i}),Ln.$set($d);const Fd={};b&2&&(Fd.$$scope={dirty:b,ctx:i}),Xn.$set(Fd);const gr={};b&2&&(gr.$$scope={dirty:b,ctx:i}),Pn.$set(gr);const Ed={};b&2&&(Ed.$$scope={dirty:b,ctx:i}),On.$set(Ed);const jd={};b&2&&(jd.$$scope={dirty:b,ctx:i}),Dn.$set(jd);const zd={};b&2&&(zd.$$scope={dirty:b,ctx:i}),Qn.$set(zd)},i(i){hc||(C(l.$$.fragment,i),C(k.$$.fragment,i),C(W.$$.fragment,i),C(ds.$$.fragment,i),C(cs.$$.fragment,i),C(Ao.$$.fragment,i),C(ps.$$.fragment,i),C(hs.$$.fragment,i),C(gs.$$.fragment,i),C(bs.$$.fragment,i),C(Ts.$$.fragment,i),C(ks.$$.fragment,i),C(ws.$$.fragment,i),C(vs.$$.fragment,i),C($s.$$.fragment,i),C(Es.$$.fragment,i),C(js.$$.fragment,i),C(zs.$$.fragment,i),C(Is.$$.fragment,i),C(Qo.$$.fragment,i),C(Yo.$$.fragment,i),C(Zs.$$.fragment,i),C(qs.$$.fragment,i),C(Vs.$$.fragment,i),C(Ko.$$.fragment,i),C(en.$$.fragment,i),C(Ls.$$.fragment,i),C(Xs.$$.fragment,i),C(Qs.$$.fragment,i),C(on.$$.fragment,i),C(nn.$$.fragment,i),C(Ys.$$.fragment,i),C(Hs.$$.fragment,i),C(oa.$$.fragment,i),C(an.$$.fragment,i),C(rn.$$.fragment,i),C(ln.$$.fragment,i),C(na.$$.fragment,i),C(sa.$$.fragment,i),C(la.$$.fragment,i),C(cn.$$.fragment,i),C(mn.$$.fragment,i),C(da.$$.fragment,i),C(ca.$$.fragment,i),C(ua.$$.fragment,i),C(hn.$$.fragment,i),C(un.$$.fragment,i),C(fa.$$.fragment,i),C(ga.$$.fragment,i),C(Ta.$$.fragment,i),C(_n.$$.fragment,i),C(bn.$$.fragment,i),C(ka.$$.fragment,i),C(wa.$$.fragment,i),C(Tn.$$.fragment,i),C($a.$$.fragment,i),C(kn.$$.fragment,i),C(wn.$$.fragment,i),C(Fa.$$.fragment,i),C(Ea.$$.fragment,i),C(Mn.$$.fragment,i),C(Wa.$$.fragment,i),C(Cn.$$.fragment,i),C($n.$$.fragment,i),C(xa.$$.fragment,i),C(Na.$$.fragment,i),C(En.$$.fragment,i),C(Ra.$$.fragment,i),C(jn.$$.fragment,i),C(zn.$$.fragment,i),C(Jn.$$.fragment,i),C(Ga.$$.fragment,i),C(Aa.$$.fragment,i),C(Wn.$$.fragment,i),C(Sa.$$.fragment,i),C(xn.$$.fragment,i),C(Nn.$$.fragment,i),C(In.$$.fragment,i),C(Pa.$$.fragment,i),C(Oa.$$.fragment,i),C(qn.$$.fragment,i),C(Ha.$$.fragment,i),C(Bn.$$.fragment,i),C(Rn.$$.fragment,i),C(Ka.$$.fragment,i),C(er.$$.fragment,i),C(An.$$.fragment,i),C(sr.$$.fragment,i),C(Vn.$$.fragment,i),C(Ln.$$.fragment,i),C(Xn.$$.fragment,i),C(ar.$$.fragment,i),C(rr.$$.fragment,i),C(Pn.$$.fragment,i),C(cr.$$.fragment,i),C(On.$$.fragment,i),C(Dn.$$.fragment,i),C(Qn.$$.fragment,i),hc=!0)},o(i){$(l.$$.fragment,i),$(k.$$.fragment,i),$(W.$$.fragment,i),$(ds.$$.fragment,i),$(cs.$$.fragment,i),$(Ao.$$.fragment,i),$(ps.$$.fragment,i),$(hs.$$.fragment,i),$(gs.$$.fragment,i),$(bs.$$.fragment,i),$(Ts.$$.fragment,i),$(ks.$$.fragment,i),$(ws.$$.fragment,i),$(vs.$$.fragment,i),$($s.$$.fragment,i),$(Es.$$.fragment,i),$(js.$$.fragment,i),$(zs.$$.fragment,i),$(Is.$$.fragment,i),$(Qo.$$.fragment,i),$(Yo.$$.fragment,i),$(Zs.$$.fragment,i),$(qs.$$.fragment,i),$(Vs.$$.fragment,i),$(Ko.$$.fragment,i),$(en.$$.fragment,i),$(Ls.$$.fragment,i),$(Xs.$$.fragment,i),$(Qs.$$.fragment,i),$(on.$$.fragment,i),$(nn.$$.fragment,i),$(Ys.$$.fragment,i),$(Hs.$$.fragment,i),$(oa.$$.fragment,i),$(an.$$.fragment,i),$(rn.$$.fragment,i),$(ln.$$.fragment,i),$(na.$$.fragment,i),$(sa.$$.fragment,i),$(la.$$.fragment,i),$(cn.$$.fragment,i),$(mn.$$.fragment,i),$(da.$$.fragment,i),$(ca.$$.fragment,i),$(ua.$$.fragment,i),$(hn.$$.fragment,i),$(un.$$.fragment,i),$(fa.$$.fragment,i),$(ga.$$.fragment,i),$(Ta.$$.fragment,i),$(_n.$$.fragment,i),$(bn.$$.fragment,i),$(ka.$$.fragment,i),$(wa.$$.fragment,i),$(Tn.$$.fragment,i),$($a.$$.fragment,i),$(kn.$$.fragment,i),$(wn.$$.fragment,i),$(Fa.$$.fragment,i),$(Ea.$$.fragment,i),$(Mn.$$.fragment,i),$(Wa.$$.fragment,i),$(Cn.$$.fragment,i),$($n.$$.fragment,i),$(xa.$$.fragment,i),$(Na.$$.fragment,i),$(En.$$.fragment,i),$(Ra.$$.fragment,i),$(jn.$$.fragment,i),$(zn.$$.fragment,i),$(Jn.$$.fragment,i),$(Ga.$$.fragment,i),$(Aa.$$.fragment,i),$(Wn.$$.fragment,i),$(Sa.$$.fragment,i),$(xn.$$.fragment,i),$(Nn.$$.fragment,i),$(In.$$.fragment,i),$(Pa.$$.fragment,i),$(Oa.$$.fragment,i),$(qn.$$.fragment,i),$(Ha.$$.fragment,i),$(Bn.$$.fragment,i),$(Rn.$$.fragment,i),$(Ka.$$.fragment,i),$(er.$$.fragment,i),$(An.$$.fragment,i),$(sr.$$.fragment,i),$(Vn.$$.fragment,i),$(Ln.$$.fragment,i),$(Xn.$$.fragment,i),$(ar.$$.fragment,i),$(rr.$$.fragment,i),$(Pn.$$.fragment,i),$(cr.$$.fragment,i),$(On.$$.fragment,i),$(Dn.$$.fragment,i),$(Qn.$$.fragment,i),hc=!1},d(i){t(d),i&&t(y),i&&t(h),F(l),i&&t(pe),i&&t(B),F(k),i&&t(he),i&&t(G),i&&t(ue),i&&t(A),i&&t(fe),i&&t(V),i&&t(te),i&&t(U),i&&t(ge),i&&t(L),i&&t(x),i&&t(oe),i&&t(_e),i&&t(R),F(W),i&&t(be),i&&t(f),i&&t(Wd),i&&t(ro),F(ds),i&&t(xd),i&&t(Ct),F(cs),F(Ao),i&&t(Nd),i&&t(lo),F(ps),i&&t(Id),i&&t(et),F(hs),F(gs),F(bs),F(Ts),F(ks),i&&t(Zd),i&&t(co),F(ws),i&&t(qd),i&&t(ct),F(vs),F($s),F(Es),i&&t(Bd),i&&t(mo),F(js),i&&t(Rd),i&&t(Oe),F(zs),F(Is),F(Qo),F(Yo),i&&t(Gd),i&&t(ho),F(Zs),i&&t(Ad),i&&t(mt),F(qs),F(Vs),F(Ko),F(en),i&&t(Vd),i&&t(fo),F(Ls),i&&t(Ld),i&&t(pt),F(Xs),F(Qs),F(on),F(nn),i&&t(Xd),i&&t(_o),F(Ys),i&&t(Sd),i&&t(ht),F(Hs),F(oa),F(an),F(rn),F(ln),i&&t(Pd),i&&t(yo),F(na),i&&t(Od),i&&t(ut),F(sa),F(la),F(cn),F(mn),i&&t(Dd),i&&t(ko),F(da),i&&t(Qd),i&&t(ft),F(ca),F(ua),F(hn),F(un),i&&t(Yd),i&&t(vo),F(fa),i&&t(Hd),i&&t(gt),F(ga),F(Ta),F(_n),F(bn),i&&t(Kd),i&&t(Co),F(ka),i&&t(ec),i&&t(ot),F(wa),F(Tn),F($a),F(kn),F(wn),i&&t(tc),i&&t(Fo),F(Fa),i&&t(oc),i&&t(nt),F(Ea),F(Mn),F(Wa),F(Cn),F($n),i&&t(nc),i&&t(jo),F(xa),i&&t(sc),i&&t(st),F(Na),F(En),F(Ra),F(jn),F(zn),F(Jn),i&&t(ac),i&&t(Jo),F(Ga),i&&t(rc),i&&t(at),F(Aa),F(Wn),F(Sa),F(xn),F(Nn),F(In),i&&t(ic),i&&t(Wo),F(Pa),i&&t(lc),i&&t(rt),F(Oa),F(qn),F(Ha),F(Bn),F(Rn),i&&t(dc),i&&t(No),F(Ka),i&&t(cc),i&&t(it),F(er),F(An),F(sr),F(Vn),F(Ln),F(Xn),i&&t(mc),i&&t(Zo),F(ar),i&&t(pc),i&&t(lt),F(rr),F(Pn),F(cr),F(On),F(Dn),F(Qn)}}}const Qw={local:"camembert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.CamembertConfig",title:"CamembertConfig"},{local:"transformers.CamembertTokenizer",title:"CamembertTokenizer"},{local:"transformers.CamembertTokenizerFast",title:"CamembertTokenizerFast"},{local:"transformers.CamembertModel",title:"CamembertModel"},{local:"transformers.CamembertForCausalLM",title:"CamembertForCausalLM"},{local:"transformers.CamembertForMaskedLM",title:"CamembertForMaskedLM"},{local:"transformers.CamembertForSequenceClassification",title:"CamembertForSequenceClassification"},{local:"transformers.CamembertForMultipleChoice",title:"CamembertForMultipleChoice"},{local:"transformers.CamembertForTokenClassification",title:"CamembertForTokenClassification"},{local:"transformers.CamembertForQuestionAnswering",title:"CamembertForQuestionAnswering"},{local:"transformers.TFCamembertModel",title:"TFCamembertModel"},{local:"transformers.TFCamembertForCausalLM",title:"TFCamembertForCasualLM"},{local:"transformers.TFCamembertForMaskedLM",title:"TFCamembertForMaskedLM"},{local:"transformers.TFCamembertForSequenceClassification",title:"TFCamembertForSequenceClassification"},{local:"transformers.TFCamembertForMultipleChoice",title:"TFCamembertForMultipleChoice"},{local:"transformers.TFCamembertForTokenClassification",title:"TFCamembertForTokenClassification"},{local:"transformers.TFCamembertForQuestionAnswering",title:"TFCamembertForQuestionAnswering"}],title:"CamemBERT"};function Yw(J){return iw(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sv extends nw{constructor(d){super();sw(this,d,Yw,Dw,aw,{})}}export{sv as default,Qw as metadata};
