vector-dev-god commited on
Commit
cddd354
·
verified ·
1 Parent(s): 7a64d72

Upload SearchMap Preview model with complete configuration

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md CHANGED
@@ -1,3 +1,141 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - embedding
5
+ - transformers
6
+ - search
7
+ - e-commerce
8
+ - conversational-search
9
+ - semantic-search
10
+ license: mit
11
+ pipeline_tag: feature-extraction
12
+ ---
13
+
14
+ # VectorPath SearchMap: Conversational E-commerce Search Embedding Model
15
+
16
+ ## Model Description
17
+
18
+ SearchMap is a specialized embedding model designed to revolutionize e-commerce search by making it more conversational and intuitive. Fine-tuned on the Stella Embed 400M v5 base model, it excels at understanding natural language queries and matching them with relevant products.
19
+
20
+ ## Key Features
21
+
22
+ - Optimized for conversational e-commerce queries
23
+ - Handles complex, natural language search intents
24
+ - Supports multi-attribute product search
25
+ - Efficient 1024-dimensional embeddings (configurable up to 8192)
26
+ - Specialized for product and hotel search scenarios
27
+
28
+ ## Model Details
29
+
30
+ - Base Model: Stella Embed 400M v5
31
+ - Embedding Dimensions: Configurable (512, 768, 1024, 2048, 4096, 6144, 8192)
32
+ - Training Data: 100,000+ e-commerce products across 32 categories
33
+ - License: MIT
34
+ - Framework: PyTorch / Sentence Transformers
35
+
36
+ ## Usage
37
+
38
+ ### Using FlagEmbedding (Recommended)
39
+
40
+ ```python
41
+ from FlagEmbedding import FlagModel
42
+
43
+ # Initialize the model
44
+ model = FlagModel(
45
+ 'vectorpath/searchmap-v1',
46
+ query_instruction_for_retrieval="Generate a representation for this search query that can be used to retrieve related ecommerce products:",
47
+ use_fp16=True
48
+ )
49
+
50
+ # Encode queries
51
+ query = "A treat my dog and I can eat together"
52
+ query_embedding = model.encode(query)
53
+
54
+ # Encode products
55
+ product_description = "Organic peanut butter dog treats, safe for human consumption..."
56
+ product_embedding = model.encode(product_description)
57
+ ```
58
+
59
+ ### Using with FAISS for Vector Search
60
+
61
+ ```python
62
+ import numpy as np
63
+ import faiss
64
+
65
+ # Create FAISS index
66
+ embedding_dimension = 1024 # or your chosen dimension
67
+ index = faiss.IndexFlatL2(embedding_dimension)
68
+
69
+ # Add product embeddings
70
+ product_embeddings = model.encode(product_descriptions)
71
+ index.add(np.array(product_embeddings).astype('float32'))
72
+
73
+ # Search
74
+ query_embedding = model.encode(query)
75
+ distances, indices = index.search(
76
+ np.array([query_embedding]).astype('float32'),
77
+ k=10
78
+ )
79
+ ```
80
+
81
+ ### Example Search Queries
82
+
83
+ The model excels at understanding natural language queries like:
84
+ - "A treat my dog and I can eat together"
85
+ - "Lightweight waterproof hiking backpack for summer trails"
86
+ - "Eco-friendly kitchen gadgets for a small apartment"
87
+ - "Comfortable shoes for standing all day at work"
88
+
89
+ ## Performance and Limitations
90
+
91
+ ### Strengths
92
+ - Excellent at understanding conversational and natural language queries
93
+ - Strong performance in e-commerce and hotel search scenarios
94
+ - Handles complex multi-attribute queries
95
+ - Efficient computation with configurable embedding dimensions
96
+
97
+ ### Current Limitations
98
+ - May not fully prioritize weighted terms in queries
99
+ - Limited handling of slang and colloquial language
100
+ - Regional language variations might need fine-tuning
101
+
102
+ ## Training Details
103
+
104
+ The model was trained using:
105
+ - Supervised learning with FlagEmbedding
106
+ - 100,000+ product dataset across 32 categories
107
+ - AI-generated conversational search queries
108
+ - Positive and negative product examples for contrast learning
109
+
110
+ ## Intended Use
111
+
112
+ This model is designed for:
113
+ - E-commerce product search and recommendations
114
+ - Hotel and accommodation search
115
+ - Product catalog vectorization
116
+ - Semantic similarity matching
117
+ - Query understanding and intent detection
118
+
119
+ ## Citation
120
+
121
+ If you use this model in your research, please cite:
122
+
123
+ ```bibtex
124
+ @misc{vectorpath2025searchmap,
125
+ title={SearchMap: Conversational E-commerce Search Embedding Model},
126
+ author={VectorPath Research Team},
127
+ year={2025},
128
+ publisher={Hugging Face},
129
+ journal={HuggingFace Model Hub},
130
+ }
131
+ ```
132
+
133
+ ## Contact and Community
134
+
135
+ - Discord Community: [Join our Discord]
136
+ - GitHub Issues: Report bugs and feature requests
137
+ - Email: [Contact Email]
138
+
139
+ ## License
140
+
141
+ This model is released under the MIT License. See the LICENSE file for more details.
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./saved_model/checkpoint-21660",
3
+ "architectures": [
4
+ "NewModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration.NewConfig",
9
+ "AutoModel": "modeling.NewModel"
10
+ },
11
+ "classifier_dropout": null,
12
+ "hidden_act": "gelu",
13
+ "hidden_dropout_prob": 0.1,
14
+ "hidden_size": 1024,
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 4096,
17
+ "layer_norm_eps": 1e-12,
18
+ "layer_norm_type": "layer_norm",
19
+ "logn_attention_clip1": false,
20
+ "logn_attention_scale": false,
21
+ "max_position_embeddings": 8192,
22
+ "model_type": "new",
23
+ "num_attention_heads": 16,
24
+ "num_hidden_layers": 24,
25
+ "pack_qkv": true,
26
+ "pad_token_id": 0,
27
+ "position_embedding_type": "rope",
28
+ "rope_scaling": {
29
+ "factor": 2.0,
30
+ "type": "ntk"
31
+ },
32
+ "rope_theta": 160000,
33
+ "torch_dtype": "float32",
34
+ "transformers_version": "4.42.4",
35
+ "type_vocab_size": 2,
36
+ "unpad_inputs": true,
37
+ "use_memory_efficient_attention": true,
38
+ "vocab_size": 30528
39
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.7.0",
4
+ "transformers": "4.42.4",
5
+ "pytorch": "2.4.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78f8474dad9b263d78420f3e1cc540d6160c32539f946feefe90727806fbf934
3
+ size 1736585680
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 8192,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "max_length": 8000,
50
+ "model_max_length": 32768,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff