Skip to content
Discussion options

You must be logged in to vote

If you load a 50GB directory of shards, the program uses almost zero additional physical RAM for the dataset itself. It achieves this using OS-level memory mapping (mmap on Linux/macOS, MapViewOfFile on Windows). The OS creates a virtual memory space pointing to the files on disk, and physical RAM is only consumed page-by-page (usually in ~10KB chunks) at the exact moment the CPU requests those specific tokens during training.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eamonsippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants