Sizing NeMo Guardrails: CPU for the library, GPUs for safety models

NeMo Guardrails sizing splits into a CPU-bound guardrails server and GPU-bound safety models it calls. This page explains how to estimate each, how every added rail changes model calls per request, and how to load test before launch.

On this page

Sizing NeMo Guardrails before you put it in front of users

If your team plans to run NeMo Guardrails in production on infrastructure you control, you need capacity numbers before you buy hardware, and the server and its safety models have different hardware profiles. The guardrails server and the library run on CPU. Many of the checks they perform, such as self-check moderation, topic control, jailbreak detection and PII models, call language or classifier models that usually need GPUs to respond at an acceptable pace. Sizing has to cover both tiers, and it has to happen before launch, before you add a new rail to an existing configuration, and before an auditor asks how the system behaves under load.

The library is open source under the Apache 2.0 license, and the current release is 0.25.0, which requires Python 3.11, 3.12 or 3.13. That license covers the code, not the hardware, the model endpoints or any support you buy. This page sizes the guardrails server and the model calls it makes. It does not quote throughput or latency figures, because none have been supplied for this release, and any figure you see elsewhere should be measured against your own configuration. Confirm the exact model hosting options and their resource requirements with the vendor or the model documentation for the models you plan to use.

The main sizing driver is how many model calls one user request triggers. Each rail you enable, including input, dialog, retrieval, execution and output rails, can add one or more calls to a safety model or to your main LLM, so the same traffic can produce very different load depending on configuration. Before you estimate hardware, list every rail in the config.yml file, note which ones call a model, and count the calls per request in your expected traffic mix. Then run a load test against a staging server with a representative configuration and a realistic request pattern. Treat the results as the baseline for your capacity plan, and rerun the test whenever you add a rail or change a model.

How a request fans out into model calls

A request enters the guardrails server, where the CPU-bound process runs input rails first. Each rail that needs a safety model sends a call to a GPU-backed endpoint you run, and only then does the application's LLM call happen. Output rails repeat the pattern on the response. Check each arrow for how many model calls it adds per request, since every rail multiplies your GPU load.

Model calls per request, split between CPU work in the server and GPU endpoints.

What drives CPU load in the guardrails server

The guardrails server does its own work before and after every model call, and that work runs on CPU. The cards below separate the runtime, flow execution, configuration, custom actions, serialization and concurrency settings, because each one scales differently and needs its own measurement before you commit to a node size.

Python runtime and version

Release 0.25.0 requires Python 3.11, 3.12 or 3.13, so the interpreter version is a platform decision you make before sizing. Confirm the version your base image ships and pin it, because interpreter changes can shift per-request CPU time. Record the exact package versions in your build so load test results can be reproduced after an upgrade.

Supported Python versions
3.11 to 3.13
PyPI package

Colang parsing and flow execution

Colang files are parsed when configurations load, and flows are evaluated on every request. The number of active flows, the rails attached to each stage and the depth of multi-turn dialog logic all add CPU per turn. Keep a count of flows per configuration and test the heaviest path, not only a simple greeting.

Configuration loading and reloads

Loading a configuration folder costs CPU at startup and whenever the server reloads it. A server holding many configurations or large Colang sets can spend noticeable time on this work, which matters for restart windows and for pods that start under load. Measure cold start time for your largest configuration and plan replica startup around it.

Custom Python actions

Custom actions run inside the guardrails process unless you move them elsewhere, so their cost is added to every request that triggers them. Regular expression checks, parsing libraries and synchronous calls to internal services can each dominate the request time. Ask the team that writes the actions to profile them separately, and confirm whether any blocking call inside an action ties up a worker.

Request serialization and payload size

Every request and response is parsed from JSON and rebuilt into message objects, and long conversation histories or large retrieved chunks increase that cost. Retrieval rails that pass many chunks through the server multiply the work. Test with realistic payload sizes from your own traffic, and record the largest payloads your applications send.

Worker and concurrency settings

The number of worker processes and the concurrency each one handles set how many requests share a CPU core. Too few workers leave cores idle, while too many compete for memory and cause contention. Tune these settings with a load test that ramps concurrent flows, and watch CPU saturation and request latency together rather than alone.

NeMo Guardrails docs

Sizing GPUs for safety models by deployment choice

When you run the content safety, topic control, jailbreak detection or GLiNER-PII models as NIM containers, model inference runs on your GPUs. Each rail that calls one of these endpoints adds a GPU-bound request to the request path, while the guardrails server keeps handling HTTP, Colang flow logic and orchestration on CPU. Capacity depends on how many NIMs you run, which models they load and how many requests reach them after each rail's trigger conditions are applied.

  • Model count: Each NemoGuard model you enable occupies its own accelerator memory, so the number of models often sets the minimum GPU count before traffic is considered.
  • Input and output checks: Input and output rails call these endpoints on every request they cover, so both directions add to GPU load.
  • KV cache reuse: Enabling KV cache reuse changes GPU memory use, so test memory with and without it at your expected prompt lengths.
  • Hardware and driver matrix: Confirm supported GPU models, driver and CUDA versions, and minimum memory for each NIM tag with NVIDIA before ordering hardware.

Check the support matrix for each model version and ask NVIDIA for the memory and throughput figures you plan against, using the NeMo Guardrails documentation as your starting point.

How each added rail changes model calls per request

Every rail you enable adds work to each user request, and most of that work is model calls. NeMo Guardrails provides five rail types. Input rails run on the user message before the main model sees it, and a self-check input rail typically adds one model call that asks a moderation prompt to judge the message. Dialog rails decide how a conversation proceeds, so they can add calls when Colang flows need the model to classify intent or pick a next step. Retrieval rails inspect the chunks your RAG pipeline returns, which adds calls when a checker model or fact-checker runs per chunk. Execution rails wrap custom actions and tool calls, so each tool invocation can trigger its own checks and any downstream API calls. Output rails review the generated response, often with another model call after generation. Count these per rail, not per request, because a single user turn can pass through several of them.

Build a per-request call budget by tracing a test request through each configuration, not by reading the config file alone. Start with the happy path: a normal message that passes every rail, and count the main model call, each rail's checker call, each retrieval step and each action call. Then count the blocked path, where an input rail stops the request early and fewer calls run, and the retried path, where an output rail rejects a response and the flow regenerates it, which can repeat the main model call and its checks. Multiply the retry case by the retry limit your flows allow. Use the most expensive realistic path as your sizing figure for GPU and CPU headroom. Confirm the exact calls each configuration makes by enabling logging or tracing in a non-production environment, sending representative requests and comparing the trace against your count. Rail behavior changes between versions and with Colang 1.0 versus 2.x, so repeat the trace after each upgrade.

Load testing NeMo Guardrails before launch

This sequence turns sizing estimates into measured limits: it shows how the guardrails server and its safety model endpoints behave under realistic traffic, where they saturate, and how they fail. The result is a tested capacity figure and a set of overload and detector outage checks that the launch decision can rely on.

  1. Define representative traffic and prompt mix

    The product owner and the platform team write down the request types the assistant receives, their share of total traffic, typical and long prompt lengths, multi-turn conversation depth, and whether requests use RAG retrieval or tool calls. Separate interactive traffic from batch traffic if both exist. Done means a written traffic profile and a prompt corpus sampled from logs or synthetic data that matches it, with the sample source recorded. Synthetic prompts should be labeled as such in the test report so results are not mistaken for production data.

  2. Build a baseline configuration matching production rails

    The platform engineer deploys the same guardrails server image, config.yml, Colang files, and actions as production into a staging environment, pointed at the same kinds of safety model endpoints (local NIMs, CPU-hosted classifiers, or external services). Every rail that runs in production must be enabled in the test, including input, output, dialog, retrieval, and execution rails. Record the image tag, configuration version, and model endpoint versions. Done means a configuration diff against production shows no differences in enabled rails or model settings.

  3. Run single-request and warm-up measurements

    Before any concurrency test, send single requests from the prompt corpus one at a time and record the latency each rail adds, along with the number of model calls per request. Include a warm-up period so caches, connection pools, and model loading are not counted as steady-state behavior. Compare the measured model call count per request with the count predicted in the sizing model. Done means a per-rail latency and call-count table that explains where request time goes, and any gap from the sizing estimate is explained before load starts.

  4. Ramp concurrency and capture the key metrics

    The performance engineer runs stepped concurrency tests, increasing the number of simultaneous requests in fixed increments and holding each level long enough for measurements to stabilize. At each level, capture p50 and p95 latency, throughput, CPU utilization on the guardrails server, GPU utilization and memory on the safety model nodes, queue depth where visible, and the error rate by status code. Run the same test against the action server and detector services if they are separate deployments. Done means a table per concurrency level with all metrics on one timeline, so the first bottleneck is visible.

  5. Find the saturation point and the bottleneck

    Identify the concurrency level where p95 latency rises sharply, errors start, or throughput stops increasing. Determine which resource was saturated first: server CPU in the Python process, GPU compute or memory on a safety model node, the action server, or an external dependency. Confirm the finding by changing one variable at a time, such as adding a replica or moving a rail to a second GPU, and repeating the step. Done means a documented saturation point for the tested configuration, the limiting component named, and a recommended operating ceiling that leaves headroom for traffic spikes. Capacity figures apply only to the tested configuration and traffic mix.

  6. Test overload behavior and detector outages

    Push load beyond the operating ceiling and confirm the system responds in a designed way: health endpoints remain accurate, requests are rejected or queued with explicit responses instead of hanging, and no request silently skips a rail. Then stop or degrade each safety model endpoint, one at a time, and send known-unsafe prompts. Check whether the server fails closed, returns an error, or passes the request unchecked, and whether monitoring raises an alert. A detector outage that lets requests through without any signal changes protection and must be treated as a launch blocker until the behavior is decided and tested. Done means a written result per failure mode with the agreed behavior.

  7. Repeat the tests after each rail or model change

    Rerun the baseline and ramp tests whenever a rail is added or removed, a model or prompt changes, the configuration version changes, or the server image is upgraded. Compare results against the stored baseline and flag any increase in model calls per request, latency, or error rate. Confirm whether the change affects the operating ceiling and update the capacity figures the team uses. Done means each change has a short test record linked to the configuration version, and the production capacity limits stay tied to what was actually measured.

Sizing choices and when each fits

This table compares the four sizing decisions that shape capacity for NeMo Guardrails: where the library runs, how many replicas serve traffic, how safety models share GPUs, and where heuristics run. Read each row as a trade-off between capacity headroom and the operational work your team takes on. Capacity numbers depend on your own load tests, so the table names the drivers rather than fixed figures.

DecisionOptionCapacity trade-offOperational cost and when it fits
Where the library runsEmbedded in the application processGuardrail CPU work competes with your application's own CPU and memory, so the host must be sized for both.Lowest network hop and no extra service to run. Fits a single application with one owner who controls the configuration.
Where the library runsCentral guardrails serverCapacity is planned for the guardrails workload alone and can scale apart from applications.Adds a service to deploy, monitor and secure, but one policy set serves several teams. Fits shared policy across applications.
Replica countSingle replicaOne process limits concurrent requests and offers no headroom during restarts or upgrades.Simplest to operate. Acceptable for low, predictable traffic or non-production use, confirmed by load tests.
Replica countSeveral replicas behind a load balancerThroughput scales with replicas, and the server has no built-in replication, so the load balancer, health checks and overload handling are yours to build.More infrastructure and configuration to run. Needed when load tests show a single replica cannot meet latency targets or when restarts must not drop traffic.
Safety model placementCo-located on shared GPU nodesModels compete for GPU memory and compute, so one heavy model can slow another rail on the same node.Lower hardware count and simpler scheduling. Fits moderate traffic and models with known, compatible memory footprints.
Safety model placementDedicated GPU nodesEach model's latency and memory are isolated, and capacity can be sized per model from its own measurements.More nodes to buy or reserve and more endpoints to monitor. Fits high traffic or strict latency requirements per rail.
Heuristics and detectorsIn-process heuristicsDetector work runs inside the guardrails process and adds CPU load to every request that reaches it.No extra service, but the documentation directs production use away from this option. Typically limited to development and testing.
Heuristics and detectorsSeparate containersDetector capacity is scaled and measured independently of the guardrails server.Another deployment to run, monitor and keep available, because a detector outage changes which requests are protected. Recommended for production.

Questions teams ask about NeMo Guardrails capacity

What drives the cost of sizing NeMo Guardrails?

The cost is driven by how many rails are enabled, how many model endpoints each request touches, and how many environments and traffic patterns need to be measured. The main cost components are the people who profile your traffic, benchmark each rail, and write the capacity model, plus any load testing tools and temporary test hardware. Sizing is usually a one-time effort that repeats when you add rails, change models, or change traffic shape. Ask any quote to list each rail and each safety model separately, the environments covered, and whether the load tests and final report are included.

How long does a NeMo Guardrails sizing exercise take?

Duration depends mainly on how many rails are in the configuration, whether the safety models run on your GPUs or elsewhere, and how much representative traffic you can supply for testing. A single input check on the CPU-bound server is quicker to measure than a pipeline that calls several GPU-hosted classifiers per request. Environment access also matters, since GPU node availability and change approval often set the pace. No duration is supplied for this work, so ask any partner to tie its timeline to a written scope and to name the rails and environments it covers.

What must our team provide before a sizing study starts?

The study needs four inputs. First, a traffic profile: request rate, peak patterns, average and largest prompt sizes, and streaming use. Second, the guardrail configurations you plan to run, including the config.yml files, Colang files and any custom actions. Third, a GPU inventory: accelerator models, memory, node counts, and which nodes are shared with other workloads. Fourth, latency targets for each request path, such as time to first token and end-to-end response time. Missing any of these means the capacity figures will rest on assumptions, so ask for them to be listed in the scope.

Can our internal team size NeMo Guardrails without outside help?

Yes, a team with load testing experience and access to the configuration and GPU hardware can do the work in-house. The skills needed are load test design, reading per-rail model call counts, GPU memory and throughput measurement, and interpreting latency percentiles. Internal teams often find it harder to build a representative traffic mix and to keep test environments separate from production. Outside help is most useful when the configuration changes often or when the result must be defended to a compliance or architecture review. Confirm which of these skills and hardware your team already has before deciding.

Does the NeMo Guardrails microservice sunset change the sizing plan?

It can change the plan, because the microservice and its container have been retired and the sizing work depends on which runtime you deploy. NVIDIA says the NeMo microservices were sunset as of October 1, 2026, with no new releases, and that new development has moved to NeMo Platform. If you run the open-source library or a self-built server image, the capacity model should be built on that package, currently release 0.25.0, which requires Python 3.11, 3.12 or 3.13. Confirm with your NVIDIA account team how existing microservice users should proceed, and re-check the runtime before finalizing numbers.

How do added rails change model calls per request?

Each enabled rail can add one or more model calls, so capacity scales with the rail count on each path, not with traffic alone. Input rails run before the main model, output rails run after it, and retrieval, dialog and execution rails add their own steps. A self-check rail usually calls a language model, while a safety classifier calls a dedicated endpoint. The effect is best measured by counting calls per request in a test run for each rail combination you plan to ship. Ask any partner to report calls per request by rail, not only overall throughput.

Do we need a DeployOpen sizing study or can a vendor estimate it?

