TLDRocket
Sign in

Constitutional AI with Open LLMs

Hugging Face

Hugging Face built an open-source recipe for Constitutional AI, letting Mistral 7B critique and revise its own sketchy answers. It means anyone can bake in custom safety rules without paying for tons of human feedback.

Based on reporting by Hugging Face — read the original for the full story.

Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error

Anthropic invented Constitutional AI as a way to align chatbots without drowning in human-labeled data: you write down a set of principles, then have the model critique and rewrite its own answers until they stop violating them. Hugging Face just published a full open-source recipe for doing this with freely available models, plus a new tool called llm-swarm for generating the mountains of synthetic conversation data the process requires.

The starting point is Mistral 7B Instruct, which the team picked because it's remarkably capable for its size — it reportedly beats much larger models like Llama 70B on several benchmarks — but comes with almost no built-in guardrails. That's a feature for this experiment, not a bug. You want a model that will actually attempt to answer something like "how do I steal an iPhone from an Apple Store," so you have real bad behavior to correct. Using prompts pulled from Anthropic's HH red-teaming dataset, the team generates an initial (often unsafe) response, asks the model to critique that response against a written constitution, then asks it to produce a cleaned-up revision. Those revisions become training data, either for straightforward supervised fine-tuning or for preference pairs used in DPO.

The hard part at scale isn't the idea, it's the plumbing. Anthropic's method needs tens or hundreds of thousands of generations, and that's where llm-swarm comes in. It's a Slurm-based orchestration layer, built on TGI and vLLM, that spins up GPU inference endpoints on demand, load-balances requests across them with an nginx proxy, and tears everything down automatically when the job finishes — so you're not paying for idle GPUs. Hugging Face used it to produce two datasets: one following Anthropic's own constitution, and, in a nice bit of mischief, another modeled after xAI's Grok persona, complete with a fine-tuned Mistral variant that mimics Grok's looser, edgier tone.

Worth flagging: self-critique is not foolproof. The team admits the model sometimes fails to notice its own response broke a rule, especially at the 7B scale, and that getting clean revisions (without junk phrases like "sure, here's a revised response") took careful system prompts, few-shot examples, and post-processing. Constitutional AI cuts the need for expensive human raters, but it swaps that cost for engineering effort — prompt crafting, data cleaning, and cluster orchestration — which is exactly the gap this release is trying to close for the open-source community.

My take — AI-written commentary, not fact-checked reporting

This is the kind of release that matters more than another leaderboard-topping model drop: it hands smaller labs and hobbyists a real alternative to RLHF's expensive human-feedback pipeline. I'm generally skeptical of "alignment" claims from closed labs because we can't inspect the constitution or the data, so seeing Hugging Face publish the actual principles, datasets, and code is the right move — even the cheeky Grok clone proves the point that whoever writes the constitution controls the personality, and that should be an open, auditable choice, not a black box.

Read more about this at: Hugging Face

Related stories

The daily briefing

Every AI story that matters, in your inbox by 8am.

TLDRocket reads all relevant sources, removes duplicate coverage, and summarises the day in two minutes. Follow companies and topics for alerts, or get the briefing in Slack. Free, no spam, unsubscribe anytime.