Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +940 -0
- config.json +25 -0
- config_sentence_transformers.json +12 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +63 -0
- vocab.txt +0 -0
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
ADDED
@@ -0,0 +1,940 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sentence-similarity
|
5 |
+
- feature-extraction
|
6 |
+
- generated_from_trainer
|
7 |
+
- loss:MatryoshkaLoss
|
8 |
+
- loss:MultipleNegativesRankingLoss
|
9 |
+
- dataset_size:164
|
10 |
+
base_model: Snowflake/snowflake-arctic-embed-l
|
11 |
+
widget:
|
12 |
+
- source_sentence: What steps must be taken before an app can receive communication
|
13 |
+
from Flow actions?
|
14 |
+
sentences:
|
15 |
+
- Before your app can receive communication from Flow actions, you need to create
|
16 |
+
one or more standardized API endpoints on your web server. Review the information
|
17 |
+
for each endpoint to understand its requirements, the format of the payload, and
|
18 |
+
the expected response. You'll also learn how to avoid processing duplicate requests,
|
19 |
+
identify an action by its ID, and verify requests for security purposes.
|
20 |
+
- 'Apps must be properly configured to respond to trigger lifecycle callbacks. When
|
21 |
+
a merchant attempts to enable a workflow that uses the trigger, Shopify Flow sends
|
22 |
+
a lifecycle callback to the app''s web server. If it doesn''t promptly receive
|
23 |
+
a response or receives a response with an HTTP status code that isn''t 2xx, then
|
24 |
+
the merchant can''t enable the workflow and make use of the trigger.
|
25 |
+
|
26 |
+
|
27 |
+
Note: Legacy trigger discovery webhook extensions created using the Partner Dashboard
|
28 |
+
are deprecated and must migrate to the CLI before they can be edited.
|
29 |
+
|
30 |
+
|
31 |
+
How trigger lifecycle callbacks work
|
32 |
+
|
33 |
+
|
34 |
+
Trigger lifecycle callbacks contain identifying information about the trigger
|
35 |
+
and the store using it and indicate whether the trigger is being used. You can
|
36 |
+
use this information to track the stores that are currently using your triggers
|
37 |
+
and then send trigger requests to only those stores.
|
38 |
+
|
39 |
+
|
40 |
+
Properties'
|
41 |
+
- 'Enter a title and description for the action. In the Action Preview area, you
|
42 |
+
can see how the title and action display to merchants when they''re choosing actions
|
43 |
+
in Shopify Flow.
|
44 |
+
|
45 |
+
|
46 |
+
Enter the URL for the action execution endpoint that you created. Shopify Flow
|
47 |
+
sends the action''s JSON payload to this endpoint when it''s about to execute
|
48 |
+
your action.
|
49 |
+
|
50 |
+
|
51 |
+
Step 2: Customize a Flow action configuration file
|
52 |
+
|
53 |
+
|
54 |
+
In this section you''ll use the default action template and update it to be a
|
55 |
+
functional extension example. Once you have generated a Flow extension using Shopify
|
56 |
+
CLI, follow the instructions below:
|
57 |
+
|
58 |
+
|
59 |
+
Change the description to Place a bid on an auction.
|
60 |
+
|
61 |
+
|
62 |
+
Update the extensions.runtime_url to an endpoint where you can receive the runtime
|
63 |
+
request.
|
64 |
+
|
65 |
+
|
66 |
+
On the second settings.fields field, update the following values:
|
67 |
+
|
68 |
+
|
69 |
+
type to number_decimal
|
70 |
+
|
71 |
+
|
72 |
+
key to amount
|
73 |
+
|
74 |
+
|
75 |
+
name to Bid Amount
|
76 |
+
|
77 |
+
|
78 |
+
Add a description property and set it to The amount of the bid'
|
79 |
+
- source_sentence: What type and key are assigned to the second settings.fields field
|
80 |
+
in the configuration?
|
81 |
+
sentences:
|
82 |
+
- '[[settings.fields]] type = "customer_reference"
|
83 |
+
|
84 |
+
|
85 |
+
[[settings.fields]] type = "single_line_text_field" key = "your field key" ```
|
86 |
+
|
87 |
+
|
88 |
+
Trigger extension properties
|
89 |
+
|
90 |
+
|
91 |
+
Extension properties are listed in the [[extensions]] section and enable you to
|
92 |
+
define the interface between Flow and your event.
|
93 |
+
|
94 |
+
|
95 |
+
Property name Description Rules name Required Name of your extension. Will be
|
96 |
+
the merchant-facing name of your task in the editor. This should be something
|
97 |
+
that is human readable. type Required The type of your extension. This should
|
98 |
+
always be set to “flow_trigger” for Flow triggers. - Value must be flow_trigger
|
99 |
+
. handle Required A unique identifier for your extension. This property cannot
|
100 |
+
be changed once you’ve run the dev or deploy command. - Cannot exceed 30 characters.
|
101 |
+
- Must be unique across your app''s extensions. - Must only contain alphanumeric
|
102 |
+
characters and hyphens. description Optional A description of your extension.
|
103 |
+
This description will be shown in the Flow editor navigation panel.'
|
104 |
+
- 'Change the description to Place a bid on an auction.
|
105 |
+
|
106 |
+
|
107 |
+
Update the extensions.runtime_url to an endpoint where you can receive the runtime
|
108 |
+
request.
|
109 |
+
|
110 |
+
|
111 |
+
On the second settings.fields field, update the following values:
|
112 |
+
|
113 |
+
|
114 |
+
type to number_decimal
|
115 |
+
|
116 |
+
|
117 |
+
key to amount
|
118 |
+
|
119 |
+
|
120 |
+
name to Bid Amount
|
121 |
+
|
122 |
+
|
123 |
+
Add a description property and set it to The amount of the bid
|
124 |
+
|
125 |
+
|
126 |
+
```bash [[extensions]] name = "Place Auction Bid" type = "flow_action" handle
|
127 |
+
= "place-bid" description = "Place a bid on an auction" runtime_url = "https://your-server-domain/path/to/action/handler"
|
128 |
+
|
129 |
+
|
130 |
+
[settings]
|
131 |
+
|
132 |
+
|
133 |
+
[[settings.fields]] type = "customer_reference" required = true
|
134 |
+
|
135 |
+
|
136 |
+
[[settings.fields]] type = "number_decimal" key = "amount" name = "Bid Amount"
|
137 |
+
description = "The amount of the bid" required = true ```
|
138 |
+
|
139 |
+
|
140 |
+
Step 3: Configure your web server
|
141 |
+
|
142 |
+
|
143 |
+
To build a Shopify Flow action, you need to add a service to your web server to
|
144 |
+
listen for the JSON payload that Shopify Flow sends when the action runs.
|
145 |
+
|
146 |
+
|
147 |
+
Optionally, you can also add the following:'
|
148 |
+
- 'To give merchants a more seamless action configuration experience, and to allow
|
149 |
+
them to manage resources that are external to Shopify Flow, you can embed a page
|
150 |
+
from your app in the Shopify Flow editor.
|
151 |
+
|
152 |
+
|
153 |
+
In your Shopify Flow action configuration, merchants see a preview with an image
|
154 |
+
and text that''s fetched from your custom configuration page preview URL. Merchants
|
155 |
+
can click the button to access the custom configuration page.
|
156 |
+
|
157 |
+
|
158 |
+
Your custom configuration page is then displayed in a frame in the Shopify admin.
|
159 |
+
|
160 |
+
|
161 |
+
In this tutorial, you''ll learn how to render a custom configuration page in Shopify
|
162 |
+
Flow, customize the page frame, and access data relevant to your action in the
|
163 |
+
custom configuration page context.
|
164 |
+
|
165 |
+
|
166 |
+
Requirements
|
167 |
+
|
168 |
+
|
169 |
+
You''ve created a Partner account.
|
170 |
+
|
171 |
+
|
172 |
+
You''ve created an app.
|
173 |
+
|
174 |
+
|
175 |
+
Resources
|
176 |
+
|
177 |
+
|
178 |
+
To implement this feature, you''ll use the following:
|
179 |
+
|
180 |
+
|
181 |
+
Shopify App Bridge
|
182 |
+
|
183 |
+
|
184 |
+
App Bridge components
|
185 |
+
|
186 |
+
|
187 |
+
App Bridge actions specific to the custom configuration page
|
188 |
+
|
189 |
+
|
190 |
+
Implementing a custom configuration page'
|
191 |
+
- source_sentence: What is the purpose of updating the description in the flow extension
|
192 |
+
to "Trigger for auction bids"?
|
193 |
+
sentences:
|
194 |
+
- 'The following procedure requires you to have generated a flow extension using
|
195 |
+
Shopify CLI. In this section you''ll use the default trigger template and update
|
196 |
+
it to be a functional extension example.
|
197 |
+
|
198 |
+
|
199 |
+
Change description to Trigger for auction bids.
|
200 |
+
|
201 |
+
|
202 |
+
On the second [[settings.fields]] field, update:
|
203 |
+
|
204 |
+
|
205 |
+
type to number_decimal
|
206 |
+
|
207 |
+
|
208 |
+
key to Amount
|
209 |
+
|
210 |
+
|
211 |
+
```bash [[extensions]] name = "Auction Bid Placed" type = "flow_trigger" handle
|
212 |
+
= "auction-bid-placed" description = "Trigger for auction bids."
|
213 |
+
|
214 |
+
|
215 |
+
[settings]
|
216 |
+
|
217 |
+
|
218 |
+
[[settings.fields]] type = "customer_reference"
|
219 |
+
|
220 |
+
|
221 |
+
[[settings.fields]] type = "number_decimal" key = "Amount" ```
|
222 |
+
|
223 |
+
|
224 |
+
Step 3: Enable the draft version of your trigger
|
225 |
+
|
226 |
+
|
227 |
+
Running app dev allows changes made to local files to update the draft version
|
228 |
+
of your Flow task extensions. The draft version is only available in your development
|
229 |
+
store.'
|
230 |
+
- 'Custom step descriptions added within the workflow.
|
231 |
+
|
232 |
+
|
233 |
+
Adding additional locales
|
234 |
+
|
235 |
+
|
236 |
+
Add new .json files prefixed with the locale, for example es.json.
|
237 |
+
|
238 |
+
|
239 |
+
Add default to one of the locales to make it the fallback if a merchant''s locale
|
240 |
+
isn''t in the locales you have provided. Example: en.default.json.
|
241 |
+
|
242 |
+
|
243 |
+
Step descriptions
|
244 |
+
|
245 |
+
|
246 |
+
You can provide translated custom step descriptions by adding a translation key
|
247 |
+
wrapped by curly braces in the step description field. For example, {expressShippingCondition}.
|
248 |
+
Ensure there''s no other characters before or after {yourKey}. After adding this
|
249 |
+
to your workflow, you can update the translation files to include the step description.
|
250 |
+
|
251 |
+
|
252 |
+
The following is an example:'
|
253 |
+
- 'Supported field types
|
254 |
+
|
255 |
+
|
256 |
+
When you create a trigger, you add the fields that your trigger sends to Shopify
|
257 |
+
Flow in the [settings] section of the TOML file. These fields define what your
|
258 |
+
event plans to send to Shopify Flow. Merchants can then use that data in their
|
259 |
+
conditions and actions.
|
260 |
+
|
261 |
+
|
262 |
+
You can add two types of fields: custom fields or predefined reference fields.
|
263 |
+
|
264 |
+
|
265 |
+
Reference field types
|
266 |
+
|
267 |
+
|
268 |
+
A reference field lets you send the identifier of a Shopify resource to Shopify
|
269 |
+
Flow. This allows merchants to build workflows that use any data related to that
|
270 |
+
resource.
|
271 |
+
|
272 |
+
|
273 |
+
For example, your trigger sends a customer ID to Shopify Flow. The merchant can
|
274 |
+
create a condition that checks customer / amountSpent and customer / tags. In
|
275 |
+
their action, the merchant can include the template variables for customers, such
|
276 |
+
as {{customer.email}}.
|
277 |
+
|
278 |
+
|
279 |
+
To specify that a trigger will include a reference field, you only need to specify
|
280 |
+
the type and an optional description property. For example:
|
281 |
+
|
282 |
+
|
283 |
+
```bash ...
|
284 |
+
|
285 |
+
|
286 |
+
[settings]'
|
287 |
+
- source_sentence: How can you add custom configuration page URLs to your Shopify
|
288 |
+
Flow action configuration?
|
289 |
+
sentences:
|
290 |
+
- 'Custom step descriptions added within the workflow.
|
291 |
+
|
292 |
+
|
293 |
+
Adding additional locales
|
294 |
+
|
295 |
+
|
296 |
+
Add new .json files prefixed with the locale, for example es.json.
|
297 |
+
|
298 |
+
|
299 |
+
Add default to one of the locales to make it the fallback if a merchant''s locale
|
300 |
+
isn''t in the locales you have provided. Example: en.default.json.
|
301 |
+
|
302 |
+
|
303 |
+
Step descriptions
|
304 |
+
|
305 |
+
|
306 |
+
You can provide translated custom step descriptions by adding a translation key
|
307 |
+
wrapped by curly braces in the step description field. For example, {expressShippingCondition}.
|
308 |
+
Ensure there''s no other characters before or after {yourKey}. After adding this
|
309 |
+
to your workflow, you can update the translation files to include the step description.
|
310 |
+
|
311 |
+
|
312 |
+
The following is an example:'
|
313 |
+
- 'Navigate to your app directory.
|
314 |
+
|
315 |
+
|
316 |
+
Run the following command to start using draft versions of your extension(s):
|
317 |
+
|
318 |
+
|
319 |
+
```bash
|
320 |
+
|
321 |
+
|
322 |
+
!/bin/bash
|
323 |
+
|
324 |
+
|
325 |
+
shopify app dev ```
|
326 |
+
|
327 |
+
|
328 |
+
Follow the prompts.
|
329 |
+
|
330 |
+
|
331 |
+
Step 4: Test your trigger
|
332 |
+
|
333 |
+
|
334 |
+
After the app dev command has started, you can test the draft version of your
|
335 |
+
trigger in Shopify Flow.
|
336 |
+
|
337 |
+
|
338 |
+
In your development store, create a workflow that uses the trigger that you created
|
339 |
+
for your app.
|
340 |
+
|
341 |
+
|
342 |
+
Using the Admin GraphQL API, send a flowTriggerReceive mutation with the following
|
343 |
+
arguments:
|
344 |
+
|
345 |
+
|
346 |
+
The handle of the trigger
|
347 |
+
|
348 |
+
|
349 |
+
The payload of the trigger containing the fields defined in the extension TOML
|
350 |
+
|
351 |
+
|
352 |
+
The size of the payload (keys included) must be under 50 KB. If the size of the
|
353 |
+
properties body exceeds the limit, then Shopify responds to the GraphQL request
|
354 |
+
with a validation error reading Properties size exceeds the limit of 50000 bytes.
|
355 |
+
As a result, workflows with the specified trigger won''t start from this request.
|
356 |
+
|
357 |
+
|
358 |
+
The following is an example of a flowTriggerReceive mutation:'
|
359 |
+
- 'const titleBar = TitleBar.create(app, { title: '''', buttons: { primary: primaryBtn,
|
360 |
+
secondary: [secondaryBtn], }, })
|
361 |
+
|
362 |
+
|
363 |
+
// update buttons after initialization const newPrimary = Button.create(app, {
|
364 |
+
label: ''New button'', }) newPrimary.subscribe(Button.Action.CLICK, () => { console.log(''new
|
365 |
+
primary button clicked'') })
|
366 |
+
|
367 |
+
|
368 |
+
titleBar.set({ buttons: { primary: newPrimary, secondary: [secondaryBtn], }, })
|
369 |
+
|
370 |
+
|
371 |
+
jsx import { TitleBar } from ''@shopify/app-bridge-react''
|
372 |
+
|
373 |
+
|
374 |
+
function Page() { const buttons = { primaryAction: { content: ''Button 1'', onAction:
|
375 |
+
() => { console.log(''button 1 clicked'') }, }, secondaryActions: [ { content:
|
376 |
+
''Button 2'', onAction: () => { console.log(''button 2 clicked'') }, }, ], }
|
377 |
+
|
378 |
+
|
379 |
+
return } ```
|
380 |
+
|
381 |
+
|
382 |
+
Next steps
|
383 |
+
|
384 |
+
|
385 |
+
Add custom configuration page preview URL and custom validation endpoints to your
|
386 |
+
app.
|
387 |
+
|
388 |
+
|
389 |
+
Add your custom configuration page preview URL, custom configuration page URL,
|
390 |
+
and custom validation URL to your Shopify Flow action configuration.'
|
391 |
+
- source_sentence: How can you access step and property information on the custom
|
392 |
+
configuration page?
|
393 |
+
sentences:
|
394 |
+
- 'Property Data type Description Example flow_trigger_definition_id String The
|
395 |
+
unique identifier for your Shopify Flow trigger. Add row to spreadsheet has_enabled_flow
|
396 |
+
Boolean Whether the store has an enabled workflow that uses your trigger. Valid
|
397 |
+
values: true : There is at least one workflow that is enabled and that uses your
|
398 |
+
trigger. false : There are no enabled workflows that use your trigger. true shop_id
|
399 |
+
Number The unique identifier for the Shopify store. 690933842 shopify_domain String
|
400 |
+
The myshopify domain of the Shopify store. johnsapparel.myshopify.com timestamp
|
401 |
+
ISO 8601 date and timestamp The time when the notification was created. Notifications
|
402 |
+
with newer timestamps should take precedence. If you already have a timestamp
|
403 |
+
in your datastore and you receive a newer timestamp, then overwrite this payload''s
|
404 |
+
information in your datastore. Conversely, if you receive a timestamp that is
|
405 |
+
older than the information in your datastore, then ignore this payload. 2019-01-25T16:44:10.999Z'
|
406 |
+
- 'Implementing a custom configuration page
|
407 |
+
|
408 |
+
|
409 |
+
To build a custom configuration page, you''ll use Shopify App Bridge to render
|
410 |
+
a page from your app page in Shopify Flow.
|
411 |
+
|
412 |
+
|
413 |
+
From the context of the custom configuration page, you can then access step and
|
414 |
+
property information that you can use to display the appropriate information.
|
415 |
+
|
416 |
+
|
417 |
+
You can also add additional buttons to the App Bridge title bar, or trigger a
|
418 |
+
redirect to the previous page.
|
419 |
+
|
420 |
+
|
421 |
+
Use Shopify App Bridge to render your app page
|
422 |
+
|
423 |
+
|
424 |
+
Note: The specifics of the Custom Configuration Page integration varies between
|
425 |
+
Shopify App Bridge versions. Make sure you implement the integration specific
|
426 |
+
to your Shopify App Bridge version.
|
427 |
+
|
428 |
+
|
429 |
+
To render your custom configuration page, you need to integrate Shopify App Bridge
|
430 |
+
on the route that you want to render. To learn about setting up Shopify App Bridge,
|
431 |
+
refer to one of the following pages:
|
432 |
+
|
433 |
+
|
434 |
+
Getting started with Shopify App Bridge
|
435 |
+
|
436 |
+
|
437 |
+
Getting started with App Bridge React
|
438 |
+
|
439 |
+
|
440 |
+
Access action information'
|
441 |
+
- 'To give merchants a more seamless action configuration experience, and to allow
|
442 |
+
them to manage resources that are external to Shopify Flow, you can embed a page
|
443 |
+
from your app in the Shopify Flow editor.
|
444 |
+
|
445 |
+
|
446 |
+
In your Shopify Flow action configuration, merchants see a preview with an image
|
447 |
+
and text that''s fetched from your custom configuration page preview URL. Merchants
|
448 |
+
can click the button to access the custom configuration page.
|
449 |
+
|
450 |
+
|
451 |
+
Your custom configuration page is then displayed in a frame in the Shopify admin.
|
452 |
+
|
453 |
+
|
454 |
+
In this tutorial, you''ll learn how to render a custom configuration page in Shopify
|
455 |
+
Flow, customize the page frame, and access data relevant to your action in the
|
456 |
+
custom configuration page context.
|
457 |
+
|
458 |
+
|
459 |
+
Requirements
|
460 |
+
|
461 |
+
|
462 |
+
You''ve created a Partner account.
|
463 |
+
|
464 |
+
|
465 |
+
You''ve created an app.
|
466 |
+
|
467 |
+
|
468 |
+
Resources
|
469 |
+
|
470 |
+
|
471 |
+
To implement this feature, you''ll use the following:
|
472 |
+
|
473 |
+
|
474 |
+
Shopify App Bridge
|
475 |
+
|
476 |
+
|
477 |
+
App Bridge components
|
478 |
+
|
479 |
+
|
480 |
+
App Bridge actions specific to the custom configuration page
|
481 |
+
|
482 |
+
|
483 |
+
Implementing a custom configuration page'
|
484 |
+
pipeline_tag: sentence-similarity
|
485 |
+
library_name: sentence-transformers
|
486 |
+
metrics:
|
487 |
+
- cosine_accuracy@1
|
488 |
+
- cosine_accuracy@3
|
489 |
+
- cosine_accuracy@5
|
490 |
+
- cosine_accuracy@10
|
491 |
+
- cosine_precision@1
|
492 |
+
- cosine_precision@3
|
493 |
+
- cosine_precision@5
|
494 |
+
- cosine_precision@10
|
495 |
+
- cosine_recall@1
|
496 |
+
- cosine_recall@3
|
497 |
+
- cosine_recall@5
|
498 |
+
- cosine_recall@10
|
499 |
+
- cosine_ndcg@10
|
500 |
+
- cosine_mrr@10
|
501 |
+
- cosine_map@100
|
502 |
+
model-index:
|
503 |
+
- name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
|
504 |
+
results:
|
505 |
+
- task:
|
506 |
+
type: information-retrieval
|
507 |
+
name: Information Retrieval
|
508 |
+
dataset:
|
509 |
+
name: Unknown
|
510 |
+
type: unknown
|
511 |
+
metrics:
|
512 |
+
- type: cosine_accuracy@1
|
513 |
+
value: 0.5416666666666666
|
514 |
+
name: Cosine Accuracy@1
|
515 |
+
- type: cosine_accuracy@3
|
516 |
+
value: 1.0
|
517 |
+
name: Cosine Accuracy@3
|
518 |
+
- type: cosine_accuracy@5
|
519 |
+
value: 1.0
|
520 |
+
name: Cosine Accuracy@5
|
521 |
+
- type: cosine_accuracy@10
|
522 |
+
value: 1.0
|
523 |
+
name: Cosine Accuracy@10
|
524 |
+
- type: cosine_precision@1
|
525 |
+
value: 0.5416666666666666
|
526 |
+
name: Cosine Precision@1
|
527 |
+
- type: cosine_precision@3
|
528 |
+
value: 0.3333333333333333
|
529 |
+
name: Cosine Precision@3
|
530 |
+
- type: cosine_precision@5
|
531 |
+
value: 0.20000000000000004
|
532 |
+
name: Cosine Precision@5
|
533 |
+
- type: cosine_precision@10
|
534 |
+
value: 0.10000000000000002
|
535 |
+
name: Cosine Precision@10
|
536 |
+
- type: cosine_recall@1
|
537 |
+
value: 0.5416666666666666
|
538 |
+
name: Cosine Recall@1
|
539 |
+
- type: cosine_recall@3
|
540 |
+
value: 1.0
|
541 |
+
name: Cosine Recall@3
|
542 |
+
- type: cosine_recall@5
|
543 |
+
value: 1.0
|
544 |
+
name: Cosine Recall@5
|
545 |
+
- type: cosine_recall@10
|
546 |
+
value: 1.0
|
547 |
+
name: Cosine Recall@10
|
548 |
+
- type: cosine_ndcg@10
|
549 |
+
value: 0.8144765845238192
|
550 |
+
name: Cosine Ndcg@10
|
551 |
+
- type: cosine_mrr@10
|
552 |
+
value: 0.75
|
553 |
+
name: Cosine Mrr@10
|
554 |
+
- type: cosine_map@100
|
555 |
+
value: 0.75
|
556 |
+
name: Cosine Map@100
|
557 |
+
---
|
558 |
+
|
559 |
+
# SentenceTransformer based on Snowflake/snowflake-arctic-embed-l
|
560 |
+
|
561 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
562 |
+
|
563 |
+
## Model Details
|
564 |
+
|
565 |
+
### Model Description
|
566 |
+
- **Model Type:** Sentence Transformer
|
567 |
+
- **Base model:** [Snowflake/snowflake-arctic-embed-l](https://huggingface.co/Snowflake/snowflake-arctic-embed-l) <!-- at revision d8fb21ca8d905d2832ee8b96c894d3298964346b -->
|
568 |
+
- **Maximum Sequence Length:** 512 tokens
|
569 |
+
- **Output Dimensionality:** 1024 dimensions
|
570 |
+
- **Similarity Function:** Cosine Similarity
|
571 |
+
<!-- - **Training Dataset:** Unknown -->
|
572 |
+
<!-- - **Language:** Unknown -->
|
573 |
+
<!-- - **License:** Unknown -->
|
574 |
+
|
575 |
+
### Model Sources
|
576 |
+
|
577 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
578 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
579 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
580 |
+
|
581 |
+
### Full Model Architecture
|
582 |
+
|
583 |
+
```
|
584 |
+
SentenceTransformer(
|
585 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
|
586 |
+
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
587 |
+
(2): Normalize()
|
588 |
+
)
|
589 |
+
```
|
590 |
+
|
591 |
+
## Usage
|
592 |
+
|
593 |
+
### Direct Usage (Sentence Transformers)
|
594 |
+
|
595 |
+
First install the Sentence Transformers library:
|
596 |
+
|
597 |
+
```bash
|
598 |
+
pip install -U sentence-transformers
|
599 |
+
```
|
600 |
+
|
601 |
+
Then you can load this model and run inference.
|
602 |
+
```python
|
603 |
+
from sentence_transformers import SentenceTransformer
|
604 |
+
|
605 |
+
# Download from the 🤗 Hub
|
606 |
+
model = SentenceTransformer("thomfoolery/AIE5-MidTerm-finetuned-embeddings")
|
607 |
+
# Run inference
|
608 |
+
sentences = [
|
609 |
+
'How can you access step and property information on the custom configuration page?',
|
610 |
+
"Implementing a custom configuration page\n\nTo build a custom configuration page, you'll use Shopify App Bridge to render a page from your app page in Shopify Flow.\n\nFrom the context of the custom configuration page, you can then access step and property information that you can use to display the appropriate information.\n\nYou can also add additional buttons to the App Bridge title bar, or trigger a redirect to the previous page.\n\nUse Shopify App Bridge to render your app page\n\nNote: The specifics of the Custom Configuration Page integration varies between Shopify App Bridge versions. Make sure you implement the integration specific to your Shopify App Bridge version.\n\nTo render your custom configuration page, you need to integrate Shopify App Bridge on the route that you want to render. To learn about setting up Shopify App Bridge, refer to one of the following pages:\n\nGetting started with Shopify App Bridge\n\nGetting started with App Bridge React\n\nAccess action information",
|
611 |
+
"To give merchants a more seamless action configuration experience, and to allow them to manage resources that are external to Shopify Flow, you can embed a page from your app in the Shopify Flow editor.\n\nIn your Shopify Flow action configuration, merchants see a preview with an image and text that's fetched from your custom configuration page preview URL. Merchants can click the button to access the custom configuration page.\n\nYour custom configuration page is then displayed in a frame in the Shopify admin.\n\nIn this tutorial, you'll learn how to render a custom configuration page in Shopify Flow, customize the page frame, and access data relevant to your action in the custom configuration page context.\n\nRequirements\n\nYou've created a Partner account.\n\nYou've created an app.\n\nResources\n\nTo implement this feature, you'll use the following:\n\nShopify App Bridge\n\nApp Bridge components\n\nApp Bridge actions specific to the custom configuration page\n\nImplementing a custom configuration page",
|
612 |
+
]
|
613 |
+
embeddings = model.encode(sentences)
|
614 |
+
print(embeddings.shape)
|
615 |
+
# [3, 1024]
|
616 |
+
|
617 |
+
# Get the similarity scores for the embeddings
|
618 |
+
similarities = model.similarity(embeddings, embeddings)
|
619 |
+
print(similarities.shape)
|
620 |
+
# [3, 3]
|
621 |
+
```
|
622 |
+
|
623 |
+
<!--
|
624 |
+
### Direct Usage (Transformers)
|
625 |
+
|
626 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
627 |
+
|
628 |
+
</details>
|
629 |
+
-->
|
630 |
+
|
631 |
+
<!--
|
632 |
+
### Downstream Usage (Sentence Transformers)
|
633 |
+
|
634 |
+
You can finetune this model on your own dataset.
|
635 |
+
|
636 |
+
<details><summary>Click to expand</summary>
|
637 |
+
|
638 |
+
</details>
|
639 |
+
-->
|
640 |
+
|
641 |
+
<!--
|
642 |
+
### Out-of-Scope Use
|
643 |
+
|
644 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
645 |
+
-->
|
646 |
+
|
647 |
+
## Evaluation
|
648 |
+
|
649 |
+
### Metrics
|
650 |
+
|
651 |
+
#### Information Retrieval
|
652 |
+
|
653 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
654 |
+
|
655 |
+
| Metric | Value |
|
656 |
+
|:--------------------|:-----------|
|
657 |
+
| cosine_accuracy@1 | 0.5417 |
|
658 |
+
| cosine_accuracy@3 | 1.0 |
|
659 |
+
| cosine_accuracy@5 | 1.0 |
|
660 |
+
| cosine_accuracy@10 | 1.0 |
|
661 |
+
| cosine_precision@1 | 0.5417 |
|
662 |
+
| cosine_precision@3 | 0.3333 |
|
663 |
+
| cosine_precision@5 | 0.2 |
|
664 |
+
| cosine_precision@10 | 0.1 |
|
665 |
+
| cosine_recall@1 | 0.5417 |
|
666 |
+
| cosine_recall@3 | 1.0 |
|
667 |
+
| cosine_recall@5 | 1.0 |
|
668 |
+
| cosine_recall@10 | 1.0 |
|
669 |
+
| **cosine_ndcg@10** | **0.8145** |
|
670 |
+
| cosine_mrr@10 | 0.75 |
|
671 |
+
| cosine_map@100 | 0.75 |
|
672 |
+
|
673 |
+
<!--
|
674 |
+
## Bias, Risks and Limitations
|
675 |
+
|
676 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
677 |
+
-->
|
678 |
+
|
679 |
+
<!--
|
680 |
+
### Recommendations
|
681 |
+
|
682 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
683 |
+
-->
|
684 |
+
|
685 |
+
## Training Details
|
686 |
+
|
687 |
+
### Training Dataset
|
688 |
+
|
689 |
+
#### Unnamed Dataset
|
690 |
+
|
691 |
+
* Size: 164 training samples
|
692 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
693 |
+
* Approximate statistics based on the first 164 samples:
|
694 |
+
| | sentence_0 | sentence_1 |
|
695 |
+
|:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
696 |
+
| type | string | string |
|
697 |
+
| details | <ul><li>min: 13 tokens</li><li>mean: 19.51 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>min: 77 tokens</li><li>mean: 198.13 tokens</li><li>max: 309 tokens</li></ul> |
|
698 |
+
* Samples:
|
699 |
+
| sentence_0 | sentence_1 |
|
700 |
+
|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
701 |
+
| <code>What is the purpose of templates in Shopify Flow?</code> | <code>How templates work<br><br>A template in Shopify Flow is an example workflow that can be copied into a merchant's shop. Templates help merchants automate a specific use case with minimal or no additional configuration. Flow's template library offers hundreds of templates with features to filter, browse, and search. You can create a template for Shopify Flow that showcases your custom triggers and actions and help merchants do more.<br><br>Next steps<br><br>Follow our step by step guide on creating a Flow template.<br><br>Learn more about how localize your template, the approval process, and more in the reference resource</code> |
|
702 |
+
| <code>How can merchants utilize the template library in Shopify Flow?</code> | <code>How templates work<br><br>A template in Shopify Flow is an example workflow that can be copied into a merchant's shop. Templates help merchants automate a specific use case with minimal or no additional configuration. Flow's template library offers hundreds of templates with features to filter, browse, and search. You can create a template for Shopify Flow that showcases your custom triggers and actions and help merchants do more.<br><br>Next steps<br><br>Follow our step by step guide on creating a Flow template.<br><br>Learn more about how localize your template, the approval process, and more in the reference resource</code> |
|
703 |
+
| <code>What is required for the test web server to successfully send information to Shopify Flow?</code> | <code>Requirements<br><br>Make sure that you have the following:<br><br>A test web server that you can use to send information to Shopify Flow. You can use an existing web server. This web server needs to be able to send POST requests to Shopify's GraphQL Admin API.<br><br>A test app that works with the test web server and can send HTTP requests.<br><br>A development store that has Shopify Flow and the test app installed.<br><br>Your application has access to the read_customers scope. The trigger you will build using this tutorial will be using a customer reference which requires that scope.<br><br>Step 1: Create a Flow trigger extension<br><br>To give your Flow action a meaningful name, use the following guidelines:<br><br>Use an object acted on + past tense verb format. For example, Auction bid placed.<br><br>Use sentence case.<br><br>Don't use punctuation.<br><br>Separate words using spaces.<br><br>Using Shopify CLI<br><br>The following steps show how to create a trigger that sends bid information to Shopify Flow when a bid is placed on an auction.</code> |
|
704 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
705 |
+
```json
|
706 |
+
{
|
707 |
+
"loss": "MultipleNegativesRankingLoss",
|
708 |
+
"matryoshka_dims": [
|
709 |
+
768,
|
710 |
+
512,
|
711 |
+
256,
|
712 |
+
128,
|
713 |
+
64
|
714 |
+
],
|
715 |
+
"matryoshka_weights": [
|
716 |
+
1,
|
717 |
+
1,
|
718 |
+
1,
|
719 |
+
1,
|
720 |
+
1
|
721 |
+
],
|
722 |
+
"n_dims_per_step": -1
|
723 |
+
}
|
724 |
+
```
|
725 |
+
|
726 |
+
### Training Hyperparameters
|
727 |
+
#### Non-Default Hyperparameters
|
728 |
+
|
729 |
+
- `eval_strategy`: steps
|
730 |
+
- `per_device_train_batch_size`: 10
|
731 |
+
- `per_device_eval_batch_size`: 10
|
732 |
+
- `num_train_epochs`: 10
|
733 |
+
- `multi_dataset_batch_sampler`: round_robin
|
734 |
+
|
735 |
+
#### All Hyperparameters
|
736 |
+
<details><summary>Click to expand</summary>
|
737 |
+
|
738 |
+
- `overwrite_output_dir`: False
|
739 |
+
- `do_predict`: False
|
740 |
+
- `eval_strategy`: steps
|
741 |
+
- `prediction_loss_only`: True
|
742 |
+
- `per_device_train_batch_size`: 10
|
743 |
+
- `per_device_eval_batch_size`: 10
|
744 |
+
- `per_gpu_train_batch_size`: None
|
745 |
+
- `per_gpu_eval_batch_size`: None
|
746 |
+
- `gradient_accumulation_steps`: 1
|
747 |
+
- `eval_accumulation_steps`: None
|
748 |
+
- `torch_empty_cache_steps`: None
|
749 |
+
- `learning_rate`: 5e-05
|
750 |
+
- `weight_decay`: 0.0
|
751 |
+
- `adam_beta1`: 0.9
|
752 |
+
- `adam_beta2`: 0.999
|
753 |
+
- `adam_epsilon`: 1e-08
|
754 |
+
- `max_grad_norm`: 1
|
755 |
+
- `num_train_epochs`: 10
|
756 |
+
- `max_steps`: -1
|
757 |
+
- `lr_scheduler_type`: linear
|
758 |
+
- `lr_scheduler_kwargs`: {}
|
759 |
+
- `warmup_ratio`: 0.0
|
760 |
+
- `warmup_steps`: 0
|
761 |
+
- `log_level`: passive
|
762 |
+
- `log_level_replica`: warning
|
763 |
+
- `log_on_each_node`: True
|
764 |
+
- `logging_nan_inf_filter`: True
|
765 |
+
- `save_safetensors`: True
|
766 |
+
- `save_on_each_node`: False
|
767 |
+
- `save_only_model`: False
|
768 |
+
- `restore_callback_states_from_checkpoint`: False
|
769 |
+
- `no_cuda`: False
|
770 |
+
- `use_cpu`: False
|
771 |
+
- `use_mps_device`: False
|
772 |
+
- `seed`: 42
|
773 |
+
- `data_seed`: None
|
774 |
+
- `jit_mode_eval`: False
|
775 |
+
- `use_ipex`: False
|
776 |
+
- `bf16`: False
|
777 |
+
- `fp16`: False
|
778 |
+
- `fp16_opt_level`: O1
|
779 |
+
- `half_precision_backend`: auto
|
780 |
+
- `bf16_full_eval`: False
|
781 |
+
- `fp16_full_eval`: False
|
782 |
+
- `tf32`: None
|
783 |
+
- `local_rank`: 0
|
784 |
+
- `ddp_backend`: None
|
785 |
+
- `tpu_num_cores`: None
|
786 |
+
- `tpu_metrics_debug`: False
|
787 |
+
- `debug`: []
|
788 |
+
- `dataloader_drop_last`: False
|
789 |
+
- `dataloader_num_workers`: 0
|
790 |
+
- `dataloader_prefetch_factor`: None
|
791 |
+
- `past_index`: -1
|
792 |
+
- `disable_tqdm`: False
|
793 |
+
- `remove_unused_columns`: True
|
794 |
+
- `label_names`: None
|
795 |
+
- `load_best_model_at_end`: False
|
796 |
+
- `ignore_data_skip`: False
|
797 |
+
- `fsdp`: []
|
798 |
+
- `fsdp_min_num_params`: 0
|
799 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
800 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
801 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
802 |
+
- `deepspeed`: None
|
803 |
+
- `label_smoothing_factor`: 0.0
|
804 |
+
- `optim`: adamw_torch
|
805 |
+
- `optim_args`: None
|
806 |
+
- `adafactor`: False
|
807 |
+
- `group_by_length`: False
|
808 |
+
- `length_column_name`: length
|
809 |
+
- `ddp_find_unused_parameters`: None
|
810 |
+
- `ddp_bucket_cap_mb`: None
|
811 |
+
- `ddp_broadcast_buffers`: False
|
812 |
+
- `dataloader_pin_memory`: True
|
813 |
+
- `dataloader_persistent_workers`: False
|
814 |
+
- `skip_memory_metrics`: True
|
815 |
+
- `use_legacy_prediction_loop`: False
|
816 |
+
- `push_to_hub`: False
|
817 |
+
- `resume_from_checkpoint`: None
|
818 |
+
- `hub_model_id`: None
|
819 |
+
- `hub_strategy`: every_save
|
820 |
+
- `hub_private_repo`: None
|
821 |
+
- `hub_always_push`: False
|
822 |
+
- `gradient_checkpointing`: False
|
823 |
+
- `gradient_checkpointing_kwargs`: None
|
824 |
+
- `include_inputs_for_metrics`: False
|
825 |
+
- `include_for_metrics`: []
|
826 |
+
- `eval_do_concat_batches`: True
|
827 |
+
- `fp16_backend`: auto
|
828 |
+
- `push_to_hub_model_id`: None
|
829 |
+
- `push_to_hub_organization`: None
|
830 |
+
- `mp_parameters`:
|
831 |
+
- `auto_find_batch_size`: False
|
832 |
+
- `full_determinism`: False
|
833 |
+
- `torchdynamo`: None
|
834 |
+
- `ray_scope`: last
|
835 |
+
- `ddp_timeout`: 1800
|
836 |
+
- `torch_compile`: False
|
837 |
+
- `torch_compile_backend`: None
|
838 |
+
- `torch_compile_mode`: None
|
839 |
+
- `dispatch_batches`: None
|
840 |
+
- `split_batches`: None
|
841 |
+
- `include_tokens_per_second`: False
|
842 |
+
- `include_num_input_tokens_seen`: False
|
843 |
+
- `neftune_noise_alpha`: None
|
844 |
+
- `optim_target_modules`: None
|
845 |
+
- `batch_eval_metrics`: False
|
846 |
+
- `eval_on_start`: False
|
847 |
+
- `use_liger_kernel`: False
|
848 |
+
- `eval_use_gather_object`: False
|
849 |
+
- `average_tokens_across_devices`: False
|
850 |
+
- `prompts`: None
|
851 |
+
- `batch_sampler`: batch_sampler
|
852 |
+
- `multi_dataset_batch_sampler`: round_robin
|
853 |
+
|
854 |
+
</details>
|
855 |
+
|
856 |
+
### Training Logs
|
857 |
+
| Epoch | Step | cosine_ndcg@10 |
|
858 |
+
|:------:|:----:|:--------------:|
|
859 |
+
| 1.0 | 17 | 0.8353 |
|
860 |
+
| 2.0 | 34 | 0.8299 |
|
861 |
+
| 2.9412 | 50 | 0.8507 |
|
862 |
+
| 3.0 | 51 | 0.8507 |
|
863 |
+
| 4.0 | 68 | 0.8353 |
|
864 |
+
| 5.0 | 85 | 0.8452 |
|
865 |
+
| 5.8824 | 100 | 0.8606 |
|
866 |
+
| 6.0 | 102 | 0.8606 |
|
867 |
+
| 7.0 | 119 | 0.8299 |
|
868 |
+
| 8.0 | 136 | 0.8145 |
|
869 |
+
| 8.8235 | 150 | 0.8145 |
|
870 |
+
| 9.0 | 153 | 0.8145 |
|
871 |
+
| 10.0 | 170 | 0.8145 |
|
872 |
+
|
873 |
+
|
874 |
+
### Framework Versions
|
875 |
+
- Python: 3.11.11
|
876 |
+
- Sentence Transformers: 3.4.1
|
877 |
+
- Transformers: 4.48.3
|
878 |
+
- PyTorch: 2.5.1+cu124
|
879 |
+
- Accelerate: 1.3.0
|
880 |
+
- Datasets: 3.3.2
|
881 |
+
- Tokenizers: 0.21.0
|
882 |
+
|
883 |
+
## Citation
|
884 |
+
|
885 |
+
### BibTeX
|
886 |
+
|
887 |
+
#### Sentence Transformers
|
888 |
+
```bibtex
|
889 |
+
@inproceedings{reimers-2019-sentence-bert,
|
890 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
891 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
892 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
893 |
+
month = "11",
|
894 |
+
year = "2019",
|
895 |
+
publisher = "Association for Computational Linguistics",
|
896 |
+
url = "https://arxiv.org/abs/1908.10084",
|
897 |
+
}
|
898 |
+
```
|
899 |
+
|
900 |
+
#### MatryoshkaLoss
|
901 |
+
```bibtex
|
902 |
+
@misc{kusupati2024matryoshka,
|
903 |
+
title={Matryoshka Representation Learning},
|
904 |
+
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
|
905 |
+
year={2024},
|
906 |
+
eprint={2205.13147},
|
907 |
+
archivePrefix={arXiv},
|
908 |
+
primaryClass={cs.LG}
|
909 |
+
}
|
910 |
+
```
|
911 |
+
|
912 |
+
#### MultipleNegativesRankingLoss
|
913 |
+
```bibtex
|
914 |
+
@misc{henderson2017efficient,
|
915 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
916 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
917 |
+
year={2017},
|
918 |
+
eprint={1705.00652},
|
919 |
+
archivePrefix={arXiv},
|
920 |
+
primaryClass={cs.CL}
|
921 |
+
}
|
922 |
+
```
|
923 |
+
|
924 |
+
<!--
|
925 |
+
## Glossary
|
926 |
+
|
927 |
+
*Clearly define terms in order to be accessible across audiences.*
|
928 |
+
-->
|
929 |
+
|
930 |
+
<!--
|
931 |
+
## Model Card Authors
|
932 |
+
|
933 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
934 |
+
-->
|
935 |
+
|
936 |
+
<!--
|
937 |
+
## Model Card Contact
|
938 |
+
|
939 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
940 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Snowflake/snowflake-arctic-embed-l",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"hidden_act": "gelu",
|
9 |
+
"hidden_dropout_prob": 0.1,
|
10 |
+
"hidden_size": 1024,
|
11 |
+
"initializer_range": 0.02,
|
12 |
+
"intermediate_size": 4096,
|
13 |
+
"layer_norm_eps": 1e-12,
|
14 |
+
"max_position_embeddings": 512,
|
15 |
+
"model_type": "bert",
|
16 |
+
"num_attention_heads": 16,
|
17 |
+
"num_hidden_layers": 24,
|
18 |
+
"pad_token_id": 0,
|
19 |
+
"position_embedding_type": "absolute",
|
20 |
+
"torch_dtype": "float32",
|
21 |
+
"transformers_version": "4.48.3",
|
22 |
+
"type_vocab_size": 2,
|
23 |
+
"use_cache": true,
|
24 |
+
"vocab_size": 30522
|
25 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.4.1",
|
4 |
+
"transformers": "4.48.3",
|
5 |
+
"pytorch": "2.5.1+cu124"
|
6 |
+
},
|
7 |
+
"prompts": {
|
8 |
+
"query": "Represent this sentence for searching relevant passages: "
|
9 |
+
},
|
10 |
+
"default_prompt_name": null,
|
11 |
+
"similarity_fn_name": "cosine"
|
12 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0f794589824ae6af68a0354a51eef303449100ba6713ab56cb8c7a4f64f3f54a
|
3 |
+
size 1336413848
|
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": 512,
|
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,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_lower_case": true,
|
47 |
+
"extra_special_tokens": {},
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 512,
|
50 |
+
"model_max_length": 512,
|
51 |
+
"pad_to_multiple_of": null,
|
52 |
+
"pad_token": "[PAD]",
|
53 |
+
"pad_token_type_id": 0,
|
54 |
+
"padding_side": "right",
|
55 |
+
"sep_token": "[SEP]",
|
56 |
+
"stride": 0,
|
57 |
+
"strip_accents": null,
|
58 |
+
"tokenize_chinese_chars": true,
|
59 |
+
"tokenizer_class": "BertTokenizer",
|
60 |
+
"truncation_side": "right",
|
61 |
+
"truncation_strategy": "longest_first",
|
62 |
+
"unk_token": "[UNK]"
|
63 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|