File size: 3,798 Bytes
4878c27 db34aaa 4878c27 be5922c d57b86e 4878c27 be5922c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
---
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.
> [!NOTE]
> 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:**
```json
{
"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](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.
|