NeMo Guardrails vs Llama Guard

NeMo Guardrails is an Apache-2.0 framework for programmable rails around an LLM app, while Llama Guard 4 is a safety classifier model under the Llama 4 Community License. Many teams need both, and this page shows how to decide.

On this page

When to choose NeMo Guardrails vs Llama Guard 4

Choose NeMo Guardrails when you need a framework for dialog, topic, retrieval and execution rails around your LLM application, and Llama Guard 4 when you need a 12-billion-parameter classifier that labels prompts and responses against the MLCommons hazards taxonomy. Llama Guard 4 answers one question per message: does this content fall into a hazard category. NeMo Guardrails decides what your application does about it, including which topics it will discuss, which tools it may call and how a conversation should be steered. The decision turns on three questions: whether you need policy logic beyond classification, which license terms your legal team will accept, and who will write and maintain the policies.

Start with the license. Llama Guard 4 ships under the Llama 4 Community License Agreement, so your legal team should read its terms against your deployment, user base and any redistribution you plan, and confirm them in the LICENSE file in the PurpleLlama repository. NeMo Guardrails is Apache-2.0 licensed, which is a different set of obligations. Then ask who owns the policies. Colang rails are code that your engineers or security team must write, test and revise as the product changes, while a classifier needs less policy authoring but gives you less control over edge cases. Ask your vendor or internal platform team to confirm how each option is tested against your own prompts before you commit.

The two are not mutually exclusive. The NeMo Guardrails library includes a llama_guard rail with documentation for configuring Llama Guard moderation and self-hosting it with vLLM, so many teams will run the classifier as one input or output check inside a broader set of NeMo rails. A practical starting point is to run Llama Guard 4 alone on a sample of your traffic, record where it misses what your policy requires, and add NeMo rails only for those gaps. Confirm the hardware, serving and licensing requirements for each component in your own environment before you plan the rollout.

Which scenario fits NeMo Guardrails and which fits Llama Guard

This table maps common deployment scenarios to the better fit between NeMo Guardrails, a runtime framework with five rail types, and Llama Guard 4, a single safety classifier. Read each row as a starting point, then check the dependency on Colang policy maintenance before committing.

ScenarioBetter fitWhy it fits
Customer-facing chatbot that must stay on approved topicsNeMo GuardrailsDialog and topic rails let you define allowed and disallowed conversation flows in Colang. Llama Guard 4 labels content against the MLCommons hazards taxonomy but does not enforce business topic boundaries on its own.
Internal RAG assistant that must check retrieved contentNeMo GuardrailsNeMo provides retrieval rails for RAG chunks, which Llama Guard 4 does not address as a separate stage. Confirm the rail configuration against your retrieval pipeline before relying on it.
Team that only needs a safety label on prompts and responsesLlama Guard 4Llama Guard 4 classifies both prompts and responses in one model. A team that does not need dialog policies avoids writing and reviewing Colang files.
Regulated deployment that must document its own policiesNeMo GuardrailsPolicies are written as versioned config.yml, Colang and Python action files that your team owns and can show an assessor. A classifier's labels alone do not document your rules.
Team without capacity to maintain Colang policiesLlama Guard 4, or a NeMo setup kept to the llama_guard railWriting and maintaining dialog flows is ongoing work. The answer depends on whether your team can own that effort, so confirm staffing before choosing full dialog rails.
Pipeline that needs both policy enforcement and a safety classifierBoth, combined through the llama_guard railNeMo's library includes a llama_guard rail with documented configuration and self-hosting with vLLM, so the classifier can sit inside NeMo's rail flow. Confirm the deployment model with your engineers.
Agent or tool-calling applicationNeMo GuardrailsExecution rails cover custom actions and tools, a stage Llama Guard 4 does not classify. Check whether your tool calls need checks beyond content labels.

How each is built, deployed and operated

NeMo Guardrails and Llama Guard sit at different layers of the same request path. One is a runtime framework you configure and run, the other is a classifier model you must host, so the operating burden lands in different places. The cards below separate the deployment forms and the work each one leaves to your team.

NeMo Guardrails as a library and server

NeMo Guardrails runs as a Python library called through its API, or as a guardrails server that loads configurations from a folder and exposes an HTTP API. The server includes a /v1/chat/completions endpoint, and a Dockerfile is provided to build a server image. Your team owns the container build, the config folder, and the place the server sits in your network. Check which Python version your image uses, since the library supports Python 3.10 through 3.13.

