Skip to content

Guide · Agent skill

How to use the Hugging Face Local Model Evals agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The huggingface-community-evals skill teaches an AI agent to run standard benchmarks such as MMLU or GSM8K against models hosted on the Hugging Face Hub, on hardware you control. It is aimed at ML engineers, researchers and developers who want local benchmark scores or a quick smoke test before scaling up. After this guide you will know how to install the skill, check your GPU and token setup, trigger the skill with a natural request, and choose between the provided scripts and backends.

Hugging Face Local Model Evalshuggingface/skills · Apache-2.0

Quick start

  1. 1Download and place the skill. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload the ZIP under Settings → Capabilities → Skills in the Claude apps.
  2. 2Install uv. Confirm uv is available by running uv --version, since the skill prefers uv run for local execution.
  3. 3Set your token. Set HF_TOKEN if you need gated or private Hub models, and verify it with printenv HF_TOKEN >/dev/null.
  4. 4Check your GPU. Run nvidia-smi to confirm the NVIDIA GPU is visible before any local GPU evaluation.
  5. 5Ask for a smoke test. Request a small run, such as MMLU or GSM8K with a limit of 10 to 20 samples, on a Hub model you want to measure.
  6. 6Choose a backend. Use vLLM where supported, and fall back to Transformers (inspect-ai) or accelerate (lighteval) if the model is unsupported.
  7. 7Scale up. Once the smoke test runs cleanly, increase the sample limit or number of tasks, or hand remote runs to the hugging-face-jobs skill.

What an agent skill is and what this one does

An agent skill is a folder containing a SKILL.md instruction file and supporting files, which an AI agent loads when a request matches the skill's description. This skill's SKILL.md tells the agent how to run evaluations on Hub models using inspect-ai and lighteval on local hardware.

The skill covers choosing between the vllm, Hugging Face Transformers and accelerate backends, smoke tests, task selection and backend fallback. It does not cover Hugging Face Jobs orchestration, model-card or model-index edits, README table extraction, .eval_results generation or publishing, PR creation, or community-evals automation.

  • Local inspect-ai eval on a Hub model via inference providers (scripts/inspect_eval_uv.py)
  • Local GPU eval with inspect-ai using vllm or Transformers (scripts/inspect_vllm_uv.py)
  • Local GPU eval with lighteval using vllm or accelerate (scripts/lighteval_vllm_uv.py)
  • Extra command patterns in examples/USAGE_EXAMPLES.md

Install the huggingface-community-evals skill

Download the skill as a ZIP from the skill's page on this directory and unzip it. Put the resulting folder in one of two places: ~/.claude/skills/ to make it available across your projects, or a project's .claude/skills/ folder to limit it to that project.

If you use the Claude apps instead, upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills

Check the requirements before your first run

The skill expects uv (the Python package runner) and, for local GPU runs, an NVIDIA GPU with nvidia-smi available. Set the HF_TOKEN environment variable if you need gated or private models. The scripts declare their Python packages in their headers: inspect-ai, inspect-evals, openai, vllm, torch, transformers, lighteval and accelerate.

Run these checks before starting a local GPU evaluation:

uv --version printenv HF_TOKEN >/dev/null nvidia-smi

Trigger the skill with a natural request

You do not need to name a script. Ask the agent in plain language, for example to run MMLU on a Hub model on your GPU, or to compare vLLM and Transformers for a model. The skill's description covers backend selection, local GPU evals and choosing between vLLM, Transformers and accelerate, so requests on those topics should match it.

Be specific about the model ID, the benchmark and whether you want a quick test. Requests about publishing scores or running on remote cloud jobs fall outside this skill and will be handed off or declined.

  • Run a quick MMLU smoke test on meta-llama/Llama-3.2-1B using my local GPU.
  • Evaluate microsoft/phi-2 on GSM8K, and fall back to Transformers if vLLM doesn't support it.
  • Which backend should I use for a 3B model on my GPU: vLLM, Transformers or accelerate?

Run a smoke test first, then scale up

The skill's core workflow is to pick a framework, pick a backend, run a small smoke test, and only then scale up. For inspect-ai, use --limit 10 or similar. For lighteval, use --max-samples 10. A small run confirms the model loads and the task runs before you spend GPU time on a full evaluation.

The first command below uses the inspect-ai path with inference providers, which needs no direct GPU control. The second runs inspect-ai on a local GPU with vLLM.

uv run scripts/inspect_eval_uv.py \ --model meta-llama/Llama-3.2-1B \ --task mmlu \ --limit 20 uv run scripts/inspect_vllm_uv.py \ --model meta-llama/Llama-3.2-1B \ --task gsm8k \ --limit 20

Run lighteval and choose a backend

