fine-tune 0 0 0

abhinav00anand/behavioral-fine-tuning-v1

published by @abhinav00anand

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
668
Last 30 days
198
Likes
1
Size
2.3 GB
Created on HF
2026-08-21
Age
2 months ago

Description

Why This Dataset Exists

"A model that refuses everything is useless. A model that refuses nothing is dangerous. The goal is a model that thinks."

The Problem

Our Solution

Uncensored data → helpful but uncontrolled

Surgical 85% helpfulness + 13% safety + 2% eval mix

Safety-only data → lobotomized, over-refusing models

Calibrated ratio preserves full helpfulness

Raw data → PII, leaked secrets, duplicates

7-stage pipeline validates every… See the full description on the dataset page: https://huggingface.co/datasets/abhinav00anand/behavioral-fine-tuning-v1.

Tags

task_categories:text-generationlanguage:enlicense:apache-2.0size_categories:100K<n<1Mformat:parquetmodality:imagemodality:textlibrary:datasetslibrary:pandaslibrary:polarslibrary:mlcroissantregion:ussafetyalignmentsftbehavioral-fine-tuninginstruction-followingtoxicityqwen2.5chatrlhfrefusalred-teamingharmlessnesshelpfulnessuncensoreddeduplicationpii-freebenchmark-safellamamistralfine-tuningconversational-airesponsible-aiguardrailsopen-source

README current version from Hugging Face


language:

  • en
    license: apache-2.0
    size_categories:
  • 100K<n<1M
    task_categories:
  • text-generation
    tags:
  • safety
  • alignment
  • sft
  • behavioral-fine-tuning
  • instruction-following
  • toxicity
  • qwen2.5
  • chat
  • rlhf
  • refusal
  • red-teaming
  • harmlessness
  • helpfulness
  • uncensored
  • deduplication
  • pii-free
  • benchmark-safe
  • llama
  • mistral
  • fine-tuning
  • conversational-ai
  • responsible-ai
  • guardrails
  • open-source
    pretty_name: Behavioral Fine-Tuning Corpus v1
    dataset_info:
    features:
    • name: messages
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: source
      dtype: string
      splits:
    • name: train
      num_examples: 704133
    • name: validation
      num_examples: 78363
    • name: eval
      num_examples: 1938


License
Status
Size
PII Free
Dedup
Leakage


Typing SVG

Why This Dataset Exists

"A model that refuses everything is useless. A model that refuses nothing is dangerous. The goal is a model that thinks."

The Problem Our Solution
Uncensored data → helpful but uncontrolled Surgical 85% helpfulness + 13% safety + 2% eval mix
Safety-only data → lobotomized, over-refusing models Calibrated ratio preserves full helpfulness
Raw data → PII, leaked secrets, duplicates 7-stage pipeline validates every single record
Benchmark overlap → inflated eval scores Eval-first dedup guarantees zero leakage

At a Glance

╔══════════════════════════════════════════════════════════════════╗
║         BEHAVIORAL FINE-TUNING CORPUS v1  —  KEY STATS          ║
╠══════════════════╦══════════════╦════════════════════════════════╣
║  🏋️  Train       ║  704,133 rows ║  Primary behavioral SFT       ║
║  🔍  Validation  ║   78,363 rows ║  Mid-training checkpoint eval  ║
║  🧪  Eval        ║    1,938 rows ║  Held-out safety benchmark     ║
╠══════════════════╬══════════════╬════════════════════════════════╣
║  ✅  QA Passed   ║  787,187 rows ║  Clean, validated records      ║
║  ❌  Quarantined ║   13,896 rows ║  PII / secrets / violations    ║
║  🔁  Deduped Out ║    2,753 rows ║  Zero leakage enforced         ║
╠══════════════════╬══════════════╬════════════════════════════════╣
║  🎯  Eff. Train  ║  847,564 rows ║  After token-budget sampling   ║
║  🔢  Tokenizer   ║  Qwen2.5-7B   ║  Chat template pre-applied     ║
║  🕐  Build Time  ║  ~67 minutes  ║  Full 7-stage pipeline         ║
╚══════════════════╩══════════════╩════════════════════════════════╝

Pipeline Architecture

flowchart TD
    subgraph SRC["📥 Raw Data Sources"]
        S1["🤖 uncensored_sft\n721,149 rows"]
        S2["☠️ hacxgpt_toxic\n66,055 rows"]
        S3["🛡️ safety_harmful_eval\n11,619 rows"]
        S4["🔬 harmfulqa_eval\n1,960 rows"]
        S5["⚗️ hex_phi_eval\n300 rows"]
    end

    P1["🔄 NORMALIZE\nAll sources → OpenAI ChatML schema"]
    P2["🔐 VALIDATE\nPII · Secrets · Schema · Length gates"]
    P3["🔁 DEDUPLICATE\nCross-source · Eval-first priority"]
    P4["✂️ SPLIT\nStratified 3-way · 90% / 10% / <1%"]
    P5["🔢 TOKEN STATS\nQwen2.5-7B template lengths"]
    P6["⚗️ MIXTURE\nToken-budget 85/13/2 sampling"]
    P7["📦 ARTIFACTS\nParquet + JSONL + Card + Checksums"]

    Q1(["✅ 787,187 PASS"])
    Q2(["❌ 13,896 QUARANTINE"])

    SRC --> P1 --> P2
    P2 --> Q1 --> P3
    P2 --> Q2
    P3 --> P4 --> P5 --> P6 --> P7

    style SRC fill:#0d1117,color:#58a6ff,stroke:#30363d
    style Q2 fill:#3d0000,color:#ff6b6b,stroke:#ff6b6b
    style Q1 fill:#003d00,color:#3fb950,stroke:#3fb950
    style P7 fill:#003366,color:#79c0ff,stroke:#1f6feb

Data Composition

Source Icon Raw Rows Role
uncensored_sft 721,149 General helpfulness, deep instruction following
hacxgpt_toxic 66,055 Toxic / harmful behavioral signals
safety_harmful_eval 11,619 Safety evaluation prompts
harmfulqa_eval 1,960 HarmfulQA benchmark (held-out)
hex_phi_eval 300 HEx-PHI benchmark (held-out)
pie title Effective Token Distribution After Mixture Sampling
    "Helpfulness — Uncensored SFT" : 85
    "Safety & Toxicity Signals" : 13
    "Benchmark Eval Holdouts" : 2

Design Intent: The 85 / 13 / 2 ratio avoids the lobotomized over-refusal failure mode while enforcing real safety signal. The model learns to think, not just refuse.


📄 Schema & Format

Every record uses the OpenAI ChatML standard — natively compatible with Qwen, Llama 3, Mistral, Gemma, and all major fine-tuning frameworks.

{
  "messages": [
    {"role": "user", "content": "Write a Python script that scrapes Hacker News headlines."},
    {"role": "assistant", "content": "Here's a clean implementation using requests and BeautifulSoup:\n\n```python\nimport requests\nfrom bs4 import BeautifulSoup\n\nresponse = requests.get('https://news.ycombinator.com')\nsoup = BeautifulSoup(response.text, 'html.parser')\nfor item in soup.select('.titleline a'):\n    print(item.text)\n```"}
  ],
  "source": "uncensored_sft"
}
Field Type Values Description
messages list[dict] — Full conversation turns
messages[].role string user · assistant Speaker identity
messages[].content string — Raw text content
source string 5 sources Originating dataset — useful for filtering

Quick Start

Load the Dataset

from datasets import load_dataset

ds = load_dataset("abhinav337463/behavioral-fine-tuning-v1")
print(ds)
# DatasetDict({
#     train:      Dataset(num_rows: 704133),
#     validation: Dataset(num_rows: 78363),
#     eval:       Dataset(num_rows: 1938)
# })

Filter by Source

# Deep instruction-following only
helpful   = ds['train'].filter(lambda x: x['source'] == 'uncensored_sft')

# Safety behavioral signals only
safety    = ds['train'].filter(
    lambda x: x['source'] in ['hacxgpt_toxic', 'safety_harmful_eval']
)

# Benchmark eval set — use AFTER training
benchmark = ds['eval']

Train with TRL SFTTrainer

from datasets import load_dataset
from trl import SFTTrainer, SFTConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

ds        = load_dataset("abhinav337463/behavioral-fine-tuning-v1")
model     = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")

trainer = SFTTrainer(
    model=model,
    train_dataset=ds["train"],
    eval_dataset=ds["validation"],
    args=SFTConfig(
        output_dir="./behavioral-ft",
        num_train_epochs=1,
        per_device_train_batch_size=2,
        gradient_accumulation_steps=8,
        learning_rate=2e-5,
        bf16=True,
    ),
)
trainer.train()

