CoolFace
Datasetpublic

docling-project/SynthCodeNet

SynthCodeNet SynthCodeNet is a multimodal dataset created for training the SmolDocling model. It consists of over 9.3 million synthetically generated image-text pairs, covering code snippets from 56 different programming languages. Text data was sourced from permissively licensed sources, while images were synthetically generated at 120 DPI using LaTeX and Pygments to ensure visual diversity. Dataset Statistics Total samples: 9,334,257 Training set: 8… See the full description on the dataset page: https://huggingface.co/datasets/docling-project/SynthCodeNet.

sourceHugging Facecdla-permissive-2.0updated 1y agoView on Hugging Face
15likes3.6kdownloads
Dataset Card

SynthCodeNet

<div style="display: flex; justify-content: center; align-items: center;"> <img src="https://cdn-uploads.huggingface.co/production/uploads/663e1254887b6f5645a0399f/whc8Bpip5P8uuzZOS0MQJ.png" alt="Code Example" style="width: 500px; height: auto"> </div>

SynthCodeNet is a multimodal dataset created for training the SmolDocling model. It consists of over 9.3 million synthetically generated image-text pairs, covering code snippets from 56 different programming languages. Text data was sourced from permissively licensed sources, while images were synthetically generated at 120 DPI using LaTeX and Pygments to ensure visual diversity.


Dataset Statistics

  • Total samples: 9,334,257
  • Training set: 8,400,838
  • Validation set: 466,703
  • Test set: 466,716
  • Modalities: Image, Text
  • Image Generation: Synthetic (LaTeX, Pygments)

Programming Languages & Sample Counts

LanguageSamplesLanguageSamplesLanguageSamples
Ada20,094Dart20,415Matlab1,170
Awk22,334Dockerfile99,459MoonScript6,237
Bash98,950Elixir20,387Nim37,236
C599,096Erlang20,039OCaml32,297
C#303,720FORTRAN34,023ObjectiveC158,398
C++698,870Forth5,548Octave2,537
CMake19,910Go333,722PHP249,566
COBOL5,153HTML245,228Pascal28,254
CSS236,596Haskell39,848Perl33,938
Ceylon8,369Haxe20,070Prolog2,058
Clojure20,765Java698,421Python1,797,063
Crystal24,720JavaScript530,899Racket4,340
Cuda142,344Julia29,681Ruby348,976
Cython22,136Kotlin292,986Rust344,491
D20,338Lisp29,749SML19,333
Lua25,328SQL493,412YAML249,011
Scala273,825Scheme23,242VisualBasic13,908
Swift25,374TypeScript255,475XML246,209
bc249dc1,713

Data Format

Each dataset entry is structured as follows:

json
{
  "images": [PIL Image],
  "texts": [
    {
      "assistant": "<loc_x0><loc_y0><loc_x1><loc_y1><_Language_>CODE_SNIPPET</code>",
      "source": "SynthCodeNetNoImageTag",
      "user": "<code>"
    }
  ]
}

Intended Use

  • Training multimodal models for document understanding, specifically:
  • Code snippet extraction and transcription

Citation

If you use SynthCodeNet, please cite:

bibtex
@article{nassar2025smoldocling,
  title={SmolDocling: An ultra-compact vision-language model for end-to-end multi-modal document conversion},
  author={Nassar, Ahmed and Marafioti, Andres and Omenetti, Matteo and Lysak, Maksym and Livathinos, Nikolaos and Auer, Christoph and Morin, Lucas and de Lima, Rafael Teixeira and Kim, Yusik and Gurbuz, A Said and others},
  journal={arXiv preprint arXiv:2503.11576},
  year={2025}
}