You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All LitData / related env knobs agents and users commonly need. Platform-injected Studio vars that are not meant to be set by hand are marked (Studio).
Streaming / cache (most useful)
Env
Default
Effect
LITDATA_POSIX_FAST
auto (on for local paths)
In-place mmap reads. Default on when input_dir is a local/POSIX path (Vast, NFS, NVMe, Studio filestore). Off for s3:// / gs:// / r2://. 0 disables, 1 forces.
LITDATA_POSIX_SHUFFLE_WINDOW
16
WindowShuffle only on Vast/NFS/Lustre/GPFS or LITDATA_POSIX_FAST=1: sequential chunk stripes, then a window permute per worker and inside each chunk. 1 = sequential. Local disks and object URLs keep FullShuffle.
LITDATA_POSIX_PAGE_BYTES
262144 (256KiB)
POSIX-fast: copy this many payload bytes from the mapped chunk in one mmap slice, then split items from that buffer. 0 falls back to one slice per sample.
LITDATA_POSIX_MAX_WORKERS
auto from MemAvailable
Cap on DataLoader workers for POSIX-fast. 0 disables the cap; N forces it.
LITDATA_POSIX_WILLNEED
auto
0 skips POSIX_FADV_WILLNEED / MADV_WILLNEED (skipped automatically when workers × keep × chunk would exceed ~half MemAvailable).
LITDATA_POSIX_RAM_FRACTION
0.5
Fraction of MemAvailable used as the WILLNEED / worker-cap budget.
LITDATA_POSIX_WORKER_RSS
268435456 (256 MiB)
Per-worker RSS assumed by posix_max_data_workers when auto-capping num_workers.
MAX_CACHE_SIZE
ctor max_cache_size (default: 75% of free disk, leave ≥50GB)
Override: "50GB" / "100G" or a fraction (0.90)
LITDATA_ASYNC_CHUNK_PREFETCH
unset → on if remote, off if local-only
1 force on · 0 force off. Overlaps chunk downloads via asyncio.gather inside PrepareChunksThread — not an async DataLoader
LITDATA_ASYNC_MIN_PRE_DOWNLOAD
4
When async is on, raise max_pre_download to at least this. 0 disables the floor
LITDATA_OBSTORE_STREAM_MIN_CHUNK_MIB
8
obstore S3 stream chunk size (MiB)
MAX_WAIT_TIME
120
Seconds to wait for a chunk file before failing
FORCE_DOWNLOAD_TIME
30
Seconds blocked on missing chunk before force re-download
LITDATA_DISABLE_VERSION_CHECK
0
1 skips upgrade prompt
LITDATA_TIMING
off
1/true enables StreamingTimingStats
Async chunk prefetch (detail)
Training loop stays sync: for batch in StreamingDataLoader(...): ...
Async only overlaps remote GETs inside each worker's PrepareChunksThread.
Default on for remote input_dir (s3://, gs://, …); off for local-only.
Needs gather width: with async on, max_pre_download is floored to LITDATA_ASYNC_MIN_PRE_DOWNLOAD (default 4) unless you set the floor to 0.
Peak disk still ≈ num_workers × max_pre_download × chunk_size — raise cache budget accordingly.
Force compare sync vs async fairly: same max_pre_download on both arms (benchmarking.md).
# Force off (e.g. debugging download races)export LITDATA_ASYNC_CHUNK_PREFETCH=0
# Force on even for local pathsexport LITDATA_ASYNC_CHUNK_PREFETCH=1
# Keep user max_pre_download=2 while async is onexport LITDATA_ASYNC_MIN_PRE_DOWNLOAD=0