diff --git a/gguf-py/gguf/utility.py b/gguf-py/gguf/utility.py index e5251aef8c832..00adcbc937398 100644 --- a/gguf-py/gguf/utility.py +++ b/gguf-py/gguf/utility.py @@ -231,7 +231,7 @@ def get_data_by_range(cls, url: str, start: int, size: int = -1) -> bytes: response.raise_for_status() # Get raw byte data - return response.content[:size] + return response.content[slice(size if size > -1 else None)] @classmethod def check_file_exist(cls, url: str) -> bool: