5050# Repository limits (from https://huggingface.co/docs/hub/repositories-recommendations)
5151MAX_FILES_PER_REPO = 100_000 # Recommended maximum number of files per repository
5252MAX_FILES_PER_FOLDER = 10_000 # Recommended maximum number of files per folder
53- MAX_FILE_SIZE_GB = 50 # Hard limit for individual file size
53+ MAX_FILE_SIZE_GB = 200 # Recommended maximum for individual file size (split larger files)
5454RECOMMENDED_FILE_SIZE_GB = 20 # Recommended maximum for individual file size
5555
5656
@@ -64,7 +64,7 @@ def _validate_upload_limits(paths_list: list[LocalUploadFilePaths]) -> None:
6464 Warns about:
6565 - Too many files in the repository (>100k)
6666 - Too many entries (files or subdirectories) in a single folder (>10k)
67- - Files exceeding size limits (>20GB recommended, >50GB hard limit )
67+ - Files exceeding size limits (>20GB recommended, >200GB maximum )
6868 """
6969 logger .info ("Running validation checks on files to upload..." )
7070
@@ -127,14 +127,14 @@ def _validate_upload_limits(paths_list: list[LocalUploadFilePaths]) -> None:
127127 elif size_gb > RECOMMENDED_FILE_SIZE_GB :
128128 large_files .append ((paths .path_in_repo , size_gb ))
129129
130- # Warn about very large files (>50GB )
130+ # Warn about very large files (>200GB )
131131 if very_large_files :
132132 files_str = "\n - " .join (f"{ path } : { size :.1f} GB" for path , size in very_large_files [:5 ])
133133 more_str = f"\n ... and { len (very_large_files ) - 5 } more files" if len (very_large_files ) > 5 else ""
134134 logger .warning (
135- f"Found { len (very_large_files )} files exceeding the { MAX_FILE_SIZE_GB } GB hard limit :\n "
135+ f"Found { len (very_large_files )} files exceeding the { MAX_FILE_SIZE_GB } GB recommended maximum :\n "
136136 f" - { files_str } { more_str } \n "
137- f"These files may fail to upload. Consider splitting them into smaller chunks."
137+ f"Consider splitting these files into smaller chunks."
138138 )
139139
140140 # Warn about large files (>20GB)
0 commit comments