---
title: "PRX Part 4: Our Data Strategy"
description: "PRX's pre-training corpus for a 7B text-to-image model is assembled from public and internal datasets, re-captioned with a VLM into long dense paragraphs, curated in Lance and streamed to training as Mosaic Data Shards."
url: "https://swe.quest/articles/prx-part-4-our-data-strategy-65ac8355bac33db9"
canonical: "https://huggingface.co/blog/Photoroom/prx-part4-data"
source: "Hugging Face"
published: "2026-07-06"
difficulty: "hard"
kind: "Case study"
reading_minutes: 20
tags: ["model-training","data-pipelines","computer-vision","machine-learning"]
---

# PRX Part 4: Our Data Strategy

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-07-06, 20 min read, Case study. Original: [https://huggingface.co/blog/Photoroom/prx-part4-data](https://huggingface.co/blog/Photoroom/prx-part4-data)

## Summary

PRX's pre-training corpus for a 7B text-to-image model is assembled from public and internal datasets, re-captioned with a VLM into long dense paragraphs, curated in Lance and streamed to training as Mosaic Data Shards. The pipeline favors breadth over aesthetic filtering and relies on faithful captions to turn imperfections like text or logos into promptable attributes. Measured decisions include storing images as JPEG quality 92, since PNG-vs-JPEG training runs were indistinguishable, and computing Qwen3-VL text latents on the fly for only a ~3–4% throughput cost. Over-fragmented Lance tables made queries slow until compaction to ~1M rows per fragment, and long Qwen2.5-VL captions clearly beat short LLaVA captions on FID, CMMD and DINO-MMD.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Computer vision](https://swe.quest/tags/computer-vision.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)

## Prerequisites

- diffusion model training ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- vision-language models ([easy posts on Computer vision](https://swe.quest/tags/computer-vision.md?difficulty=easy))
- columnar data formats
- distributed training basics ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))

## Keywords

PRX, Lance, Mosaic Data Shards, Ray Data, Qwen3-VL, Qwen2.5-VL, Mosaic Composer, Photoroom

## Related posts

- [Build awesome datasets for video generation](https://swe.quest/articles/build-awesome-datasets-for-video-generation-234cead646e03175.md): Hugging Face · 2025-02-12 · Medium · 5 min read · Model training, Computer vision, Data pipelines, Video & media
  A three-stage pipeline for building small video-generation fine-tuning datasets: acquisition with yt-dlp and scene splitting, per-frame filtering for watermarks, aesthetics and NSFW content plus an OpenCV motion score, and captioning with Florence-2 or a video captioner like Qwen2VL.
- [Open Preference Dataset for Text-to-Image Generation by the 🤗 Community](https://swe.quest/articles/open-preference-dataset-for-text-to-image-generation-by-the-community-51063f2eca79d4de.md): Hugging Face · 2024-12-09 · Easy · 7 min read · Model training, Computer vision, Evaluation, Open source
  Data is Better Together released an Apache 2.0 text-to-image preference dataset of 10K pairs, with over 30K annotations from more than 250 community members collected in under two weeks.
- [PRX Part 3 — Training a Text-to-Image Model in 24h!](https://swe.quest/articles/prx-part-3-training-a-text-to-image-model-in-24h-e27e27a7f3c7dc41.md): Hugging Face · 2026-03-03 · Hard · 9 min read · Model training, Computer vision, Machine learning
  A 24-hour, ~$1500 speedrun on 32 H200s combines the most effective diffusion training tricks into a single text-to-image recipe.
- [Introducing TextImage Augmentation for Document Images](https://swe.quest/articles/introducing-textimage-augmentation-for-document-images-9f0736935fc8d1ff.md): Hugging Face · 2024-08-06 · Medium · 7 min read · Computer vision, Model training, Python
  Albumentations adds a TextImage transform that augments document images and their text annotations together, so vision-language models fine-tuned on small document datasets see text-preserving variations.
- [Docmatix - a huge dataset for Document Visual Question Answering](https://swe.quest/articles/docmatix-a-huge-dataset-for-document-visual-question-answering-acf1e0919e3f7459.md): Hugging Face · 2024-07-18 · Medium · 4 min read · Computer vision, Model training, LLMs
  Docmatix is a Document Visual Question Answering dataset with 2.4 million images and 9.5 million Q/A pairs drawn from 1.3 million PDFs, roughly 240x larger than earlier DocVQA datasets.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
