If your scientific_index.faiss file is only 1.3MB, then it’s unusual that Hugging Face is rejecting it for being a binary file. Given that your other FAISS indexes were accepted, here are some possible reasons why this one is behaving differently:
Even though 1.3MB is relatively small, Hugging Face might be treating it as a binary format due to its contents (FAISS files contain raw index data).
✅ Try Force-Pushing Without LFS
Since this file is small, try forcing Git to push it normally without LFS:
git lfs untrack "RAG_data/scientific_index.faiss"
git commit -m "Untrack FAISS file from LFS"
Then, re-add it:
git add RAG_data/scientific_index.faiss
git commit -m "Re-add FAISS file as a normal Git file"
This ensures Git doesn’t try to use LFS unnecessarily.
If you previously pushed this file with Git LFS, then Hugging Face expects it to always be in LFS.
✅ Check if it’s in LFS
Run:
- If
scientific_index.faiss is listed, that means Git still considers it an LFS file, even if it’s small.
- If it appears, re-track it:
git lfs track "RAG_data/scientific_index.faiss"
git add .gitattributes RAG_data/scientific_index.faiss
git commit -m "Ensure FAISS file is in Git LFS"
There might be a setting in your Hugging Face repository that blocks specific binary files.
✅ Check the repository settings on Hugging Face:
- Go to your Hugging Face repo (
https://huggingface.co/spaces/george-adamon/tree_correspondents_article).
- Navigate to Settings.
- Look for Git LFS Support or any binary file restrictions.
- If Git LFS is disabled, enable it.
Hugging Face could be rejecting this file due to its format—especially if it got corrupted during creation.
✅ Try re-creating and re-adding the file
- Regenerate or re-save the FAISS index in your local environment.
- Re-add it to the repo:
git add RAG_data/scientific_index.faiss
git commit -m "Re-add FAISS index after regeneration"
To confirm the problem is only this file, try temporarily removing it:
git rm RAG_data/scientific_index.faiss
git commit -m "Temporarily remove FAISS index for testing"
- If the push succeeds, the issue is definitely with this file.
- If the push still fails, there may be a different issue in your repository.
| Issue | Why It Happens | Solution |
|---|
| Git mistakenly treats it as LFS | FAISS files can be detected as binary | git lfs untrack, remove .gitattributes, and push again |
| Previously tracked in LFS | Git expects LFS for the file | Run git lfs track, commit, and push again |
| Hugging Face repo settings | LFS might be disabled or blocking binaries | Check Hugging Face settings and enable LFS |
| Corrupted file | File may be unreadable | Regenerate the FAISS file and re-add it |
| Push fails even without the file | Problem is with repo, not the file | Try removing the file and pushing |
Try these steps and let me know what happens! 🚀