Instructions to use HopitAI/moda-pro-lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use HopitAI/moda-pro-lite with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:HopitAI/moda-pro-lite') tokenizer = open_clip.get_tokenizer('hf-hub:HopitAI/moda-pro-lite') - Notebooks
- Google Colab
- Kaggle
|
Download README.md from HopitAI/moda-pro-lite: direct link, hf CLI and curl.
- Browser
- Download file 3.43 kB
-
https://huggingface.co/HopitAI/moda-pro-lite/resolve/main/README.md
- Command line
-
hf download hf://HopitAI/moda-pro-lite/README.md
-
curl -L -o README.md https://huggingface.co/HopitAI/moda-pro-lite/resolve/main/README.md
3.43 kB
| license: apache-2.0 | |
| tags: | |
| - fashion | |
| - retrieval | |
| - text-to-image | |
| - open_clip | |
| - siglip2 | |
| pipeline_tag: feature-extraction | |
| library_name: open_clip | |
| # MODA Pro Lite | |
| A 213M fashion retrieval encoder (SigLIP2-base-384 backbone, fashion-vocabulary build). | |
| **Open weights.** | |
| Served with its calibrated recipe it becomes | |
| **[MODA Pro Lite+](https://huggingface.co/HopitAI/moda-pro-lite-plus)** β the strongest open | |
| system at β€250M parameters on catalogue and title search. The recipe lives in that repository; | |
| the weights live here, and Pro Lite+ pulls them at load time. | |
| ## Results | |
| MAP@10, full corpus, all ground-truth queries, one evaluator (`pytrec_eval map_cut.10`). | |
| `MODA` is FashionSigLIP with its own serving recipe, shown for reference. | |
| | benchmark | MODA | Pro Lite (bare) | **Pro Lite+** (with recipe) | | |
| |---|---:|---:|---:| | |
| | KAGL | 0.2887 | 0.3055 | **0.3201** | | |
| | Polyvore | 0.3726 | 0.3952 | **0.4049** | | |
| | Atlas | 0.1862 | 0.1814 | **0.1904** | | |
| | Fashion200K | **0.1946** | 0.1758 | 0.1846 | | |
| | DeepFashion In-Shop | **0.1642** | 0.0930 | 0.1026 | | |
| | DeepFashion Multimodal | **0.0147** | 0.0118 | 0.0133 | | |
| **Pro Lite+ leads the β€250M class on KAGL, Polyvore and Atlas** β +10.9% over MODA on KAGL, | |
| +8.7% on Polyvore, both significant under a paired bootstrap (10,000 resamples). | |
| The recipe is worth +2.5% to +12.8% over the bare encoder on every benchmark, and costs | |
| nothing at query time: the views are fused into a single vector before indexing. | |
| **Where this model is weak, stated plainly.** Pro Lite is tuned for short catalogue titles. | |
| On long natural-language descriptions it trails FashionSigLIP substantially β DeepFashion | |
| In-Shop queries average 75 words, and Pro Lite+ scores 0.1026 there against MODA's 0.1642. | |
| If your queries are descriptions rather than titles, use | |
| [MODA Duo](https://huggingface.co/HopitAI/moda-duo), which routes per query. | |
| ## Use | |
| ```bash | |
| pip install open_clip_torch pillow | |
| ``` | |
| ```python | |
| import open_clip, torch | |
| model, _, preprocess = open_clip.create_model_and_transforms("hf-hub:HopitAI/moda-pro-lite") | |
| tokenizer = open_clip.get_tokenizer("hf-hub:HopitAI/moda-pro-lite") | |
| model.eval() | |
| with torch.no_grad(): | |
| image = torch.nn.functional.normalize(model.encode_image(preprocess(img).unsqueeze(0)), dim=-1) | |
| text = torch.nn.functional.normalize(model.encode_text(tokenizer(["black leather ankle boots"])), dim=-1) | |
| score = (text @ image.T).item() | |
| ``` | |
| 768-d embeddings, cosine similarity, one vector per item. Index them in any vector database. | |
| For the recipe that lifts these numbers to the Pro Lite+ column, use | |
| [moda-pro-lite-plus](https://huggingface.co/HopitAI/moda-pro-lite-plus). | |
| ## Evaluation | |
| All figures are full corpus, all ground-truth queries, MAP@10 under one evaluator | |
| (`pytrec_eval map_cut.10`), float32. Per-query results and confidence intervals are in the | |
| [repository](https://github.com/hopit-ai/Moda). | |
| ## Related | |
| - [MODA Pro Lite+](https://huggingface.co/HopitAI/moda-pro-lite-plus) β this encoder with its serving recipe. | |
| - [MODA Duo](https://huggingface.co/HopitAI/moda-duo) β routes each query to Pro Lite+ or MODA by its shape; beats both on a mixed workload. | |
| - [MODA](https://huggingface.co/HopitAI/moda-fashionsiglip-multiview-203m) β FashionSigLIP with a serving recipe. Stronger on long descriptions. | |
| - [MODA-SigLIP-Distilled](https://huggingface.co/HopitAI/moda-fashion-distilled) β image-to-image retrieval. | |