Skip to content

Commit ee57a88

Browse files
committed
add docs
formatting clean up docs wording
1 parent 6e778b9 commit ee57a88

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

docs/docs/features/searching.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Some search examples:
4545
</TabItem>
4646
<TabItem value="Mobile" label="Mobile">
4747

48-
<img src={require('./img/moblie-smart-serach.webp').default} width="30%" title='Smart search on mobile' />
48+
<img src={require('./img/mobile-smart-search.webp').default} width="30%" title='Smart search on mobile' />
4949

5050
</TabItem>
5151
</Tabs>
@@ -56,20 +56,42 @@ Navigating to `Administration > Settings > Machine Learning Settings > Smart Sea
5656

5757
### CLIP model
5858

59-
More powerful models can be used for more accurate search results, but are slower and can require more server resources. Check out the models [here][huggingface-clip] for more options!
59+
The default search model is fast, but there are many other options that can provide better search results. The tradeoff of using these models is that they use more memory and are slower (both during Smart Search jobs and when searching). For example, the current best model for English, `ViT-H-14-378-quickgelu__dfn5b`, is roughly 72x slower and uses approximates 4.3GiB of memory compared to 801MiB with the default model `ViT-B-32__openai`.
60+
61+
The first step of choosing the right model for you is to decide which languages your users will search in.
62+
63+
If your users will only search in English, then the recommended [CLIP][huggingface-clip] section is the best place to look. This is a curated list of the models that generally perform the best for their size class. The models here are ordered from higher to lower quality. This means that the top models will generally rank the most relevant results higher and have a higher capacity to understand descriptive, detailed, and/or niche queries. They models are also generally ordered from larger to smaller, so consider the impact on memory usage, job processing and search speed when deciding on one. The smaller models in this list are not too different in quality and many times faster.
64+
65+
[Multilingual models][huggingface-multilingual-clip] are also available so users can search in their native language. Use these models if you expect non-English searches to be common. They can be separated into two search patterns:
66+
67+
- `nllb` models expect the search query to be in the language specified in the user settings
68+
- `xlm` models understand search text regardless of the current language setting
69+
70+
`nllb` models perform the best and are recommended when users primarily searches in their native, non-English language. `xlm` models are more flexible and are recommended for mixed language search, where the same user might search in different languages at different times.
71+
72+
A third option is if your users will search entirely in major Western European languages, such as English, Spanish, French and German. The `ViT-H-14-quickgelu__dfn5b` and `ViT-H-14-378-quickgelu__dfn5b` models perform the best for these languages and are similarly flexible as `xlm` models. However, they understand very few languages compared to the explicitly multilingual `nllb` and `xlm` models, so don't use them for other languages.
6073

61-
[Multilingual models][huggingface-multilingual-clip] are also available so users can search in their native language. These models support over 100 languages; the `nllb` models in particular support 200.
6274
:::note
6375
Multilingual models are much slower and larger and perform slightly worse for English than English-only models. For this reason, only use them if you actually intend to search in a language besides English.
64-
65-
As a special case, the `ViT-H-14-quickgelu__dfn5b` and `ViT-H-14-378-quickgelu__dfn5b` models are excellent at many European languages despite not specifically being multilingual. They're very intensive regardless, however - especially the latter.
6676
:::
6777

68-
Once you've chosen a model, change this setting to the name of the model you chose. Be sure to re-run Smart Search on all assets after this change.
78+
Once you've chosen a model, follow these steps:
79+
80+
1. Copy the name of the model (e.g. `ViT-B-16-SigLIP__webli`)
81+
2. Go to the [Smart Search settings][smart-search-settings]
82+
3. Paste the model name into the Model Name section
83+
4. Save the settings
84+
5. Go to the [Job Status page][job-status-page]
85+
6. Click "All" next to "Smart Search" to begin re-processing your assets with the new model
86+
7. (Optional) Confirm that the logs for the server and machine learning service don't have relevant errors
87+
88+
In rare instances, changing the model might leave bits of the old model's incompatible data in the database, causing errors when processing Smart Search jobs. If you notice errors like this in the logs, you can change the model back to the previous one and save, then back again to the new model.
6989

7090
:::note
7191
Feel free to make a feature request if there's a model you want to use that we don't currently support.
7292
:::
7393

7494
[huggingface-clip]: https://huggingface.co/collections/immich-app/clip-654eaefb077425890874cd07
7595
[huggingface-multilingual-clip]: https://huggingface.co/collections/immich-app/multilingual-clip-654eb08c2382f591eeb8c2a7
96+
[smart-search-settings]: https://my.immich.app/admin/system-settings?isOpen=machine-learning+smart-search
97+
[job-status-page]: https://my.immich.app/admin/jobs-status

0 commit comments

Comments
 (0)