NeMo Guardrails vs Llama Guard

NeMo Guardrails is a framework for programmable rails around an LLM app, while Llama Guard 4 is a classifier model you call for safety labels. Most teams with both on the shortlist need to decide whether they want a policy engine, a model, or both.

On this page

NeMo Guardrails vs Llama Guard: when your team should choose each

Start with the question your team must answer first: do you need a classifier that labels risky content, a programmable policy layer that controls how the application behaves, or both? Llama Guard 4 is a 12-billion-parameter multimodal safety classifier pruned from Llama 4 Scout. It classifies both prompts and responses against the MLCommons hazards taxonomy and replaces Llama Guard 3-8B and 3-11B-vision in one model. On its own, it returns a safety verdict. It does not define conversation flow, your business topics, or what a tool call is allowed to do. NeMo Guardrails fills that gap with input, dialog, output, retrieval and execution rails, configured in Colang, so your team writes the policy and the framework enforces it at each point in the request path.

The two options are not mutually exclusive. NeMo's library includes a llama_guard rail with documentation for configuring Llama Guard content moderation and for self-hosting it with vLLM, so the classifier verdict can become one rail inside a Colang flow alongside dialog and execution checks. Before committing, confirm what that combination adds to your operations. Llama Guard 4 must run in your own environment, which means GPU capacity, a serving stack you patch, and added latency that you should measure on your own prompts. Decide early which rails run on every request and which run only on traffic the classifier flags, because that choice drives both cost and response time. The llama_guard rail documentation is the natural starting point for that check.

The license decision runs in parallel with the technical one. NeMo Guardrails is Apache-2.0 licensed, and its current release is 0.25.0. Llama Guard 4 ships under the Llama 4 Community License Agreement, so the model weights you deploy carry Meta's terms, separate from the framework's Apache-2.0 terms. Have legal review the Llama Guard 4 license against your intended use, including any acceptable use terms and obligations for hosted or redistributed copies, and confirm the position before production. If the terms are unacceptable for your regulated workload, a design built on NeMo's own rails, or a different classifier, becomes the starting point. Choose a classifier when you need hazard verdicts, a policy layer when you need business rules, and both when the license and operating cost are acceptable.

Which platform fits which scenario

This table maps common LLM deployment scenarios to the platform that fits each one better, and names the condition under which the other option is stronger. Llama Guard 4 is a classifier model that labels prompts and responses, while NeMo Guardrails is a runtime framework that orchestrates rails, so many teams end up using both through the llama_guard rail.

ScenarioBetter fitChoose the other option when
Single chat assistant that needs content moderationLlama Guard 4 on its own, if the goal is classifying prompts and responses against a hazard taxonomyYou also need fixed dialog flows, off-topic refusals or custom Colang policies, which Llama Guard 4 does not provide by itself
RAG app that needs topic control and retrieval railsNeMo Guardrails, because retrieval rails, dialog rails and topic safety sit in one configurationYour only requirement is to screen individual messages for hazardous content and you have no need for retrieval-level checks
Agent with tools that needs execution railsNeMo Guardrails, since execution rails apply to custom actions and toolsYour agent risk is mainly prompt injection in a model input, where a dedicated classifier such as Prompt Guard 2 may be the more direct tool (confirm fit with its own license terms)
Team that must review every componentDepends on the review: NeMo Guardrails is Apache-2.0 with a Python codebase to audit, while Llama Guard 4 adds Llama 4 Community License terms to reviewYour legal team cannot accept the Llama license terms, in which case a permissively licensed option is the better path
Team that wants a model with a published hazard taxonomyLlama Guard 4, which classifies against the MLCommons hazards taxonomyYou need to define your own policy categories, where NeMo's Colang rails give more control
Team that runs models on its own GPUs with vLLMLlama Guard 4 served through the llama_guard rail, since the library documents self-hosting with vLLMYou want no separate model server and can accept an approach based on rules and model calls within NeMo alone
Team needing a server endpoint for existing appsNeMo Guardrails server, which exposes a /v1/chat/completions endpointYour app already has its own gateway, so a classifier called as a library function is enough
Team that must confirm NVIDIA's roadmapConfirm the NeMo Guardrails library path, because the microservice was sunset on October 1, 2026You are already on the library and have confirmed your deployment target and Python version (3.11 to 3.13)

How each one is built and what that means for operations

Llama Guard 4 is a model you serve, while NeMo Guardrails is a Python library or server that applies rules around your application. The two sit at different layers, so their operating demands differ, and they can run together in one request path.

Llama Guard 4 is a model you serve

