Prompt Chain

Deploy and test Hugging Face inference endpoints

Set up and evaluate Hugging Face inference endpoints with automated testing workflows and configuration templates.

Works with huggingface

73
Spark score
out of 100
Updated 19 days ago
Version 0.121.18

Add to Favorites

Why it matters

Enable developers to quickly set up, configure, and evaluate Hugging Face inference endpoints through automated testing workflows that validate model performance and API integration.

Outcomes

What it gets done

01

Initialize Hugging Face inference endpoint configuration files

02

Authenticate with Hugging Face API using environment tokens

03

Execute evaluation tests against deployed inference endpoints

04

View and analyze inference endpoint test results

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/pfoo-inference-endpoint | bash

Steps

Steps in the chain

01
Initialize example project
02
Navigate to project directory
03
Set HF_API_TOKEN environment variable
04
Edit configuration file
05
Run evaluation
06
View results

Overview

Inference Endpoint

This promptfoo example provides a starting configuration for working with Hugging Face Inference Endpoints. Use this example when you want a starting point for using promptfoo with Hugging Face Inference Endpoints.

What it does

This promptfoo example provides a starting configuration for working with Hugging Face Inference Endpoints. It includes the basic setup files needed to get started with promptfoo and Hugging Face.

When to use - and when NOT to

Use this example when you want a starting point for using promptfoo with Hugging Face Inference Endpoints. Do NOT use this if you're working with other providers - promptfoo supports many other providers that may be more appropriate for those scenarios.

Inputs and outputs

You provide your HF_API_TOKEN environment variable and edit the promptfooconfig.yaml file. After running the evaluation, you can view the results by running promptfoo view.

Integrations

This example works with Hugging Face Inference Endpoints and uses the promptfoo framework.

Who it's for

This example is designed for developers who want to use promptfoo with Hugging Face Inference Endpoints. The example provides a starting point that can be customized for specific needs.

Quick start

Initialize the example project:

npx promptfoo@latest init --example huggingface/inference-endpoint
cd huggingface/inference-endpoint

Set your HF_API_TOKEN environment variable, edit the promptfooconfig.yaml file, then run:

promptfoo eval

View results with promptfoo view.

Source README

huggingface/inference-endpoint (Huggingface Inference Endpoint)

You can run this example with:

npx promptfoo@latest init --example huggingface/inference-endpoint
cd huggingface/inference-endpoint

Usage

To get started, set your HF_API_TOKEN environment variable. See also https://promptfoo.dev/docs/providers/huggingface/ for setup details.

Next, edit promptfooconfig.yaml.

Then run:

promptfoo eval

Afterwards, you can view the results by running promptfoo view

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.