Run a cascade, cheap filter first, safety-tuned escalation second, human review last, against millions of pieces of user-generated content a day, and per-call moderation API pricing stops working. Not "gets expensive." Stops working, as in the bill for the naive version of the pipeline exceeds what most trust and safety budgets can absorb. Self-hosting Llama Guard, ShieldGemma, and GPT-OSS Safeguard on rented GPUs is how the unit economics actually close at that volume, and it's also how you keep the audit trail DSA and EU AI Act obligations require in-house instead of trusting a vendor's word for it.
This is a different problem from runtime guardrails on your own model's output. If you're looking for that, our NeMo Guardrails production guide covers Colang-based input and output rails that sit in front of a model you're serving. This post is about the other direction: moderating content other people upload, at platform scale, before it ever reaches another user.
Why UGC Moderation Doesn't Fit a Pay-Per-Call API Budget
Content moderation at platform scale is a volume problem before it's a model-quality problem. The daily item count on any UGC platform of consequence runs into the tens of millions, and a per-item vendor charge that looks trivial in a demo turns into a real line item the moment it's multiplied by that number, every day, forever.
The Volume Problem: What Platform-Scale UGC Actually Looks Like
YouTube reports over 20 million videos uploaded daily on average, according to its own press page. Every one of those needs some pass of automated screening before it's fully live, and that's one platform, one media type. Add images, comments, livestream frames, and DMs across a portfolio of products, and the daily item count for a mid-sized platform routinely clears eight figures.
Scale changes what "moderation" even means operationally. Meta's own H1 2026 integrity report shows the range: the company removed over 159 million scam ads in 2025, catching 92% of them before a single user reported them, and took down 10.9 million accounts tied to scam centers in Southeast Asia and the Middle East the same year (Meta Transparency Center). In Q4 2025 alone, Facebook, Instagram, and Threads sent over 2.6 million CyberTip reports for child sexual exploitation to NCMEC. And across hundreds of billions of pieces of content, Meta's enforcement precision on Facebook and Instagram held under 0.1% incorrect removals. Precision at that level isn't a nice-to-have at this volume. It's the difference between a moderation program and a censorship complaint desk. None of that runs through a pay-per-call endpoint with acceptable latency or acceptable cost.
What Per-Call Moderation APIs Actually Cost at That Volume
Run the naive version, send every item to a hosted moderation API, and multiply. AWS Rekognition charges $0.001 per image for the first million a month, plus $0.10 per minute of video analyzed (Rekognition pricing breakdown). At 10 million images a day, that's $10,000 a day, $300,000 a month, before a single video frame or comment gets touched. Azure AI Content Safety gives you 5,000 free text records a month on its free tier and then moves to per-record billing on the standard tier (Azure AI Content Safety pricing), and 5,000 records is roughly a minute of traffic at platform scale, so the free tier is a rounding error, not a strategy.
OpenAI's Moderation endpoint is the one genuine exception: it's free and doesn't count against usage limits (Moderation API pricing overview). But it only screens against OpenAI's own fixed taxonomy. It isn't a policy engine, and it isn't a substitute for a trust and safety program built around your platform's specific rules, your specific escalation workflow, and your specific audit requirements. The moment you need custom categories, multimodal content, or a defensible per-decision log, you're back to a metered API or a model you run yourself. The Artificial Analysis team put the underlying tension plainly in their guardrail benchmark writeup: "A guardrail adds no feature a user asked for, it adds latency and cost to every call it screens" (Artificial Analysis guardrail benchmark). At consumer platform volume, that cost compounds fast enough to make the architecture decision, not just the vendor decision, the thing that determines whether the budget works.
Cascade Architecture: Cheap Filter First, Frontier Model Only on Edge Cases
The fix isn't a cheaper vendor. It's not running every item through the same model at all. A cascade routes content through progressively more expensive checks, and structures the pipeline so the vast majority of traffic never reaches the expensive tier.
Stage 1: A Fast, Cheap First-Pass Classifier
The first stage sees every single item. It has to be cheap per call and fast enough not to become the bottleneck, because it's running at full platform volume. Its job isn't to be right about hard cases, it's to clear the obvious majority: content that's clean, or content that's an unambiguous, high-confidence violation. A small, quantized classifier running on a modest GPU handles this tier well; our AWQ quantization guide covers shrinking a first-pass filter model further if throughput per GPU is the binding constraint at your volume.
Stage 2: Escalation to a Safety-Tuned Model on Ambiguous Content
Whatever stage 1 flags as uncertain, borderline, or high-severity gets a second look from a larger, safety-tuned classifier with a broader taxonomy. This tier sees a fraction of total volume, so it can afford to be slower and more expensive per call. It's also where you want a model trained specifically for hazard classification rather than a general-purpose chat model repurposed for the job.
Stage 3: Human Review Queue for the Remainder
What the second stage can't resolve with confidence goes to a human, with the model's classification and, ideally, its rationale attached so the reviewer isn't starting cold. This tier is the most expensive per item by far. Human moderator pay in the US averages around $39,014 a year, roughly $19 an hour, as of July 2026 (Salary.com), which is exactly why the cascade's whole design goal is to keep this tier's volume as small as the model tiers above it can responsibly make it.
Why This Only Pencils Out Self-Hosted
A three-stage cascade needs every stage running continuously, with the first tier absorbing full platform volume around the clock. That's a fixed-infrastructure problem, not a per-call billing problem. Pay-per-call API pricing charges the same rate whether an item is the 1st or the 10,000,000th of the day, so a cascade built on metered APIs pays full price at every stage, every time, which defeats the entire point of having a cheap first stage. Self-hosting flips the economics: the GPU running your stage 1 filter costs the same per hour whether it processes ten items or ten thousand, so the cost per item falls as volume rises, which is exactly the direction platform-scale UGC moves.
Open-Source Safety Models: Llama Guard, ShieldGemma, GPT-OSS Safeguard
Three open-weight model families cover most of what a cascade needs, and they aren't interchangeable. Each was built for a different point on the speed, precision, and flexibility spectrum.
Llama Guard 4 12B: Multimodal, Meta's Taxonomy (S1-S14)
Llama Guard 4 is a 12B dense, natively multimodal safety classifier that handles both text and multiple images in a single pass. It was pruned from Llama 4 Scout, keeping the shared expert weights and dropping the routed experts, and trained on roughly a 3:1 blend of text-only to multimodal data (Llama Guard 4 model card). It classifies against MLCommons' S1-S14 hazard taxonomy, covering categories like violent crimes, sexual exploitation, hate speech, and self-harm. The fixed taxonomy is the tradeoff: you get broad, well-tested coverage out of the box, but customizing categories means fine-tuning rather than editing a prompt.
ShieldGemma: High Precision, Built on Gemma
ShieldGemma 2 is a 4B parameter image safety model built on Gemma 3, purpose-built as an input filter for vision-language models or an output filter for image generators, checking content against sexually explicit, violence and gore, and dangerous content categories (ShieldGemma 2 model page). It's smaller and cheaper to run than Llama Guard 4, which makes it a strong candidate for a first-pass filter on image-heavy UGC rather than a full escalation-tier classifier.
GPT-OSS Safeguard 120B/20B: Policy-Reasoning, Bring-Your-Own-Policy
GPT-OSS Safeguard ships in 120B and 20B sizes under an Apache 2.0 license, developed by OpenAI in collaboration with Discord, SafetyKit, and ROOST (Robust Open Online Safety Tools) (Help Net Security coverage). Instead of classifying against a fixed, pre-trained taxonomy, it takes two inputs, a policy you write and the content to classify, and reasons over that policy at inference time, returning a decision plus its rationale. Vinay Rao, CTO of ROOST, called it "the first open source reasoning model with a 'bring your own policies and definitions of harm' design" (ROOST blog). It's built for input and output filtering, online content labeling, and offline batch review, explicitly not for use as a chat model (Cisco AI blog). That's the model to reach for when your platform's actual policy doesn't map cleanly onto anyone else's taxonomy, at the cost of more compute per decision than a fixed classifier.
Picking a Model for Your Cascade (Benchmark Table)
Don't default to the biggest model on the assumption that size buys recall. A recent multi-model safety benchmark modeled on WildGuardTest found the opposite pattern across five widely used guard models:
| Model | Parameters | Recall |
|---|---|---|
| Qwen Guard 4B | 4B | 0.84 |
| Nemotron Safety 8B | 8B | 0.77 |
| ShieldGemma 2B | 2B | 0.45 |
| Llama Guard 12B | 12B | 0.33 |
| GPT-OSS Safeguard 20B | 20B | 0.25 |
The smallest model in this set had the highest recall; the largest had the lowest (arXiv benchmark paper). This isn't a reason to skip GPT-OSS Safeguard. Its strength is policy-reasoning flexibility, not raw recall against a generic hazard taxonomy, and recall alone doesn't capture precision, category coverage, or how well a model handles your specific policy. It is a reason to benchmark candidate models against your own moderation policy and your own labeled data before locking a cascade tier to a specific model, rather than assuming a bigger parameter count is doing more work.
GPU Throughput Needed to Moderate at Social-Platform Volume
Sizing a cascade means sizing each tier separately, because each tier sees a different fraction of total volume and runs a different model size.
Sizing the First-Pass Filter (Requests/sec per GPU)
The first tier sees 100% of volume, so its per-GPU throughput sets the floor for how many GPUs you need overall. Benchmarks of an 8B-class model served with vLLM on a single H100 show generation throughput around 6,067 tokens/sec on a chat-style workload (Microsoft Azure HPC benchmark, via Argon Systems). A moderation response is much shorter than a chat reply, often just a label and a short category tag, so a rough back-of-envelope ceiling for a similarly sized classifier lands somewhere in the low hundreds of items per second per GPU on generation-bound throughput. Real numbers depend heavily on prompt length, batch size, and quantization, so treat that as a starting estimate to validate against your own stack, not a number to plan capacity around directly.
Sizing the Escalation Tier
The second tier sees a much smaller share of traffic, whatever the first tier flags as uncertain, so it needs far fewer GPU-hours even though each item costs more compute. A 12B-class multimodal model like Llama Guard 4 is heavier per call than the first-pass filter, but if only 10-15% of volume escalates, one mid-tier GPU typically covers it with headroom, and spot capacity is a reasonable fit here since escalation-tier batches tolerate occasional preemption better than a first-pass filter that's blocking the rest of the pipeline.
Example Build: Moderating 10M UGC Items/Day
Ten million items a day averages out to about 116 items/sec, with real traffic running well above that at peak hours, so a cascade sized for average volume alone will fall behind during the busiest part of the day. A workable three-tier build:
| Tier | Model class | GPU | Rate |
|---|---|---|---|
| Stage 1 (100% of volume) | Small quantized classifier | L40S PCIe, on-demand | $0.96/hr |
| Stage 2 (~10-15% escalates) | Llama Guard 4 12B-class | A100 80G SXM4, spot | $0.82/hr |
| Stage 3 (~1-2% needs policy reasoning) | GPT-OSS Safeguard 20B | H100 SXM5, spot | $2.91/hr |
Running all three tiers 24/7, that's roughly $4.70/hr in raw GPU cost, call it $115/day, well under the $10,000-a-day floor a naive per-image API call structure hits at the same volume against a single content type. The gap only widens once you add video and text moderation on top of images. Spot pricing works for tiers 2 and 3 because those workloads batch well and tolerate an occasional preemption; keep stage 1 on-demand since it's on the critical path for every item.
Pricing fluctuates based on GPU availability. The prices above are based on 24 Jul 2026 and may have changed. Check current GPU pricing → for live rates.
Deploying the Cascade on Spheron
Provision each tier as its own instance so a spike in escalation volume doesn't starve the first-pass filter of GPU cycles. On Spheron, that means a L40S GPU rental for stage 1, an A100 instance for stage 2, and Spheron H100 capacity for stage 3, each with SSH root access so you control request logging independently per tier.
Serve each model behind vLLM's OpenAI-compatible API with request logging enabled:
docker run --gpus all --ipc=host -p 8000:8000 \
vllm/vllm-openai:latest \
--model <your-stage-model> \
--quantization awq \
--enable-log-requests \
--enable-log-outputs \
--max-model-len 8192A thin orchestration service in front of the three endpoints handles the routing logic: call stage 1, check the confidence or label against your escalation threshold, call stage 2 if it's ambiguous, call stage 3 if stage 2 still can't resolve it with the policy you've configured, and write every request, response, and routing decision to durable, access-controlled storage. If you're processing a backlog of historical content rather than a live stream, the same three models run well in offline batch mode instead of an always-on endpoint; our batch LLM inference guide covers the queuing pattern and the additional cost savings from not keeping every tier warm around the clock. For a full walkthrough of multi-GPU vLLM deployment, tensor parallelism, and load balancing across instances, see our vLLM production deployment guide.
Once the cascade is live, adversarially test it before it sees real traffic. A moderation pipeline that a bad actor can reliably route around a specific stage is worse than no automated moderation at all, because it creates false confidence. Our AI red teaming infrastructure guide covers deploying PyRIT, Garak, and Inspect against a self-hosted model, the same tooling that applies to probing a moderation cascade for blind spots before launch.
Compliance Angle: DSA and EU AI Act Audit Trails for Trust & Safety
Trust and safety teams operating in the EU carry two separate transparency obligations, and both depend on having a real, per-decision audit trail, not a vendor's assurance that one exists somewhere on their end.
The DSA's Article 17 requires providers of hosting services to give affected users a clear, specific statement of reasons for content restrictions, removal, demotion, or account suspension, including a reference to the legal ground and, where automated tools made the call, a disclosure that automated means were used (Article 17 text via eu-digital-services-act.com). That's a per-decision obligation, not an annual filing. On top of it, all in-scope services publish periodic transparency reports on their moderation activity, annually for general services and twice yearly for designated Very Large Online Platforms and search engines, and the first harmonised, machine-readable versions of those reports under the Commission's new Implementing Regulation went live in March 2026 (European Commission digital strategy news).
Producing a statement of reasons for millions of decisions a day means every stage of the cascade needs to log its input, its output label, its confidence or rationale, the model version that made the call, and a timestamp, by design, not bolted on after a regulator asks. vllm serve --enable-log-requests --enable-log-outputs gets you request-level capture at the model layer; our LLM observability guide covers wiring that into a self-hosted tracing stack you can query on demand instead of exporting logs to a third party. The same "own the audit trail" argument applies to other high-risk deployments under the EU AI Act's Annex III; our self-hosted AI recruiting screening guide walks through the identical logging discipline for a different regulated vertical, and our EU AI Act compliance guide covers the broader risk-classification and data residency framework this pipeline sits inside.
None of this replaces the actual compliance work. DSA reporting deadlines and content categories still have to be met regardless of where the models run. What self-hosting changes is whether you can actually produce the record when it's due: a request-level log on infrastructure you control, not a support ticket to a vendor asking what happened to a specific item on a specific day.
A cascade only pencils out when the infrastructure cost per item falls as volume rises, which is exactly what per-call moderation APIs can't do. Spheron's per-minute billing keeps GPU cost tied to actual moderation throughput instead of a fixed rate per item.
Frequently Asked Questions
A cascade routes content through progressively more expensive checks instead of running every item through one heavyweight model. A fast, cheap first-pass classifier clears the obvious majority of clean content. Only ambiguous or flagged items escalate to a slower, safety-tuned model with a broader taxonomy. Whatever the second stage can't resolve confidently goes to a human reviewer with the model's rationale attached. Most items never reach the expensive tiers, which is what makes the economics work at millions of items a day.
They solve different problems, not competing on one scale. Llama Guard 4 12B is a multimodal classifier against Meta's fixed S1-S14 hazard taxonomy, good as a broad-coverage escalation-tier model. ShieldGemma 2 is a smaller, cheaper image safety classifier built for narrow, high-precision categories (sexually explicit, violence/gore, dangerous content), a strong first-pass filter. GPT-OSS Safeguard reasons over a policy you write yourself and returns a label plus rationale, which fits a platform's specific, evolving trust and safety policy better than a fixed taxonomy, but it's slower and better suited to edge cases than full-volume screening. On a public multi-model benchmark, recall doesn't track model size: the smallest model tested (Qwen Guard 4B) had the highest recall, and GPT-OSS Safeguard 20B had the lowest, so benchmark on your own policy before picking a default.
Pay-per-call APIs bill per item regardless of volume: AWS Rekognition charges $0.001 per image for the first million a month, and $0.10 per minute of video. At 10 million images a day that's $10,000 a day before you've moderated a single video or a word of text. A self-hosted cascade running on a small mix of rented GPUs (a cheap card for the first-pass filter, a mid-tier card for escalation, spot capacity for the edge-case tier) typically runs a few hundred dollars a day for the same volume, because the expensive model only ever sees the fraction of content that actually needs it.
Self-hosting doesn't replace the legal obligations, but it makes them provable. The DSA's Article 17 requires a statement of reasons for every content restriction, and in-scope platforms owe annual (or twice-yearly, for designated Very Large Online Platforms) transparency reporting. Producing that reliably means every moderation decision needs a timestamped, model-versioned, auditable record. A vendor API gives you a label back; it doesn't hand you request-level logs you can pull on demand for a regulator or your own compliance team the way a self-hosted stack you control does.