Llama Guard 4 is a 12-billion-parameter multimodal safety classifier pruned from Llama 4 Scout. It classifies both prompts and responses against the MLCommons hazards taxonomy. You host it yourself, so the operational questions are GPU capacity, model serving and the request latency that serving adds to every call. The NeMo Guardrails library documents a path for self-hosting Llama Guard with vLLM, so ask your platform team whether that serving stack fits your existing GPU pool.

Parameters
12B
Llama Guard 4 model card

NeMo Guardrails is a library or server

NeMo Guardrails runs as a Python API inside your application or as a guardrails server that loads configurations from a folder and exposes an HTTP API. A Dockerfile is provided to build a server image. Your rules live in Colang files, so policy changes are code changes that need review, testing and version control alongside the application.

Current release
0.25.0
NeMo Guardrails repository

Python version constraints for NeMo

NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13. Teams whose base images or application runtimes are pinned to an older interpreter will need to upgrade or isolate the guardrails service. Confirm the interpreter in your build pipeline early, because a mismatch blocks installation rather than failing at runtime.

nemoguardrails on PyPI

Two components to version and patch

Llama Guard is a model artifact with its own weights, license and update cycle, while NeMo Guardrails is a software package with its own dependencies and release cadence. Each needs a pinned version, a change record and a retest when upgraded. Ask who in your organization owns each component and how a model swap is validated before it reaches production.

Running both in one request path

The llama_guard rail lets NeMo Guardrails call Llama Guard as one of its checks, so a request can pass through Colang input rules, the classifier and output rules in sequence. Every added hop adds latency and a failure point. Test what happens when the model endpoint is slow or unavailable, and decide whether the application fails closed or open.

Check which NeMo release you deploy

The NeMo Guardrails microservice was sunset on October 1, 2026, so a container image from NGC will receive no new releases. Confirm you are deploying the open-source library or server from the NVIDIA-NeMo repository rather than the retired artifact, and check the migration guide before you adopt the deprecated LLMRails class.

Colang 2 migration guide

How a request flows through NeMo rails and Llama Guard

The request starts with the user and enters the NeMo Guardrails input rails inside the application's trust boundary. When the llama_guard rail is configured, the prompt goes to a self-hosted Llama Guard endpoint, which returns a classification the rail turns into allow or block. Only allowed input reaches the model, and output rails check the response before it returns. Check where the block decision is returned, and confirm which endpoint your deployment calls and what it logs.

Request path through NeMo rails and a self-hosted Llama Guard check, with block decisions returned to the user.

Capability comparison: classifier labels against programmable rails

This table compares what each option classifies or enforces, how it covers dialogs, tools and multimodal input, and how each is licensed and maintained. Read it as a split between a model that labels content and a framework that decides what happens to it. The main takeaway is that the two are often combined, and the licenses and maintenance status should be checked before either goes into production.

CapabilityNeMo GuardrailsLlama Guard 4
LicenseApache-2.0 library, developed in the NVIDIA-NeMo/Guardrails repositoryLlama 4 Community License Agreement, which governs use of the model weights
What is classified or enforcedInput, dialog, retrieval, execution and output rails that can block, rewrite or route messagesClassifies both prompts and responses against the MLCommons hazards taxonomy and returns labels
Dialog and topic controlColang flows and topic safety rails define allowed conversation paths and off-topic handlingNot provided by the model itself; topic limits must be built in the surrounding application
Execution rail coverage for toolsExecution rails check custom actions and tools; a tool safety check is included in the libraryDoes not evaluate tool calls; tool permissions must be enforced by the application
Multimodal inputDepends on the rails and models configured; confirm image handling for your setupMultimodal: the model is designed to classify both text and image content
Self-hosting pathRuns in your Python process or as a guardrails server packaged with a Dockerfile; Python 3.11, 3.12 or 3.13 required for 0.25.0Self-hosting with vLLM is documented through the llama_guard rail; confirm GPU and serving needs for your hardware
Server or API exposureGuardrails server loads configurations from a folder and exposes an HTTP API, including a /v1/chat/completions endpointExposed only through whatever serving layer you deploy, such as vLLM or your own endpoint
Maintenance statusCurrent release 0.25.0 (November 2026); the NeMo microservice was sunset on October 1, 2026, so confirm which deployment path you useModel card and license published by Meta; confirm the current model version and license terms with Meta before deployment

What the Apache-2.0 and Llama license terms require

