Comparing open-weight models with promptfoo before self-hosting

Run DeepSeek, Mistral, Qwen and Llama against your own tasks with promptfoo before choosing one to host. Use local Ollama runs for screening and vLLM for the serving tests that come closer to production.

On this page

Comparing open-weight models with promptfoo before self-hosting

Test the candidate models on your own tasks before you buy hardware or commit to a serving stack. A team that wants a self-hosted open-weight model usually starts from public benchmarks, which say little about how a model handles your prompts, your documents and your output format. promptfoo lets you run one evaluation suite against several candidates, grade every output with the same assertions, and compare the results side by side. Run the comparison before purchasing GPUs, reserving capacity or signing up for a platform, because the cheapest model to test is the one you have not yet deployed. The same suite can also be reused later to check a chosen model after upgrades or prompt changes.

The comparison runs locally. promptfoo is open source under the MIT license, and its documentation states that evals run on your machine and talk directly with the model, so your test data does not pass through a promptfoo service. Targets can be a local Ollama instance, a vLLM server exposing OpenAI-compatible endpoints, or another self-hosted endpoint. Start with a small set of representative cases drawn from real work, then add objective assertions such as equals, regex or is-json where they fit, and reserve model-graded checks for qualities that cannot be scored by rule. Confirm the current provider configuration for each target in the promptfoo documentation before you start.

The promptfoo documentation includes a guide to comparing DeepSeek, Mistral, Qwen and Llama on custom datasets, which is a useful starting point for choosing candidates. Compare models at the size and quantization you could realistically run, since a larger model may pass your tests but not fit your hardware. Record latency and output length alongside quality, because those figures drive the accelerator capacity you need. The result is a documented decision: which model passed your assertions, at what cost in time and compute, and which failures need a prompt change or a different model before you commit.

Ollama for screening or vLLM for serving tests

Ollama is a runtime for running language models locally on macOS, Windows, Linux or Docker. It suits a small candidate list that a single engineer wants to run on a laptop or workstation before deciding which models deserve a closer look. Its local API listens on port 11434 without authentication, so promptfoo can call it directly with little setup. The runtime is licensed under MIT and its local runs do not send prompts or data to Ollama, according to its FAQ.

  • Model storage: Models are kept on the local disk in a default folder per operating system, and OLLAMA_MODELS moves them elsewhere. Plan disk space for every candidate model you pull.
  • Local hardware: Speed depends on the memory and accelerator capacity of the machine you run it on, so results from a laptop may not match a server.
  • Concurrency defaults: OLLAMA_NUM_PARALLEL defaults to 1 request per model, which keeps screening runs simple but slows large suites.
  • Network exposure: The server binds to 127.0.0.1 by default. Changing OLLAMA_HOST exposes it to other machines, so put a proxy with access control in front of it.
  • Cost: Running models on your own hardware is unlimited under Ollama's pricing page. Cost comes from the hardware and the engineer's time.

Before relying on screening results, confirm the exact model tags, quantization and context settings you used, because these change behavior between runs.

Which test target fits each stage of the comparison

This table compares three ways to point promptfoo at an open-weight model: Ollama on localhost, a vLLM server, and an OpenAI-compatible gateway. Read each row against the stage you are in, from a quick first look on a laptop to a shared run that resembles production. The main takeaway is that the target's authentication and concurrency defaults change what a comparison result means.

CapabilityOllama on localhostvLLM serverOpenAI-compatible gateway
Access modelREST API on 127.0.0.1 port 11434 by default, bound to the local machineOpenAI-compatible endpoints such as /v1/chat/completions on the host you start with vllm serveA single front door that routes to one or more model backends, which may be self-hosted or hosted
Authentication behaviorLocal API needs no authentication, so any process on the machine can call itThe --api-key option covers /v1 endpoints but not /metrics, /health or /invocations, so add a reverse proxyDepends on the gateway; confirm which keys, tokens or allowlists it enforces before sending test traffic
Concurrency controlsOLLAMA_NUM_PARALLEL defaults to 1 request per model and OLLAMA_MAX_QUEUE defaults to 512 queued requestsThroughput is set by accelerator capacity and serving configuration, so tune the run's concurrency to matchSet by gateway rate limits and backend capacity; confirm per-model limits before timing comparisons
Metrics availableLimited to what you measure in promptfoo; confirm any server-side metrics in your Ollama versionPrometheus-format metrics at /metrics covering request counts, token throughput, latency and KV cache useDepends on the product; confirm whether latency, token counts and errors are exported
Data handlingRuns on your hardware; Ollama states it does not see prompts when running locallyRuns in your infrastructure; node-to-node traffic in multi-node setups must sit on an isolated networkTraffic may leave your network if a backend is hosted; confirm the data path for each model
When it fitsFirst pass on a laptop or workstation to shortlist models and check prompts quicklyTesting the serving stack you plan to self-host, including API compatibility and load behaviorComparing self-hosted and hosted models through one configuration before a production choice

