import{s as _e,n as xe,o as Be}from"../chunks/scheduler.5f3e6389.js";import{S as Ce,i as ke,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 Ze,m as l,n as m,t as f,o as g,p as u}from"../chunks/index.373ab25c.js";import{C as Ge,H,E as Le}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.196dae42.js";import{C as ce}from"../chunks/CodeBlock.ff08898c.js";function qe($e){let d,P,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.",R,$,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>`,A,w,Q,M,Y,J,D,v,Te="You can use configuration files to define the model and the provider to use.",N,y,O,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,Je='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,C,ae,k,ve='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,Z,ye="To bill requests to an organization:",oe,G,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,q,Ue='For more detailed error handling and provider-specific information, refer to the <a href="https://huggingface.co/docs/inference-endpoints/guides/inference_providers" rel="nofollow">Hugging Face Inference Providers documentation</a>.',fe,z,ge,F,ue;return h=new Ge({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new H({props:{title:"Using Inference Providers as Backend",local:"using-inference-providers-as-backend",headingTag:"h1"}}),w=new H({props:{title:"Basic Usage",local:"basic-usage",headingTag:"h2"}}),M=new ce({props:{code:"bGlnaHRldmFsJTIwZW5kcG9pbnQlMjBpbmZlcmVuY2UtcHJvdmlkZXJzJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIybW9kZWxfbmFtZSUzRGRlZXBzZWVrLWFpJTJGRGVlcFNlZWstUjElMkNwcm92aWRlciUzRGhmLWluZmVyZW5jZSUyMiUyMCU1QyUwQSUyMCUyMCUyMCUyMCUyMmxpZ2h0ZXZhbCU3Q2dzbThrJTdDMCUyMg==",highlighted:`lighteval endpoint inference-providers \\
    <span class="hljs-string">&quot;model_name=deepseek-ai/DeepSeek-R1,provider=hf-inference&quot;</span> \\
    <span class="hljs-string">&quot;lighteval|gsm8k|0&quot;</span>`,wrap:!1}}),J=new H({props:{title:"Using a Configuration File",local:"using-a-configuration-file",headingTag:"h2"}}),y=new ce({props:{code:"bGlnaHRldmFsJTIwZW5kcG9pbnQlMjBpbmZlcmVuY2UtcHJvdmlkZXJzJTIwJTVDJTBBJTIwJTIwJTIwJTIwZXhhbXBsZXMlMkZtb2RlbF9jb25maWdzJTJGaW5mZXJlbmNlX3Byb3ZpZGVycy55YW1sJTIwJTVDJTBBJTIwJTIwJTIwJTIwJTIybGlnaHRldmFsJTdDZ3NtOGslN0MwJTIy",highlighted:`lighteval endpoint inference-providers \\
    examples/model_configs/inference_providers.yaml \\
    <span class="hljs-string">&quot;lighteval|gsm8k|0&quot;</span>`,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 H({props:{title:"Supported Providers",local:"supported-providers",headingTag:"h2"}}),B=new H({props:{title:"Billing and Costs",local:"billing-and-costs",headingTag:"h2"}}),C=new H({props:{title:"Personal Account Billing",local:"personal-account-billing",headingTag:"h3"}}),W=new H({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}}),z=new Le({props:{source:"https://github.com/huggingface/lighteval/blob/main/docs/source/use-inference-providers-as-backend.mdx"}}),{c(){d=i("meta"),P=s(),E=i("p"),S=s(),r(h.$$.fragment),V=s(),r(b.$$.fragment),X=s(),T=i("p"),T.textContent=he,R=s(),$=i("blockquote"),$.innerHTML=be,A=s(),r(w.$$.fragment),Q=s(),r(M.$$.fragment),Y=s(),r(J.$$.fragment),D=s(),v=i("p"),v.textContent=Te,N=s(),r(y.$$.fragment),O=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=Je,le=s(),r(B.$$.fragment),se=s(),r(C.$$.fragment),ae=s(),k=i("p"),k.innerHTML=ve,ie=s(),r(W.$$.fragment),re=s(),Z=i("p"),Z.textContent=ye,oe=s(),G=i("ol"),G.innerHTML=je,pe=s(),r(L.$$.fragment),me=s(),q=i("p"),q.innerHTML=Ue,fe=s(),r(z.$$.fragment),ge=s(),F=i("p"),this.h()},l(e){const t=We("svelte-u9bgzb",document.head);d=o(t,"META",{name:!0,content:!0}),t.forEach(n),P=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),R=a(e),$=o(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),c($)!=="svelte-3nbkih"&&($.innerHTML=be),A=a(e),p(w.$$.fragment,e),Q=a(e),p(M.$$.fragment,e),Y=a(e),p(J.$$.fragment,e),D=a(e),v=o(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-1c6c3y0"&&(v.textContent=Te),N=a(e),p(y.$$.fragment,e),O=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=Je),le=a(e),p(B.$$.fragment,e),se=a(e),p(C.$$.fragment,e),ae=a(e),k=o(e,"P",{"data-svelte-h":!0}),c(k)!=="svelte-1qvgbkn"&&(k.innerHTML=ve),ie=a(e),p(W.$$.fragment,e),re=a(e),Z=o(e,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-1ec4m2x"&&(Z.textContent=ye),oe=a(e),G=o(e,"OL",{"data-svelte-h":!0}),c(G)!=="svelte-1mqojvo"&&(G.innerHTML=je),pe=a(e),p(L.$$.fragment,e),me=a(e),q=o(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-168pz23"&&(q.innerHTML=Ue),fe=a(e),p(z.$$.fragment,e),ge=a(e),F=o(e,"P",{}),Ie(F).forEach(n),this.h()},h(){de(d,"name","hf:doc:metadata"),de(d,"content",ze),de($,"class","warning")},m(e,t){Ze(document.head,d),l(e,P,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,R,t),l(e,$,t),l(e,A,t),m(w,e,t),l(e,Q,t),m(M,e,t),l(e,Y,t),m(J,e,t),l(e,D,t),l(e,v,t),l(e,N,t),m(y,e,t),l(e,O,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(C,e,t),l(e,ae,t),l(e,k,t),l(e,ie,t),m(W,e,t),l(e,re,t),l(e,Z,t),l(e,oe,t),l(e,G,t),l(e,pe,t),m(L,e,t),l(e,me,t),l(e,q,t),l(e,fe,t),m(z,e,t),l(e,ge,t),l(e,F,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(J.$$.fragment,e),f(y.$$.fragment,e),f(U.$$.fragment,e),f(_.$$.fragment,e),f(B.$$.fragment,e),f(C.$$.fragment,e),f(W.$$.fragment,e),f(L.$$.fragment,e),f(z.$$.fragment,e),ue=!0)},o(e){g(h.$$.fragment,e),g(b.$$.fragment,e),g(w.$$.fragment,e),g(M.$$.fragment,e),g(J.$$.fragment,e),g(y.$$.fragment,e),g(U.$$.fragment,e),g(_.$$.fragment,e),g(B.$$.fragment,e),g(C.$$.fragment,e),g(W.$$.fragment,e),g(L.$$.fragment,e),g(z.$$.fragment,e),ue=!1},d(e){e&&(n(P),n(E),n(S),n(V),n(X),n(T),n(R),n($),n(A),n(Q),n(Y),n(D),n(v),n(N),n(O),n(j),n(K),n(ee),n(I),n(te),n(ne),n(x),n(le),n(se),n(ae),n(k),n(ie),n(re),n(Z),n(oe),n(G),n(pe),n(me),n(q),n(fe),n(ge),n(F)),n(d),u(h,e),u(b,e),u(w,e),u(M,e),u(J,e),u(y,e),u(U,e),u(_,e),u(B,e),u(C,e),u(W,e),u(L,e),u(z,e)}}}const ze='{"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 He($e){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ve extends Ce{constructor(d){super(),ke(this,d,He,qe,_e,{})}}export{Ve as component};
