KernelLLM-1 / README.md
frisk2137's picture
Update README.md
db34aaa verified
metadata
license: other
task_categories:
  - text-generation
language:
  - en
tags:
  - code
  - kernel
  - osdev
  - linux
  - freebsd
  - low-level
pretty_name: KernelLLM-1
size_categories:
  - 100K<n<1M

KernelLLM-1 Dataset

A high-quality raw dataset for training and fine-tuning LLMs on Operating System Development.

Overview

This dataset combines raw source code from a variety of mature and hobbyist operating system kernels with thousands of expert-level technical discussions and critiques from the Linux Kernel Mailing List.

The source code included in this dataset represents the latest stable versions of the respective repositories as of February 2nd 2026.

Dataset Structure

The dataset is provided in Parquet format for optimal compression and integration with the datasets library.

1. kernelllm_source.parquet (~1 GB)

Cleaned & Deduplicated Source Code (~970M Tokens).

  • Files: 180,129
  • Size: ~1 GB (Parquet), ~3.4 GB (Raw Text)
  • Sources: Linux, FreeBSD, OpenBSD, NetBSD, Illumos, ReactOS, seL4, ToaruOS, Redox OS, SerenityOS and DragonFlyBSD.
  • Cleaning:
    • Removed common license headers (GPL, BSD, MIT, etc) to prioritize logic.
    • Exact and "smart" deduplication (normalized whitespace) across repositories.
    • Excluded files < 100 characters to remove boilerplate headers.

Repository Distribution:

Repository File Count
Linux 62,969
FreeBSD 43,956
Illumos 23,411
BSD-Mixed (Open/Net) 22,949
DragonFlyBSD 17,662
SerenityOS 7,307
Redox OS 701
ToaruOS 609
seL4 565

2. kernelllm_critiques.parquet (~3.6 MB) (Tiny bit of the LKML)

LKML Critique Pairs (3,135 pairs).

  • Sources: lore.kernel.org archives.
  • Content: Pairs code snippets (patches) with substantive replies, critiques and NACKs from senior maintainers.
  • Schema:
{
  "source": "lkml",
  "subject": "[PATCH] ...",
  "code": "(The patch content)",
  "critique": "(The maintainer feedback)",
  "metadata": {
    "author": "...",
    "date": "...",
    "thread_id": "..."
  }
}

Dataset Release Strategy

This is the Raw version of the dataset. It is intended for:

  1. Intermediate Training: Pre-training on high-quality systems code.
  2. Fine-Tuning: Instruction-tuning models to act as "Kernel Maintainers". (Or just make them better at Kernel code.)
  3. Research: Analyzing developer communication patterns in low-level systems.

Licensing and Usage

This dataset is a collection of publicly available open-source code and mailing list archives. It contains content governed by multiple licenses. For full details, see the LICENSE file.

  • GNU General Public License (GPL) v2/v3 (e.g., Linux, ReactOS)
  • BSD 2-Clause / 3-Clause (e.g., FreeBSD, OpenBSD, NetBSD)
  • MIT License (e.g. SerenityOS, ToaruOS)
  • Apache License 2.0 (e.g., seL4)

Disclaimer

  1. Original Licenses Apply: The individual source code files and mailing list archives contained in this dataset remain governed by their original respective licenses.
  2. Attribution: The metadata field for each entry in the dataset includes repository and author information to facilitate attribution.
  3. Research & Ethics: This dataset is provided primarily for research and educational purposes in the field of LLM training and systems programming analysis.
  4. License Compliance: Users of this dataset are responsible for ensuring that their use of the data complies with all applicable licenses.w

Opt-out

If you are a maintainer of one of the included repositories and would like your data removed from future versions of this dataset, please open an issue on the Hugging Face dataset page.