Set up a fair four-model comparison in promptfoo

This sequence takes four open-weight candidates from installation to a repeatable promptfoo eval, so you can see how each model performs on your tasks before choosing one to self-host. The output is a shared configuration, comparable pass rates and a list of failures you can act on.

  1. Confirm Node.js and install promptfoo

    Check that Node.js 22.22.0 or newer is installed by running node --version on the machine that will run evals. Then install promptfoo from npm and confirm the CLI responds with promptfoo --version. promptfoo is MIT licensed and runs locally, so the evals execute on your machine and call the models directly. Done means the version command returns a release and no Node.js error appears.

  2. Start the candidate models locally

    Pull each candidate into Ollama with ollama pull for quick local testing, or start a vLLM server with vllm serve for an OpenAI-compatible endpoint that matches a production serving stack. Ollama listens on 127.0.0.1 port 11434 by default and needs no authentication locally, while vLLM's --api-key option does not protect every endpoint, so keep it on a private network. Confirm each endpoint responds to a single simple prompt before going further, and record the exact model tag or checkpoint name for each candidate.

  3. Verify every model receives the same prompt

    Send one identical test prompt to all four endpoints through promptfoo or curl and compare the requests. Check that the model names, system prompt, temperature and maximum output tokens are the same in each target block of your configuration. This check catches the most common unfair comparison, where one model gets a different prompt template or sampling setting than the others. Done means four valid responses that were generated from one shared set of settings.

  4. Write one configuration with shared test cases

    Create a single promptfoo configuration file that lists the four providers under the providers key and points to one set of test cases built from your own data. Use assertions that match the task, such as contains, is-json or a rubric where the answer is open-ended. Keep the prompt, variables and assertions identical across providers so that only the model changes. Confirm the file validates by running promptfoo with a small subset of test cases first.

  5. Run the eval and capture results

    Run the full eval from the terminal and let promptfoo execute every test case against each of the four providers. Save the results with the output option so the run can be reopened and shared. Watch for connection errors or timeouts, which usually indicate an endpoint problem rather than a weak model, and rerun those cases after fixing the endpoint. Done means every provider has a complete result set for the test cases.

  6. Review pass rates and failure patterns

    Open the results in the promptfoo web viewer and compare pass rates per model and per test category. Read the failing outputs, not only the totals, and sort them into patterns such as format errors, missed facts, refusals or overlong answers. Decide whether a failure comes from the model, the prompt or a weak assertion, and adjust the assertion or prompt only when it is clearly the cause, then rerun the affected cases. The output is a short ranked list of models with the failure types that matter for your use case.

  7. Repeat with a larger dataset before deciding

    Expand the test cases with more representative examples from your own data, including the hard cases and the edge cases that caused the failures you reviewed. Run the same configuration again so the new results remain comparable to the earlier run. Check that the ranking is stable across both runs before treating it as a signal, since a small test set can favor a model by chance. For how to structure the comparison across more model families, the promptfoo open-source model comparison guide is the natural next read.

How the evaluation flows from your data to a hosting decision

The flow starts with your test cases and assertions, which promptfoo reads from your own configuration on the machine or CI runner where it runs. promptfoo sends each prompt directly to the endpoint for every candidate model, either a local Ollama server on its default port or a vLLM OpenAI-compatible server, and grades the responses against your assertions. The results, not vendor benchmarks, feed the self-hosting decision. Check that the trust boundary holds: the inference endpoints should stay inside your network, and any API key or reverse proxy in front of vLLM should allowlist only the endpoints users need.

promptfoo sends your test cases to each candidate model endpoint and grades the results.

Security settings to check before any model endpoint sees real data

