Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Overview
dataset_permissive{.json/.parquet} is a curated collection of pairs of pytorch programs and equivalent triton code (generated by torch inductor) which can be used to train models to translate pytorch code to triton code.
The triton code was generated using PyTorch 2.5.0 so for best results during evaluation / running the triton code we recommend using that version of pytorch.
Dataset Creation
The dataset was created through the following process:
- Repository Collection: PyTorch repositories were collected from GitHub using repositories (and associated hashes) from the Stack v1.
- PyTorch Module Extraction: We extracted the pytorch code from the repositories, and seperated them into individual
torch.nnmodules with appropriate dependencies. - Creating Unit Tests: We created unit tests for each module to ensure that the code was working as expected. Code in which could not create unit tests for was removed.
- Extracting Triton Code: We used torch.compile in order to produce triton code from the pytorch code.
- Transorming Triton Code: We transformed the triton code into one which resembled the format seen in KernelBench.
- Metadata Enrichment: Each repository entry was enriched with metadata such as license information, star count, and commit SHA.
The scripts to do this yourself can be found here
Data Structure
Each entry in the dataset contains the following fields:
| Field | Description |
|---|---|
repo_name |
The name of the repository in the format username/repository |
licenses |
List of licenses associated with the repository |
stars |
Number of GitHub stars the repository has |
sha |
The commit SHA hash used for version reference |
repo_link |
Direct link to the repository at the specific commit (GitHub URL) |
| Additional fields | The dataset may contain other repository-specific information |
File Formats
The dataset is available in two formats:
- JSON:
dataset_permissive.json- A human-readable format that can be easily parsed by most programming languages. - Parquet:
dataset_permissive.parquet- A columnar storage format optimized for analytics and big data processing.
Usage Examples
Loading the Dataset in Python
Using JSON:
import json
# Load the JSON version
with open('dataset_permissive.json', 'r') as f:
repos = json.load(f)
# Example: Print the first 5 repository names
for repo in repos[:5]:
print(repo['repo_name'])
Using Parquet:
import pandas as pd
# Load the Parquet version
df = pd.read_parquet('dataset_permissive.parquet')
# Example: Get repositories with more than 1000 stars
popular_repos = df[df['stars'] > 1000]
print(f"Number of popular repositories: {len(popular_repos)}")
License Information
This dataset is licensed under the June 9 Researcher Reciprocity License.
You are free to use, share, analyze, transform, and redistribute the material for research, education, benchmarking, publication, commercial analysis, and other lawful purposes, provided you give appropriate credit.
This license adapts the Open RAIL-D structure and adds one specific use restriction: training, fine-tuning, distillation, synthetic-data generation for training, embedding for training, or otherwise using this dataset to improve an AI model or AI service requires Researcher Reciprocity.
If you train on it, you let us generate.
Covered AI model and service providers may not use this dataset while imposing terms that prevent GPU Mode, dataset contributors, or authorized researchers from generating outputs, evaluating models, benchmarking, publishing research, or exploring their own research ideas on materially equal terms to ordinary users.
The dataset_permissive contains code derived from repositories with permissive licenses, including but not limited to MIT, Apache-2.0, BSD, MPL, Unlicense, and zlib. Users should still verify the license of individual repositories before using their code in production or commercial settings.
Citation
@software{kernelbook2025,
title={KernelBook},
author={Paliskara, Sahan and Saroufim, Mark},
year={2025},
month={5},
url={https://huggingface.co/datasets/GPUMODE/KernelBook},
}
- Downloads last month
- 466