NeMo Guardrails is licensed under Apache 2.0, and the LICENSE.md in the repository sets out the terms for the library code you download, modify and run. The current release is 0.25.0, published on November 19, 2026 to PyPI with the Apache-2.0 license expression, and the previous release was 0.24.1 on September 16, 2026. The license conditions, such as keeping notices when you redistribute, travel with the source and the package, so your build pipeline needs to preserve them.

  • Library code: Apache-2.0 covers the NeMo Guardrails library and its bundled rails, including the llama_guard rail, so you can review and pin that code like any other dependency.
  • Version pinning: Version 0.25.0 requires Python 3.11, 3.12 or 3.13, and it deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0.
  • Third-party models: Rails can call models that carry their own terms, such as Llama Guard, so each model license is separate from the Apache-2.0 grant on the library.
  • Redistribution: If you build a container from the provided Dockerfile or bundle the package into a product, keep the license and notice files with the artifact.
  • Hosted artifacts: The NGC microservice container is no longer supported, so your license review should cover the open-source library you deploy, not that container.

Ask counsel and your security team which version you will pin, which third-party models you will call, and how license notices are kept in your build.

What drives the running cost of each option

Running cost for either path comes from the compute that serves each check, the engineering time spent on policies and tests, and the upgrade and support work that follows. The cards below separate the cost of a self-hosted classifier from the cost of a rails framework, so you can ask each vendor or partner for a quote that covers the same items.

GPU or inference capacity for Llama Guard

A self-hosted Llama Guard 4 is a 12-billion-parameter model, so it runs on GPU or accelerator capacity that you provision, patch and monitor in your own environment. Its cost recurs with uptime, peak request volume and redundancy for every prompt and response it screens. Ask for the hardware class, the serving stack, such as vLLM as documented in the NeMo llama_guard rail, and the capacity plan for your peak load.

Llama Guard 4 parameters
12B
Llama Guard rail docs

CPU and latency budget for rails

NeMo rails run in the request path, and each input, dialog or output rail that calls a model adds latency and inference load on top of the application model. The cost depends on how many rails run per turn, whether they call an LLM or a local classifier, and how much CPU the Python service needs. Ask the vendor or partner to measure end-to-end latency with your rail set enabled and to state which rails call a model.

Engineering time for Colang policies

Colang policies for dialog, topic and execution rails are written, reviewed and changed by people who understand your product and your risk appetite. This labor is usually the largest recurring cost in a NeMo deployment and rises with the number of intents, flows and custom actions. Ask for the expected number of flows in scope, who owns policy changes after handover, and how much of the work is one-time versus ongoing.

Evaluation and regression testing

Every policy change or model swap can alter which prompts are blocked, so you need a fixed set of test prompts, expected outcomes and a repeatable run in CI. Building that suite is a one-time cost, while running it and expanding it for new attacks recurs. Ask whether the scope includes a regression suite, who maintains the labeled cases, and how false positives on legitimate traffic will be measured.

Upgrades across the LLMRails deprecation

NeMo Guardrails 0.25.0 deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0, and NVIDIA publishes a 0.25 migration guide. Moving code and configurations to the new class is a one-time task that recurs at each breaking release. Llama Guard also changes when you move to a new model generation. Ask for the upgrade path, the test coverage that proves behavior is unchanged, and who handles each migration.

Colang 2 migration guide

Support and license obligations

NVIDIA's NeMo Guardrails is Apache-2.0 licensed, while Llama Guard 4 ships under the Llama 4 Community License Agreement, so the model carries its own terms that your legal team must review. Support options differ: community channels for the library, and a support contract or implementation partner for the rest. Ask who answers incidents for the model and the library, what terms apply to the Llama license, and whether the scope includes ongoing support retainers.

Moving between a classifier and a rail framework