Open-weight model servers ship with defaults that suit a developer laptop, not a shared network. The cards below cover the settings that most often expose a model endpoint, and each one is worth confirming in your own environment before an evaluation uses production prompts or documents.

Isolate multi-node vLLM traffic

vLLM's security documentation states that communication between nodes in a multi-node deployment is insecure by default, with no authorization or encryption. If you split a large model across machines using pipeline parallelism or Ray, place those nodes on an isolated network segment. Confirm the network design with your platform team before you route any evaluation data through the cluster.

vLLM security docs

Do not rely on the vLLM API key alone

The --api-key option protects endpoints under /v1, /v2, /inference and /cohere, but not /invocations, /pause, /resume, /abort_requests, /metrics or /health. The documentation warns against relying on the key alone and recommends a reverse proxy that allowlists only the endpoints meant for users. Test each unprotected path from outside the network before you point promptfoo at the server.

Proxy Ollama before sharing it

Ollama binds to 127.0.0.1 on port 11434 by default, so only the local machine can reach it. Changing the bind address with OLLAMA_HOST exposes the API to the network, and the local API does not require authentication. If several reviewers need access, place a reverse proxy such as Nginx in front and add authentication there.

Ollama FAQ

Turn off Ollama cloud features

Direct cloud inference at ollama.com requires an API key sent as a Bearer token, so a key in a configuration file or script can send prompts outside your infrastructure. For evaluations that must stay local, set OLLAMA_NO_CLOUD=1 or disable cloud features in the server configuration file. Check the environment of every machine that runs promptfoo to confirm no cloud key is loaded.

Ollama API authentication

Set policy for eval data and logs

Evaluation prompts, retrieved documents and model outputs often contain customer or internal data, and promptfoo stores results and logs on the machine or server that runs it. Decide where result files live, who can read them, how long they are kept and how they are deleted before the first run. Ask your security team to approve this policy for each model server and CI runner in scope.

promptfoo self-hosting docs

Questions teams ask before running open-weight model comparisons

What does an open-weight model comparison with promptfoo cost?

The promptfoo software is free to start: the Community edition is free, includes all LLM evaluation features and all model providers, and is released under the MIT license. The real cost comes from the compute that runs the models, which is GPU or other accelerator capacity for vLLM or a machine with enough memory for Ollama, plus the surrounding infrastructure, the time of the people who build and read the evals, and any judge model calls you pay for. Ollama's pricing page states that running models on your own hardware is always unlimited, and vLLM has no paid edition. Ask any partner for a quote that separates one-time setup from recurring compute and review time.

How long does a comparison take, and what makes it longer?

The duration depends mostly on three things: how many test cases you have, how many models you compare, and how the answers are graded. A suite of objective checks such as equals, regex or is-json runs quickly and is cheap to repeat. Model-graded rubrics or LLM-as-a-judge assertions add judge calls and need someone to review disagreements. Hosting the candidate models adds work when each one must be downloaded, sized and served behind an endpoint. Fixed-scope engagements agree the timeline in writing before work starts, so ask for the schedule to be tied to dataset size, model count and grading method.

What does the team need to provide for the comparison?

Three things matter most. First, labeled test data: real or representative prompts from your task, with reference answers or clear grading criteria, because a comparison is only as useful as the examples it runs on. Second, a named owner who can decide what a good answer looks like and sign off on the results. Third, endpoint access: a place to run each candidate model, whether a vLLM server reached over HTTP or an Ollama instance on a machine you control, plus credentials for any judge model. Confirm data handling rules for prompts and outputs before anything leaves your network.

Can our own team run this comparison without a partner?

Yes, if you have engineers who can install the promptfoo CLI, which requires Node.js 22.22.0 or newer, write assertions, and host the models. The promptfoo documentation states that evals run locally and talk directly with the LLM, so a small team can start on a laptop with a single model. Teams often bring in a partner when the suite needs domain-specific test design, when several models must be served on shared accelerator capacity, or when the results must be defensible to a risk or compliance function. Decide early who will maintain the suite after the first run.

Do we need self-hosted promptfoo to share results across the team?