Colang 1.0 and 2.0 configuration

Guardrails are defined with a config.yml file, optional Python actions and Colang files. Colang 1.0 is the default, and Colang 2.0 is also supported. NVIDIA documents a migration path using the nemoguardrails convert tool, but states that converted configurations still need manual review. Budget for that review if you start on 1.0 and plan to move later, and confirm which dialect your policy authors know before you commit to one.

NeMo Guardrails microservice on Kubernetes

NVIDIA also offers the NeMo Guardrails microservice, a production container image built on the same configuration model and deployed on Kubernetes with Helm. This moves configuration handling and deployment into a platform you must operate. Ask NVIDIA what support, upgrade path and license terms apply to the microservice before assuming it matches the open-source library you tested.

Llama Guard 4 as a model to serve

Llama Guard 4 is a 12-billion-parameter multimodal classifier that must be hosted before it can screen anything. The llama_guard rail documentation covers self-hosting Llama Guard with vLLM, so the GPU or accelerator capacity, model serving stack and scaling become your responsibility. Estimate serving hardware with your own load tests, because no sizing figures are supplied here, and confirm how latency grows under your peak request volume.

Policy review workload for each approach

Llama Guard classifies content against the MLCommons hazards taxonomy, so policy work is mostly deciding which categories to act on and where to set thresholds. NeMo Guardrails adds dialog, topic and execution rails written in Colang, so your team writes, tests and maintains the rules. Plan who owns that rule set, how changes are reviewed, and how regression tests run whenever a rail or the model changes.

Combined stack and upgrade effort

The llama_guard rail lets NeMo Guardrails call Llama Guard as one check inside its own flow, so a combined deployment runs two components: the rails server and the model server. Each one has its own release cycle, so version pinning and upgrade testing cover both. Ask how your chosen NeMo release and Llama Guard model version are tested together, and who carries the on-call duty when either component fails.

Capability, license and deployment side by side

This table sets NeMo Guardrails, a runtime framework, against Llama Guard 4, a safety classifier model, across license, maintainer, enforcement scope, configuration and Python support. Read it as two different kinds of component: one decides how an application behaves, the other labels content, and many production designs use both. Confirm the rows marked for your environment before you commit to hosting.

CapabilityNeMo GuardrailsLlama Guard 4
LicenseApache 2.0 for the library, per the repository LICENSELlama 4 Community License Agreement, per the PurpleLlama LICENSE files; review its terms with legal
MaintainerNVIDIA, developed in the NVIDIA-NeMo/Guardrails repositoryMeta, published in the PurpleLlama repository with a model card
What is classified or enforcedRuns input, dialog, retrieval, execution and output rails that block, redirect or check flowsClassifies both prompts and responses against the MLCommons hazards taxonomy, returning a safety label
Dialog and topic controlColang flows define allowed conversation paths and topic boundariesNot provided; it labels content but does not define conversation flows or topic policy
Retrieval and execution railsIncluded: retrieval rails for RAG chunks and execution rails for custom actions and toolsNot provided; it does not inspect retrieved chunks or tool calls by itself
Jailbreak and injection detectionLibrary ships jailbreak and injection detection rails; confirm current coverage in your versionClassifies unsafe content categories; confirm whether your use case needs prompt injection detection from Prompt Guard 2 instead
Hosting requirementsRuns as a Python library or a server; confirm model and LLM provider dependencies for each rail you enableA 12-billion-parameter model; confirm GPU sizing and serving stack, such as the vLLM setup in the llama_guard rail docs
Configuration modelconfig.yml, optional Python actions and Colang files; Colang 1.0 default, 2.0 supportedModel weights with a prompt template; no flow or policy configuration file
Python supportPython 3.10, 3.11, 3.12 and 3.13, per the READMEDepends on the serving framework you choose; confirm with your inference team

What the license terms and editions mean for each option

The NeMo Guardrails library is Apache 2.0 licensed and developed in the NVIDIA-NeMo/Guardrails repository. Apache 2.0 is a permissive software license: you can install, modify, embed and redistribute the code under its terms, provided you keep the license and notices intact. The library itself carries no per-seat or usage fee, so your cost is the infrastructure you run it on, the engineering time to write Colang and Python actions, and any third-party models or APIs your rails call.

  • Reference text: The LICENSE.md file in the repository is the authoritative source for the terms that apply to the code.
  • Pinned versions: Track releases such as v0.24.1, published on September 16, 2026, and record which version you deploy.
  • Bundled components: Rails that call NVIDIA content safety or topic safety models, or Llama Guard through the llama_guard rail, bring their own terms. Review each model's license separately.
  • Your responsibilities: Maintaining patches, policies and tests falls to your team or your implementation partner.

