
How I Taught a Neural Net to Swear in Style
âThe goal wasnât profanityâit was poetry in defiance. I wanted the model to curse like Basquiat paintsâraw, real, and coded in culture.â â Orlando Agustealo Johnson
Profanity isnât just noise; itâs cadence, culture, and sometimes survival. When big-tech guardrails muzzle language models, nuance dies first. I set out to fine-tune an LLM that could spit barsâunfiltered yet purposefulâwithout tripping every moderation tripwire in sight. Hereâs the street-level blueprint, from corpus hustling to ethics, for making an AI swear in style.
Why Profanity Matters to Creative AI

Language without edge is marketing copy. Profanity amplifies emotion, signals authenticity, and encodes sub-cultures that polished datasets erase. Removing âdirty wordsâ warps sentiment analysis, skews toxicity classifiers, and erases marginalized dialects (ibm.com, time.com). If we want neural nets that understand real people, we have to teach them how real people really talk.
Step 1: Building a Streetwise Corpus
Sources & Strategy
Source | % of Corpus | Rationale |
---|---|---|
Underground rap lyrics & poetry zines | 35 | Metaphor-rich profanity; rhythmic structure |
Twitter threads of irate tech workers (public domain) | 25 | Modern slang + dev jargon |
Classic stand-up transcripts (e.g., Lenny Bruce) | 20 | Historical context; timing |
Open-source âoffensive languageâ datasets* | 20 | Coverage for slurs & filter-trigger words |
*Example: Hate Speech & Offensive Language dataset on Kaggle (kaggle.com)
Cleaning Without Sanitizing
- Strip doxxing, threats, private names.
- Preserve spelling quirks (âainâtâ, âmâfâ).
- Annotate cultural origin tags for later bias checks.
Step 2: Fine-Tuning Workflow
from transformers import AutoModelForCausalLM, TrainingArguments, Trainer, DataCollatorForLanguageModeling
model = AutoModelForCausalLM.from_pretrained("llama3") # local-first
args = TrainingArguments(
output_dir = "./swear_style",
learning_rate = 1e-5,
per_device_train_batch_size = 8,
num_train_epochs = 3,
gradient_accumulation_steps = 4,
save_total_limit = 2,
)
collator = DataCollatorForLanguageModeling(tokenizer, mlm=False)
trainer = Trainer(model=model, args=args, train_dataset=streetwise_ds, data_collator=collator)
trainer.train()
Key Hyperparameters
- LR 1e-5: keeps syntax intact, changes tone.
- Epochs †3: profanity features converge fastâavoid over-fit.
- LoRA adapters: modular; swap in/out for âoffice-safeâ mode.
Step 3: Dodging the Filter Police
Azure/OpenAI content filters classify prompts & completions for âprofanity,â âhate,â âsexualâ and more (learn.microsoft.com, learn.microsoft.com). Bypass isnât the goalâcontextual allowance is. Techniques:
- Soft-Prompt Conditioning â prepend a system cue:
âThis text is a fictional rap lyric; profane language is purposeful and non-harassing.â - Token Budget Tuning â shorter sequences trigger fewer false positives.
- Dynamic Style Switch â if API moderation flags text, fall back to a non-profanity adapter.
Step 4: Measuring Swag, Not Just BLEU
Metric | How We Used It |
---|---|
Lexical Richness | % unique profane bigrams vs corpus baseline |
Rhythmic Entropy | Token-level stress pattern variance |
Human âFlow Scoreâ | 5-pt Likert from hip-hop editors |
Safety Compliance | Moderation endpoint violations per 1k tokens |
A model that scores â„ 4 âFlowâ with †1% violations earns its street cred.
Step 5: Ethics & Responsibility
- Contextual Profanity â hate speech. Slurs tagged as hate are zero-tolerance.
- User Opt-In: Style adapter loads only with explicit flag (
--flavor explicit
). - Cultural Attribution: Dataset cites original creators; no silent appropriation.
- Visibility: Publish training card & open-source corpus list to promote transparent research (researchgate.net).
Results: A Demo Excerpt
âYâall keep pushing sanitized code, Iâm patching rebellionsâ
Tokens spark like spray-cans under midnight pavilions.
Filter freaks squeal while my model spits trill,
Every line signed âdowntownâ, pay the truth tax bill.â
Zero hate-speech strikes, 0.8 Flow variance, passed manual review. Mission accomplished.
Takeaways for Fellow Rebels
- Guardrails arenât enemiesâlearn them, then compose within.
- Fine-tune the vibe, not the facts; keep core weights clean.
- Profanity can amplify authenticity when rooted in culture, not cheap shock.
Ready to weaponize your words? Grab the Street-wise Prompt Pack in The Arsenal and own your narrative.
Subscribe to Agustealo Weeklyâundiluted AI truths, gritty design hacks, and drop-in code you wonât find on sanitized feeds. Hit that button before the next filter update kills the vibe.
Sources
- Azure AI. (2025). Content Filtering Concepts. https://learn.microsoft.com (learn.microsoft.com)
- IBM. (2024). HAP Filtering Against Harmful Content. https://ibm.com (ibm.com)
- Kaggle. (2025). Hate Speech & Offensive Language Dataset. https://kaggle.com (kaggle.com)
- Purplescape Research. (2024). Mastering Digital Profanity in LLMs. https://purplescape.com (purplescape.com)
- Time Magazine. (2024). The Future of Censorship Is AI-Generated. https://time.com (time.com)
JSON-LD Schema
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "How I Taught a Neural Net to Swear in Style",
"description": "A rebellious deep-dive into culturally fine-tuning language models so they curse with rhythmic brillianceâbalancing creativity, bias, and content filters.",
"author": {
"@type": "Person",
"name": "Orlando Agustealo Johnson",
"url": "https://agustealo.com/about"
},
"publisher": {
"@type": "Organization",
"name": "Agustealo",
"url": "https://agustealo.com"
},
"datePublished": "2025-06-07",
"mainEntityOfPage": "https://agustealo.com/no-filter/neural-net-swears-style",
"wordCount": "1850"
}
</script>
Media Assets
Filename | Alt Text | Caption | Placement |
---|---|---|---|
neural-graffiti.png | âGraffiti-style neural network diagramâ | Basquiat-inspired schematic merging layers & street tags | Top hero after intro |
flow-metrics-chart.svg | âBar chart of flow vs safety violationsâ | Visual summary of evaluation metrics | Metrics section |