This report provides a comprehensive guide for training a state-of-the-art, specialized cybersecurity language model. It covers curated lists of datasets for each stage of training—from pre-training to reasoning-focused post-training—and outlines a detailed methodology for continual pre-training with private data.


1. Curated Datasets for Language Model Training

A robust model is built in layers. First, it learns general language patterns from a massive pre-training corpus. Then, it learns to follow instructions and reason through post-training (SFT).

1.1 General-Purpose Large Pre-training Corpora

This is the foundational data used to train a base model from scratch or to continue its training to adapt it to broad new knowledge.

Corpus NameSizeKey Characteristics & Focus
SlimPajama1.2 Trillion tokensA rigorously cleaned and deduplicated version of the RedPajama dataset. It contains a diverse mix of web data (Common Crawl), GitHub code, books, Wikipedia, and scientific articles (arXiv).
The Pile825 GiBA large, open-source language modeling dataset from EleutherAI. Known for its diversity, encompassing 22 different smaller datasets, including academic sources, code, and web text.
Dolma3 Trillion tokensThe open dataset used to train the OLMo models by the Allen Institute for AI. It contains a massive and diverse mix of web content, academic papers, code, and books.
FineWeb15 Trillion tokensA massive, high-quality web dataset from Hugging Face. It is heavily filtered and deduplicated from 96 Common Crawl dumps, making it one of the best resources for pre-training on web data.
C4 (Colossal Clean Crawled Corpus)~750 GiBA cleaned version of Common Crawl that was widely used for training earlier models like T5. While older, it’s still a valuable resource.

1.2 General-Purpose SFT / Post-training Datasets

These datasets teach a pre-trained model to be a helpful assistant, enabling it to follow instructions, answer questions, and engage in conversation.

Dataset NameSize (Examples)Key Characteristics & Focus
Infinity-Instruct~7,000,000A massive, high-quality dataset of evolved instructions. Excellent for providing deep and broad coverage of general abilities.
WebInstructSub~2,390,000A very large dataset created by extracting and refining question-answer pairs from the Common Crawl web corpus.
The-Tome~1,750,000A large and carefully filtered collection with a strong emphasis on high-quality, complex instruction following.
OpenHermes 2.5~1,000,000A highly popular and respected dataset composed of primarily GPT-4 level synthetic data. Excellent for teaching complex reasoning.
Tulu 3 SFT Mixture~940,000A state-of-the-art recipe from AI2. A meticulously curated mix focusing on reasoning, math, coding, and precise instruction adherence.

1.3 Reasoning-Specific Post-training Datasets

These datasets are specifically designed to enhance a model’s ability to perform multi-step reasoning, logical deduction, and mathematical problem-solving. They are often mixed into the general SFT data.

Dataset NameSize (Examples)Key Characteristics & Focus
NuminaMath-CoT~100,000+A high-quality dataset of mathematical problems with detailed Chain-of-Thought (CoT) explanations for each step. Excellent for teaching step-by-step reasoning.
MetaMathQA~395,000A large dataset created by re-writing math problems to enhance reasoning diversity. It helps models generalize their mathematical abilities.
Open-Platypus~25,000While a general dataset, it is highly curated and filtered, known for significantly boosting performance on reasoning and logic benchmarks.
Code-Contests~13,500Contains competitive programming problems with solutions. While code-focused, it is one of the best datasets for teaching complex, multi-step logical reasoning.
GSM8K~8,500A classic dataset of grade-school math problems that require multi-step reasoning. Essential for benchmarking and training core reasoning skills.

1.4 Cybersecurity SFT Datasets 🛡️

These datasets provide the specialized knowledge required for your model to excel in the security domain.

Dataset NameSize (Examples)Key Characteristics & Focus
CyberLLMInstruct~55,000The leading choice for instruction tuning. Covers malware analysis, phishing, vulnerabilities, and more.
Primus CollectionMulti-stageA comprehensive suite including pre-training, instruction, and reasoning data from Trend Micro AI.
AttackQA~25,000A Question-Answering dataset designed specifically for Security Operations Center (SOC) analysts’ needs.
Purple Team DatasetSynthetic LogsSimulates collaborative Red (offensive) and Blue (defensive) team exercises, including logs and network traffic.

2. Strategy for Continual Pre-training with Private Data

When you have a valuable, privately curated dataset (like proprietary cybersecurity reports, incident logs, or internal threat intelligence), the goal is to make the model an expert in that domain without making it “forget” its general world knowledge. This is achieved through continual pre-training.

Core Principle: You should NEVER train only with your own private data. Doing so will lead to catastrophic forgetting (the model loses its general abilities) and domain overfitting (the model performs poorly on anything outside your specific data format).

You must mix your private cybersecurity data with a large, general-purpose pre-training corpus.

  1. Choose a Base Model: Start with a strong base model like Llama 3.1 8B Base. A base model is better for continual pre-training than an instruct model, as it is designed to continue learning from large, unstructured text corpora.

  2. Select a General Corpus: Choose a large, high-quality general pre-training corpus from the list in section 1.1. SlimPajama or FineWeb are excellent modern choices.

  3. Create Your Data Mixture:

    • Ratio: The ideal ratio depends on the size and quality of your private data. A good starting point is a 50/50 or 70/30 mix (Private Cyber Data / General Corpus Data). If your private dataset is relatively small (under 10 billion tokens), you should lean towards a lower ratio of your data to avoid overfitting.
    • Preparation: Ensure your private text data is cleaned, formatted as plain text, and deduplicated. Combine it with the general corpus into a single training dataset.
  4. Execute the Continual Pre-training Run:

    • This is not SFT. You will run a pre-training objective, where the model learns to predict the next token in the text.
    • Training Time: This process is computationally expensive. You will likely train for a specific number of tokens (e.g., 50B to 200B tokens), not epochs.
    • Learning Rate: Use a very small learning rate and a learning rate scheduler (like cosine decay) to gently update the model’s weights.
  5. Follow Up with Supervised Fine-Tuning (SFT):

    • After continual pre-training, your model is now an expert in the language of cybersecurity but may not be good at following instructions.
    • Take your new, continually pre-trained model and perform a final SFT step. For this, create a mixture of general SFT data (like OpenHermes) and cybersecurity SFT data (like CyberLLMInstruct) as described previously. This final step makes your domain-expert model a helpful assistant.

This two-stage process—continual pre-training followed by supervised fine-tuning—is the state-of-the-art method for creating a highly specialized and capable domain-specific model.

Reference for Data Mixing Principle

The concept that you should not train exclusively on domain-specific data is a cornerstone of modern transfer learning and continual learning. The core ideas—catastrophic forgetting and domain overfitting—are well-documented in machine learning literature.

  1. Continual Learning in Large Language Models (LLMs): A Survey (Mirzadeh et al., 2024, arXiv:2403.02927): This recent survey provides a comprehensive overview of the challenges in continually training LLMs. It explicitly discusses catastrophic forgetting as a primary hurdle and reviews various methods to mitigate it, with data replay (mixing old and new data) being a fundamental strategy. Section 3 directly addresses the forgetting problem.
  2. LIMA: Less Is More for Alignment (Zhou et al., 2023, arXiv:2305.11206): This influential paper, while focused on instruction tuning, provides strong evidence for the power of data quality and diversity. Its findings implicitly support the idea that a model’s capabilities are shaped by the breadth of its training data. Overfitting to a narrow, specialized dataset would counteract the goal of creating a broadly capable model.
  3. Practical Experience from the Community: Beyond academic papers, this principle is widely accepted as a best practice in applied AI. The fine-tuning recipes for virtually all high-performing open-source models (like those from Mistral, Llama, and AI2) involve mixing domain-specific or instruction data with a diverse, general dataset to maintain robust performance. The goal is to specialize the model without sacrificing the general reasoning capabilities learned during its initial pre-training.

Medicine-Focused Datasets

The medical domain has a rich collection of datasets, though many are heavily restricted due to patient privacy (HIPAA). Here are some well-known public and benchmark datasets.

Dataset NameTypeFocus & Content
PubMed Central (PMC)Pre-training CorpusA massive archive of over 9 million full-text biomedical and life sciences journal articles. It’s a standard for pre-training medical LLMs like BioBERT and Med-PaLM.
MIMIC-IVPre-training / SFTA large, de-identified database containing health data from tens of thousands of ICU patients. It includes clinical notes, lab results, and diagnoses. Access requires a credentialing process.
MedQuADSFT / Q&AA dataset of over 47,000 medical questions and answers collected from reputable NIH websites like a ‘medical textbook’ for question-answering.
LiveMedSFT / Q&AA dataset of over 3.7 million medical questions and answers, designed to reflect real-world user queries for medical information.
MedMCQASFT / Q&AA large-scale, multiple-choice question-answering dataset designed for Indian medical entrance exams. It covers a wide range of medical subjects and is a challenging benchmark for medical reasoning.
PMC-LLaMASFT / InstructionsAn instruction-tuning dataset created by processing 4.8 million biomedical research papers from PubMed Central. It’s designed to teach models to follow instructions in the biomedical domain.

Negotiation & Bargaining Focused Datasets

Teaching an LLM strategic bargaining is a frontier research area. Datasets are scarcer than in medicine but are growing. They focus on modeling dialogue, strategy, and persuasion.

Dataset NameTypeFocus & Content
CraigslistBargainSFT / DialogueA dataset of over 6,000 real dialogues from Craigslist where two people negotiate the price of an item for sale. It includes the participants’ desired outcomes and strategies.
CaSiNo (Persuasion for Good)SFT / DialogueA dataset of over 1,000 dialogues where one person tries to persuade another to donate to a charity. It’s designed to study persuasive language and strategy.
Deal or No DealSFT / DialogueA dataset based on the TV game show, capturing multi-turn negotiations between a player and a “banker” involving strategic offers and counter-offers under uncertainty.
MutualFriendsSFT / DialogueA social negotiation game where two players, who can’t see each other’s friends list, must negotiate to discover their mutual friends through dialogue. It models information exchange and strategy.
Coached Conversational Preference Elicitation (CCPE)SFT / DialogueWhile not strictly about bargaining, this dataset involves an agent asking strategic questions to understand a user’s preferences (e.g., for movies). It’s highly relevant for learning strategic questioning, a key component of negotiation.