This sequence shows how a team moves from a Llama Guard-only check to NeMo rails, or adds Llama Guard to an existing NeMo deployment, without losing the policy decisions already made. The output is a cutover decision backed by regression results on the same test set.

  1. Inventory the current moderation decisions

    The security or product owner lists every category the current setup blocks, the action taken for each (refuse, redact, escalate) and where each check sits in the request path. Engineering confirms which checks run on prompts, which run on responses and which run on retrieved content or tool calls. The step is done when the list is signed off and every row maps to a named owner. This inventory is the baseline for everything that follows.

  2. Map labels to NeMo rail types

    Engineers match each inventory row to a NeMo Guardrails rail type: input rails, output rails, dialog rails for conversation flow, retrieval rails for RAG chunks or execution rails for tools. Rows that are pure content classification usually map to the llama_guard rail or a self-check moderation rail, while topic and conversation boundaries need Colang flows. The output is a mapping sheet that marks each row as carried over, rebuilt or dropped with a written reason. Ask the vendor or the repository docs to confirm which built-in rails your release version ships.

  3. Carry over label policies and test prompts

    Teams keep the category definitions, the allow and deny examples and the labeled test prompts they already own, since these describe the risk and not the tool. They store the prompts in a versioned file that both the classifier-only path and the NeMo path can read. Each prompt gets its expected outcome recorded before any new configuration is written. The step is complete when the test set runs from the repository and produces the same baseline results on the current system.

  4. Rebuild Colang flows and thresholds

    Engineers write the NeMo configuration in Colang, including the flows for dialog and topic boundaries, the rail order and the refusal messages. Where a classifier threshold existed, the team sets an equivalent in the rail configuration and records why the value was chosen. The NeMo configuration is kept separate from application code so that policy changes are reviewed as configuration. The step closes when the configuration loads cleanly in a test environment and each rail is visible in the logs.

  5. Wire Llama Guard into the rail chain

    If Llama Guard stays in the stack, engineers connect it through the llama_guard rail, following the documentation for configuring content moderation and for self-hosting the model with vLLM. The team confirms which model version and license terms apply to the deployment, because the Llama 4 Community License Agreement governs Llama Guard 4. The check passes when a test prompt is classified by the model and the rail decision appears in the audit log with the same identifiers as other rails.

  6. Run regression tests before cutover

    The team runs the full labeled test set against the old path and the new path side by side, then compares each result. Any prompt whose outcome changed is reviewed by the policy owner, and every intended change is recorded. Security testers add adversarial prompts for jailbreak and injection, and they confirm that latency and error handling still meet the application's needs. Cutover proceeds only when the owner signs off on each changed outcome and the logs show every decision was captured.

  7. Cut over and keep the old path for rollback

    Operations switches traffic to the NeMo path in a staged way, with the Llama Guard-only path kept deployable until the new path has run cleanly in production. The team monitors blocked and allowed rates against the baseline and reviews a sample of decisions each day. The output is a documented rollback procedure and a dated record of the cutover. Engineers then retire the old check only after the owner confirms the rollback is no longer needed.

Where implementation projects usually run long

The longest stretch on a NeMo Guardrails project is usually policy design, not installation. Installing the library is quick compared with agreeing on policy ownership for each rule. Someone has to decide which topics are out of bounds, which answers need a dialog rail, and what happens when a Colang flow conflicts with a rule the security team wrote separately. When ownership is unclear, the Colang files get edited by whoever is on call, and the rails drift from the written policy. Before work starts, name one owner for each rail type (input, dialog, retrieval, execution and output) and confirm that your team can read and version the Colang files and the configuration folder the server loads. Also check the runtime: NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13.

On the Llama Guard side, the first delay usually comes from access and serving. Llama Guard 4 ships under the Llama 4 Community License Agreement, so legal and procurement should read that license and confirm the terms that apply to your deployment before the model enters your environment. Then decide where the 12-billion-parameter model will run. NeMo's llama_guard rail documentation covers self-hosting Llama Guard with vLLM, so the platform team needs GPU capacity, a serving stack and a network path from the guardrail process to that endpoint. Confirm hardware requirements against the model card and your own environment. If you also plan to use Llama Prompt Guard 2, add its license to the same review, since LlamaFirewall is MIT-licensed while the Llama models are not.

Questions buyers ask before hiring outside help

Is Llama Guard alone enough to guard an LLM application?

Llama Guard alone is enough only when the risks you must block are content hazards that its classifier already covers. Llama Guard 4 is a 12-billion-parameter multimodal safety classifier that labels both prompts and responses against the MLCommons hazards taxonomy. It does not enforce conversation flows, topic boundaries, retrieval checks or limits on which tools an agent can call. If your policy requires the assistant to stay within one product domain, follow a scripted escalation path, or restrict agent actions, you need a framework layer such as NeMo Guardrails around the classifier. Ask your security team to list the hazard categories and conversation behaviors the policy requires, then test the combined setup against that list before deciding.

What drives the cost of running Llama Guard in our own infrastructure?

The main costs come from hosting, serving, and people, and each one depends on your own environment. Hosting a 12-billion-parameter model needs accelerator capacity sized to your request volume and latency targets. The serving stack adds setup and operating work, and the NeMo Guardrails llama_guard rail documents self-hosting Llama Guard with vLLM. Each classified prompt and response adds latency and compute to the request path, so the number of checks per request matters. One-time costs include integration, evaluation and policy testing. Recurring costs include compute, monitoring, and staff time for model and library upgrades. When you request a quote, ask the provider to itemize hosting, serving setup, integration, testing and retainer support separately, so you can see which costs scale with traffic.

Can NeMo Guardrails run without the NeMo microservice?

