Buckets:

rtrm's picture
download
raw
9.13 kB
import{s as ue,o as ce,n as $e}from"../chunks/scheduler.ddb4e551.js";import{S as be,i as ve,g as r,s as a,r as g,B as we,h as o,f as n,c as i,j as he,u as h,x as f,k as pe,y as ke,a as l,v as p,d as u,t as c,w as $}from"../chunks/index.e16e4efa.js";import{T as ye}from"../chunks/Tip.20abb04f.js";import{H as j,E as _e}from"../chunks/index.e108c5ed.js";function Te(F){let s,b='For more details about the <code>fill-mask</code> task, check out its <a href="https://huggingface.co/tasks/fill-mask" rel="nofollow">dedicated page</a>! You will find examples and related materials.';return{c(){s=r("p"),s.innerHTML=b},l(d){s=o(d,"P",{"data-svelte-h":!0}),f(s)!=="svelte-1jo8vou"&&(s.innerHTML=b)},m(d,R){l(d,s,R)},p:$e,d(d){d&&n(s)}}}function xe(F){let s,b,d,R,v,z,w,le="Mask filling is the task of predicting the right word (token to be precise) in the middle of a sequence.",S,m,U,k,D,y,ae='<li><a href="https://huggingface.co/FacebookAI/xlm-roberta-base" rel="nofollow">FacebookAI/xlm-roberta-base</a>: A multilingual model trained on 100 languages.</li>',O,_,ie='Explore all available models and find the one that suits you best <a href="https://huggingface.co/models?inference=warm&amp;pipeline_tag=fill-mask&amp;sort=trending" rel="nofollow">here</a>.',W,T,Y,x,se="No snippet available for this task.",G,P,N,H,J,L,re='<thead><tr><th align="left">Payload</th> <th align="left"></th> <th align="left"></th></tr></thead> <tbody><tr><td align="left"><strong>inputs*</strong></td> <td align="left"><em>string</em></td> <td align="left">The text with masked tokens</td></tr> <tr><td align="left"><strong>parameters</strong></td> <td align="left"><em>object</em></td> <td align="left"></td></tr> <tr><td align="left"><strong>        top_k</strong></td> <td align="left"><em>integer</em></td> <td align="left">When passed, overrides the number of predictions to return.</td></tr> <tr><td align="left"><strong>        targets</strong></td> <td align="left"><em>string[]</em></td> <td align="left">When passed, the model will limit the scores to the passed targets instead of looking up in the whole vocabulary. If the provided targets are not in the model vocab, they will be tokenized and the first resulting token will be used (with a warning, and that might be slower).</td></tr></tbody>',K,M,oe="Some options can be configured by passing headers to the Inference API. Here are the available headers:",Q,C,de='<thead><tr><th align="left">Headers</th> <th align="left"></th> <th align="left"></th></tr></thead> <tbody><tr><td align="left"><strong>authorization</strong></td> <td align="left"><em>string</em></td> <td align="left">Authentication header in the form <code>&#39;Bearer: hf_****&#39;</code> when <code>hf_****</code> is a personal user access token with Inference API permission. You can generate one from <a href="https://huggingface.co/settings/tokens" rel="nofollow">your settings page</a>.</td></tr> <tr><td align="left"><strong>x-use-cache</strong></td> <td align="left"><em>boolean, default to <code>true</code></em></td> <td align="left">There is a cache layer on the inference API to speed up requests we have already seen. Most models can use those results as they are deterministic (meaning the outputs will be the same anyway). However, if you use a nondeterministic model, you can set this parameter to prevent the caching mechanism from being used, resulting in a real new query. Read more about caching <a href="../parameters#caching%5D">here</a>.</td></tr> <tr><td align="left"><strong>x-wait-for-model</strong></td> <td align="left"><em>boolean, default to <code>false</code></em></td> <td align="left">If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error, as it will limit hanging in your application to known places. Read more about model availability <a href="../overview#eligibility%5D">here</a>.</td></tr></tbody>',V,I,fe='For more information about Inference API headers, check out the parameters <a href="../parameters">guide</a>.',X,A,Z,q,me='<thead><tr><th align="left">Body</th> <th align="left"></th> <th align="left"></th></tr></thead> <tbody><tr><td align="left"><strong>(array)</strong></td> <td align="left"><em>object[]</em></td> <td align="left">Output is an array of objects.</td></tr> <tr><td align="left"><strong>        sequence</strong></td> <td align="left"><em>string</em></td> <td align="left">The corresponding input with the mask token prediction.</td></tr> <tr><td align="left"><strong>        score</strong></td> <td align="left"><em>number</em></td> <td align="left">The corresponding probability</td></tr> <tr><td align="left"><strong>        token</strong></td> <td align="left"><em>integer</em></td> <td align="left">The predicted token id (to replace the masked one).</td></tr> <tr><td align="left"><strong>        token_str</strong></td> <td align="left"><em>string</em></td> <td align="left">The predicted token (to replace the masked one).</td></tr></tbody>',ee,E,te,B,ne;return v=new j({props:{title:"Fill-mask",local:"fill-mask",headingTag:"h2"}}),m=new ye({props:{$$slots:{default:[Te]},$$scope:{ctx:F}}}),k=new j({props:{title:"Recommended models",local:"recommended-models",headingTag:"h3"}}),T=new j({props:{title:"Using the API",local:"using-the-api",headingTag:"h3"}}),P=new j({props:{title:"API specification",local:"api-specification",headingTag:"h3"}}),H=new j({props:{title:"Request",local:"request",headingTag:"h4"}}),A=new j({props:{title:"Response",local:"response",headingTag:"h4"}}),E=new _e({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/inference-providers/tasks/fill-mask.md"}}),{c(){s=r("meta"),b=a(),d=r("p"),R=a(),g(v.$$.fragment),z=a(),w=r("p"),w.textContent=le,S=a(),g(m.$$.fragment),U=a(),g(k.$$.fragment),D=a(),y=r("ul"),y.innerHTML=ae,O=a(),_=r("p"),_.innerHTML=ie,W=a(),g(T.$$.fragment),Y=a(),x=r("p"),x.textContent=se,G=a(),g(P.$$.fragment),N=a(),g(H.$$.fragment),J=a(),L=r("table"),L.innerHTML=re,K=a(),M=r("p"),M.textContent=oe,Q=a(),C=r("table"),C.innerHTML=de,V=a(),I=r("p"),I.innerHTML=fe,X=a(),g(A.$$.fragment),Z=a(),q=r("table"),q.innerHTML=me,ee=a(),g(E.$$.fragment),te=a(),B=r("p"),this.h()},l(e){const t=we("svelte-u9bgzb",document.head);s=o(t,"META",{name:!0,content:!0}),t.forEach(n),b=i(e),d=o(e,"P",{}),he(d).forEach(n),R=i(e),h(v.$$.fragment,e),z=i(e),w=o(e,"P",{"data-svelte-h":!0}),f(w)!=="svelte-gbqbvr"&&(w.textContent=le),S=i(e),h(m.$$.fragment,e),U=i(e),h(k.$$.fragment,e),D=i(e),y=o(e,"UL",{"data-svelte-h":!0}),f(y)!=="svelte-fskxex"&&(y.innerHTML=ae),O=i(e),_=o(e,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1vhpw27"&&(_.innerHTML=ie),W=i(e),h(T.$$.fragment,e),Y=i(e),x=o(e,"P",{"data-svelte-h":!0}),f(x)!=="svelte-1kehkb7"&&(x.textContent=se),G=i(e),h(P.$$.fragment,e),N=i(e),h(H.$$.fragment,e),J=i(e),L=o(e,"TABLE",{"data-svelte-h":!0}),f(L)!=="svelte-d6zztv"&&(L.innerHTML=re),K=i(e),M=o(e,"P",{"data-svelte-h":!0}),f(M)!=="svelte-xa4wks"&&(M.textContent=oe),Q=i(e),C=o(e,"TABLE",{"data-svelte-h":!0}),f(C)!=="svelte-2rfiu7"&&(C.innerHTML=de),V=i(e),I=o(e,"P",{"data-svelte-h":!0}),f(I)!=="svelte-1ps9cb1"&&(I.innerHTML=fe),X=i(e),h(A.$$.fragment,e),Z=i(e),q=o(e,"TABLE",{"data-svelte-h":!0}),f(q)!=="svelte-ywjehq"&&(q.innerHTML=me),ee=i(e),h(E.$$.fragment,e),te=i(e),B=o(e,"P",{}),he(B).forEach(n),this.h()},h(){pe(s,"name","hf:doc:metadata"),pe(s,"content",Pe)},m(e,t){ke(document.head,s),l(e,b,t),l(e,d,t),l(e,R,t),p(v,e,t),l(e,z,t),l(e,w,t),l(e,S,t),p(m,e,t),l(e,U,t),p(k,e,t),l(e,D,t),l(e,y,t),l(e,O,t),l(e,_,t),l(e,W,t),p(T,e,t),l(e,Y,t),l(e,x,t),l(e,G,t),p(P,e,t),l(e,N,t),p(H,e,t),l(e,J,t),l(e,L,t),l(e,K,t),l(e,M,t),l(e,Q,t),l(e,C,t),l(e,V,t),l(e,I,t),l(e,X,t),p(A,e,t),l(e,Z,t),l(e,q,t),l(e,ee,t),p(E,e,t),l(e,te,t),l(e,B,t),ne=!0},p(e,[t]){const ge={};t&2&&(ge.$$scope={dirty:t,ctx:e}),m.$set(ge)},i(e){ne||(u(v.$$.fragment,e),u(m.$$.fragment,e),u(k.$$.fragment,e),u(T.$$.fragment,e),u(P.$$.fragment,e),u(H.$$.fragment,e),u(A.$$.fragment,e),u(E.$$.fragment,e),ne=!0)},o(e){c(v.$$.fragment,e),c(m.$$.fragment,e),c(k.$$.fragment,e),c(T.$$.fragment,e),c(P.$$.fragment,e),c(H.$$.fragment,e),c(A.$$.fragment,e),c(E.$$.fragment,e),ne=!1},d(e){e&&(n(b),n(d),n(R),n(z),n(w),n(S),n(U),n(D),n(y),n(O),n(_),n(W),n(Y),n(x),n(G),n(N),n(J),n(L),n(K),n(M),n(Q),n(C),n(V),n(I),n(X),n(Z),n(q),n(ee),n(te),n(B)),n(s),$(v,e),$(m,e),$(k,e),$(T,e),$(P,e),$(H,e),$(A,e),$(E,e)}}}const Pe='{"title":"Fill-mask","local":"fill-mask","sections":[{"title":"Recommended models","local":"recommended-models","sections":[],"depth":3},{"title":"Using the API","local":"using-the-api","sections":[],"depth":3},{"title":"API specification","local":"api-specification","sections":[{"title":"Request","local":"request","sections":[],"depth":4},{"title":"Response","local":"response","sections":[],"depth":4}],"depth":3}],"depth":2}';function He(F){return ce(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ae extends be{constructor(s){super(),ve(this,s,He,xe,ue,{})}}export{Ae as component};

Xet Storage Details

Size:
9.13 kB
·
Xet hash:
4ce6a5f36ceb403a1e5f4bb3417af651294de0fae25b2eaab848e12ae577b240

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.