16 Commits
Author SHA1 Message Date
Taksh 9d3f97e620 Fix duplicate words and grammar typos across codebase (#5044)
Summary:
- Fix duplicate word "the the" to "the" in `faiss/utils/quantize_lut.h` (comment) and `benchs/README.md`
- Fix duplicate word "to to" to "to" in `faiss/IndexBinaryHNSW.cpp` (comment)
- Fix subject-verb agreement "This produce" to "This produces" in `INSTALL.md`
- Fix broken grammar "it does not the case" to "it is not the case" in `tests/test_residual_quantizer.py`

Pull Request resolved: https://github.com/facebookresearch/faiss/pull/5044

Test Plan:
- [ ] No functional code changes; only comments, documentation, and test comments are modified
- [ ] Verified each fix is a clear typo/grammar correction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed By: mnorris11

Differential Revision: D99692631

Pulled By: alibeklfc

fbshipit-source-id: e3ae88ba4ca732e9f620e1c205f51e4b827d0730
2026-04-06 14:28:34 -07:00
Tom Jackson 748c0311e4 HNSW: add prune_headroom to avoid O(n^2) pruning/locking, headroom test (#4847)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4847

Particularly when building large graphs (10M+), insertion performance often plummets in the presence of highly contended nodes. More time is spent doing repeated `O(d*M^2)` pruning, and more time is spent waiting for locks:

```name=Before
 [6.2%] +624,960 vecs / +10.1s = +62,165 vecs/s
[12.5%] +625,152 vecs /  +8.3s = +75,316 vecs/s
[18.8%] +625,152 vecs /  +8.0s = +78,244 vecs/s
[25.0%] +625,152 vecs /  +8.6s = +72,813 vecs/s
[31.3%] +625,024 vecs /  +8.6s = +72,796 vecs/s
[37.5%] +624,960 vecs /  +9.2s = +68,038 vecs/s
[43.8%] +624,960 vecs /  +9.9s = +63,074 vecs/s
[50.0%] +624,960 vecs /  +9.3s = +67,249 vecs/s
[56.3%] +624,960 vecs /  +9.6s = +64,865 vecs/s
[62.5%] +624,960 vecs /  +9.8s = +63,622 vecs/s
[68.8%] +624,960 vecs / +10.1s = +62,016 vecs/s
[75.0%] +624,960 vecs / +10.3s = +60,543 vecs/s
[81.3%] +624,960 vecs / +23.3s = +26,858 vecs/s
[87.5%] +624,960 vecs / +12.0s = +51,891 vecs/s
[93.8%] +624,960 vecs / +11.4s = +55,053 vecs/s
[100.%] +624,960 vecs / +11.9s = +52,318 vecs/s
[done] 10,000,000 vecs / 177.9s = 56,220 vecs/s average
```

By providing a bit more headroom, much useful time is spent actually constructing the graph, leading to
```name=After
Building IDMap,HNSW64 with 192 threads...
[ 6.2%] +624,960 vecs / +4.0s = +154,359 vecs/s
[12.5%] +625,152 vecs / +3.9s = +159,162 vecs/s
[18.8%] +625,152 vecs / +4.2s = +150,183 vecs/s
[25.0%] +625,152 vecs / +4.8s = +130,363 vecs/s
[31.3%] +625,024 vecs / +5.3s = +118,817 vecs/s
[37.5%] +624,960 vecs / +4.7s = +133,585 vecs/s
[43.8%] +624,960 vecs / +5.5s = +113,630 vecs/s
[50.0%] +624,960 vecs / +4.8s = +131,124 vecs/s
[56.3%] +624,960 vecs / +4.8s = +129,847 vecs/s
[62.5%] +624,960 vecs / +5.0s = +124,726 vecs/s
[68.8%] +624,960 vecs / +5.3s = +117,075 vecs/s
[75.0%] +624,960 vecs / +5.3s = +118,652 vecs/s
[81.3%] +624,960 vecs / +8.1s =  +77,497 vecs/s
[87.5%] +624,960 vecs / +6.3s =  +99,823 vecs/s
[93.8%] +624,960 vecs / +6.0s = +103,604 vecs/s
[100.%] +624,960 vecs / +5.9s = +106,680 vecs/s
[done] 10,000,000 vecs / 89.9s = 111,278 vecs/s average
```

The increased pruning has minimal effect on recall, particularly with the default value of `prune_headroom = 0.2`.

Reviewed By: mdouze

Differential Revision: D94442964

fbshipit-source-id: 696ff40184c3b67d176bdd7f0fcb37cf8dbfd788
2026-03-18 13:39:03 -07:00
Subhadeep Karan 451ca8429d Fix typos in documentation, tutorials, and C API (#4666)
Summary:
Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4666

*   `for OpenMP support support` → `for OpenMP support`
*   `neccesary` → `necessary`
*   `journal= {arXiv:1702.08734},,` → `journal = {arXiv:1702.08734},`
*   `verinsion` → `version`
*   `consistency_check--config` → `consistency_check --config`
*   `etracted` → `extracted` (2 occurrences)
*   `sb` → `xb` (variable reference)
*   `statists` → `statistics`
*   `elemnts` → `elements`

Reviewed By: alibeklfc

Differential Revision: D86474214

fbshipit-source-id: f63272423b0a767f7576cd433004c87d85e2d740
2025-11-07 21:38:52 -08:00
Michael Norris 1334d169b9 Correct capitalization of FAISS to Faiss
Summary:
For the release, we want to standardize on Faiss instead of FAISS.

Changed everything except the CHANGELOG.md which I assume should not be changed after it lands.

This doesn't aim to fix any existing lints / errors. Those can be handled at another time.

Reviewed By: junjieqi

Differential Revision: D68842649

fbshipit-source-id: c0b60d5baa0e1f710db3638ffcc6f223fb3408ad
2025-01-29 13:05:05 -08:00
Alexandr Guzhva 0a622d2d78 Update docs for benchmarks in benchs/ directory (#2565)
Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/2565

Reviewed By: mdouze

Differential Revision: D40856253

fbshipit-source-id: 78f549bb37cdb3e6f562d877f5e33fa1c20834dc
2022-11-08 08:44:42 -08:00
mdouze ab50f0ae4b Update README.md 2017-03-01 11:09:41 +01:00
mdouze 12049daee2 Update README.md 2017-02-28 10:24:01 +01:00
mdouze da8b35da5f Update README.md 2017-02-27 10:06:19 +01:00
mdouze caa7787e17 Update README.md 2017-02-25 08:17:11 +01:00
mdouze 990c96343a Update README.md 2017-02-24 22:44:15 +01:00
mdouze 8c03bf4e32 Update README.md 2017-02-24 18:15:31 +01:00
mdouze 455c6e1015 Update README.md 2017-02-24 18:05:15 +01:00
mdouze 4a8a4cd5a5 Update README.md 2017-02-24 17:42:58 +01:00
mdouze 8895c35e38 Update README.md 2017-02-24 11:33:15 +01:00
mdouze 7487a45583 Update README.md 2017-02-24 11:01:53 +01:00
Matthijs Douze c670118a4e Initial commit 2017-02-22 23:26:44 +01:00