Not for a first comparison. Running the CLI locally or in a pipeline is enough to produce results for one engineer or a small group. A self-hosted promptfoo server becomes relevant when several people need a shared view of runs. The self-hosted app stores data in a local SQLite database that cannot be shared across replicas, has no RBAC, horizontal scaling, built-in authentication or SSO, and is not recommended for production use. Teams that need team sharing, access control and SSO should compare the paid Enterprise and On-Premise editions, whose pricing is custom and quoted from a written scope.

How do new vLLM and Ollama releases affect our results?

New releases can change model behavior, default settings, chat templates or API details, so a result from one version may not hold on another. vLLM ships new minor releases about every two weeks, for example v0.30.0 on September 22 and v0.31.0 on October 5, 2026. Ollama ships frequent releases, including v0.40.5 on 14 October 2026. Pin the server version and the model file, record both in every eval run, and rerun the suite before upgrading. Read the release notes for changes to sampling defaults or tokenization, and treat a pre-release as a test build rather than a baseline.

Is an Ollama or vLLM endpoint safe to point promptfoo at?

It depends on how the endpoint is exposed. The local Ollama API at localhost:11434 does not require authentication, and Ollama binds to 127.0.0.1 by default, so keep it on localhost or put it behind a proxy that enforces access. The vLLM --api-key option protects only some endpoints, not /metrics or /health, and the vLLM docs recommend a reverse proxy that allowlists only the endpoints meant for users. For multi-node vLLM runs, the docs state that node-to-node traffic is insecure by default and must sit on an isolated network. Confirm these settings in your own environment before sending real prompts.

What to confirm about model support and results before deciding

Before you trust a comparison run, confirm that the model tags and provider settings you tested are the ones you will later self-host. Model support and provider options in promptfoo change between releases, and the current release line is 0.124.1, so check the provider IDs, model names and configuration keys against the version you actually run in your environment. The promptfoo model documentation is the place to start, but do not assume a provider string from an older example still resolves. Record the promptfoo version, the provider configuration and the exact model tag in your eval results so a later rerun can be matched to the original.

Hardware is the next thing to confirm. vLLM runs on NVIDIA CUDA, AMD ROCm and Intel XPU GPUs, on several CPU architectures, and on further accelerators only through third-party plugins outside the main repository. A model that serves well on one accelerator may not load, or may run far slower, on another, so test on hardware that matches your production target. For Ollama, confirm where your installation stores models (the default path differs by operating system, and OLLAMA_MODELS can move it), and check the OLLAMA_NUM_PARALLEL, OLLAMA_MAX_LOADED_MODELS and OLLAMA_MAX_QUEUE values on your server. Concurrency defaults that look fine for a single developer can distort latency results when several eval workers hit the same model.

Finally, treat model-graded scores as measurements with their own variance. When an llm-rubric or similar grader scores outputs, the grader model's answers can shift between runs, and the grader's own version, temperature and prompt shape all affect the result. Run each comparison more than once, keep the grader fixed across all candidate models, and check a sample of grader decisions by hand before you rank models on them. Confirm each of these items in your own environment rather than assuming the defaults or the examples in the documentation match your setup.

Limits to confirm in your environment

An eval run gives you evidence about one set of tasks, on one set of model builds, on one machine. The cards below cover the places where that evidence can stop applying, so you know what to recheck before you commit to self-hosting a model.

Model versions and tags change

A model name such as a Llama, Qwen, Mistral or DeepSeek tag can point to different weights over time, and quantized builds can differ from the full-precision model in the vendor's paper. Record the exact tag, digest or checkpoint identifier in each promptfoo config, and rerun the suite when the model under test changes. Confirm which artifact your serving engine actually loaded before you compare results.

The eval only measures what you test

A promptfoo suite scores the prompts, datasets and assertions you wrote, so a model that wins on your sample can still fail on rare inputs, long documents or edge cases that never entered the test set. Check that the dataset reflects real traffic, including messy inputs and the cases your support team actually sees. Treat a pass rate as evidence for those tasks only.

A model grader can be biased

When an llm-rubric or other model-graded assertion scores outputs, the judge model may favor its own style, longer answers or particular phrasing. Use a judge that is separate from the models under test where possible, and spot-check a sample of grades by hand. Confirm that the judge's verdicts agree with a human reviewer before you treat model-graded scores as a selection signal.

vLLM and Ollama release often

vLLM publishes new minor releases about every two weeks, and Ollama ships frequent releases as well, so the same model can behave differently across server versions. Pin the server version in your test environment and in your self-hosted deployment, and note the version in every eval report. Read the release notes before you upgrade a server that an eval depends on.

