Speed up git-lfs detection on error
Prevent read and discard of entire checkpoint file.

# What does this PR do?

Mutates an error handler that checks only 7 bytes, to only read those 7 bytes rather than an entire checkpoint file.

Fixes # (issue)

Issue not opened. I encountered a memory allocation crash here when exploring disk offloading.

## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

## Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sgugger
_The documentation is not available anymore as the PR was closed or merged._