import{s as _e,n as xe,o as Be}from"../chunks/scheduler.3a17fb72.js";import{S as Ce,i as ke,e as i,s,c as r,h as We,a as o,d as l,b as a,f as Ie,g as p,j as c,k as de,l as Ze,m as n,n as m,t as f,o as g,p as u}from"../chunks/index.093f8863.js";import{C as Ge,H as z,E as Le}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.d34720df.js";import{C as ce}from"../chunks/CodeBlock.55467b9b.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,_,le,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.',ne,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-providers/en/index" rel="nofollow">Hugging Face Inference Providers documentation</a>.',fe,H,ge,F,ue;return h=new Ge({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),b=new z({props:{title:"Using Inference Providers as Backend",local:"using-inference-providers-as-backend",headingTag:"h1"}}),w=new z({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 z({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 z({props:{title:"Supported Providers",local:"supported-providers",headingTag:"h2"}}),B=new z({props:{title:"Billing and Costs",local:"billing-and-costs",headingTag:"h2"}}),C=new z({props:{title:"Personal Account Billing",local:"personal-account-billing",headingTag:"h3"}}),W=new z({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"),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),le=s(),x=i("p"),x.innerHTML=Je,ne=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(H.$$.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(l),P=a(e),E=o(e,"P",{}),Ie(E).forEach(l),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),le=a(e),x=o(e,"P",{"data-svelte-h":!0}),c(x)!=="svelte-x9hj8e"&&(x.innerHTML=Je),ne=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-j75rfj"&&(q.innerHTML=Ue),fe=a(e),p(H.$$.fragment,e),ge=a(e),F=o(e,"P",{}),Ie(F).forEach(l),this.h()},h(){de(d,"name","hf:doc:metadata"),de(d,"content",He),de($,"class","warning")},m(e,t){Ze(document.head,d),n(e,P,t),n(e,E,t),n(e,S,t),m(h,e,t),n(e,V,t),m(b,e,t),n(e,X,t),n(e,T,t),n(e,R,t),n(e,$,t),n(e,A,t),m(w,e,t),n(e,Q,t),m(M,e,t),n(e,Y,t),m(J,e,t),n(e,D,t),n(e,v,t),n(e,N,t),m(y,e,t),n(e,O,t),n(e,j,t),n(e,K,t),m(U,e,t),n(e,ee,t),n(e,I,t),n(e,te,t),m(_,e,t),n(e,le,t),n(e,x,t),n(e,ne,t),m(B,e,t),n(e,se,t),m(C,e,t),n(e,ae,t),n(e,k,t),n(e,ie,t),m(W,e,t),n(e,re,t),n(e,Z,t),n(e,oe,t),n(e,G,t),n(e,pe,t),m(L,e,t),n(e,me,t),n(e,q,t),n(e,fe,t),m(H,e,t),n(e,ge,t),n(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(H.$$.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(H.$$.fragment,e),ue=!1},d(e){e&&(l(P),l(E),l(S),l(V),l(X),l(T),l(R),l($),l(A),l(Q),l(Y),l(D),l(v),l(N),l(O),l(j),l(K),l(ee),l(I),l(te),l(le),l(x),l(ne),l(se),l(ae),l(k),l(ie),l(re),l(Z),l(oe),l(G),l(pe),l(me),l(q),l(fe),l(ge),l(F)),l(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(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 ze($e){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ve extends Ce{constructor(d){super(),ke(this,d,ze,qe,_e,{})}}export{Ve as component};
