/
resources.rs
205 lines (193 loc) · 13.6 KB
/
resources.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/// # Pretrained config files for sentence embeddings
pub struct SentenceEmbeddingsModulesConfigResources;
/// # Pretrained dense weights files for sentence embeddings
pub struct SentenceEmbeddingsDenseResources;
/// # Pretrained dense config files for sentence embeddings
pub struct SentenceEmbeddingsDenseConfigResources;
/// # Pretrained pooling config files for sentence embeddings
pub struct SentenceEmbeddingsPoolingConfigResources;
/// # Pretrained config files for sentence embeddings
pub struct SentenceEmbeddingsConfigResources;
/// # Pretrained tokenizer config files for sentence embeddings
pub struct SentenceEmbeddingsTokenizerConfigResources;
pub enum SentenceEmbeddingsModelType {
DistiluseBaseMultilingualCased,
BertBaseNliMeanTokens,
AllMiniLmL12V2,
AllMiniLmL6V2,
AllDistilrobertaV1,
ParaphraseAlbertSmallV2,
SentenceT5Base,
}
impl SentenceEmbeddingsModulesConfigResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/sbert-config",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/modules.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens>. Modified with conversion to C-array format.
pub const BERT_BASE_NLI_MEAN_TOKENS: (&'static str, &'static str) = (
"bert-base-nli-mean-tokens/sbert-config",
"https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens/resolve/main/modules.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L12_V2: (&'static str, &'static str) = (
"all-mini-lm-l12-v2/sbert-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2/resolve/main/modules.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L6_V2: (&'static str, &'static str) = (
"all-mini-lm-l6-v2/sbert-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/modules.json",
);
/// Shared under Apache 2.0 licenseat <https://huggingface.co/sentence-transformers/all-distilroberta-v1>. Modified with conversion to C-array format.
pub const ALL_DISTILROBERTA_V1: (&'static str, &'static str) = (
"all-distilroberta-v1/sbert-config",
"https://huggingface.co/sentence-transformers/all-distilroberta-v1/resolve/main/modules.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2>. Modified with conversion to C-array format.
pub const PARAPHRASE_ALBERT_SMALL_V2: (&'static str, &'static str) = (
"paraphrase-albert-small-v2/sbert-config",
"https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2/resolve/main/modules.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/sbert-config",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/modules.json",
);
}
impl SentenceEmbeddingsDenseResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/sbert-dense",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/2_Dense/rust_model.ot",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/sbert-dense",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/2_Dense/rust_model.ot",
);
}
impl SentenceEmbeddingsDenseConfigResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/sbert-dense-config",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/2_Dense/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/sbert-dense-config",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/2_Dense/config.json",
);
}
impl SentenceEmbeddingsPoolingConfigResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens>. Modified with conversion to C-array format.
pub const BERT_BASE_NLI_MEAN_TOKENS: (&'static str, &'static str) = (
"bert-base-nli-mean-tokens/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L12_V2: (&'static str, &'static str) = (
"all-mini-lm-l12-v2/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L6_V2: (&'static str, &'static str) = (
"all-mini-lm-l6-v2/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 licenseat <https://huggingface.co/sentence-transformers/all-distilroberta-v1>. Modified with conversion to C-array format.
pub const ALL_DISTILROBERTA_V1: (&'static str, &'static str) = (
"all-distilroberta-v1/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/all-distilroberta-v1/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2>. Modified with conversion to C-array format.
pub const PARAPHRASE_ALBERT_SMALL_V2: (&'static str, &'static str) = (
"paraphrase-albert-small-v2/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2/resolve/main/1_Pooling/config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/sbert-pooling-config",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/1_Pooling/config.json",
);
}
impl SentenceEmbeddingsConfigResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/sbert-config",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens>. Modified with conversion to C-array format.
pub const BERT_BASE_NLI_MEAN_TOKENS: (&'static str, &'static str) = (
"bert-base-nli-mean-tokens/sbert-config",
"https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L12_V2: (&'static str, &'static str) = (
"all-mini-lm-l12-v2/sbert-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L6_V2: (&'static str, &'static str) = (
"all-mini-lm-l6-v2/sbert-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 licenseat <https://huggingface.co/sentence-transformers/all-distilroberta-v1>. Modified with conversion to C-array format.
pub const ALL_DISTILROBERTA_V1: (&'static str, &'static str) = (
"all-distilroberta-v1/sbert-config",
"https://huggingface.co/sentence-transformers/all-distilroberta-v1/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2>. Modified with conversion to C-array format.
pub const PARAPHRASE_ALBERT_SMALL_V2: (&'static str, &'static str) = (
"paraphrase-albert-small-v2/sbert-config",
"https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2/resolve/main/sentence_bert_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/sbert-config",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/sentence_bert_config.json",
);
}
impl SentenceEmbeddingsTokenizerConfigResources {
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased>. Modified with conversion to C-array format.
pub const DISTILUSE_BASE_MULTILINGUAL_CASED: (&'static str, &'static str) = (
"distiluse-base-multilingual-cased/tokenizer-config",
"https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens>. Modified with conversion to C-array format.
pub const BERT_BASE_NLI_MEAN_TOKENS: (&'static str, &'static str) = (
"bert-base-nli-mean-tokens/tokenizer-config",
"https://huggingface.co/sentence-transformers/bert-base-nli-mean-tokens/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L12_V2: (&'static str, &'static str) = (
"all-mini-lm-l12-v2/tokenizer-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L12-v2/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2>. Modified with conversion to C-array format.
pub const ALL_MINI_LM_L6_V2: (&'static str, &'static str) = (
"all-mini-lm-l6-v2/tokenizer-config",
"https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 licenseat <https://huggingface.co/sentence-transformers/all-distilroberta-v1>. Modified with conversion to C-array format.
pub const ALL_DISTILROBERTA_V1: (&'static str, &'static str) = (
"all-distilroberta-v1/tokenizer-config",
"https://huggingface.co/sentence-transformers/all-distilroberta-v1/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2>. Modified with conversion to C-array format.
pub const PARAPHRASE_ALBERT_SMALL_V2: (&'static str, &'static str) = (
"paraphrase-albert-small-v2/tokenizer-config",
"https://huggingface.co/sentence-transformers/paraphrase-albert-small-v2/resolve/main/tokenizer_config.json",
);
/// Shared under Apache 2.0 license at <https://huggingface.co/sentence-transformers/sentence-t5-base>. Modified with conversion to C-array format.
pub const SENTENCE_T5_BASE: (&'static str, &'static str) = (
"sentence-t5-base/tokenizer-config",
"https://huggingface.co/sentence-transformers/sentence-t5-base/resolve/main/tokenizer_config.json",
);
}