import{s as _e,n as xe,o as Be}from"../chunks/scheduler.3a17fb72.js";import{S as ke,i as Ce,e as i,s,c as r,h as We,a as o,d as n,b as a,f as Ie,g as p,j as c,k as de,l as Ge,m as l,n as m,t as f,o as g,p as u}from"../chunks/index.093f8863.js";import{C as Ze,H as q,E as Le}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.27fc3733.js";import{C as ce}from"../chunks/CodeBlock.55ce9d10.js";function ze($e){let d,F,E,S,h,V,b,X,T,he="Lighteval allows you to use Hugging Face’s Inference Providers to evaluate LLMs on supported providers such as Black Forest Labs, Cerebras, Fireworks AI, Nebius, Together AI, and many more.",A,$,be=`<p>Do not forget to set your Hugging Face API key.
You can set it using the <code>HF_TOKEN</code> environment variable or by using the <code>huggingface-cli</code> command.</p>`,R,w,Q,M,Y,v,D,J,Te="You can use configuration files to define the model and the provider to use.",O,y,N,j,we="With the following configuration file:",K,U,ee,I,Me=`By default, inference requests are billed to your personal account.
Optionally, you can charge them to an organization by setting <code>org_to_bill=&quot;&lt;your_org_name&gt;&quot;</code> (requires being a member of that organization).`,te,_,ne,x,ve='Hugging Face Inference Providers supports a wide range of LLM providers see the <a href="https://huggingface.co/docs/inference-providers/en/index" rel="nofollow">Inference Providers documentation</a> for the complete list.',le,B,se,k,ae,C,Je='By default, all inference requests are billed to your personal Hugging Face account. You can monitor your usage in the <a href="https://huggingface.co/settings/billing" rel="nofollow">Hugging Face billing dashboard</a>.',ie,W,re,G,ye="To bill requests to an organization:",oe,Z,je="<li>Ensure you are a member of the organization</li> <li>Add <code>org_to_bill=&quot;&lt;organization_name&gt;&quot;</code> to your configuration</li> <li>The organization must have sufficient credits</li>",pe,L,me,z,Ue='For more detailed error handling and provider-specific information, refer to the <a href="https://huggingface.co/docs/inference-providers/en/index" rel="nofollow">Hugging Face Inference Providers documentation</a>.',fe,H,ge,P,ue;return h=new Ze({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new q({props:{title:"Using Inference Providers as Backend",local:"using-inference-providers-as-backend",headingTag:"h1"}}),w=new q({props:{title:"Basic Usage",local:"basic-usage",headingTag:"h2"}}),M=new ce({props:{code:"bGlnaHRldmFsJTIwZW5kcG9pbnQlMjBpbmZlcmVuY2UtcHJvdmlkZXJzJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIybW9kZWxfbmFtZSUzRGRlZXBzZWVrLWFpJTJGRGVlcFNlZWstUjElMkNwcm92aWRlciUzRGhmLWluZmVyZW5jZSUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMGdzbThr",highlighted:`lighteval endpoint inference-providers \\
    <span class="hljs-string">&quot;model_name=deepseek-ai/DeepSeek-R1,provider=hf-inference&quot;</span> \\
    gsm8k`,wrap:!1}}),v=new q({props:{title:"Using a Configuration File",local:"using-a-configuration-file",headingTag:"h2"}}),y=new ce({props:{code:"bGlnaHRldmFsJTIwZW5kcG9pbnQlMjBpbmZlcmVuY2UtcHJvdmlkZXJzJTIwJTVDJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlMkZtb2RlbF9jb25maWdzJTJGaW5mZXJlbmNlX3Byb3ZpZGVycy55YW1sJTIwJTVDJTBBJTIwJTIwJTIwJTIwZ3NtOGs=",highlighted:`lighteval endpoint inference-providers \\
    examples/model_configs/inference_providers.yaml \\
    gsm8k`,wrap:!1}}),U=new ce({props:{code:"bW9kZWxfcGFyYW1ldGVycyUzQSUwQSUyMCUyMG1vZGVsX25hbWUlM0ElMjAlMjJkZWVwc2Vlay1haSUyRkRlZXBTZWVrLVIxLURpc3RpbGwtUXdlbi0zMkIlMjIlMEElMjAlMjBwcm92aWRlciUzQSUyMCUyMm5vdml0YSUyMiUwQSUyMCUyMHRpbWVvdXQlM0ElMjBudWxsJTBBJTIwJTIwcHJveGllcyUzQSUyMG51bGwlMEElMjAlMjBwYXJhbGxlbF9jYWxsc19jb3VudCUzQSUyMDEwJTBBJTIwJTIwZ2VuZXJhdGlvbl9wYXJhbWV0ZXJzJTNBJTBBJTIwJTIwJTIwJTIwdGVtcGVyYXR1cmUlM0ElMjAwLjglMEElMjAlMjAlMjAlMjB0b3BfayUzQSUyMDEwJTBBJTIwJTIwJTIwJTIwbWF4X25ld190b2tlbnMlM0ElMjAxMDAwMA==",highlighted:`<span class="hljs-attr">model_parameters:</span>
  <span class="hljs-attr">model_name:</span> <span class="hljs-string">&quot;deepseek-ai/DeepSeek-R1-Distill-Qwen-32B&quot;</span>
  <span class="hljs-attr">provider:</span> <span class="hljs-string">&quot;novita&quot;</span>
  <span class="hljs-attr">timeout:</span> <span class="hljs-literal">null</span>
  <span class="hljs-attr">proxies:</span> <span class="hljs-literal">null</span>
  <span class="hljs-attr">parallel_calls_count:</span> <span class="hljs-number">10</span>
  <span class="hljs-attr">generation_parameters:</span>
    <span class="hljs-attr">temperature:</span> <span class="hljs-number">0.8</span>
    <span class="hljs-attr">top_k:</span> <span class="hljs-number">10</span>
    <span class="hljs-attr">max_new_tokens:</span> <span class="hljs-number">10000</span>`,wrap:!1}}),_=new q({props:{title:"Supported Providers",local:"supported-providers",headingTag:"h2"}}),B=new q({props:{title:"Billing and Costs",local:"billing-and-costs",headingTag:"h2"}}),k=new q({props:{title:"Personal Account Billing",local:"personal-account-billing",headingTag:"h3"}}),W=new q({props:{title:"Organization Billing",local:"organization-billing",headingTag:"h3"}}),L=new ce({props:{code:"bW9kZWxfcGFyYW1ldGVycyUzQSUwQSUyMCUyMG1vZGVsX25hbWUlM0ElMjAlMjJtZXRhLWxsYW1hJTJGTGxhbWEtMi03Yi1jaGF0LWhmJTIyJTBBJTIwJTIwcHJvdmlkZXIlM0ElMjAlMjJ0b2dldGhlciUyMiUwQSUyMCUyMG9yZ190b19iaWxsJTNBJTIwJTIybXktb3JnYW5pemF0aW9uJTIy",highlighted:`<span class="hljs-attr">model_parameters:</span>
  <span class="hljs-attr">model_name:</span> <span class="hljs-string">&quot;meta-llama/Llama-2-7b-chat-hf&quot;</span>
  <span class="hljs-attr">provider:</span> <span class="hljs-string">&quot;together&quot;</span>
  <span class="hljs-attr">org_to_bill:</span> <span class="hljs-string">&quot;my-organization&quot;</span>`,wrap:!1}}),H=new Le({props:{source:"https://github.com/huggingface/lighteval/blob/main/docs/source/use-inference-providers-as-backend.mdx"}}),{c(){d=i("meta"),F=s(),E=i("p"),S=s(),r(h.$$.fragment),V=s(),r(b.$$.fragment),X=s(),T=i("p"),T.textContent=he,A=s(),$=i("blockquote"),$.innerHTML=be,R=s(),r(w.$$.fragment),Q=s(),r(M.$$.fragment),Y=s(),r(v.$$.fragment),D=s(),J=i("p"),J.textContent=Te,O=s(),r(y.$$.fragment),N=s(),j=i("p"),j.textContent=we,K=s(),r(U.$$.fragment),ee=s(),I=i("p"),I.innerHTML=Me,te=s(),r(_.$$.fragment),ne=s(),x=i("p"),x.innerHTML=ve,le=s(),r(B.$$.fragment),se=s(),r(k.$$.fragment),ae=s(),C=i("p"),C.innerHTML=Je,ie=s(),r(W.$$.fragment),re=s(),G=i("p"),G.textContent=ye,oe=s(),Z=i("ol"),Z.innerHTML=je,pe=s(),r(L.$$.fragment),me=s(),z=i("p"),z.innerHTML=Ue,fe=s(),r(H.$$.fragment),ge=s(),P=i("p"),this.h()},l(e){const t=We("svelte-u9bgzb",document.head);d=o(t,"META",{name:!0,content:!0}),t.forEach(n),F=a(e),E=o(e,"P",{}),Ie(E).forEach(n),S=a(e),p(h.$$.fragment,e),V=a(e),p(b.$$.fragment,e),X=a(e),T=o(e,"P",{"data-svelte-h":!0}),c(T)!=="svelte-1xit6v6"&&(T.textContent=he),A=a(e),$=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c($)!=="svelte-3nbkih"&&($.innerHTML=be),R=a(e),p(w.$$.fragment,e),Q=a(e),p(M.$$.fragment,e),Y=a(e),p(v.$$.fragment,e),D=a(e),J=o(e,"P",{"data-svelte-h":!0}),c(J)!=="svelte-1c6c3y0"&&(J.textContent=Te),O=a(e),p(y.$$.fragment,e),N=a(e),j=o(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-pllqfe"&&(j.textContent=we),K=a(e),p(U.$$.fragment,e),ee=a(e),I=o(e,"P",{"data-svelte-h":!0}),c(I)!=="svelte-1wooksr"&&(I.innerHTML=Me),te=a(e),p(_.$$.fragment,e),ne=a(e),x=o(e,"P",{"data-svelte-h":!0}),c(x)!=="svelte-x9hj8e"&&(x.innerHTML=ve),le=a(e),p(B.$$.fragment,e),se=a(e),p(k.$$.fragment,e),ae=a(e),C=o(e,"P",{"data-svelte-h":!0}),c(C)!=="svelte-1qvgbkn"&&(C.innerHTML=Je),ie=a(e),p(W.$$.fragment,e),re=a(e),G=o(e,"P",{"data-svelte-h":!0}),c(G)!=="svelte-1ec4m2x"&&(G.textContent=ye),oe=a(e),Z=o(e,"OL",{"data-svelte-h":!0}),c(Z)!=="svelte-1mqojvo"&&(Z.innerHTML=je),pe=a(e),p(L.$$.fragment,e),me=a(e),z=o(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-j75rfj"&&(z.innerHTML=Ue),fe=a(e),p(H.$$.fragment,e),ge=a(e),P=o(e,"P",{}),Ie(P).forEach(n),this.h()},h(){de(d,"name","hf:doc:metadata"),de(d,"content",He),de($,"class","warning")},m(e,t){Ge(document.head,d),l(e,F,t),l(e,E,t),l(e,S,t),m(h,e,t),l(e,V,t),m(b,e,t),l(e,X,t),l(e,T,t),l(e,A,t),l(e,$,t),l(e,R,t),m(w,e,t),l(e,Q,t),m(M,e,t),l(e,Y,t),m(v,e,t),l(e,D,t),l(e,J,t),l(e,O,t),m(y,e,t),l(e,N,t),l(e,j,t),l(e,K,t),m(U,e,t),l(e,ee,t),l(e,I,t),l(e,te,t),m(_,e,t),l(e,ne,t),l(e,x,t),l(e,le,t),m(B,e,t),l(e,se,t),m(k,e,t),l(e,ae,t),l(e,C,t),l(e,ie,t),m(W,e,t),l(e,re,t),l(e,G,t),l(e,oe,t),l(e,Z,t),l(e,pe,t),m(L,e,t),l(e,me,t),l(e,z,t),l(e,fe,t),m(H,e,t),l(e,ge,t),l(e,P,t),ue=!0},p:xe,i(e){ue||(f(h.$$.fragment,e),f(b.$$.fragment,e),f(w.$$.fragment,e),f(M.$$.fragment,e),f(v.$$.fragment,e),f(y.$$.fragment,e),f(U.$$.fragment,e),f(_.$$.fragment,e),f(B.$$.fragment,e),f(k.$$.fragment,e),f(W.$$.fragment,e),f(L.$$.fragment,e),f(H.$$.fragment,e),ue=!0)},o(e){g(h.$$.fragment,e),g(b.$$.fragment,e),g(w.$$.fragment,e),g(M.$$.fragment,e),g(v.$$.fragment,e),g(y.$$.fragment,e),g(U.$$.fragment,e),g(_.$$.fragment,e),g(B.$$.fragment,e),g(k.$$.fragment,e),g(W.$$.fragment,e),g(L.$$.fragment,e),g(H.$$.fragment,e),ue=!1},d(e){e&&(n(F),n(E),n(S),n(V),n(X),n(T),n(A),n($),n(R),n(Q),n(Y),n(D),n(J),n(O),n(N),n(j),n(K),n(ee),n(I),n(te),n(ne),n(x),n(le),n(se),n(ae),n(C),n(ie),n(re),n(G),n(oe),n(Z),n(pe),n(me),n(z),n(fe),n(ge),n(P)),n(d),u(h,e),u(b,e),u(w,e),u(M,e),u(v,e),u(y,e),u(U,e),u(_,e),u(B,e),u(k,e),u(W,e),u(L,e),u(H,e)}}}const He='{"title":"Using Inference Providers as Backend","local":"using-inference-providers-as-backend","sections":[{"title":"Basic Usage","local":"basic-usage","sections":[],"depth":2},{"title":"Using a Configuration File","local":"using-a-configuration-file","sections":[],"depth":2},{"title":"Supported Providers","local":"supported-providers","sections":[],"depth":2},{"title":"Billing and Costs","local":"billing-and-costs","sections":[{"title":"Personal Account Billing","local":"personal-account-billing","sections":[],"depth":3},{"title":"Organization Billing","local":"organization-billing","sections":[],"depth":3}],"depth":2}],"depth":1}';function qe($e){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ve extends ke{constructor(d){super(),Ce(this,d,qe,ze,_e,{})}}export{Ve as component};
