Instructions to use HopitAI/moda-duo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use HopitAI/moda-duo with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:HopitAI/moda-duo') tokenizer = open_clip.get_tokenizer('hf-hub:HopitAI/moda-duo') - Notebooks
- Google Colab
- Kaggle
Download config.json from HopitAI/moda-duo: direct link, hf CLI and curl.
- Browser
- Download file 2.57 kB
-
https://huggingface.co/HopitAI/moda-duo/resolve/main/config.json
- Command line
-
hf download hf://HopitAI/moda-duo/config.json
-
curl -L -o config.json https://huggingface.co/HopitAI/moda-duo/resolve/main/config.json
2.57 kB
| { | |
| "name": "MODA Duo", | |
| "artifact_type": "retrieval_system", | |
| "description": "Two open constituents, one answer per query. Each query is routed to whichever constituent suits its shape: short catalogue titles to MODA Pro Lite+, longer descriptions to MODA. One text forward and one nearest-neighbour query per search.", | |
| "additional_learned_parameters": 0, | |
| "constituents": { | |
| "moda": { | |
| "base_model": "Marqo/marqo-fashionSigLIP", | |
| "parameters": 203155970, | |
| "embedding_dimension": 768, | |
| "gallery": { | |
| "views": { | |
| "official": 1.0, | |
| "pad_white": 0.25, | |
| "center_crop": 0.25 | |
| }, | |
| "normalize": true | |
| }, | |
| "query": { | |
| "prompts": { | |
| "raw": 1.0, | |
| "product": 0.25 | |
| }, | |
| "normalize": true | |
| }, | |
| "prompt_templates": { | |
| "raw": "{query}", | |
| "product": "a fashion product photo of {query}" | |
| } | |
| }, | |
| "moda_pro_lite_plus": { | |
| "base_model": "HopitAI/moda-pro-lite", | |
| "parameters": 213159938, | |
| "embedding_dimension": 768, | |
| "gallery": { | |
| "views": { | |
| "official": 1.0, | |
| "pad": 0.25, | |
| "foreground_pad": 0.25 | |
| }, | |
| "normalize": true | |
| }, | |
| "query": { | |
| "prompts": { | |
| "raw": 1.0, | |
| "photo": 0.25 | |
| }, | |
| "normalize": true | |
| }, | |
| "prompt_templates": { | |
| "raw": "{query}", | |
| "photo": "a photo of {query}" | |
| } | |
| } | |
| }, | |
| "router": { | |
| "kind": "query_word_count", | |
| "rule": "words(query) <= threshold -> moda_pro_lite_plus, else moda", | |
| "threshold": 36, | |
| "pluggable": true, | |
| "note": "The router is a callable; any policy mapping a query to a constituent name may replace it." | |
| }, | |
| "serving": { | |
| "stored_vectors_per_item": 2, | |
| "indexes": 2, | |
| "text_forwards_per_query": 2, | |
| "encoders_run_per_query": 1, | |
| "ann_queries_per_search": 1, | |
| "rerank": false | |
| }, | |
| "selection": { | |
| "criterion": "maximin regret against the per-regime oracle (better of the two constituents), tie-break mean regret", | |
| "target_benchmarks_accessed_during_selection": false, | |
| "frozen_before_target_evaluation": true, | |
| "receipt": "results/multiview_recipe_rebuild/SELECTION_duo.json", | |
| "threshold_selected_on": "development data only (OpenVTON validation 4,989 + GLAMI 2,000 x 3 query views)" | |
| }, | |
| "evaluation": { | |
| "protocol": "full corpus, all ground-truth queries, MAP@10, pytrec_eval map_cut.10, paired bootstrap 10000 @ 20260728", | |
| "receipt": "results/duo_target_eval.json" | |
| } | |
| } |