| --- |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: train-* |
| - split: validation |
| path: validation-* |
| dataset_info: |
| features: |
| - name: texts |
| sequence: string |
| - name: images |
| sequence: image |
| - name: metadata |
| list: |
| - name: document_url |
| dtype: string |
| - name: unformatted_src |
| dtype: string |
| - name: src |
| dtype: string |
| - name: formatted_filename |
| dtype: string |
| - name: alt_text |
| dtype: string |
| - name: rendered_width |
| dtype: int64 |
| - name: rendered_height |
| dtype: int64 |
| - name: original_width |
| dtype: int64 |
| - name: original_height |
| dtype: int64 |
| - name: format |
| dtype: string |
| - name: general_metadata |
| struct: |
| - name: url |
| dtype: string |
| - name: warc_filename |
| dtype: string |
| - name: warc_record_offset |
| dtype: int64 |
| - name: warc_record_length |
| dtype: int64 |
| task_categories: |
| - image-text-to-text |
| language: |
| - en |
| size_categories: |
| - 1K<n<10K |
| tags: |
| - multimodal |
| - interleaved |
| - pretraining |
| --- |
| |
| # Tiny-OBELICS (Debug Dataset) |
|
|
| **Tiny-OBELICS** is a curated, 100% offline-compatible multimodal debug dataset of interleaved |
| document-image examples drawn from the first shard of `HuggingFaceM4/OBELICS`. |
|
|
| **All image bytes are stored directly inside the Parquet shards** using Hugging Face's native |
| `Image` feature type. No CDN dependencies, no dead links, no download bubbles at training time. |
|
|
| ## Dataset Structure |
|
|
| Parallel-lists layout matching the original OBELICS schema. |
|
|
| | Column | Type | Description | |
| | :--- | :--- | :--- | |
| | `texts` | `list[str\|null]` | Text segments interleaved with images | |
| | `images` | `list[image\|null]` | PIL images (or `None` for text-only slots) | |
| | `metadata` | `list[struct\|null]` | Per-image metadata (dimensions, src, alt-text, …) | |
| | `general_metadata` | `struct` | Document-level crawl info (url, warc offset/length) | |
|
|
| ## Shard Policy |
|
|
| - Shards are bounded by **raw image byte size** (~25MB per shard), not by row count. |
| - Any document where one or more images failed to download is discarded entirely. |
| - Images are converted to RGB and have metadata stripped to ensure clean serialization. |
| - Original image width and height are always calculated directly from the verified PIL image object. |
|
|
| ## Usage |
|
|
| ```python |
| from datasets import load_dataset |
| |
| # Load train split |
| ds_train = load_dataset("akzsh/tiny-obelics", split="train") |
| print(ds_train) |
| |
| # Load validation split |
| ds_val = load_dataset("akzsh/tiny-obelics", split="validation") |
| print(ds_val) |
| |
| row = ds_train[0] |
| for text, img in zip(row["texts"], row["images"]): |
| if text: print("[Text]", text[:80]) |
| elif img: print("[Image]", img.size) |
| ``` |
|
|
| ## Source |
|
|
| Processed subset of [HuggingFaceM4/OBELICS](https://huggingface.co/datasets/HuggingFaceM4/OBELICS). |
|
|