Ask your counsel to confirm how Apache 2.0 notice and attribution duties apply to your internal distribution and any customer-facing product you build on the library.

What drives the running cost of each option

The one-time work on each path is different in kind. With NeMo Guardrails, most of the early cost is engineering time: writing the config.yml, the Colang files and any Python actions, then testing the dialog, topic and execution rails against your own traffic. If you move between Colang 1.0 and 2.x, the nemoguardrails convert tool helps, but NVIDIA's migration guide says converted configurations still need manual review, so budget that review as a separate line. With Llama Guard 4, the one-time work is narrower but not zero: you wire the classifier into the request path, decide which MLCommons categories block, warn or pass, and run an evaluation against your own prompts and responses. Ask any vendor or integrator who owns the policy definitions after handover, and whether the evaluation set is delivered to you.

The recurring costs are where the two paths diverge most. Llama Guard 4 is a 12-billion-parameter classifier, so compute to serve it on your own infrastructure is a standing expense that grows with request volume and with any redundancy you require. The llama_guard rail documents self-hosting with vLLM, which moves that cost onto your GPU capacity. NeMo's rails add their own recurring work: each policy change is a Colang edit, a test pass and a review, and the category mapping must be re-checked whenever the MLCommons taxonomy you align to changes. Both paths also carry license tracking, because Llama Guard 4 ships under the Llama 4 Community License Agreement while NeMo Guardrails is Apache-2.0. Plan a recurring check of model and library upgrades, including the NeMo release cadence (v0.24.1 was published on September 16, 2026).

When you request a quote, specify the deliverables in writing: the policy files and category decisions you will own, the evaluation method and dataset, the test cases run before handover, and the upgrade path for both the library and the model. Ask whether the scope includes Colang migration review if you plan to use Colang 2.x, and whether GPU sizing and vLLM setup are inside the scope or only documented. Confirm the license obligations for your deployment with Meta and NVIDIA directly, and ask who is responsible for re-running tests after a model or library update. DeployOpen fixed-scope engagements are agreed in writing before work starts, so these questions shape the quote itself.

Where implementation projects usually run long

Most delays in a NeMo Guardrails and Llama Guard project come from decisions made late: what the rails must block, where the classifier runs, and which license terms apply. The cards below name the checks to run before build work starts and the people who should own each one.

Define policy scope before writing Colang

Agree on which user journeys, topics and actions the guardrails must cover before anyone writes a flow. NeMo's dialog and topic rails are only as good as the policy they encode, and Llama Guard 4 covers only the hazard categories it was trained on. Confirm with product owners, legal and the security lead which behaviors are blocked, which are escalated and which are logged only. Illustrative: a banking assistant may need topic limits that a general chatbot does not.

Size the classifier and confirm latency

Llama Guard 4 is a 12-billion-parameter model, so it adds a model call to every prompt and response it checks. Ask the platform team to measure added latency and GPU capacity under expected peak load, and to confirm whether vLLM or another serving stack will host it. Run this test inside your own network, since the number that matters is the one your users see.

Decide on Colang 1.0 or 2.x

Colang 1.0 is the default, and Colang 2.0 is also supported. NVIDIA documents a migration path with the nemoguardrails convert tool, but states that converted configurations still need manual review. Decide early which version the team will maintain, because flows written in one version do not carry over unchanged. Involve the engineers who will own the flows for the next several years, not only the people who prototype them.

Map classifier categories to your risk taxonomy

Llama Guard 4 classifies against the MLCommons hazards taxonomy, which may not match the risk categories your organization already uses for audits or incident response. Build a mapping table that links each Llama Guard category to an internal risk ID and to the owner who handles incidents. Confirm with the compliance lead how these categories will appear in evidence and logs, so the mapping survives an assessment.

Test rails against adversarial inputs

A classifier and a set of rails both fail under prompt injection, jailbreaks and multi-turn pressure, so passing your own happy-path tests proves little. Plan a test suite that includes injection attempts and out-of-policy requests, and run it on every change to flows or the model version. Security testers should own the attack set, and the application team should own the expected outcomes. Tools such as garak and promptfoo can help with this work.

Review license terms before production

NeMo Guardrails is Apache-2.0, but Llama Guard 4 ships under the Llama 4 Community License Agreement, which has its own terms. Legal counsel should read the license against your planned use, deployment scale and any redistribution of model weights before go-live. Also confirm how the license applies to fine-tuned or quantized copies, because those terms may differ from the base model's. Start this review in the first week, not at launch.

How to move between NeMo Guardrails and Llama Guard without rebuilding everything

This sequence lets a team that runs one option add or switch to the other while keeping its test cases, policy wording and logs, and it ends with a documented cutover decision backed by a shared test set.

  1. Inventory existing rails and category mappings

    The engineer who owns the current guardrail configuration lists every input, dialog, output, retrieval and execution rail in use, along with every Colang flow, Python action and blocked category. For each blocked behavior, write down which Llama Guard hazard category from the MLCommons taxonomy it would most plausibly map to, and mark behaviors with no clear match, such as topic restrictions or tool-call checks. Done means a spreadsheet where every rail has either a mapped category or an explicit note that it must be rebuilt.

  2. Confirm license acceptance for the model

    Legal or procurement reviews the Llama 4 Community License Agreement that covers Llama Guard 4, using the LICENSE file in the PurpleLlama repository, and records who accepted it and for which deployments. Note that NeMo Guardrails itself is Apache-2.0, so the model license is a separate obligation. Done means a signed or recorded acceptance and a written statement of where the model will run, which the team can show during a later review.

  3. Convert Colang configurations and review the output

    If the existing configuration uses Colang 1.0, the engineer runs the nemoguardrails convert tool against a copy of the configuration folder, as described in NVIDIA's migration guide, and then reviews every converted file by hand because NVIDIA states the output still needs manual review. Flows that rely on dialog state, custom actions or retrieval rails are checked most closely. Done means a converted folder that loads without errors and a list of each change that was made manually.

  4. Run the llama_guard rail in a test environment with vLLM

    The platform team deploys Llama Guard 4 behind vLLM in a non-production environment, following the self-hosting notes in the nemoguardrails llama_guard folder, and configures the rail in a test copy of the NeMo Guardrails configuration. Confirm the GPU and memory footprint with your own hardware team, since the supplied facts do not give sizing figures. Done means the test environment answers a set of smoke-test prompts and logs a verdict for each one.

  5. Compare block decisions on a shared test set

    The security engineer builds one test set from existing red team results, known bad prompts and benign prompts that should pass, then runs it through the current option and through the candidate. Tools such as garak or promptfoo can produce the attack inputs if the team already uses them. Record each prompt with both verdicts and label every disagreement as a false positive, a false negative or a policy difference. Done means a table of disagreements reviewed by someone who owns the policy, with a decision for each row.

  6. Carry over test cases, policy wording and logs

    The engineer moves the shared test set, the plain-language policy statements and the log schema into the new setup, so that results stay comparable over time. Policy wording transfers as text even though its implementation changes, and existing logs stay in their current store for audit purposes. Done means a repository or folder that holds the test set and policy text and a log sample from the new setup that matches the old schema.

  7. Rebuild category mappings and Colang flows

    Category mappings and dialog flows do not carry over directly, so the team rebuilds them: Llama Guard returns hazard categories from its taxonomy, while NeMo's rails express behavior in Colang flows and actions. Write the new mapping rules, implement the flows that remain necessary, and re-run the shared test set until the disagreements from the earlier comparison are resolved or accepted. Done means the test set passes at the agreed level and the owner signs off the new mapping document.

  8. Cut over and keep the rollback path

    The team switches production traffic in a controlled window, keeps the previous configuration deployable for a rollback, and watches block rates and logs during the first period of use. Confirm with your change board how long the rollback path must stay available, since no duration is supplied here. Done means production runs the chosen option, the rollback has been tested once, and the decision record names the owner and the test results it relied on.

Questions buyers ask before hiring outside help

How much more effort does NeMo Guardrails take to run than Llama Guard?

NeMo Guardrails takes considerably more setup, because it is a framework you configure rather than a single classifier you call. Llama Guard 4 is one model that classifies prompts and responses against the MLCommons hazards taxonomy, so the main work is hosting it and deciding how to act on its labels. NeMo adds a config.yml file, optional Python actions and Colang files, plus the rails you switch on. Colang 1.0 is the default, and Colang 2.0 is also supported. Effort grows with the number of rails, the number of policies you maintain and whether you build custom actions. Ask any team to size the work by listing the rails, the models behind them and the policies that need owners.