Yes. NVIDIA sunset the NeMo microservices on October 1, 2026, and the NGC container states there will be no new releases and no ongoing support. The open-source library does not depend on that microservice. NeMo Guardrails 0.25.0 is Apache-2.0 licensed and can be called through its Python API or run as a guardrails server that loads configurations from a folder and exposes an HTTP API, with a Dockerfile provided to build a server image. The package requires Python 3.11, 3.12 or 3.13. Version 0.25.0 also deprecates the LLMRails class in favor of Guardrails, with removal planned no earlier than 0.27.0, and NVIDIA publishes a 0.25 migration guide. Existing microservice users should contact their NVIDIA account team, as NVIDIA's archived documentation advises.

How long does a Llama Guard and NeMo Guardrails deployment take?

No researched timeline is available for this combination, so the duration depends on the scope you agree in writing. The main drivers are the number of rails you need (input, dialog, retrieval, execution and output), whether existing configurations need migration to the Colang 2 syntax, and how the classifier is hosted in your environment. Identity integration, logging destinations and change control in a regulated environment also add steps, as does the testing needed to show the controls work. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. Ask any provider for a written plan that lists each deliverable, the environment access it needs, and the review gates your compliance team will require.

What does the team need to supply before an engagement starts?

Most delays come from missing inputs, so gather these before scoping begins:

  • Access to the environment where the system will run, such as a cloud account, data center or air-gapped network, plus the accelerator capacity to host the 12-billion-parameter classifier.
  • A named policy owner who can list the hazard categories, blocked topics and escalation rules the guardrails must enforce.
  • Representative prompts, sample conversations and the retrieval sources or tools the application uses, so rails can be tested against real behavior.
  • The identity provider for SSO, the logging destination for audit records, and the change process your security team uses for production.
  • Legal review of the Llama license terms that apply to the model version you plan to deploy.

Without these inputs, the written scope will be vague, and the testing evidence your compliance team asks for will be harder to produce.

Can our own engineers deploy and maintain this without outside help?

Yes, if your team has Python skills, experience operating model serving infrastructure, and time to write and test policies in the Colang language. Staff who already run GPU workloads and maintain CI pipelines usually handle the deployment work. The ongoing load is higher than the first deployment. NeMo Guardrails publishes frequent releases, with 0.24.1 on September 16, 2026 and 0.25.0 on November 19, 2026, so someone must track breaking changes and retest policies after each upgrade. Testing for prompt injection and jailbreaks is a separate skill from writing rails, and many teams underestimate it. If you build in-house, assign owners for classifier operations, policy maintenance and adversarial testing. If you want outside help, DeployOpen plans, implements, tests, documents and supports self-hosted platforms in your infrastructure, and ongoing support is available as a retainer.

What does the Llama license require when we deploy Llama Guard?

Llama Guard 4 ships under the Llama 4 Community License Agreement, as set out in the LICENSE file for that model. The license, not this page, defines your obligations, including any attribution, redistribution and acceptable use terms, so have your legal team read the full text before deployment. License terms differ across the Purple Llama components. Its evals, benchmarks and Code Shield are MIT licensed, while its models use the matching Llama Community License. LlamaFirewall is MIT licensed, but its AlignmentCheck scanner requires a Together API key. NeMo Guardrails itself is Apache-2.0 licensed, so the Llama terms apply to the classifier, not to the framework. Confirm which model version and license apply to the version you deploy, and record that decision in your third-party software inventory.

How DeployOpen helps choose and implement guardrails

DeployOpen plans, implements, integrates, hardens, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For a choice between NeMo Guardrails and Llama Guard, we start from the written scope and the controls your compliance and security teams need to review.

How we scope

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • The written scope states which application flows, rails and model endpoints are covered for NeMo Guardrails or Llama Guard.
  • We confirm your hosting target, Python version and whether a Llama Guard model can run in your environment.

How we build

  • We configure the llama_guard rail or NeMo rails in your environment, with the Colang policies your team has approved.
  • We test the setup against prompt injection, jailbreak and data exposure cases before it reaches production traffic.
  • We check the Llama 4 Community License terms against your intended use and record the review in the project file.

How we hand over

  • Handover includes configuration, deployment notes, test results and the evidence your compliance team asked for.
  • Documentation covers how each rail is configured, what it blocks, and which settings change its behavior.
  • We explain what DeployOpen prepares for assessments and that independent auditors issue any audit report or certification.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, agreed separately from the initial scope.
  • Retainers can cover tracking NeMo Guardrails releases and retesting rails after a version change or a model swap.
  • Support scope, response expectations and terms are set in the written agreement, so you can confirm them before signing.

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.