{
  "id": 154,
  "kind": "dataset",
  "title": "swallowcode2",
  "summary": "[SwallowCode-v1](https://huggingface.co/datasets/tokyotech-llm/swallow-code) was a high-quality Python code dataset generated through an LLM-based rewriting pipeline.",
  "body": "",
  "notes": "downloads=13854; likes=42 | Discord posted the HF pointer. Cite Fujii et al. 2025 arXiv 2505.02881. gated=false; public. Substituted for gated bigcode/the-stack, bigcode/the-stack-v2, and nvidia/Nemotron-Pretraining-Code-v1 (CuratorBote still no access 2026-08-14). Distinct from OpenCoder FineWeb Code Corpus already in this catalog. Not in papers_local.csv. Not on the Aug 13 live Datasets sheet export.",
  "url": "https://huggingface.co/datasets/tokyotech-llm/swallow-code-v2",
  "links": [
    {
      "url": "https://huggingface.co/datasets/tokyotech-llm/swallow-code-v2",
      "label": "Dataset"
    },
    {
      "url": "https://arxiv.org/abs/2505.02881",
      "label": "Related"
    },
    {
      "url": "https://huggingface.co/datasets/tokyotech-llm/swallow-code-v2",
      "label": "Related"
    },
    {
      "url": "https://huggingface.co/datasets/tokyotech-llm/swallow-math-v2",
      "label": "Related"
    },
    {
      "url": "https://github.com/rioyokotalab/swallow-code-math",
      "label": "Related"
    },
    {
      "url": "https://huggingface.co/datasets/bigcode/the-stack-v2",
      "label": "Related"
    },
    {
      "url": "https://huggingface.co/datasets/HuggingFaceTB/stack-edu",
      "label": "Related"
    }
  ],
  "authors": [
    "tokyotech-llm"
  ],
  "tags": [
    "hf-dataset-language-modeling"
  ],
  "topics": "Language Modeling, Code",
  "venue": "tokyotech-llm",
  "publisher": "",
  "source": "huggingface",
  "language": "en",
  "access": "free",
  "license": "apache-2.0",
  "published_year": 2025,
  "added_at": "2026-07-17T19:59:21.716Z",
  "verified_at": "2026-07-17T19:59:21.716Z",
  "attrs": {
    "hf": {
      "kind": "dataset",
      "name": "swallow-code-v2",
      "namespace": "tokyotech-llm"
    },
    "scale": "10M<n<100M",
    "dataset": {
      "cost": "Free",
      "type": "Pretraining corpus / rewritten Python code",
      "scale": "Card: 49.8B Llama-3 tokens (v1 was 16.1B). usedStorage 5,194,499,027,449 bytes (~5.19 TB / 4.72 TiB) for all pipeline stages on Hub. Default SwallowCode-v2 = stage5-auto-format/python/medium: 150 jsonl (train_0001–0160 with gaps 0050, 0055, 0115–0122); most ~7.0–7.2 GB, a tail of ~2.2–4.7 GB shards. datasets-server estimated_num_rows 146,711,936 across configs (partial viewer). stage4-llm-rewrite estimated 19,588,324 rows (stage5 is the ruff-formatted medium rewrite of that set; stage5/swallowcode-v2 size endpoints failed). YAML size_categories 10M<n<100M vs Hub tag 100M<n<1B (multi-config). gated=false. Hub 11,154 downloads / 44 likes at check.",
      "domain": "Python code pretraining; LLM-rewritten Stack-v2",
      "format": "jsonl per pipeline stage (stage1-auto-format … stage5-auto-format). Default config swallowcode-v2 points at stage5 python medium train*.",
      "license": "Apache-2.0 (card). Also subject to The-Stack-v2 licensing terms (card). v1 was Llama 3.3 Community License — this v2 dump is the Apache release. Qwen3 rewrite outputs inherit Qwen terms where applicable.",
      "novelty": "High (public 49.8B Apache rewritten Stack-v2 Python with actual files, not metadata-only)",
      "purpose": "Public 49.8B-token Apache-2.0 rewritten Python corpus for code pre-training, vs gated The-Stack-v2 and metadata-only Nemotron-Pretraining-Code-v1",
      "used_for": "Llama-3.1-8B 50B-token continual pretrain: +20.7 HumanEval / +21.9 HumanEval+ pass@1 vs Stack-Edu (card). Paper v1 CPT +17.0 / +17.7 vs Stack-Edu. Hub 11,154 downloads / 44 likes at check. GitHub rioyokotalab/swallow-code-math 31 stars. Tokyo Tech Swallow checkpoints.",
      "bias_dist": "Python-only. Ablation: rewriting Medium-quality SeedCoder-scored seeds beat High-quality on HumanEval (authors hypothesize simpler, problem-like files match the bench). Qwen3 rewrite style can uniformize code. Upstream The-Stack-v2 GitHub popularity/permissive-license skew remains. Instruct rewriter used (Thinking model similar quality, higher GPU). 1-stage rewrite adopted over v1’s 2-stage (similar downstream, ~2× cheaper).",
      "is_static": "Unknown (HF lastModified 2025-11-08; Python-only one-shot; authors mention a possible v3)",
      "processed": "Unknown",
      "author_dist": "Original snippets: GitHub via The-Stack-v2. Rewrites: Qwen3-235B-A22B-Instruct. Quality scorer: SeedCoder prompt. Tokyo Tech (Kazuki Fujii, Yukito Tajima, Masaki Kawamura, Naoaki Okazaki, Rio Yokota et al.).",
      "sample_size": "Default swallowcode-v2 / stage5-auto-format: python medium train* (150 shards; ~20M estimated from stage4). Also configs stage1-auto-format, stage2-length-filter (high), stage3-llm-score (high+medium YAML; server currently exposes medium), stage4-llm-rewrite. No val/test. Sister tokyotech-llm/swallow-math-v2 is a separate repo.",
      "time_period": "HF createdAt 2025-10-20; lastModified 2025-11-08. Paper 2025-05-05 (arXiv 2505.02881) describes v1 (16.1B, Llama 3.3 license); this Hub dump is the Apache v2 rewrite. Discord posted 2025-11-17. Source The-Stack-v2 (Software Heritage GitHub; older). Rewriter Qwen3-235B-A22B-Instruct-2507.",
      "idea_quality": "High",
      "long_context": "Mixed (length-filtered; stage2 longer_samples dir exists). Typical files are medium code snippets, not repo-scale documents.",
      "text_quality": "Five-stage transform-and-retain: ruff auto-format → length filter → SeedCoder 0–10 score → Qwen3-235B rewrite for clarity/structure → final ruff. Contrasts filter-only Stack-Edu. Residual LLM rewrite errors, over-simplification, and leftover tmp_*.jsonl under stage3/high. Do not train on stage1/c or unreleased language dirs.",
      "language_dist": "Python source (card language:en). Comments mixed; rewriter is English-oriented. Python-only released (13-language plan dropped for GPU cost). Leftover stage1/c jsonl shards exist but are not the v2 release.",
      "modality_dist": "Text (Python source)",
      "relevant_links": "https://arxiv.org/abs/2505.02881; https://huggingface.co/datasets/tokyotech-llm/swallow-code-v2; https://huggingface.co/datasets/tokyotech-llm/swallow-math-v2; https://github.com/rioyokotalab/swallow-code-math; https://huggingface.co/datasets/bigcode/the-stack-v2; https://huggingface.co/datasets/HuggingFaceTB/stack-edu",
      "dataset_location": "https://huggingface.co/datasets/tokyotech-llm/swallow-code-v2",
      "collection_method": "Download",
      "intermediate_steps": "Yes (The-Stack-v2 Python → ruff → length filter → SeedCoder score → Qwen3 1-stage rewrite → ruff). Intermediate stages 1–4 are on Hub. Code/prompts: github.com/rioyokotalab/swallow-code-math.",
      "text_conversion_ease": "Ready jsonl. load_dataset(\"tokyotech-llm/swallow-code-v2\", \"swallowcode-v2\") or config stage5-auto-format. Streaming required (multi-TB repo; stage5 alone is ~1 TB of jsonl)."
    },
    "purpose": "Language Modeling",
    "used_for": "arXiv: 2505.02881, 2506.03524",
    "author_type": "unknown",
    "time_period": "created 2025-10-20; updated 2025-11-08"
  },
  "enrichment": {
    "hf": {
      "id": "tokyotech-llm/swallow-code-v2",
      "size": "100M<n<1B",
      "type": "dataset",
      "arxiv": [
        "2505.02881",
        "2506.03524"
      ],
      "gated": false,
      "likes": 50,
      "tasks": [
        "text-generation"
      ],
      "author": "tokyotech-llm",
      "created": "2025-10-20",
      "formats": [
        "json"
      ],
      "license": "apache-2.0",
      "modified": "2025-11-08",
      "downloads": 5638,
      "languages": [
        "en"
      ],
      "fetched_at": "2026-10-03T14:33:19.493Z",
      "modalities": [
        "tabular",
        "text"
      ]
    }
  },
  "enriched_at": "2026-10-03T14:33:19.524Z",
  "license_class": "permissive",
  "langs": [
    "en"
  ],
  "modalities": [
    "text"
  ],
  "size_class": "100M<n<1B",
  "provenance": {
    "legacy_paper_id": "160",
    "pipeline_status": "done",
    "research_status": "done",
    "legacy_dataset_id": 123
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-10-03T12:29:06.561Z",
  "updated_at": "2026-10-03T14:33:19.524Z",
  "page": "https://papers.projxon.ai/entries/154",
  "markdown": "https://papers.projxon.ai/entries/154.md",
  "api": "https://papers.projxon.ai/api/entries/154",
  "relations": [
    {
      "relation": "related",
      "direction": "out",
      "note": "shared link",
      "via": "shared-link",
      "entry": {
        "id": 153,
        "kind": "dataset",
        "title": "swallowmath2",
        "summary": "[SwallowMath-v2](https://huggingface.co/datasets/tokyotech-llm/swallow-math-v2) is a large-scale mathematical dataset containing **32 billion tokens**, developed as the successor to [SwallowMath-v1](https://huggingface.co/datasets/tokyotech-llm/swallow-math).",
        "url": "https://huggingface.co/datasets/tokyotech-llm/swallow-math-v2",
        "authors": [
          "tokyotech-llm"
        ],
        "tags": [
          "hf-dataset-language-modeling",
          "math-json-text-datasets-dask-mlcroissant-math-has-paper"
        ],
        "venue": "tokyotech-llm",
        "source": "huggingface",
        "license": "apache-2.0",
        "published_year": 2025,
        "added_at": "2026-07-17T19:59:21.418Z",
        "has_dataset_profile": true,
        "license_class": "permissive",
        "langs": [
          "en"
        ],
        "modalities": [
          "text"
        ],
        "size_class": "10M<n<100M",
        "citation_count": null,
        "downloads": 8875,
        "stars": null,
        "page": "https://papers.projxon.ai/entries/153",
        "markdown": "https://papers.projxon.ai/entries/153.md",
        "api": "https://papers.projxon.ai/api/entries/153"
      }
    },
    {
      "relation": "related",
      "direction": "out",
      "note": "shared link",
      "via": "shared-link",
      "entry": {
        "id": 232,
        "kind": "dataset",
        "title": "The Stack v2",
        "summary": "The Stack v2 is a large-scale pre-training dataset of source code containing over 3 billion files in 600+ programming and markup languages, derived from the Software Heritage archive. It serves as a pre-training corpus for Code LLMs (used to train StarCoder2), with the full dataset at 67.5TB and the deduplicated version at 32.1TB (~900B tokens). The dataset provides SWHIDs (Software Heritage IDs) for provenance and compliance, with file contents stored on Software Heritage's S3 bucket.",
        "url": "https://huggingface.co/datasets/bigcode/the-stack-v2",
        "authors": [
          "BigCode Project (collaboration including Hugging Face",
          "ServiceNow",
          "INRIA",
          "Software Heritage)"
        ],
        "tags": [],
        "venue": "BigCode Project / Software Heritage / INRIA",
        "source": "huggingface",
        "license": "Various (per-repository licenses; must abide by original license terms)",
        "published_year": 2024,
        "added_at": "2026-07-17T20:18:03.735Z",
        "has_dataset_profile": true,
        "license_class": "other",
        "langs": [
          "code"
        ],
        "modalities": [
          "text"
        ],
        "size_class": null,
        "citation_count": null,
        "downloads": 6031,
        "stars": null,
        "page": "https://papers.projxon.ai/entries/232",
        "markdown": "https://papers.projxon.ai/entries/232.md",
        "api": "https://papers.projxon.ai/api/entries/232"
      }
    },
    {
      "relation": "related",
      "direction": "in",
      "note": "shared link",
      "via": "shared-link",
      "entry": {
        "id": 1179,
        "kind": "dataset",
        "title": "The Stack v2",
        "summary": "Open reproducible Code LLM pretraining corpus with license/provenance metadata and developer opt-out",
        "url": "https://huggingface.co/datasets/bigcode/the-stack-v2",
        "authors": [
          "bigcode"
        ],
        "tags": [],
        "venue": "",
        "source": "huggingface",
        "license": "other / per-file SPDX; ToU requires original license compliance + SWH LLM principles",
        "published_year": 2024,
        "added_at": "2026-09-10T20:53:36.000Z",
        "has_dataset_profile": true,
        "license_class": "other",
        "langs": [
          "code"
        ],
        "modalities": [
          "code",
          "text"
        ],
        "size_class": null,
        "citation_count": null,
        "downloads": 6031,
        "stars": null,
        "page": "https://papers.projxon.ai/entries/1179",
        "markdown": "https://papers.projxon.ai/entries/1179.md",
        "api": "https://papers.projxon.ai/api/entries/1179"
      }
    }
  ],
  "duplicates": [],
  "similar": [
    {
      "id": 229,
      "kind": "dataset",
      "title": "github-top-code",
      "summary": "A curated dataset of 1.3M+ source code files from **GitHub's top ranked developers (2015-2025)**.",
      "url": "https://huggingface.co/datasets/ronantakizawa/github-top-code",
      "authors": [
        "ronantakizawa"
      ],
      "tags": [
        "hf-dataset-language-modeling"
      ],
      "venue": "ronantakizawa",
      "source": "huggingface",
      "license": "mit",
      "published_year": 2026,
      "added_at": "2026-07-17T20:00:39.260Z",
      "has_dataset_profile": true,
      "license_class": "permissive",
      "langs": [
        "code"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "1M<n<10M",
      "citation_count": null,
      "downloads": 2689,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/229",
      "markdown": "https://papers.projxon.ai/entries/229.md",
      "api": "https://papers.projxon.ai/api/entries/229"
    },
    {
      "id": 255,
      "kind": "dataset",
      "title": "Step-3.5-Flash-SFT",
      "summary": "`Step-3.5-Flash-SFT` is a general-domain supervised fine-tuning release for chat models.",
      "url": "https://huggingface.co/datasets/stepfun-ai/Step-3.5-Flash-SFT",
      "authors": [
        "stepfun-ai"
      ],
      "tags": [
        "hf-dataset-language-modeling",
        "reasoning",
        "code-chat-sft-instruction-tuning-reasoning-code-agent"
      ],
      "venue": "stepfun-ai",
      "source": "huggingface",
      "license": "apache-2.0, cc-by-nc-2.0",
      "published_year": 2026,
      "added_at": "2026-07-17T20:00:53.513Z",
      "has_dataset_profile": true,
      "license_class": "non-commercial",
      "langs": [
        "multilingual"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "1M<n<10M",
      "citation_count": null,
      "downloads": 5160,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/255",
      "markdown": "https://papers.projxon.ai/entries/255.md",
      "api": "https://papers.projxon.ai/api/entries/255"
    },
    {
      "id": 269,
      "kind": "dataset",
      "title": "EsoLang-Bench",
      "summary": "EsoLang-Bench is a contamination-resistant benchmark for evaluating large language models on out-of-distribution programming languages. It contains **80 algorithmic programming problems** organised into four difficulty tiers, each shipped with **6 hidden input-output test cases** for byte-exact scoring. Problems are language-agnostic and intended to be solved in five esoteric target languages whose pre-training presence is many orders of magnitude smaller than mainstream languages.",
      "url": "https://huggingface.co/datasets/Lossfunk/Esolang-Bench",
      "authors": [
        "Lossfunk"
      ],
      "tags": [
        "hf-dataset-language-modeling",
        "code"
      ],
      "venue": "Lossfunk",
      "source": "huggingface",
      "license": "cc-by-4.0",
      "published_year": 2026,
      "added_at": "2026-07-17T20:01:04.310Z",
      "has_dataset_profile": true,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "n<1K",
      "citation_count": null,
      "downloads": 117,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/269",
      "markdown": "https://papers.projxon.ai/entries/269.md",
      "api": "https://papers.projxon.ai/api/entries/269"
    },
    {
      "id": 355,
      "kind": "dataset",
      "title": "AgentTrove",
      "summary": "At 1.7 million rows, AgentTrove is **4× the size of the [Nemotron Terminal Corpus](https://huggingface.co/datasets/laion/nemotron-terminal-corpus-unified)** (430 K rows), the previous largest open-source agentic trace dataset.",
      "url": "https://huggingface.co/datasets/open-thoughts/AgentTrove",
      "authors": [
        "open-thoughts"
      ],
      "tags": [
        "hf-dataset-language-modeling",
        "code"
      ],
      "venue": "open-thoughts",
      "source": "huggingface",
      "license": "apache-2.0",
      "published_year": 2026,
      "added_at": "2026-07-17T20:02:07.913Z",
      "has_dataset_profile": true,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "1M<n<10M",
      "citation_count": null,
      "downloads": 3533,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/355",
      "markdown": "https://papers.projxon.ai/entries/355.md",
      "api": "https://papers.projxon.ai/api/entries/355"
    },
    {
      "id": 359,
      "kind": "dataset",
      "title": "TaskTrove",
      "summary": "> **v3.2 (current)** — replaced the old swegym task dataset (`laion__swegym-tasks-patched-validated-v2`, 989 tasks) with `laion/swegym-tasks-patched-validated-v5` (2,438 tasks, patched + validated). No other dataset changed.",
      "url": "https://huggingface.co/datasets/open-thoughts/TaskTrove",
      "authors": [
        "open-thoughts"
      ],
      "tags": [
        "hf-dataset-language-modeling",
        "code"
      ],
      "venue": "open-thoughts",
      "source": "huggingface",
      "license": "apache-2.0",
      "published_year": 2026,
      "added_at": "2026-07-17T20:02:09.641Z",
      "has_dataset_profile": true,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "1M<n<10M",
      "citation_count": null,
      "downloads": 9088,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/359",
      "markdown": "https://papers.projxon.ai/entries/359.md",
      "api": "https://papers.projxon.ai/api/entries/359"
    },
    {
      "id": 206,
      "kind": "dataset",
      "title": "Superior-Reasoning-SFT-gpt-oss-120b",
      "summary": "[![GitHub](https://img.shields.io/badge/GitHub-DASD--Thinking-181717?logo=github&logoColor=white)](https://github.com/D2I-ai/dasd-thinking)&#160;",
      "url": "https://huggingface.co/datasets/Alibaba-Apsara/Superior-Reasoning-SFT-gpt-oss-120b",
      "authors": [
        "Alibaba-Apsara"
      ],
      "tags": [
        "hf-dataset-language-modeling",
        "code",
        "math"
      ],
      "venue": "Alibaba-Apsara",
      "source": "huggingface",
      "license": "cc-by-4.0",
      "published_year": 2025,
      "added_at": "2026-07-17T20:00:21.565Z",
      "has_dataset_profile": true,
      "license_class": "permissive",
      "langs": [
        "en"
      ],
      "modalities": [
        "text"
      ],
      "size_class": "100K<n<1M",
      "citation_count": null,
      "downloads": 1561,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/206",
      "markdown": "https://papers.projxon.ai/entries/206.md",
      "api": "https://papers.projxon.ai/api/entries/206"
    }
  ]
}