vLLM releases

Hardware and accelerator support varies

vLLM supports NVIDIA CUDA, AMD ROCm and Intel XPU GPUs, several CPU architectures and Apple silicon, but the features and model sizes you can run differ by platform. A laptop run through Ollama shows whether a model answers well, not whether your production accelerators can serve it at the same quality and speed. Confirm support for your exact accelerator, driver and model with the vendor documentation before planning capacity.

vLLM installation docs

Single-user runs do not show production load

A local Ollama run with one prompt at a time shows answer quality, but it does not show how the model behaves when many users send requests at once. Ollama's default of one parallel request per model is set for local use, and throughput, queueing and latency under concurrency need their own load test. Measure latency and throughput with production-like concurrency on the serving stack you plan to run.

How to turn comparison results into a self-hosting decision

Read a promptfoo comparison as a set of signals, not a single ranking. A pass rate tells you how often a model met your assertions, but two models with similar pass rates can fail in very different ways. Open the failure rows and group them: wrong answers on your domain facts, malformed JSON that breaks a parser, refusals on legitimate requests, or slow responses that cause timeouts. A model that fails on formatting is often fixable with prompt or schema changes, while a model that fabricates facts in your data is a harder reason to reject it. Record latency and token counts from the same run, because a local run on your own hardware will not reproduce hosted timings, and the numbers only help when they come from comparable conditions.

A result is enough to commit hardware when the winning candidate passes your gates on a dataset that resembles production, the failure patterns are ones you can accept or mitigate, and the operating requirements are already understood. Those requirements go beyond the model. vLLM exposes an OpenAI-compatible server, Prometheus metrics at /metrics, and multiple Kubernetes deployment options, and its docs say node-to-node traffic in a multi-node deployment is insecure by default, so you need to confirm your network isolation, scaling model and monitoring before buying accelerators. If any of those are unresolved, or your data is small and unrepresentative, run a vLLM pilot first on a rented or existing node, put the same promptfoo suite against its endpoint, and measure throughput under realistic concurrency. Ask your infrastructure team to confirm accelerator support for the target model and their own hardware, since vLLM's supported platforms vary.

Keep the pilot honest by changing one variable at a time and writing down the decision criteria before you look at results. Define the pass-rate threshold, the maximum acceptable latency and the failure categories that block adoption. Then run the pilot with the same configuration you plan to operate, including the reverse proxy that allowlists only user-facing endpoints, because the vLLM --api-key option does not cover every route. Treat the pilot's output as a decision record: which model, which serving stack, which hardware assumptions, which known failure modes and who owns each mitigation. If the pilot clears the gates, the record supports the purchase. If it does not, the same suite has still narrowed the candidates and the cost of learning that was small compared with hardware commitments.

How DeployOpen scopes and delivers an open-weight model comparison

DeployOpen approaches a comparison of open-weight models as a written, fixed-scope engagement. We define your tasks and test data first, then set up promptfoo and the candidate models inside infrastructure you control so the results reflect your own workload before any self-hosting decision is made.

How we scope

  • Agree in writing which tasks, datasets and open-weight models (such as DeepSeek, Mistral, Qwen or Llama) the comparison covers.
  • Define assertions, judge models and pass criteria for each task, so results can be compared across candidates.
  • Confirm the serving paths to test, such as Ollama on a workstation or vLLM on accelerators you operate, and who provides the hardware.

How we build

  • Set up promptfoo with a shared configuration so every candidate model receives identical prompts and test cases.
  • Run candidates locally through Ollama or through an OpenAI-compatible vLLM endpoint, and record latency, output quality and failure modes.
  • Lock the test suite and run configuration under version control so the comparison can be rerun when models or prompts change.

How we hand over

  • Deliver the eval suite, configuration files and run reports, with instructions for rerunning the comparison in your environment.
  • Document the decision record: results per task, the hardware and serving assumptions behind each result, and open risks.
  • Walk your engineering and security teams through the findings, including what the results do not show about production load.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers when new model releases need re-evaluation.
  • Retesting can follow promptfoo and serving-engine upgrades, so comparisons stay valid as the stack changes.
  • Support scope, response expectations and any service levels are agreed in the written scope before work starts.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.