> ## Documentation Index
> Fetch the complete documentation index at: https://benchgen.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# From a HuggingFace Model

> Pull any public model from the HuggingFace Hub, deploy it on the fly, and benchmark it against an Eval environment.

The **HuggingFace** source lets you benchmark a model you have not deployed yet. You search the
HuggingFace Hub from inside BenchGen, pick a model, and BenchGen deploys it for you and runs the
evaluation. This is the fastest way to score a public model against an environment without adding
it to your workspace first.

> [!NOTE]
>
> **When to use this.** Reach for HuggingFace when the model lives on the Hub and you just want a
> quick score. If the model is already deployed on BenchGen, use [On a platform
> model](https://benchgen.com/docs/eval/run-a-benchmark-platform.md); if you started it yourself, use [On a running
> model](https://benchgen.com/docs/eval/evaluate-a-running-model.md).

## Prerequisites

* A benchmark or environment to evaluate against, from the Environments Hub or a [custom
  environment](https://benchgen.com/docs/eval/create-environment.md) you uploaded.
* GPU capacity for BenchGen to deploy the model onto.
* For private or gated models, a HuggingFace access token.

## Steps

### 1. Open a benchmark

Open the environment you want to evaluate against. The **Overview** tab describes what the
benchmark measures and how it scores submissions.

![The benchmark overview page](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/01-benchmark-overview.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=18fc5a05deb2f4ec37d3d0622bf090b6)

The benchmark overview page

Click **Evaluate** in the top right, or open the **Evaluate** tab.

### 2. Switch to the HuggingFace source

On the **Evaluate** tab, the model sources are grouped into tabs: **Platform Models**, **Running**,
**Trained**, **HuggingFace**, and **External API**. Click **HuggingFace**.

![The HuggingFace tab selected on the Evaluate screen](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/02-huggingface-tab.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=daeab916810b49c82729f69943b4164b)

The HuggingFace tab selected on the Evaluate screen

> [!TIP]
>
> For a private or gated repository, use **Add your HF token** below the search box so BenchGen can
> download the weights.

### 3. Search the Hub

Type a model name to search the HuggingFace Hub. Results show the repository, download and like
counts, and the task tag (for example `text-generation`).

![Searching the HuggingFace Hub for qwen2.5](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/03-search-models.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=e09e86c3e02269d600bc68909b64d24a)

Searching the HuggingFace Hub for qwen2.5

### 4. Select and deploy the model

Click a result to select it. BenchGen deploys the model and confirms with **Deployed & selected**.
The **Advanced: model environment & parameters** panel now reads **auto-filled from selected
model**, so the model connection values are wired up for you.

![Qwen2.5-7B-Instruct deployed and selected, with Run Evaluation enabled](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/04-model-deployed-selected.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=5f94d6e7ae090245a2d0929700c045f3)

Qwen2.5-7B-Instruct deployed and selected, with Run Evaluation enabled

The environment variables the benchmark declares are filled from this deployed model. You only fill
in the fields the benchmark owner exposed (here `GK_SYSTEM_PROMPT` and `GK_MAX_QUESTIONS`), and you
can adjust the sampling parameters. See [Environment variables](https://benchgen.com/docs/eval/environment-variables.md) for how
these values are injected.

> [!WARNING]
>
> Leave a field blank to fall back to the benchmark defaults. The runner fills in values only; the
> keys are fixed by the benchmark owner.

### 5. Run the evaluation

Click **Run Evaluation**. BenchGen creates the run and opens a live view. While the model comes
online, the status reads **Deploying** and the logs wait for output.

![The run page showing Deploying status and live logs](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/05-run-deploying.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=a742aeebe451807e5915e5e811f1a482)

The run page showing Deploying status and live logs

The **Evaluation details** panel summarizes the run: status, model, environment, phase, submission
archive, and the run ID.

### 6. Review the results

When the run finishes, the status turns **Completed** and the **Score Breakdown** appears. The
example below scored **92%** (46 of 50 correct).

![The completed run with a 92% score and detailed per-question results](https://mintcdn.com/benchgen-8fc81371/IfVgV9RQkb1kYYW_/images/eval/huggingface/06-results.jpg?fit=max\&auto=format\&n=IfVgV9RQkb1kYYW_\&q=85\&s=47eabb8bf4864fda85d2d01d40acdfd1)

The completed run with a 92% score and detailed per-question results

The **Detailed Results** table lists each question with its correct answer (**Doğru**), the model's
answer (**Model**), and whether it matched (**Sonuç**). Download the prediction output, scoring
output, or the full HTML/JSON breakdown from the **Files** panel. See [Read
results](https://benchgen.com/docs/eval/read-results.md) for a full walkthrough.

## Next steps

> [card] [Benchmark Results](https://benchgen.com/docs/eval/read-results.md)
>
> Interpret the score breakdown and detailed table.

> [card] [Environment Variables](https://benchgen.com/docs/eval/environment-variables.md)
>
> How run values reach the model.

> [card] [On a Platform Model](https://benchgen.com/docs/eval/run-a-benchmark-platform.md)
>
> Benchmark a model already on BenchGen.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.