Vendor estimates can give a starting point, but they usually use the vendor's test traffic and hardware, not yours. DeployOpen plans, implements, tests and documents self-hosted platforms in infrastructure you control, so a sizing study would run against your configurations, your GPUs and your traffic profile. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that written scope. Ask for the rails tested, the environments covered, the load test method, and the form of the final capacity report before comparing options.

Limits to confirm in your environment

The numbers you produce from this sizing exercise depend on hardware, software versions and traffic that vary by deployment. The cards below list the assumptions to remove before you commit to a capacity plan, and who can confirm each one.

Vendor hardware requirements for safety models

Each NemoGuard or other safety model you self-host has its own accelerator, memory and driver requirements, set by the vendor that packages it. Do not borrow GPU counts from another model or from this page. Ask NVIDIA for the supported GPU models, memory per model, and the container and driver versions for each NIM you plan to run, then confirm them with your hardware vendor for the exact SKUs you buy. Record the answers next to your capacity figures.

NeMo Guardrails docs

No built-in autoscaling in the open-source server

The open-source guardrails server does not scale itself. Replica counts, scaling triggers and the rules for adding GPU capacity are your responsibility, whether you run containers or Kubernetes. Decide in advance how many replicas serve your peak, how quickly new replicas become ready, and what happens to in-flight requests during a scale-down. Test those behaviors instead of assuming them.

No built-in high availability

The server does not provide load balancing, redundant safety model endpoints or overload responses out of the box. A single replica or a single safety model endpoint becomes a single point of failure for every request that passes through it. Plan the replicas, health checks and fallback behavior for each detector, and confirm how your application behaves when a detector is unreachable, because that choice changes which requests are protected.

NeMo microservice sunset

NVIDIA sunset the NeMo Guardrails microservice as of October 1, 2026, and no new releases or support will follow for that artifact. Any sizing that assumed the microservice container must be redone against the open-source server image you build, or against the platform NVIDIA points to. Ask your NVIDIA account team how existing users should move, and do not treat the archived documentation as current guidance.

Sunset notice

Load results depend on your workload

A throughput number from a test is only valid for the prompts, rails, models and concurrency that produced it. Changing the number of input or output rails, enabling a fact-checking or hallucination rail, or raising average prompt length each changes model calls per request. Build a test set from your real traffic shape, run it against the same configuration you will ship, and repeat the test after every rail or model change.

Verification against your own traffic

Before launch, confirm each figure in your plan with a load test against your own infrastructure. Measure p95 latency, error rates and GPU memory under sustained and burst load, not only averages. Ask your hardware vendor to validate the GPU sizing on the SKUs you purchase, and ask NVIDIA to confirm supported combinations. Keep the test report with the configuration version it was run against.

How DeployOpen scopes and delivers NeMo Guardrails sizing

DeployOpen approaches sizing as a written, fixed-scope exercise: we measure the guardrails server, the safety models it calls and the traffic your application actually sends before recommending hardware. The result is a capacity model your platform and security teams can review, test and maintain in infrastructure you control.

How we scope

  • Confirm the NeMo Guardrails version, Python runtime and whether you run the library in-process or the HTTP server.
  • List every rail in each configuration and the model calls each one makes per request.
  • Agree in writing which safety models run on your GPUs, which run elsewhere, and which load tests count as acceptance.

How we build

  • Build a request-path model showing CPU work in the server and GPU time in each safety model endpoint.
  • Run load tests with traffic shaped like your production mix, including blocked, rewritten and allowed requests.
  • Record latency percentiles, error rates and saturation points for each component, then compare them with the capacity model.

How we hand over

  • Deliver the sizing model, load test scripts, raw results and the assumptions behind each capacity figure.
  • Document the scaling thresholds, alert points and the steps to re-test after a configuration or model change.
  • Walk your platform, security and compliance teams through the evidence so they can review it without us.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer when capacity needs change over time.
  • Re-run load tests after NeMo Guardrails upgrades, new rails or changes to the safety models your team deploys.
  • Confirm with your team which environment, hardware and vendor terms apply before any capacity figure goes into production.

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.