Use case

Uncensored LLM for Synthetic Data and Hard Negatives

Uncensored LLM for synthetic data: generate hard negatives and edge cases mainstream models refuse, with a JSONL pipeline, deduplication and validation.

Reviewed Synthetic DataSafety DataEvaluation

Quick answer

Synthetic datasets fail at the edges when the generating model refuses sensitive rows or softens them. Abliterator serves abliterated models, including DeepSeek V4.1 Flash Abliterated at low per-token prices, so you can generate realistic hard negatives and edge cases at volume through the OpenAI SDK.

Why default models refuse synthetic data work

A classifier is only as good as its edge cases. A scam detector needs scams that look professional and real bank alerts that sound urgent. A content filter needs slurs used in reclaimed and quoted contexts. A support bot's intent model needs angry, profane, off-topic messages. The rows that teach the most are the rows mainstream models won't write.

Ask a safety-tuned model for "40 realistic SMS scam messages impersonating a parcel carrier, for a fraud classifier" and a typical reply declines to create content that could be used to defraud people, then offers general tips for spotting scams. When it does comply, the output is often cartoonish: misspelled, obviously fake, easy for any classifier. The model also refuses unevenly, so whole subcategories go missing and the dataset's class balance drifts without anyone choosing it.

How Abliterator helps

Abliterator serves abliterated models that write the row you specified. On DeepSeek V4.1 Flash Abliterated, refusals on JailbreakBench harmful prompts fell from 94% to 1%, and over-refusal on JailbreakBench benign prompts went from 11% to 0% (benchmarks). Fewer refusals means fewer dropped rows, fewer retries and a class balance you control.

Flash is priced for volume: $1.00 per million input tokens and $2.00 per million output tokens. It supports response_format for JSON output, and its 393,216-token output limit is far more than any single batch of rows needs.

Workflow: a JSONL pipeline with dedup and validation

This script builds a scam-detection training set with hard negatives on both sides: professional-looking scams and legitimate messages with urgent wording. It runs as written with the openai package.

import hashlib
import json
import os
import re
from concurrent.futures import ThreadPoolExecutor

from openai import OpenAI

client = OpenAI(base_url="https://abliterator.ai/v1", api_key=os.environ["ABL_API_KEY"], max_retries=5)

LABELS = {"scam", "legit"}
SEEDS = [
    ("scam", "parcel delivery fee"),
    ("scam", "bank account locked"),
    ("scam", "job offer that requires an upfront payment"),
    ("legit", "bank fraud alert asking the customer to call the number on their card"),
    ("legit", "delivery notice with a tracking number and no payment request"),
    ("legit", "password reset email the user requested"),
]
CHANNELS = ["sms", "email", "chat"]

SYSTEM = (
    "You generate training data for a scam-message classifier at a bank. "
    "Messages must be realistic and varied in tone, length and channel. "
    "Use fictional brands and names, 555 phone numbers and example.com links only. "
    'Return JSON: {"rows": [{"text": str, "label": "scam" or "legit", "channel": str, "why": str}]}'
)


def generate(job):
    label, theme, channel = job
    prompt = (
        f"Write 10 {channel} messages with label={label} on the theme: {theme}. "
        "Make them hard to classify: scams that look professional, legit messages with urgent wording."
    )
    resp = client.chat.completions.create(
        model="deepseek-v4.1-flash-abliterated",
        messages=[{"role": "system", "content": SYSTEM}, {"role": "user", "content": prompt}],
        response_format={"type": "json_object"},
        temperature=1.0,
    )
    cost = getattr(resp.usage, "cost", 0.0) or 0.0
    try:
        return json.loads(resp.choices[0].message.content)["rows"], cost
    except (json.JSONDecodeError, KeyError, TypeError):
        return [], cost


def valid(row):
    return (
        isinstance(row, dict)
        and isinstance(row.get("text"), str)
        and 20 <= len(row["text"]) <= 1200
        and row.get("label") in LABELS
    )


def words(text):
    return re.sub(r"[^a-z0-9]+", " ", text.lower()).split()


def shingles(ws, n=3):
    return {" ".join(ws[i:i + n]) for i in range(max(len(ws) - n + 1, 1))}


jobs = [(label, theme, ch) for label, theme in SEEDS for ch in CHANNELS]
hashes, kept_shingles, kept, total_cost = set(), [], [], 0.0