Can our own team deploy this without outside help?

Often yes, if you have engineers who already run Python services and model hosting, and the scope stays narrow. The Llama Guard path is the smaller of the two: host the model, call it, and test the labels against your own traffic. The NeMo path needs Colang knowledge, a review process for policy changes and a plan for testing rails under realistic attacks. The NeMo documentation's migration guide says converted Colang configurations still need manual review, which is a reminder that the policy work does not disappear. Outside help is most useful for the design decisions, hardening and evidence, and for handing the system over with documentation your team can maintain.

What do our engineers and policy owners need to contribute?

Engineers need to own hosting, the request path, logging, latency measurement and the integration with your application. Policy owners need to define which hazards, topics and data types matter, and who approves changes to them. Security staff should own the test cases that prove a rail blocks what it claims to block. Before the work starts, confirm which people hold each of these roles, how many hours they can commit, and who signs off on each policy change. Gaps in policy ownership cause more delays than gaps in Python skills.

How long does a first deployment take, and what drives that time?

No supplied figure gives a typical duration, so treat any number you hear as a claim to verify. The main drivers are the number of rails in scope, whether you use a hosted or self-hosted model, the amount of custom Colang or Python actions, the size of your existing test suite, and how many approval cycles your policies require. Infrastructure choices also matter: running Llama Guard with vLLM needs GPU capacity and a serving plan. Ask for a written milestone plan that separates hosting, rail configuration, testing and handover, so you can see where time goes.

Does the Llama license need legal review before we use Llama Guard?

Yes, you should have counsel review it before production use. Llama Guard 4 ships under the Llama 4 Community License Agreement, and the Purple Llama license table shows that its models use Llama Community License terms, which differ from the MIT license used for the Purple Llama evals and Code Shield. Read the license file for the exact model you deploy, check the acceptable use terms against your product, and confirm how those terms apply to your customers and any redistribution. NeMo Guardrails itself is Apache-2.0, but a model it calls carries its own license. Review both layers together.

What should we ask for in a fixed-scope quote?

Ask for a written scope that names each rail or model in use, the environments covered, the test cases to be run and the evidence delivered. Request a list of deliverables such as configuration files, Colang or Python source, deployment documentation, test results and a handover session. Confirm what is one-time work and what recurs, such as model upgrades, rule updates and retesting after a release. Ask which parts depend on your infrastructure, your identity provider or your data sources, and which assumptions your team must verify. Most DeployOpen engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and a quote follows from that scope.

Can we use the llama_guard rail without writing Colang?

You can wire up the llama_guard rail with configuration rather than writing new dialog logic, but you still need a config.yml and the rail's documentation in the NeMo Guardrails library. The llama_guard folder documents how to configure Llama Guard content moderation and how to self-host it with vLLM. Whether you need Colang depends on what you add beyond that rail. Any dialog, topic or custom execution rail will require Colang or Python. Confirm with a proof of concept which parts of your policy the configuration can express before you commit to a design that avoids Colang entirely.

How DeployOpen helps choose, implement and migrate

DeployOpen is a Chainscore Labs company that plans, implements, customizes, integrates and hardens self-hosted open-source platforms inside your own infrastructure. For a NeMo Guardrails vs Llama Guard decision, we work from a written scope that shows which protections come from the classifier, which come from the rails, and how they run in your environment.

How we scope

  • Map the attacks, topics and content categories your application must block before choosing a control.
  • Confirm which model deployment, hosting location and inference path your environment allows for each component.
  • Review the Llama 4 Community License Agreement terms against your intended use with your legal team before build.

How we build

  • Configure NeMo Guardrails input, dialog, output and execution rails in Colang and config.yml for your application.
  • Set up the llama_guard rail with a self-hosted Llama Guard endpoint, if your scope calls for it, inside your own infrastructure.
  • Test blocked and allowed cases in your CI pipeline, and record false positives and missed attacks for review.

How we hand over

  • Deliver configuration, policy files, test results and a runbook for updating rails and model versions.
  • Document the license obligations that come with each model and the owner responsible for tracking them.
  • Walk your platform and security teams through the deployment, including what to re-test after an upgrade.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover, scoped in writing.
  • Re-run regression tests when NeMo Guardrails or the Llama Guard model version changes, as agreed in scope.
  • Prepare control evidence for your compliance assessors, while independent auditors issue any audit report or certification.

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.