Use lighteval when the benchmark is naturally expressed as a lighteval task string, especially leaderboard-style tasks. Task strings use the format suite|task|num_fewshot, and several can be comma-separated in --tasks. Prefer vLLM for throughput on supported architectures, and use accelerate as the compatibility fallback.

For inspect-ai, use --backend hf with Transformers when vLLM does not support the model. The Transformers fallback in the example below also uses --trust-remote-code, which runs custom code from the model repository (see the safety section).

  • Task string examples: leaderboard|mmlu|5, leaderboard|gsm8k|5, leaderboard|arc_challenge|25, lighteval|hellaswag|0
  • inspect-ai task examples: mmlu, gsm8k, hellaswag, arc_challenge, truthfulqa, winogrande, humaneval
uv run scripts/lighteval_vllm_uv.py \ --model meta-llama/Llama-3.2-3B-Instruct \ --tasks "leaderboard|mmlu|5,leaderboard|gsm8k|5" \ --max-samples 20 \ --use-chat-template uv run scripts/inspect_vllm_uv.py \ --model microsoft/phi-2 \ --task mmlu \ --backend hf \ --trust-remote-code \ --limit 20

Pick hardware and fix common errors

The skill's guidance is that models under 3B suit a consumer GPU, Apple Silicon or a small development GPU; 3B to 13B need a stronger local GPU; and 13B and above need a high-memory local GPU or a handoff to hugging-face-jobs. For out-of-memory errors on CUDA or vLLM, reduce --batch-size or --gpu-memory-utilization, or try a smaller model for the smoke test.

If vLLM does not support a model, switch to --backend hf for inspect-ai or --backend accelerate for lighteval. If a gated or private repo fails to load, check HF_TOKEN. If the model needs custom code, add --trust-remote-code.

  • CUDA or vLLM out of memory: reduce --batch-size, reduce --gpu-memory-utilization, or use a smaller smoke-test model
  • Model unsupported by vLLM: use --backend hf (inspect-ai) or --backend accelerate (lighteval)
  • Gated or private repo fails: verify HF_TOKEN
  • Custom model code required: add --trust-remote-code

Safety notes: scripts, network and remote code

This skill runs scripts and uses the network, so the agent will execute the three provided Python scripts through uv and download models and datasets. Review the scripts and the arguments before running them, especially on a machine with sensitive files.

The Transformers fallback can use --trust-remote-code, which executes custom code from the model repository. Only use that flag with models whose code you trust.

  • The skill runs scripts and uses network access.
  • --trust-remote-code executes code from the model repository; avoid it for untrusted models.
  • Keep HF_TOKEN in your environment rather than pasting it into prompts.

What people use it for

  • Measuring MMLU or GSM8K scores for an open Hub model on your own NVIDIA GPU.
  • Running a quick local smoke test to confirm a model loads and a task runs before a larger evaluation.
  • Comparing vLLM, Transformers and accelerate backends to find one that works for a given model.
  • Running lighteval leaderboard-style tasks such as leaderboard|mmlu|5 with chat templates.
  • Preparing a local run that can later be passed to hugging-face-jobs for remote execution.

Frequently asked questions

How do I install the huggingface-community-evals skill?

Download the skill ZIP from this page and unzip it into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

What do I need to run it?

You need uv, an NVIDIA GPU with nvidia-smi for local GPU runs, and an HF_TOKEN environment variable for gated or private models. The scripts also pull in Python packages such as inspect-ai, lighteval, vllm, torch and transformers declared in their headers.

Is the huggingface-community-evals skill free and what is its licence?

The skill is listed under the Apache-2.0 licence. The source does not state any pricing, so check the licence text for the terms that apply to your use.

Can I use it without a GPU?

The skill expects local NVIDIA hardware for local GPU runs. Without a GPU, the skill's guidance is to use scripts/inspect_eval_uv.py for lighter provider-backed evaluation, or to hand off to hugging-face-jobs for remote compute.

Why does my model fail with an out-of-memory or vLLM error?

Reduce --batch-size or --gpu-memory-utilization, or switch to a smaller model for the smoke test. If the model is still too large for your hardware, the skill suggests handing off to hugging-face-jobs.

Does this skill publish results to model cards or the leaderboard?

No. The skill explicitly excludes model-card edits, .eval_results generation or publishing, PR creation and community-evals automation. It stops after generating the evaluation run.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits ML engineers, researchers and developers who want to measure Hub model benchmark scores or run a quick smoke test on their own NVIDIA GPU. If you have no GPU and need heavy evaluations, want to publish scores to model cards or leaderboards, or plan to run untrusted models with custom code, pick a different tool or use the hand-off paths the skill describes.

Download the skill

Find exactly what
you're looking for