← All entries
Dataset2024#280

KStack

Summary

KStack is the largest collection of permissively licensed Kotlin source code, containing 5.52 million files scraped from GitHub repositories with metadata like owner, repo ID, language distribution, license, and commit SHA. It is part of JetBrains' Kotlin ML Pack (alongside the curated KStack-clean and KExercises datasets) and is intended for pretraining and fine-tuning code generation models for Kotlin, demonstrating that even small high-quality subsets can yield up to a 16-point increase in HumanEval pass rate.

Venue
JetBrains (HuggingFace)
Access
free
License
other (permissively licensed Kotlin code, varies per file; Apache 2.0 common)
License family
Other
Language
Kotlin, Java, English
Hugging Face
JetBrains/KStack
Author type
human
Added
Jul 17, 2026
Verified
Jul 17, 2026
Research status
done

From the source

Repository
JetBrains/KStack
Created
May 13, 2024
Last updated
Apr 22, 2025
Downloads (last month)
1,686
Likes
14
Size
1M to 10M rows
Modalities
text
Tasks
text-generation
Formats
parquet

Fetched Oct 3, 2026 from Hugging Face. These numbers change; the curated fields above do not come from here.

Topics

Code

Dataset profile

Scale
Card comparison table: 4M files / 168,902 repos / 292M lines / 3.1B tokens vs Stack v2 Kotlin 2M / 109,457 / 162M / 1.7B. dataset_info train: 5,517,601 examples; 16,332,255,331 bytes (~16.33 GB) uncompressed / download_size 5,891,399,337 (~5.89 GB parquet). usedStorage 14,463,919,198 bytes (~14.46 GB). 33 parquet shards (~176–182 MB). YAML size_categories 100M<n<1B conflicts with Hub tags 1M<n<10M and the 5.52M-row split — tags/split used here. gated=false. HF 326 downloads / 14 likes at check.
Format
parquet (33 shards). Fields: path, owner, repo_id, is_fork, languages_distribution, content, issues, main_language, forks, stars, commit_sha, size, name, license.
Type
Pretraining corpus / permissively licensed Kotlin files
License
other (card): mix of per-file permissive licenses in licenses.json (MIT, Apache-2.0, BSD-2/3-Clause, Unlicense, CC0-1.0, CC-BY-4.0, …). Not a single dataset license. Upstream GitHub terms still apply.
Cost
Free
Languages
Kotlin source (card language:code). Files .kt / .kts / .gradle.kts via go-enry. Comments mixed-language; repos may list other languages in languages_distribution. Not natural-language English text.
Modality
Text (Kotlin source)
Domain
Kotlin source-code pretraining; permissively licensed GitHub
Time period
GitHub Kotlin snapshot as of February 2024 plus The Stack v1.2 Kotlin files. HF createdAt 2024-05-13; lastModified 2025-04-22. Paper Kotlin ML Pack arXiv 2405.19250 (2024-05-29). Discord posted 2026-03-23.
Purpose
Largest public permissively licensed Kotlin file collection for code LM pretrain/finetune, denser than The Stack v2 Kotlin slice
Used for
Kotlin ML Pack (arXiv 2405.19250): CodeLlama/DeepSeek Kotlin finetunes; KStack-clean (25k) and KExercises are the high-quality/synth siblings (paper: up to +16 HumanEval-Kotlin pass). Hub 326 downloads / 14 likes at check. JetBrains Kotlin ML collection.
Authors
GitHub Kotlin repo owners (main-language Kotlin, or any Kotlin file with ≥10 stars as of Feb 2024, plus Stack v1.2). JetBrains Research (Sergey Titov, Mikhail Evtikhiev, Anton Shapkin et al.). PII stripped with star-pii.
Bias
Open GitHub only (paper: private Kotlin unseen). Permissive-license filter (MIT/Apache-2.0/BSD/CC-BY/Unlicense/…; full list licenses.json). Star≥10 auxiliary crawl plus main-language-Kotlin repos; popularity skew. Near-dedup keeps the highest-star file per cluster. Forks flagged via is_fork. YAML pretty_name is wrongly KExercises (copy-paste); this repo is the large file dump, not the 25k clean set.
Text quality
Exact hash dedup + Stack v1.2-style near-dedup; star-pii PII rewrite. Permissive-license detector (GitHub then go-license-detector). Residual noisy/generated Kotlin, build scripts (.kts/.gradle.kts), and incomplete files remain. Paper treats KStack as the broad corpus and KStack-clean as the algorithmic-quality subset.
Sample size
Single train split (5,517,601 rows / 33 parquet parts). No val/test. Sister JetBrains/KStack-clean is 25,000 rows (~23M CodeLlama-7B tokens), not a config here.
Long context
Mixed (per-file; mean ~3.0 KB / file from dataset_size/n). Not repo-level packing.
Intermediate steps
Yes (GitHub + Stack v1.2 Kotlin harvest → exact/near dedup → permissive license filter → star-pii). Paper also builds KStack-clean (Mistral pairwise edu rank → CodeT5p classifier) and KExercises; those are separate repos.
Idea quality
High
Novelty
High (public Kotlin dump ~2× Stack v2 Kotlin files/tokens, fully permissive)
Text conversion
Ready parquet. load_dataset('JetBrains/KStack'). Full dump is small vs web corpora (~5.9 GB download).
Collection method
Download
Static
Unknown (HF lastModified 2025-04-22; Feb 2024 GitHub snapshot)
Processed
Unknown

Research notes

  • Part of JetBrains' Kotlin ML Pack. Associated papers: arXiv:2211.15533 (2022) and arXiv:2402.19173 / arXiv:2405.19250 (Kotlin ML Pack Technical Report, 2024). KStack-clean is a filtered 25k-example subset for higher-quality training.
  • Discord posted the HF pointer. Cite Titov et al. 2024 Kotlin ML Pack arXiv 2405.19250. gated=false; public. Substituted as the code-pretrain pick vs gated bigcode/the-stack and the-stack-v2 (CuratorBote still no access 2026-08-14). Card YAML pretty_name/size_categories look copied from KExercises — use dataset_info + Hub tags. Not in papers_local.csv. Not on the Aug 13 live Datasets sheet export.

Similar entries