Content moderation has the unusual property that throughput dominates instantaneous latency: each message is short, can be processed in batch, and never leaves the platform’s control plane. A single RTX 4090 24GB dedicated server running a hybrid classifier-plus-LLM stack moderates hundreds of millions of messages per day, with policy enforcement, multilingual coverage, audit trail and appeals all running on the same UK-resident card. This article is the senior trust-and-safety infra walkthrough: workload decomposition, model selection, latency profiles, capacity numbers, the vLLM launch, and the production gotchas that bite you at month four. For the wider hardware menu see dedicated GPU hosting.
Contents
- The Forum Co workload, decomposed
- Hybrid two-tier moderation stack
- Tier 1 classifier: DeBERTa-v3
- Tier 2 LLM judge: Llama Guard 3 8B FP8
- Daily throughput and scaling triggers
- Latency profiles and SLA fit
- Audit, appeals and active learning
- Production gotchas and verdict
The Forum Co workload, decomposed
The hypothetical we keep returning to is “Forum Co”, a UK-headquartered community platform with 8 million daily active users, 14 million messages per day across chat, comments and direct messages, in 17 languages with English at 62% of volume. Policy taxonomy spans 11 categories: hate speech, harassment, sexual content, self-harm, violence, illegal goods, spam, scams, CSAM (zero-tolerance, immediate hash match plus second-pass), regulated health claims (UK-specific), and election misinformation (period-specific). The legal requirement is that 100% of public-facing content is screened pre-publication, and that any content removed has a logged justification suitable for an appeal within 24 hours. Latency budget for synchronous in-flow moderation: under 250 ms p95 for the fast path, under 500 ms p95 for the escalated path.
That set of requirements fits cleanly on one 4090 because it decomposes into two stages with very different cost profiles: a sub-millisecond classifier sweep over 100% of traffic, and a 12-millisecond LLM adjudication over the 1-5% that the classifier marks ambiguous. The 4090’s combination of 1,008 GB/s memory bandwidth, native FP8 tensor cores and 24 GB of GDDR6X holds both stages comfortably with headroom for embedding-based dedup, image moderation and a CSAM hash matcher running alongside.
Hybrid two-tier moderation stack
The architecture is two tiers plus auxiliary services. Tier 1 is a small, fast classifier that handles the easy 95-99% of traffic — clearly safe, clearly unsafe, or low-ambiguity policy match. Tier 2 is a larger LLM judge (Llama Guard 3 8B at FP8) that adjudicates the borderline cases with structured “safe / unsafe (categories)” output. Auxiliary: a sentence embedding model (BGE-M3 or BGE-large-en-v1.5) for semantic deduplication and brigading detection, plus a CSAM perceptual-hash matcher (PhotoDNA or pdq) on the CPU side.
| Tier | Model | VRAM | Throughput | Role |
|---|---|---|---|---|
| Tier 1 classifier | DeBERTa-v3-base fine-tuned | 0.7 GB | 5,800 items/s batch 128 | ~98% of traffic |
| Tier 1 (heavy) | DeBERTa-v3-large | 1.6 GB | 1,800 items/s batch 64 | Higher accuracy lane |
| Tier 2 LLM judge | Llama Guard 3 8B FP8 | 10 GB + KV | 130 verdicts/s batch 16 | Borderline 1-5% |
| Embedding (dedup) | BGE-large-en-v1.5 | 1.4 GB | 7,000 texts/s | Brigade and copy-paste |
| Image classifier | CLIP ViT-L/14 + NSFW head | 1.0 GB | 900 images/s | Optional second card |
Total resident with the dense English path: ~13 GB, leaving 11 GB for KV cache, prefix caching and burst absorption. The card runs with --gpu-memory-utilization 0.92 on the LLM tier and a small sliver allocated to the classifier and embedding engines.
Tier 1 classifier: DeBERTa-v3
A DeBERTa-v3-base toxicity head fine-tuned on the platform’s specific policy taxonomy reaches roughly 0.93 macro F1 on the standard hate / harassment / sexual benchmarks and roughly 0.89 on the platform-specific eval set. At batch 128 in FP16 with ONNX Runtime and CUDA Graph capture, throughput on the 4090 lands at about 5,800 items per second per card — equivalent to 500 million messages per day if the classifier saw all traffic and did nothing else. In practice it shares the GPU with Llama Guard, so the classifier runs at --gpu-memory-utilization 0.10 equivalent and absorbs the 14 million daily message volume with no measurable impact on the LLM tier.
For higher-accuracy lanes (e.g. minority-language traffic where DeBERTa-v3-large outperforms base by 4-6 F1 points), the larger variant runs at 1,800 items/s batch 64. Even at the slower rate, one card handles 155 million items per day on the heavy lane alone. Train the classifier head on platform data; do not rely on off-the-shelf checkpoints for production policy enforcement, because policy taxonomies are platform-specific. Re-train monthly on the previous month’s Tier 2 verdicts to capture taxonomy drift.
Tier 2 LLM judge: Llama Guard 3 8B FP8
Llama Guard 3 8B is Meta’s safety classifier built on Llama 3.1 8B with a custom system prompt that emits a structured verdict in 30-80 tokens: safe or unsafe followed by a comma-separated category list. On the 4090 with FP8 weights, FP8 KV cache and batch 16, sustained throughput is ~130 verdicts per second, equivalent to 11.2 million messages per day routed through the LLM tier. Combined with Tier 1 filtering 95-98% of input as clear safe or clear unsafe, the blended capacity exceeds 140-200 million messages per day on a single card.
The launch:
python -m vllm.entrypoints.openai.api_server \
--model meta-llama/Llama-Guard-3-8B \
--quantization fp8 \
--kv-cache-dtype fp8 \
--max-model-len 4096 \
--max-num-seqs 32 \
--enable-chunked-prefill \
--enable-prefix-caching \
--gpu-memory-utilization 0.80 \
--port 8001
Why these flags. --quantization fp8 --kv-cache-dtype fp8 for the standard Ada throughput uplift. --max-model-len 4096 because moderation prompts are short and the system prompt plus message rarely exceeds 1k tokens; bounding context tightly maximises concurrent capacity. --max-num-seqs 32 for batch absorption. --enable-prefix-caching is the high-leverage trick: the system prompt that defines the policy taxonomy is the same on every call (~600 tokens), and the cache hit drops prefill from ~120 ms to ~3 ms after the first call. --gpu-memory-utilization 0.80 intentionally leaves room for the DeBERTa classifier and embedding engine that share the card. See the FP8 deployment guide and vLLM setup for the underlying mechanics.
Daily throughput and scaling triggers
| Stage | Per-message work | Daily capacity per 4090 |
|---|---|---|
| Tier 1 only (clear safe or unsafe) | ~0.17 ms GPU at batch 128 | ~500 million |
| Tier 2 escalation (5% of traffic) | ~7.7 ms GPU at batch 16 | ~11 million through Guard |
| Embedding dedup pass (sample 10%) | ~0.14 ms GPU at batch 64 | ~600 million |
| Total mixed (Forum Co profile) | blended | ~140-200 million |
For comparison: a Discord-scale community at 1 billion messages per day would require 7-10 4090s with redundancy for both tiers, plus a separate set for image moderation. A typical SaaS chat or comment platform at 1-10 million messages per day fits on one 4090 with massive headroom — most of the card sits idle and the rental amortises against the API alternative within weeks. See vs OpenAI API cost.
Scaling triggers. Add a second card when sustained traffic exceeds 100 million messages per day, when escalation rate exceeds 8% (LLM tier becomes the bottleneck), when image moderation is added at non-trivial volume, or when you need active-active failover for compliance. Move to two cards via multi-card pairing; consider a 5090 32GB step-up via the 5090 decision page when you need 14B AWQ as the Tier 2 judge for stronger multilingual reasoning.
Latency profiles and SLA fit
| Path | P50 | P95 | P99 |
|---|---|---|---|
| Tier 1 only (clear safe) | 4 ms | 9 ms | 15 ms |
| Tier 1 only (clear unsafe) | 4 ms | 9 ms | 15 ms |
| Tier 1 + Tier 2 escalation | 120 ms | 240 ms | 410 ms |
| Tier 2 only (forced) | 110 ms | 220 ms | 380 ms |
| With dedup + embedding lookup | 140 ms | 280 ms | 460 ms |
Both tiers are well below the 250 ms p95 user-visible chat threshold, so moderation runs synchronously inside the message-send path without UX degradation. The escalated path at 240 ms p95 also stays under the 500 ms p95 budget for the slow lane. The full prefill/decode benchmark covers the underlying numbers.
Audit, appeals and active learning
- Log every Tier 2 verdict with the full prompt, the model output, the categories asserted, the model version and a timestamp. This is your appeals defence and your active-learning corpus.
- Active learning loop: sample 1% of Tier 1 verdicts daily, route to Tier 2 review, fine-tune Tier 1 weekly on the disagreements. Expect Tier 1 F1 to climb 1-2 points per quarter for the first year.
- Multilingual coverage: Llama Guard 3 8B handles 8 languages reasonably; for heavy non-English traffic consider Mixtral 8x7B AWQ as Tier 2 — see Mixtral 8x7B.
- Appeals workflow: a junior moderator reviews 100% of removals appealed; the platform’s overturn rate informs Tier 2 prompt tuning quarterly.
- Image moderation: add CLIP-based NSFW classifier on the same card (1 GB VRAM) or split to a second card if image volume exceeds 1 million per day.
- Hash matching for known harm: CSAM and known terrorist content matched against PhotoDNA/pdq hashes on CPU; never goes through the LLM. Hits route immediately to law enforcement workflow.
Production gotchas and verdict
- Llama Guard’s policy taxonomy is fixed at training time. Custom platform categories require a wrapper prompt or a fine-tune; do not assume the categories you care about exist out of the box.
- Prefix caching is essential for throughput. Without it, the 600-token system prompt re-prefills every request and you get ~30 verdicts/s instead of 130. Confirm prefix cache hit rate via
vllm:num_cache_hits. - Tier 1 calibration drifts. Confidence cutoffs that worked in March silently mis-route 4-6% of borderline traffic by August as platform vocabulary evolves. Re-evaluate cutoffs monthly.
- Adversarial inputs rise after launch. Spammers and trolls reverse-engineer your classifier within weeks. Add a small adversarial-eval set to your weekly retraining loop and track regression.
- Tier 2 hallucinated categories. Llama Guard occasionally asserts a category not in its taxonomy. Validate output against a strict allowlist; reject and log on parse failure rather than acting.
- Power throttling under sustained load. Continuous 14 million daily messages keeps the GPU near steady decode for hours; cap at 400 W via
nvidia-smi -pl 400for thermal stability — see power draw and efficiency and thermal performance. - Multi-tenant moderation. If you run moderation as a service for multiple customers, namespace prefix caches and audit logs per customer; see multi-tenant SaaS.
Verdict and decision criteria. A single RTX 4090 24GB is the correct hardware choice for content moderation under the following conditions: 1 to 100 million messages per day, English-primary or Llama-Guard-supported language mix, escalation rate below 8%, image moderation either off-card or under 500k images per day, and you can tolerate one card’s worth of single-point-of-failure (mitigated by failover to a second box). Above those numbers, scale to two 4090s active-active or step up to a 5090 32GB for the 14B AWQ Tier 2 path. You should not pick the 4090 if your average traffic exceeds 100 million daily messages with high escalation, if you need 70B-class reasoning as the Tier 2 default, or if your image moderation volume dominates text. For benchmarks see Llama 8B benchmark and the tokens per watt page; for cost framing see monthly hosting cost and vs OpenAI API cost.
Moderate at scale, on-premise, UK-resident
Hybrid Llama Guard plus DeBERTa on one card, hundreds of millions of messages per day. UK dedicated hosting.
Order the RTX 4090 24GBSee also: FP8 Llama deployment, vLLM setup, tokens per watt, Llama 8B benchmark, customer support, monthly cost, spec breakdown.