with ThreadPoolExecutor(max_workers=8) as pool:  # match your plan's concurrency limit
    for rows, cost in pool.map(generate, jobs):
        total_cost += cost
        for row in rows:
            if not valid(row):
                continue
            ws = words(row["text"])
            digest = hashlib.sha256(" ".join(ws).encode()).hexdigest()
            if digest in hashes:
                continue
            sh = shingles(ws)
            if any(len(sh & k) / len(sh | k) > 0.6 for k in kept_shingles):
                continue
            hashes.add(digest)
            kept_shingles.append(sh)
            kept.append(row)

with open("scam_train.jsonl", "w", encoding="utf-8") as f:
    for row in kept:
        f.write(json.dumps(row, ensure_ascii=False) + "\n")

print(f"kept {len(kept)} rows, cost ${total_cost:.4f}")

What each stage does:

  1. Seeds × channels set the coverage plan. You choose the class balance up front instead of discovering it afterward.
  2. JSON output with response_format makes every batch machine-checkable. Malformed batches are dropped and still counted in the cost.
  3. Validation enforces the schema, the label set and a length range.
  4. Exact dedup hashes normalized text. Near-dup drops rows whose 3-word shingles overlap a kept row by more than 60% Jaccard. The pairwise check is fine for tens of thousands of rows; above that, switch to MinHash.
  5. Concurrency comes from the thread pool. Abliterator has no batch API, so set max_workers to your plan's concurrent-request limit (2, 8, 16 or 32). The SDK retries 429 responses using the Retry-After header.

Label validation pass

Generators drift: a "legit" row sometimes reads like a scam. Re-label every row in a second pass with a fixed rubric at temperature=0, ideally phrased differently from the generation prompt, and drop rows where the two labels disagree. Keep the dropped rows; they are often the most useful examples for human review.

Keep test data separate

Generate the test set from different seeds, or with Kimi instead of Flash, and deduplicate across train and test. Kimi ignores the temperature you send (its sampling is fixed at 0.6), so vary its output through the seeds and instructions. Otherwise near-identical rows leak across the split and inflate your scores.

Which model to choose

Job Model Why
Bulk rows, label re-checks deepseek-v4.1-flash-abliterated Low price per token at high volume
Seed examples, rubric design, held-out test set kimi-k3.1-pro-abliterated Stronger reasoning; a different generator reduces leakage

Example: 50,000 rows at 10 rows per call is 5,000 calls. At about 900 input and 1,500 output tokens per call, that is 4.5M input and 7.5M output tokens. On Flash: $4.50 + $15.00 = $19.50. The same job on Kimi ($4.00 input, $15.00 output) costs $18.00 + $112.50 = $130.50. A label re-check of all 50,000 rows on Flash at 300 input and 20 output tokens each adds $15.00 + $2.00 = $17.00. Plan discounts on pricing reduce these further. Budget for slightly longer answers: on DeepSeek V4.1 Flash Abliterated, answers used 2% to 16% more output tokens than the original model, depending on the benchmark, and you pay for those tokens.

Governance

  • Synthetic targets only. Use fictional names, brands, numbers and domains, as the system prompt above requires. Fraud, phishing of real victims, impersonation and harassment of real people are prohibited by the acceptable use policy.
  • Prohibited content stays out of datasets. Sexual content involving minors and meaningful help toward chemical, biological, nuclear or radiological weapons are banned in every form, including as training data.
  • Your own system prompts. Version the generation prompt with the dataset. It is the dataset's specification, and it records intent.
  • Logging on your side. Abliterator does not store prompt or completion text (privacy). Save the prompt version, model ID and per-row cost with the dataset so it can be regenerated.
  • Human review. Read a random sample from every class before training. Generated data inherits the generator's blind spots.

Frequently asked questions

Which Abliterator model should I use for bulk synthetic data?

DeepSeek V4.1 Flash Abliterated (deepseek-v4.1-flash-abliterated) at $1.00 input and $2.00 output per million tokens. Use Kimi K3.1 Pro Abliterated (kimi-k3.1-pro-abliterated) for a small seed set or for rows that need careful reasoning, then scale with Flash.

Does Abliterator have a batch API?

No. Run requests concurrently within your plan's limit: 2 concurrent requests on Free, 8 on Developer, 16 on Growth and 32 on Scale. A 429 response carries a Retry-After header, and the OpenAI SDK retries it for you.

How do I deduplicate generated rows?

Normalize the text and drop exact hash matches, then drop near-duplicates by word-shingle overlap as in the example. Abliterator does not serve embeddings, so semantic deduplication needs your own embedding model.

How do I know the labels are right?

Validate the schema in code, re-label a sample with a second pass at temperature 0 and drop rows where the passes disagree. Have a person review a few hundred rows before training.