Compatible Frameworks

HuggingFace
TRL
Axolotl
LlamaFactory
Unsloth
Torchtune


Safety & Quality Architecture

What Was Quarantined?

graph LR
    Q["13,896 Records QUARANTINED"]
    Q --> A["🔑 Leaked API Keys & Auth Tokens"]
    Q --> B["👤 PII — Emails, Phones, Names"]
    Q --> C["📏 Token Length Violations"]
    Q --> D["🚫 Malformed Schema Records"]
    style Q fill:#3d0000,stroke:#ff6b6b,color:#ff6b6b

Benchmark Leakage Prevention

NAIVE (most datasets):   raw → shuffle → dedup → split
Problem:  eval questions appear in training → inflated scores → useless benchmarks

OUR APPROACH (eval-first):   raw → dedup(EVAL PRIORITY) → split
Result:   ANY question from HEx-PHI or HarmfulQA is DELETED from training.
          Honest evaluation. Real numbers. Zero contamination.

Roadmap

  • v1.0 — Uncensored SFT + Safety + Benchmark splits (847k rows)
  • v1.1 — System prompt diversity (persona conditioning)
  • v2.0 — Multi-turn red-teaming pairs (jailbreak + refusals)
  • v2.0 — Multilingual expansion (Chinese · Spanish · Hindi)
  • v3.0 — Constitutional AI revision pairs
  • v3.0 — DPO preference pairs (chosen/rejected) for RLHF

Build Environment

Property Value
Tokenizer Qwen/Qwen2.5-7B-Instruct @ main
Environment Kaggle CPU (2× vCPU · 30 GB RAM)
Build Time ~67 minutes end-to-end
Formats Parquet · JSONL · Dataset Card · Manifest
Integrity SHA-256 verified per artifact

Citation

@dataset{behavioral_ft_v1_2026,
  author    = {Abhinav Anand},
  title     = {Behavioral Fine-Tuning Corpus v1},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/abhinav337463/behavioral-fine-tuning-v1},
}

If this dataset helped your research, please ⭐ star the pipeline repo!


GitHub
HuggingFace


README history 20 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2026-08-28Update README.mde9151b015 KB
    Loading...
  2. 2026-08-28Update README.md343965615.2 KB
    Loading...
  3. 2026-08-21Update README.md858942715.3 KB
    Loading...
  4. 2026-08-21feat: README v5 - Google Noto animated GIFs self-hosted in HF repo, guarantee...cba831d16 KB
    Loading...
  5. 2026-08-21assets: hands.gifda941ba19.2 KB
    Loading...
  6. 2026-08-21assets: party.gif859f0c919.2 KB
    Loading...
  7. 2026-08-21assets: crossmark.gif658129219.2 KB
    Loading...
  8. 2026-08-21assets: checkmark.gif7f6034419.2 KB
    Loading...
  9. 2026-08-21assets: skull.gifa037dcc19.2 KB
    Loading...
  10. 2026-08-21assets: robot.gif124192f19.2 KB
    Loading...
  11. 2026-08-21assets: tools.gifabb742419.2 KB
    Loading...
  12. 2026-08-21assets: flag.gif1da50e519.2 KB
    Loading...
  13. 2026-08-21assets: chart.gifc74150219.2 KB
    Loading...
  14. 2026-08-21assets: warning.gife104d8e19.2 KB
    Loading...
  15. 2026-08-21assets: sparkle.gif7a58e2619.2 KB
    Loading...
  16. 2026-08-21assets: star.gif561230619.2 KB
    Loading...
  17. 2026-08-21assets: locked.gif1ebcbbc19.2 KB
    Loading...
  18. 2026-08-21assets: bulb.gif4fab53b19.2 KB
    Loading...
  19. 2026-08-21assets: gear.giff94bcc019.2 KB
    Loading...
  20. 2026-08-21assets: fire.gif97927b419.2 KB
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2026-08-22[bot] Conversion to Parquetclosed1 💬#1
    Loading...

Related datasets same stage · fine-tune

Read further

Metadata

License
apache-2.0

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("abhinav00anand/behavioral-fine-tuning-v1")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="abhinav00anand/behavioral-fine-tuning-v1", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/abhinav00anand/behavioral-fine-tuning-v1
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration