Add new SentenceTransformer model.
Browse files- README.md +379 -400
- config.json +1 -1
- config_sentence_transformers.json +3 -3
README.md
CHANGED
@@ -12,103 +12,68 @@ tags:
|
|
12 |
- loss:MultipleNegativesRankingLoss
|
13 |
base_model: Snowflake/snowflake-arctic-embed-m-v1.5
|
14 |
widget:
|
15 |
-
- source_sentence: Where can I find older versions of ZenML documentation?
|
16 |
sentences:
|
17 |
-
- '
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
ZenML is a Python package that can be installed directly via pip:
|
24 |
-
|
25 |
-
|
26 |
-
pip install zenml
|
27 |
-
|
28 |
-
|
29 |
-
Note that ZenML currently supports Python 3.8, 3.9, 3.10, and 3.11. Please make
|
30 |
-
sure that you are using a supported Python version.
|
31 |
-
|
32 |
-
|
33 |
-
Install with the dashboard
|
34 |
-
|
35 |
-
|
36 |
-
ZenML comes bundled with a web dashboard that lives inside a sister repository.
|
37 |
-
In order to get access to the dashboard locally, you need to launch the ZenML
|
38 |
-
Server and Dashboard locally. For this, you need to install the optional dependencies
|
39 |
-
for the ZenML Server:
|
40 |
-
|
41 |
-
|
42 |
-
pip install "zenml[server]"
|
43 |
-
|
44 |
-
|
45 |
-
We highly encourage you to install ZenML in a virtual environment. At ZenML, We
|
46 |
-
like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual
|
47 |
-
environments.
|
48 |
-
|
49 |
-
|
50 |
-
Installing onto MacOS with Apple Silicon (M1, M2)
|
51 |
-
|
52 |
-
|
53 |
-
A change in how forking works on Macs running on Apple Silicon means that you
|
54 |
-
should set the following environment variable which will ensure that your connections
|
55 |
-
to the server remain unbroken:
|
56 |
-
|
57 |
-
|
58 |
-
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
59 |
-
|
60 |
-
|
61 |
-
You can read more about this here. This environment variable is needed if you
|
62 |
-
are working with a local server on your Mac, but if you''re just using ZenML as
|
63 |
-
a client / CLI and connecting to a deployed server then you don''t need to set
|
64 |
-
it.
|
65 |
|
66 |
|
67 |
-
|
|
|
|
|
68 |
|
69 |
|
70 |
-
|
71 |
-
are built from the latest develop branch (to which work ready for release is published)
|
72 |
-
and are not guaranteed to be stable. To install the nightly build, run:
|
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 |
-
- 'Finetuning LLMs with ZenML
|
103 |
|
104 |
|
105 |
-
|
106 |
|
107 |
|
108 |
-
|
109 |
|
110 |
|
111 |
-
|
112 |
- 'ZenML - Bridging the gap between ML & Ops
|
113 |
|
114 |
|
@@ -122,7 +87,7 @@ widget:
|
|
122 |
|
123 |
|
124 |
Powered by GitBook'
|
125 |
-
- source_sentence:
|
126 |
sentences:
|
127 |
- 'Whylogs
|
128 |
|
@@ -181,173 +146,257 @@ widget:
|
|
181 |
If you don''t need to connect to the WhyLabs platform to upload and store the
|
182 |
generated whylogs data profiles, the Data Validator stack component does not require
|
183 |
any configuration parameters. Adding it to a stack is as simple as running e.g.:'
|
184 |
-
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
\ what can happen in the pipeline step, but you are still limited to the functionality\
|
213 |
-
\ implemented in the Data Validator.\n\nuse the whylogs library directly in your\
|
214 |
-
\ custom step implementation. This gives you complete freedom in how you are using\
|
215 |
-
\ whylogs's features.\n\nYou can visualize whylogs profiles in Jupyter notebooks\
|
216 |
-
\ or view them directly in the ZenML dashboard.\n\nThe whylogs standard step"
|
217 |
-
- source_sentence: How can I build my own custom experiment tracker flavor in ZenML?
|
218 |
sentences:
|
219 |
-
-
|
220 |
-
\ BaseService registry, where every BaseService instance is used as an internal\
|
221 |
-
\ representation of a remote model server (see the find_model_server abstract\
|
222 |
-
\ method). To achieve this, it must be able to re-create the configuration of\
|
223 |
-
\ a BaseService from information that is persisted externally, alongside, or even\
|
224 |
-
\ as part of the remote model server configuration itself. For example, for model\
|
225 |
-
\ servers that are implemented as Kubernetes resources, the BaseService instances\
|
226 |
-
\ can be serialized and saved as Kubernetes resource annotations. This allows\
|
227 |
-
\ the model deployer to keep track of all externally running model servers and\
|
228 |
-
\ to re-create their corresponding BaseService instance representations at any\
|
229 |
-
\ given time. The model deployer also defines methods that implement basic life-cycle\
|
230 |
-
\ management on remote model servers outside the coverage of a pipeline (see stop_model_server\
|
231 |
-
\ , start_model_server and delete_model_server).\n\nPutting all these considerations\
|
232 |
-
\ together, we end up with the following interface:\n\nfrom abc import ABC, abstractmethod\n\
|
233 |
-
from typing import Dict, List, Optional, Type\nfrom uuid import UUID\n\nfrom zenml.enums\
|
234 |
-
\ import StackComponentType\nfrom zenml.services import BaseService, ServiceConfig\n\
|
235 |
-
from zenml.stack import StackComponent, StackComponentConfig, Flavor\n\nDEFAULT_DEPLOYMENT_START_STOP_TIMEOUT\
|
236 |
-
\ = 300\n\nclass BaseModelDeployerConfig(StackComponentConfig):\n \"\"\"Base\
|
237 |
-
\ class for all ZenML model deployer configurations.\"\"\"\n\nclass BaseModelDeployer(StackComponent,\
|
238 |
-
\ ABC):\n \"\"\"Base class for all ZenML model deployers.\"\"\"\n\n@abstractmethod\n\
|
239 |
-
\ def perform_deploy_model(\n self,\n id: UUID,\n config:\
|
240 |
-
\ ServiceConfig,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
|
241 |
-
\ ) -> BaseService:\n \"\"\"Abstract method to deploy a model.\"\"\""
|
242 |
-
- 'Develop a custom experiment tracker
|
243 |
|
244 |
|
245 |
-
|
246 |
|
247 |
|
248 |
-
|
249 |
-
yourself with our general guide to writing custom component flavors in ZenML.
|
250 |
-
This guide provides an essential understanding of ZenML''s component flavor concepts.
|
251 |
|
252 |
|
253 |
-
|
|
|
254 |
|
255 |
|
256 |
-
|
257 |
-
will be available soon. As a result, their extension is not recommended at the
|
258 |
-
moment. When you are selecting an Experiment Tracker for your stack, you can use
|
259 |
-
one of the existing flavors.
|
260 |
|
261 |
|
262 |
-
|
263 |
-
so, but keep in mind that you may have to refactor it when the base abstraction
|
264 |
-
is released.
|
265 |
|
266 |
|
267 |
-
|
268 |
|
269 |
|
270 |
-
|
271 |
-
|
272 |
|
273 |
|
274 |
-
|
275 |
-
the abstract methods.
|
276 |
|
277 |
|
278 |
-
|
279 |
-
|
|
|
|
|
280 |
|
281 |
|
282 |
-
|
283 |
-
the BaseExperimentTrackerFlavor class.
|
284 |
|
285 |
|
286 |
-
|
287 |
-
|
|
|
288 |
|
289 |
|
290 |
-
|
291 |
|
292 |
|
293 |
-
|
294 |
-
|
|
|
295 |
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
sentences:
|
327 |
-
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
\
|
339 |
-
\
|
340 |
-
\
|
341 |
-
\
|
342 |
-
\
|
343 |
-
\
|
344 |
-
\
|
345 |
-
\
|
346 |
-
\
|
347 |
-
\
|
348 |
-
\
|
349 |
-
\
|
350 |
-
\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
- ' your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder
|
352 |
to authenticate to GCP and access the GCP Cloud Build services, it is recommended
|
353 |
to leverage the many features provided by the GCP Service Connector such as auto-configuration,
|
@@ -403,76 +452,7 @@ widget:
|
|
403 |
If you already have one or more GCP Service Connectors configured in your ZenML
|
404 |
deployment, you can check which of them can be used to access generic GCP resources
|
405 |
like the GCP Image Builder required for your GCP Image Builder by running e.g.:'
|
406 |
-
|
407 |
-
\ to create the several resources in Kubernetes in order to give Spark access\
|
408 |
-
\ to edit/manage your driver executor pods.\n\nTo do so, create a file called\
|
409 |
-
\ rbac.yaml with the following content:\n\napiVersion: v1\nkind: Namespace\nmetadata:\n\
|
410 |
-
\ name: spark-namespace\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n\
|
411 |
-
\ name: spark-service-account\n namespace: spark-namespace\n---\napiVersion:\
|
412 |
-
\ rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: spark-role\n\
|
413 |
-
\ namespace: spark-namespace\nsubjects:\n - kind: ServiceAccount\n name:\
|
414 |
-
\ spark-service-account\n namespace: spark-namespace\nroleRef:\n kind: ClusterRole\n\
|
415 |
-
\ name: edit\n apiGroup: rbac.authorization.k8s.io\n---\n\nAnd then execute\
|
416 |
-
\ the following command to create the resources:\n\naws eks --region=$REGION update-kubeconfig\
|
417 |
-
\ --name=$EKS_CLUSTER_NAME\n\nkubectl create -f rbac.yaml\n\nLastly, note down\
|
418 |
-
\ the namespace and the name of the service account since you will need them when\
|
419 |
-
\ registering the stack component in the next step.\n\nHow to use it\n\nTo use\
|
420 |
-
\ the KubernetesSparkStepOperator, you need:\n\nthe ZenML spark integration. If\
|
421 |
-
\ you haven't installed it already, run\n\nzenml integration install spark\n\n\
|
422 |
-
Docker installed and running.\n\nA remote artifact store as part of your stack.\n\
|
423 |
-
\nA remote container registry as part of your stack.\n\nA Kubernetes cluster deployed.\n\
|
424 |
-
\nWe can then register the step operator and use it in our active stack:\n\nzenml\
|
425 |
-
\ step-operator register spark_step_operator \\\n\t--flavor=spark-kubernetes \\\
|
426 |
-
\n\t--master=k8s://$EKS_API_SERVER_ENDPOINT \\\n\t--namespace=<SPARK_KUBERNETES_NAMESPACE>\
|
427 |
-
\ \\\n\t--service_account=<SPARK_KUBERNETES_SERVICE_ACCOUNT>\n\n# Register the\
|
428 |
-
\ stack\nzenml stack register spark_stack \\\n -o default \\\n -s spark_step_operator\
|
429 |
-
\ \\\n -a spark_artifact_store \\\n -c spark_container_registry \\\n \
|
430 |
-
\ -i local_builder \\\n --set"
|
431 |
-
- source_sentence: Where can I find older versions of ZenML documentation?
|
432 |
-
sentences:
|
433 |
-
- 'ZenML - Bridging the gap between ML & Ops
|
434 |
-
|
435 |
-
|
436 |
-
Legacy Docs
|
437 |
-
|
438 |
-
|
439 |
-
Bleeding EdgeLegacy Docs0.67.0
|
440 |
-
|
441 |
-
|
442 |
-
🧙♂️Find older version our docs
|
443 |
-
|
444 |
-
|
445 |
-
Powered by GitBook'
|
446 |
-
- 'ZenML - Bridging the gap between ML & Ops
|
447 |
-
|
448 |
-
|
449 |
-
Legacy Docs
|
450 |
-
|
451 |
-
|
452 |
-
Bleeding EdgeLegacy Docs0.67.0
|
453 |
-
|
454 |
-
|
455 |
-
🧙♂️Find older version our docs
|
456 |
-
|
457 |
-
|
458 |
-
Powered by GitBook'
|
459 |
-
- "tainer_registry \\\n -i local_builder \\\n --setOnce you added the step\
|
460 |
-
\ operator to your active stack, you can use it to execute individual steps of\
|
461 |
-
\ your pipeline by specifying it in the @step decorator as follows:\n\nfrom zenml\
|
462 |
-
\ import step\n\n@step(step_operator=<STEP_OPERATOR_NAME>)\ndef step_on_spark(...)\
|
463 |
-
\ -> ...:\n \"\"\"Some step that should run with Spark on Kubernetes.\"\"\"\
|
464 |
-
\n ...\n\nAfter successfully running any step with a KubernetesSparkStepOperator,\
|
465 |
-
\ you should be able to see that a Spark driver pod was created in your cluster\
|
466 |
-
\ for each pipeline step when running kubectl get pods -n $KUBERNETES_NAMESPACE.\n\
|
467 |
-
\nInstead of hardcoding a step operator name, you can also use the Client to dynamically\
|
468 |
-
\ use the step operator of your active stack:\n\nfrom zenml.client import Client\n\
|
469 |
-
\nstep_operator = Client().active_stack.step_operator\n\n@step(step_operator=step_operator.name)\n\
|
470 |
-
def step_on_spark(...) -> ...:\n ...\n\nAdditional configuration\n\nFor additional\
|
471 |
-
\ configuration of the Spark step operator, you can pass SparkStepOperatorSettings\
|
472 |
-
\ when defining or running your pipeline. Check out the SDK docs for a full list\
|
473 |
-
\ of available attributes and this docs page for more information on how to specify\
|
474 |
-
\ settings.\n\nPreviousKubernetesNextDevelop a Custom Step Operator\n\nLast updated\
|
475 |
-
\ 4 months ago"
|
476 |
pipeline_tag: sentence-similarity
|
477 |
library_name: sentence-transformers
|
478 |
metrics:
|
@@ -502,10 +482,10 @@ model-index:
|
|
502 |
type: dim_384
|
503 |
metrics:
|
504 |
- type: cosine_accuracy@1
|
505 |
-
value:
|
506 |
name: Cosine Accuracy@1
|
507 |
- type: cosine_accuracy@3
|
508 |
-
value:
|
509 |
name: Cosine Accuracy@3
|
510 |
- type: cosine_accuracy@5
|
511 |
value: 1.0
|
@@ -514,10 +494,10 @@ model-index:
|
|
514 |
value: 1.0
|
515 |
name: Cosine Accuracy@10
|
516 |
- type: cosine_precision@1
|
517 |
-
value:
|
518 |
name: Cosine Precision@1
|
519 |
- type: cosine_precision@3
|
520 |
-
value: 0.
|
521 |
name: Cosine Precision@3
|
522 |
- type: cosine_precision@5
|
523 |
value: 0.2
|
@@ -526,10 +506,10 @@ model-index:
|
|
526 |
value: 0.1
|
527 |
name: Cosine Precision@10
|
528 |
- type: cosine_recall@1
|
529 |
-
value:
|
530 |
name: Cosine Recall@1
|
531 |
- type: cosine_recall@3
|
532 |
-
value:
|
533 |
name: Cosine Recall@3
|
534 |
- type: cosine_recall@5
|
535 |
value: 1.0
|
@@ -538,13 +518,13 @@ model-index:
|
|
538 |
value: 1.0
|
539 |
name: Cosine Recall@10
|
540 |
- type: cosine_ndcg@10
|
541 |
-
value:
|
542 |
name: Cosine Ndcg@10
|
543 |
- type: cosine_mrr@10
|
544 |
-
value:
|
545 |
name: Cosine Mrr@10
|
546 |
- type: cosine_map@100
|
547 |
-
value:
|
548 |
name: Cosine Map@100
|
549 |
- task:
|
550 |
type: information-retrieval
|
@@ -554,10 +534,10 @@ model-index:
|
|
554 |
type: dim_256
|
555 |
metrics:
|
556 |
- type: cosine_accuracy@1
|
557 |
-
value: 0.
|
558 |
name: Cosine Accuracy@1
|
559 |
- type: cosine_accuracy@3
|
560 |
-
value:
|
561 |
name: Cosine Accuracy@3
|
562 |
- type: cosine_accuracy@5
|
563 |
value: 1.0
|
@@ -566,10 +546,10 @@ model-index:
|
|
566 |
value: 1.0
|
567 |
name: Cosine Accuracy@10
|
568 |
- type: cosine_precision@1
|
569 |
-
value: 0.
|
570 |
name: Cosine Precision@1
|
571 |
- type: cosine_precision@3
|
572 |
-
value: 0.
|
573 |
name: Cosine Precision@3
|
574 |
- type: cosine_precision@5
|
575 |
value: 0.2
|
@@ -578,10 +558,10 @@ model-index:
|
|
578 |
value: 0.1
|
579 |
name: Cosine Precision@10
|
580 |
- type: cosine_recall@1
|
581 |
-
value: 0.
|
582 |
name: Cosine Recall@1
|
583 |
- type: cosine_recall@3
|
584 |
-
value:
|
585 |
name: Cosine Recall@3
|
586 |
- type: cosine_recall@5
|
587 |
value: 1.0
|
@@ -590,13 +570,13 @@ model-index:
|
|
590 |
value: 1.0
|
591 |
name: Cosine Recall@10
|
592 |
- type: cosine_ndcg@10
|
593 |
-
value: 0.
|
594 |
name: Cosine Ndcg@10
|
595 |
- type: cosine_mrr@10
|
596 |
-
value: 0.
|
597 |
name: Cosine Mrr@10
|
598 |
- type: cosine_map@100
|
599 |
-
value: 0.
|
600 |
name: Cosine Map@100
|
601 |
- task:
|
602 |
type: information-retrieval
|
@@ -606,10 +586,10 @@ model-index:
|
|
606 |
type: dim_128
|
607 |
metrics:
|
608 |
- type: cosine_accuracy@1
|
609 |
-
value: 0.
|
610 |
name: Cosine Accuracy@1
|
611 |
- type: cosine_accuracy@3
|
612 |
-
value:
|
613 |
name: Cosine Accuracy@3
|
614 |
- type: cosine_accuracy@5
|
615 |
value: 1.0
|
@@ -618,10 +598,10 @@ model-index:
|
|
618 |
value: 1.0
|
619 |
name: Cosine Accuracy@10
|
620 |
- type: cosine_precision@1
|
621 |
-
value: 0.
|
622 |
name: Cosine Precision@1
|
623 |
- type: cosine_precision@3
|
624 |
-
value: 0.
|
625 |
name: Cosine Precision@3
|
626 |
- type: cosine_precision@5
|
627 |
value: 0.2
|
@@ -630,10 +610,10 @@ model-index:
|
|
630 |
value: 0.1
|
631 |
name: Cosine Precision@10
|
632 |
- type: cosine_recall@1
|
633 |
-
value: 0.
|
634 |
name: Cosine Recall@1
|
635 |
- type: cosine_recall@3
|
636 |
-
value:
|
637 |
name: Cosine Recall@3
|
638 |
- type: cosine_recall@5
|
639 |
value: 1.0
|
@@ -642,13 +622,13 @@ model-index:
|
|
642 |
value: 1.0
|
643 |
name: Cosine Recall@10
|
644 |
- type: cosine_ndcg@10
|
645 |
-
value: 0.
|
646 |
name: Cosine Ndcg@10
|
647 |
- type: cosine_mrr@10
|
648 |
-
value: 0.
|
649 |
name: Cosine Mrr@10
|
650 |
- type: cosine_map@100
|
651 |
-
value: 0.
|
652 |
name: Cosine Map@100
|
653 |
- task:
|
654 |
type: information-retrieval
|
@@ -658,10 +638,10 @@ model-index:
|
|
658 |
type: dim_64
|
659 |
metrics:
|
660 |
- type: cosine_accuracy@1
|
661 |
-
value: 0.
|
662 |
name: Cosine Accuracy@1
|
663 |
- type: cosine_accuracy@3
|
664 |
-
value:
|
665 |
name: Cosine Accuracy@3
|
666 |
- type: cosine_accuracy@5
|
667 |
value: 1.0
|
@@ -670,10 +650,10 @@ model-index:
|
|
670 |
value: 1.0
|
671 |
name: Cosine Accuracy@10
|
672 |
- type: cosine_precision@1
|
673 |
-
value: 0.
|
674 |
name: Cosine Precision@1
|
675 |
- type: cosine_precision@3
|
676 |
-
value: 0.
|
677 |
name: Cosine Precision@3
|
678 |
- type: cosine_precision@5
|
679 |
value: 0.2
|
@@ -682,10 +662,10 @@ model-index:
|
|
682 |
value: 0.1
|
683 |
name: Cosine Precision@10
|
684 |
- type: cosine_recall@1
|
685 |
-
value: 0.
|
686 |
name: Cosine Recall@1
|
687 |
- type: cosine_recall@3
|
688 |
-
value:
|
689 |
name: Cosine Recall@3
|
690 |
- type: cosine_recall@5
|
691 |
value: 1.0
|
@@ -694,19 +674,19 @@ model-index:
|
|
694 |
value: 1.0
|
695 |
name: Cosine Recall@10
|
696 |
- type: cosine_ndcg@10
|
697 |
-
value: 0.
|
698 |
name: Cosine Ndcg@10
|
699 |
- type: cosine_mrr@10
|
700 |
-
value: 0.
|
701 |
name: Cosine Mrr@10
|
702 |
- type: cosine_map@100
|
703 |
-
value: 0.
|
704 |
name: Cosine Map@100
|
705 |
---
|
706 |
|
707 |
# zenml/finetuned-snowflake-arctic-embed-m-v1.5
|
708 |
|
709 |
-
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-m-v1.5](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1.5)
|
710 |
|
711 |
## Model Details
|
712 |
|
@@ -716,8 +696,7 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [S
|
|
716 |
- **Maximum Sequence Length:** 512 tokens
|
717 |
- **Output Dimensionality:** 768 tokens
|
718 |
- **Similarity Function:** Cosine Similarity
|
719 |
-
- **Training Dataset:**
|
720 |
-
- json
|
721 |
- **Language:** en
|
722 |
- **License:** apache-2.0
|
723 |
|
@@ -755,9 +734,9 @@ from sentence_transformers import SentenceTransformer
|
|
755 |
model = SentenceTransformer("zenml/finetuned-snowflake-arctic-embed-m-v1.5")
|
756 |
# Run inference
|
757 |
sentences = [
|
758 |
-
'
|
759 |
-
'ZenML
|
760 |
-
|
761 |
]
|
762 |
embeddings = model.encode(sentences)
|
763 |
print(embeddings.shape)
|
@@ -801,45 +780,45 @@ You can finetune this model on your own dataset.
|
|
801 |
* Dataset: `dim_384`
|
802 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
803 |
|
804 |
-
| Metric | Value
|
805 |
-
|
806 |
-
| cosine_accuracy@1 |
|
807 |
-
| cosine_accuracy@3 |
|
808 |
-
| cosine_accuracy@5 | 1.0
|
809 |
-
| cosine_accuracy@10 | 1.0
|
810 |
-
| cosine_precision@1 |
|
811 |
-
| cosine_precision@3 | 0.
|
812 |
-
| cosine_precision@5 | 0.2
|
813 |
-
| cosine_precision@10 | 0.1
|
814 |
-
| cosine_recall@1 |
|
815 |
-
| cosine_recall@3 |
|
816 |
-
| cosine_recall@5 | 1.0
|
817 |
-
| cosine_recall@10 | 1.0
|
818 |
-
| cosine_ndcg@10 |
|
819 |
-
| cosine_mrr@10 |
|
820 |
-
| **cosine_map@100** | **
|
821 |
|
822 |
#### Information Retrieval
|
823 |
* Dataset: `dim_256`
|
824 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
825 |
|
826 |
-
| Metric | Value
|
827 |
-
|
828 |
-
| cosine_accuracy@1 | 0.
|
829 |
-
| cosine_accuracy@3 |
|
830 |
-
| cosine_accuracy@5 | 1.0
|
831 |
-
| cosine_accuracy@10 | 1.0
|
832 |
-
| cosine_precision@1 | 0.
|
833 |
-
| cosine_precision@3 | 0.
|
834 |
-
| cosine_precision@5 | 0.2
|
835 |
-
| cosine_precision@10 | 0.1
|
836 |
-
| cosine_recall@1 | 0.
|
837 |
-
| cosine_recall@3 |
|
838 |
-
| cosine_recall@5 | 1.0
|
839 |
-
| cosine_recall@10 | 1.0
|
840 |
-
| cosine_ndcg@10 | 0.
|
841 |
-
| cosine_mrr@10 | 0.
|
842 |
-
| **cosine_map@100** | **0.
|
843 |
|
844 |
#### Information Retrieval
|
845 |
* Dataset: `dim_128`
|
@@ -847,43 +826,43 @@ You can finetune this model on your own dataset.
|
|
847 |
|
848 |
| Metric | Value |
|
849 |
|:--------------------|:----------|
|
850 |
-
| cosine_accuracy@1 | 0.
|
851 |
-
| cosine_accuracy@3 |
|
852 |
| cosine_accuracy@5 | 1.0 |
|
853 |
| cosine_accuracy@10 | 1.0 |
|
854 |
-
| cosine_precision@1 | 0.
|
855 |
-
| cosine_precision@3 | 0.
|
856 |
| cosine_precision@5 | 0.2 |
|
857 |
| cosine_precision@10 | 0.1 |
|
858 |
-
| cosine_recall@1 | 0.
|
859 |
-
| cosine_recall@3 |
|
860 |
| cosine_recall@5 | 1.0 |
|
861 |
| cosine_recall@10 | 1.0 |
|
862 |
-
| cosine_ndcg@10 | 0.
|
863 |
-
| cosine_mrr@10 | 0.
|
864 |
-
| **cosine_map@100** | **0.
|
865 |
|
866 |
#### Information Retrieval
|
867 |
* Dataset: `dim_64`
|
868 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
869 |
|
870 |
-
| Metric | Value
|
871 |
-
|
872 |
-
| cosine_accuracy@1 | 0.
|
873 |
-
| cosine_accuracy@3 |
|
874 |
-
| cosine_accuracy@5 | 1.0
|
875 |
-
| cosine_accuracy@10 | 1.0
|
876 |
-
| cosine_precision@1 | 0.
|
877 |
-
| cosine_precision@3 | 0.
|
878 |
-
| cosine_precision@5 | 0.2
|
879 |
-
| cosine_precision@10 | 0.1
|
880 |
-
| cosine_recall@1 | 0.
|
881 |
-
| cosine_recall@3 |
|
882 |
-
| cosine_recall@5 | 1.0
|
883 |
-
| cosine_recall@10 | 1.0
|
884 |
-
| cosine_ndcg@10 | 0.
|
885 |
-
| cosine_mrr@10 | 0.
|
886 |
-
| **cosine_map@100** | **0.
|
887 |
|
888 |
<!--
|
889 |
## Bias, Risks and Limitations
|
@@ -901,22 +880,22 @@ You can finetune this model on your own dataset.
|
|
901 |
|
902 |
### Training Dataset
|
903 |
|
904 |
-
####
|
|
|
905 |
|
906 |
-
* Dataset: json
|
907 |
* Size: 36 training samples
|
908 |
* Columns: <code>positive</code> and <code>anchor</code>
|
909 |
-
* Approximate statistics based on the first
|
910 |
| | positive | anchor |
|
911 |
|:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
912 |
| type | string | string |
|
913 |
-
| details | <ul><li>min: 13 tokens</li><li>mean:
|
914 |
* Samples:
|
915 |
-
| positive
|
916 |
-
|
917 |
-
| <code>
|
918 |
-
| <code>How
|
919 |
-
| <code>How
|
920 |
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
921 |
```json
|
922 |
{
|
@@ -1010,7 +989,7 @@ You can finetune this model on your own dataset.
|
|
1010 |
- `dataloader_num_workers`: 0
|
1011 |
- `dataloader_prefetch_factor`: None
|
1012 |
- `past_index`: -1
|
1013 |
-
- `disable_tqdm`:
|
1014 |
- `remove_unused_columns`: True
|
1015 |
- `label_names`: None
|
1016 |
- `load_best_model_at_end`: True
|
@@ -1071,21 +1050,21 @@ You can finetune this model on your own dataset.
|
|
1071 |
</details>
|
1072 |
|
1073 |
### Training Logs
|
1074 |
-
| Epoch | Step |
|
1075 |
|:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
|
1076 |
-
| **1.0** | **1** | **0.
|
1077 |
-
| 2.0 | 3 |
|
1078 |
-
| 3.0 | 4 |
|
1079 |
|
1080 |
* The bold row denotes the saved checkpoint.
|
1081 |
|
1082 |
### Framework Versions
|
1083 |
-
- Python: 3.
|
1084 |
-
- Sentence Transformers: 3.
|
1085 |
-
- Transformers: 4.
|
1086 |
-
- PyTorch: 2.5.1
|
1087 |
-
- Accelerate:
|
1088 |
-
- Datasets:
|
1089 |
- Tokenizers: 0.19.1
|
1090 |
|
1091 |
## Citation
|
@@ -1108,7 +1087,7 @@ You can finetune this model on your own dataset.
|
|
1108 |
#### MatryoshkaLoss
|
1109 |
```bibtex
|
1110 |
@misc{kusupati2024matryoshka,
|
1111 |
-
title={Matryoshka Representation Learning},
|
1112 |
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},
|
1113 |
year={2024},
|
1114 |
eprint={2205.13147},
|
@@ -1120,7 +1099,7 @@ You can finetune this model on your own dataset.
|
|
1120 |
#### MultipleNegativesRankingLoss
|
1121 |
```bibtex
|
1122 |
@misc{henderson2017efficient,
|
1123 |
-
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
1124 |
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},
|
1125 |
year={2017},
|
1126 |
eprint={1705.00652},
|
|
|
12 |
- loss:MultipleNegativesRankingLoss
|
13 |
base_model: Snowflake/snowflake-arctic-embed-m-v1.5
|
14 |
widget:
|
15 |
+
- source_sentence: Where can I find older versions of the ZenML documentation?
|
16 |
sentences:
|
17 |
+
- 'gister flavors.my_flavor.MyExperimentTrackerFlavorZenML resolves the flavor class
|
18 |
+
by taking the path where you initialized zenml (via zenml init) as the starting
|
19 |
+
point of resolution. Therefore, please ensure you follow the best practice of
|
20 |
+
initializing zenml at the root of your repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
|
23 |
+
If ZenML does not find an initialized ZenML repository in any parent directory,
|
24 |
+
it will default to the current working directory, but usually, it''s better to
|
25 |
+
not have to rely on this mechanism and initialize zenml at the root.
|
26 |
|
27 |
|
28 |
+
Afterward, you should see the new flavor in the list of available flavors:
|
|
|
|
|
29 |
|
30 |
|
31 |
+
zenml experiment-tracker flavor list
|
32 |
|
33 |
|
34 |
+
It is important to draw attention to when and how these base abstractions are
|
35 |
+
coming into play in a ZenML workflow.
|
36 |
|
37 |
|
38 |
+
The CustomExperimentTrackerFlavor class is imported and utilized upon the creation
|
39 |
+
of the custom flavor through the CLI.
|
40 |
|
41 |
|
42 |
+
The CustomExperimentTrackerConfig class is imported when someone tries to register/update
|
43 |
+
a stack component with this custom flavor. Especially, during the registration
|
44 |
+
process of the stack component, the config will be used to validate the values
|
45 |
+
given by the user. As Config objects are inherently pydantic objects, you can
|
46 |
+
also add your own custom validators here.
|
47 |
|
48 |
|
49 |
+
The CustomExperimentTracker only comes into play when the component is ultimately
|
50 |
+
in use.
|
51 |
|
52 |
|
53 |
+
The design behind this interaction lets us separate the configuration of the flavor
|
54 |
+
from its implementation. This way we can register flavors and components even
|
55 |
+
when the major dependencies behind their implementation are not installed in our
|
56 |
+
local setting (assuming the CustomExperimentTrackerFlavor and the CustomExperimentTrackerConfig
|
57 |
+
are implemented in a different module/path than the actual CustomExperimentTracker).
|
58 |
|
59 |
|
60 |
+
PreviousWeights & BiasesNextModel Deployers
|
61 |
|
62 |
|
63 |
+
Last updated 21 days ago'
|
64 |
+
- 'ZenML - Bridging the gap between ML & Ops
|
65 |
|
66 |
|
67 |
+
Legacy Docs
|
|
|
68 |
|
69 |
|
70 |
+
Bleeding EdgeLegacy Docs0.67.0
|
71 |
|
72 |
|
73 |
+
🧙♂️Find older version our docs
|
74 |
|
75 |
|
76 |
+
Powered by GitBook'
|
77 |
- 'ZenML - Bridging the gap between ML & Ops
|
78 |
|
79 |
|
|
|
87 |
|
88 |
|
89 |
Powered by GitBook'
|
90 |
+
- source_sentence: Where can I find older versions of the ZenML documentation?
|
91 |
sentences:
|
92 |
- 'Whylogs
|
93 |
|
|
|
146 |
If you don''t need to connect to the WhyLabs platform to upload and store the
|
147 |
generated whylogs data profiles, the Data Validator stack component does not require
|
148 |
any configuration parameters. Adding it to a stack is as simple as running e.g.:'
|
149 |
+
- 'ZenML - Bridging the gap between ML & Ops
|
150 |
+
|
151 |
+
|
152 |
+
Legacy Docs
|
153 |
+
|
154 |
+
|
155 |
+
Bleeding EdgeLegacy Docs0.67.0
|
156 |
+
|
157 |
+
|
158 |
+
🧙♂️Find older version our docs
|
159 |
+
|
160 |
+
|
161 |
+
Powered by GitBook'
|
162 |
+
- 'ZenML - Bridging the gap between ML & Ops
|
163 |
+
|
164 |
+
|
165 |
+
Legacy Docs
|
166 |
+
|
167 |
+
|
168 |
+
Bleeding EdgeLegacy Docs0.67.0
|
169 |
+
|
170 |
+
|
171 |
+
🧙♂️Find older version our docs
|
172 |
+
|
173 |
+
|
174 |
+
Powered by GitBook'
|
175 |
+
- source_sentence: How can I install ZenML with support for a local dashboard, and
|
176 |
+
what precautions should I take when installing on a Mac with Apple Silicon?
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
sentences:
|
178 |
+
- 'Finetuning LLMs with ZenML
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
|
180 |
|
181 |
+
Finetune LLMs for specific tasks or to improve performance and cost.
|
182 |
|
183 |
|
184 |
+
PreviousEvaluating finetuned embeddingsNextSet up a project repository
|
|
|
|
|
185 |
|
186 |
|
187 |
+
Last updated 6 months ago'
|
188 |
+
- '🧙Installation
|
189 |
|
190 |
|
191 |
+
Installing ZenML and getting started.
|
|
|
|
|
|
|
192 |
|
193 |
|
194 |
+
ZenML is a Python package that can be installed directly via pip:
|
|
|
|
|
195 |
|
196 |
|
197 |
+
pip install zenml
|
198 |
|
199 |
|
200 |
+
Note that ZenML currently supports Python 3.8, 3.9, 3.10, and 3.11. Please make
|
201 |
+
sure that you are using a supported Python version.
|
202 |
|
203 |
|
204 |
+
Install with the dashboard
|
|
|
205 |
|
206 |
|
207 |
+
ZenML comes bundled with a web dashboard that lives inside a sister repository.
|
208 |
+
In order to get access to the dashboard locally, you need to launch the ZenML
|
209 |
+
Server and Dashboard locally. For this, you need to install the optional dependencies
|
210 |
+
for the ZenML Server:
|
211 |
|
212 |
|
213 |
+
pip install "zenml[server]"
|
|
|
214 |
|
215 |
|
216 |
+
We highly encourage you to install ZenML in a virtual environment. At ZenML, We
|
217 |
+
like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual
|
218 |
+
environments.
|
219 |
|
220 |
|
221 |
+
Installing onto MacOS with Apple Silicon (M1, M2)
|
222 |
|
223 |
|
224 |
+
A change in how forking works on Macs running on Apple Silicon means that you
|
225 |
+
should set the following environment variable which will ensure that your connections
|
226 |
+
to the server remain unbroken:
|
227 |
|
228 |
|
229 |
+
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
230 |
+
|
231 |
+
|
232 |
+
You can read more about this here. This environment variable is needed if you
|
233 |
+
are working with a local server on your Mac, but if you''re just using ZenML as
|
234 |
+
a client / CLI and connecting to a deployed server then you don''t need to set
|
235 |
+
it.
|
236 |
+
|
237 |
+
|
238 |
+
Nightly builds
|
239 |
+
|
240 |
+
|
241 |
+
ZenML also publishes nightly builds under the zenml-nightly package name. These
|
242 |
+
are built from the latest develop branch (to which work ready for release is published)
|
243 |
+
and are not guaranteed to be stable. To install the nightly build, run:
|
244 |
+
|
245 |
+
|
246 |
+
pip install zenml-nightly
|
247 |
+
|
248 |
+
|
249 |
+
Verifying installations
|
250 |
+
|
251 |
+
|
252 |
+
Once the installation is completed, you can check whether the installation was
|
253 |
+
successful either through Bash:
|
254 |
+
|
255 |
+
|
256 |
+
zenml version
|
257 |
+
|
258 |
+
|
259 |
+
or through Python:
|
260 |
+
|
261 |
+
|
262 |
+
import zenml
|
263 |
+
|
264 |
+
|
265 |
+
print(zenml.__version__)
|
266 |
+
|
267 |
+
|
268 |
+
If you would like to learn more about the current release, please visit our PyPi
|
269 |
+
package page.
|
270 |
+
|
271 |
+
|
272 |
+
Running with Docker'
|
273 |
+
- "se you decide to switch to another Data Validator.All you have to do is call\
|
274 |
+
\ the whylogs Data Validator methods when you need to interact with whylogs to\
|
275 |
+
\ generate data profiles. You may optionally enable whylabs logging to automatically\
|
276 |
+
\ upload the returned whylogs profile to WhyLabs, e.g.:\n\nimport pandas as pd\n\
|
277 |
+
from whylogs.core import DatasetProfileView\nfrom zenml.integrations.whylogs.data_validators.whylogs_data_validator\
|
278 |
+
\ import (\n WhylogsDataValidator,\n)\nfrom zenml.integrations.whylogs.flavors.whylogs_data_validator_flavor\
|
279 |
+
\ import (\n WhylogsDataValidatorSettings,\n)\nfrom zenml import step\n\nwhylogs_settings\
|
280 |
+
\ = WhylogsDataValidatorSettings(\n enable_whylabs=True, dataset_id=\"<WHYLABS_DATASET_ID>\"\
|
281 |
+
\n)\n\n@step(\n settings={\n \"data_validator\": whylogs_settings\n\
|
282 |
+
\ }\n)\ndef data_profiler(\n dataset: pd.DataFrame,\n) -> DatasetProfileView:\n\
|
283 |
+
\ \"\"\"Custom data profiler step with whylogs\n\nArgs:\n dataset: a\
|
284 |
+
\ Pandas DataFrame\n\nReturns:\n Whylogs profile generated for the data\n\
|
285 |
+
\ \"\"\"\n\n# validation pre-processing (e.g. dataset preparation) can take\
|
286 |
+
\ place here\n\ndata_validator = WhylogsDataValidator.get_active_data_validator()\n\
|
287 |
+
\ profile = data_validator.data_profiling(\n dataset,\n )\n #\
|
288 |
+
\ optionally upload the profile to WhyLabs, if WhyLabs credentials are configured\n\
|
289 |
+
\ data_validator.upload_profile_view(profile)\n\n# validation post-processing\
|
290 |
+
\ (e.g. interpret results, take actions) can happen here\n\nreturn profile\n\n\
|
291 |
+
Have a look at the complete list of methods and parameters available in the WhylogsDataValidator\
|
292 |
+
\ API in the SDK docs.\n\nCall whylogs directly\n\nYou can use the whylogs library\
|
293 |
+
\ directly in your custom pipeline steps, and only leverage ZenML's capability\
|
294 |
+
\ of serializing, versioning and storing the DatasetProfileView objects in its\
|
295 |
+
\ Artifact Store. You may optionally enable whylabs logging to automatically upload\
|
296 |
+
\ the returned whylogs profile to WhyLabs, e.g.:"
|
297 |
+
- source_sentence: How can I finetune embeddings using Sentence Transformers as described
|
298 |
+
in the ZenML documentation?
|
299 |
sentences:
|
300 |
+
- 'Evaluation and metrics
|
301 |
+
|
302 |
+
|
303 |
+
Track how your RAG pipeline improves using evaluation and metrics.
|
304 |
+
|
305 |
+
|
306 |
+
PreviousBasic RAG inference pipelineNextEvaluation in 65 lines of code
|
307 |
+
|
308 |
+
|
309 |
+
Last updated 4 months ago'
|
310 |
+
- ":\n \"\"\"Abstract method to deploy a model.\"\"\"@staticmethod\n @abstractmethod\n\
|
311 |
+
\ def get_model_server_info(\n service: BaseService,\n ) -> Dict[str,\
|
312 |
+
\ Optional[str]]:\n \"\"\"Give implementation-specific way to extract relevant\
|
313 |
+
\ model server\n properties for the user.\"\"\"\n\n@abstractmethod\n \
|
314 |
+
\ def perform_stop_model(\n self,\n service: BaseService,\n \
|
315 |
+
\ timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n force: bool\
|
316 |
+
\ = False,\n ) -> BaseService:\n \"\"\"Abstract method to stop a model\
|
317 |
+
\ server.\"\"\"\n\n@abstractmethod\n def perform_start_model(\n self,\n\
|
318 |
+
\ service: BaseService,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
|
319 |
+
\ ) -> BaseService:\n \"\"\"Abstract method to start a model server.\"\
|
320 |
+
\"\"\n\n@abstractmethod\n def perform_delete_model(\n self,\n \
|
321 |
+
\ service: BaseService,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
|
322 |
+
\ force: bool = False,\n ) -> None:\n \"\"\"Abstract method to\
|
323 |
+
\ delete a model server.\"\"\"\n\nclass BaseModelDeployerFlavor(Flavor):\n \
|
324 |
+
\ \"\"\"Base class for model deployer flavors.\"\"\"\n\n@property\n @abstractmethod\n\
|
325 |
+
\ def name(self):\n \"\"\"Returns the name of the flavor.\"\"\"\n\n\
|
326 |
+
@property\n def type(self) -> StackComponentType:\n \"\"\"Returns the\
|
327 |
+
\ flavor type.\n\nReturns:\n The flavor type.\n \"\"\"\n \
|
328 |
+
\ return StackComponentType.MODEL_DEPLOYER\n\n@property\n def config_class(self)\
|
329 |
+
\ -> Type[BaseModelDeployerConfig]:\n \"\"\"Returns `BaseModelDeployerConfig`\
|
330 |
+
\ config class.\n\nReturns:\n The config class.\n \"\"\"\
|
331 |
+
\n return BaseModelDeployerConfig\n\n@property\n @abstractmethod\n \
|
332 |
+
\ def implementation_class(self) -> Type[BaseModelDeployer]:\n \"\"\"\
|
333 |
+
The class that implements the model deployer.\"\"\"\n\nThis is a slimmed-down\
|
334 |
+
\ version of the base implementation which aims to highlight the abstraction layer.\
|
335 |
+
\ In order to see the full implementation and get the complete docstrings, please\
|
336 |
+
\ check the SDK docs .\n\nBuilding your own model deployers"
|
337 |
+
- 'Finetuning embeddings with Sentence Transformers
|
338 |
+
|
339 |
+
|
340 |
+
Finetune embeddings with Sentence Transformers.
|
341 |
+
|
342 |
+
|
343 |
+
PreviousSynthetic data generationNextEvaluating finetuned embeddings
|
344 |
+
|
345 |
+
|
346 |
+
Last updated 1 month ago'
|
347 |
+
- source_sentence: How does ZenML utilize type annotations in step outputs to enhance
|
348 |
+
data handling between pipeline steps?
|
349 |
+
sentences:
|
350 |
+
- "ator which runs Steps with Spark on Kubernetes.\"\"\"def _backend_configuration(\n\
|
351 |
+
\ self,\n spark_config: SparkConf,\n step_config:\
|
352 |
+
\ \"StepConfiguration\",\n ) -> None:\n \"\"\"Configures Spark to run\
|
353 |
+
\ on Kubernetes.\"\"\"\n # Build and push the image\n docker_image_builder\
|
354 |
+
\ = PipelineDockerImageBuilder()\n image_name = docker_image_builder.build_and_push_docker_image(...)\n\
|
355 |
+
\n# Adjust the spark configuration\n spark_config.set(\"spark.kubernetes.container.image\"\
|
356 |
+
, image_name)\n ...\n\nFor Kubernetes, there are also some additional important\
|
357 |
+
\ configuration parameters:\n\nnamespace is the namespace under which the driver\
|
358 |
+
\ and executor pods will run.\n\nservice_account is the service account that will\
|
359 |
+
\ be used by various Spark components (to create and watch the pods).\n\nAdditionally,\
|
360 |
+
\ the _backend_configuration method is adjusted to handle the Kubernetes-specific\
|
361 |
+
\ configuration.\n\nWhen to use it\n\nYou should use the Spark step operator:\n\
|
362 |
+
\nwhen you are dealing with large amounts of data.\n\nwhen you are designing a\
|
363 |
+
\ step that can benefit from distributed computing paradigms in terms of time\
|
364 |
+
\ and resources.\n\nHow to deploy it\n\nTo use the KubernetesSparkStepOperator\
|
365 |
+
\ you will need to setup a few things first:\n\nRemote ZenML server: See the deployment\
|
366 |
+
\ guide for more information.\n\nKubernetes cluster: There are many ways to deploy\
|
367 |
+
\ a Kubernetes cluster using different cloud providers or on your custom infrastructure.\
|
368 |
+
\ For AWS, you can follow the Spark EKS Setup Guide below.\n\nSpark EKS Setup\
|
369 |
+
\ Guide\n\nThe following guide will walk you through how to spin up and configure\
|
370 |
+
\ a Amazon Elastic Kubernetes Service with Spark on it:\n\nEKS Kubernetes Cluster\n\
|
371 |
+
\nFollow this guide to create an Amazon EKS cluster role.\n\nFollow this guide\
|
372 |
+
\ to create an Amazon EC2 node role.\n\nGo to the IAM website, and select Roles\
|
373 |
+
\ to edit both roles.\n\nAttach the AmazonRDSFullAccess and AmazonS3FullAccess\
|
374 |
+
\ policies to both roles.\n\nGo to the EKS website.\n\nMake sure the correct region\
|
375 |
+
\ is selected on the top right."
|
376 |
+
- "\U0001F5C4️Handle Data/Artifacts\n\nStep outputs in ZenML are stored in the artifact\
|
377 |
+
\ store. This enables caching, lineage and auditability. Using type annotations\
|
378 |
+
\ helps with transparency, passing data between steps, and serializing/des\n\n\
|
379 |
+
For best results, use type annotations for your outputs. This is good coding practice\
|
380 |
+
\ for transparency, helps ZenML handle passing data between steps, and also enables\
|
381 |
+
\ ZenML to serialize and deserialize (referred to as 'materialize' in ZenML) the\
|
382 |
+
\ data.\n\n@step\ndef load_data(parameter: int) -> Dict[str, Any]:\n\n# do something\
|
383 |
+
\ with the parameter here\n\ntraining_data = [[1, 2], [3, 4], [5, 6]]\n labels\
|
384 |
+
\ = [0, 1, 0]\n return {'features': training_data, 'labels': labels}\n\n@step\n\
|
385 |
+
def train_model(data: Dict[str, Any]) -> None:\n total_features = sum(map(sum,\
|
386 |
+
\ data['features']))\n total_labels = sum(data['labels'])\n \n # Train\
|
387 |
+
\ some model here\n \n print(f\"Trained model using {len(data['features'])}\
|
388 |
+
\ data points. \"\n f\"Feature sum is {total_features}, label sum is\
|
389 |
+
\ {total_labels}\")\n\n@pipeline \ndef simple_ml_pipeline(parameter: int):\n\
|
390 |
+
\ dataset = load_data(parameter=parameter) # Get the output \n train_model(dataset)\
|
391 |
+
\ # Pipe the previous step output into the downstream step\n\nIn this code, we\
|
392 |
+
\ define two steps: load_data and train_model. The load_data step takes an integer\
|
393 |
+
\ parameter and returns a dictionary containing training data and labels. The\
|
394 |
+
\ train_model step receives the dictionary from load_data, extracts the features\
|
395 |
+
\ and labels, and trains a model (not shown here).\n\nFinally, we define a pipeline\
|
396 |
+
\ simple_ml_pipeline that chains the load_data and train_model steps together.\
|
397 |
+
\ The output from load_data is passed as input to train_model, demonstrating how\
|
398 |
+
\ data flows between steps in a ZenML pipeline.\n\nPreviousDisable colorful loggingNextHow\
|
399 |
+
\ ZenML stores data\n\nLast updated 4 months ago"
|
400 |
- ' your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder
|
401 |
to authenticate to GCP and access the GCP Cloud Build services, it is recommended
|
402 |
to leverage the many features provided by the GCP Service Connector such as auto-configuration,
|
|
|
452 |
If you already have one or more GCP Service Connectors configured in your ZenML
|
453 |
deployment, you can check which of them can be used to access generic GCP resources
|
454 |
like the GCP Image Builder required for your GCP Image Builder by running e.g.:'
|
455 |
+
datasets: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
pipeline_tag: sentence-similarity
|
457 |
library_name: sentence-transformers
|
458 |
metrics:
|
|
|
482 |
type: dim_384
|
483 |
metrics:
|
484 |
- type: cosine_accuracy@1
|
485 |
+
value: 0.5
|
486 |
name: Cosine Accuracy@1
|
487 |
- type: cosine_accuracy@3
|
488 |
+
value: 0.75
|
489 |
name: Cosine Accuracy@3
|
490 |
- type: cosine_accuracy@5
|
491 |
value: 1.0
|
|
|
494 |
value: 1.0
|
495 |
name: Cosine Accuracy@10
|
496 |
- type: cosine_precision@1
|
497 |
+
value: 0.5
|
498 |
name: Cosine Precision@1
|
499 |
- type: cosine_precision@3
|
500 |
+
value: 0.25
|
501 |
name: Cosine Precision@3
|
502 |
- type: cosine_precision@5
|
503 |
value: 0.2
|
|
|
506 |
value: 0.1
|
507 |
name: Cosine Precision@10
|
508 |
- type: cosine_recall@1
|
509 |
+
value: 0.5
|
510 |
name: Cosine Recall@1
|
511 |
- type: cosine_recall@3
|
512 |
+
value: 0.75
|
513 |
name: Cosine Recall@3
|
514 |
- type: cosine_recall@5
|
515 |
value: 1.0
|
|
|
518 |
value: 1.0
|
519 |
name: Cosine Recall@10
|
520 |
- type: cosine_ndcg@10
|
521 |
+
value: 0.7326691395183482
|
522 |
name: Cosine Ndcg@10
|
523 |
- type: cosine_mrr@10
|
524 |
+
value: 0.6458333333333333
|
525 |
name: Cosine Mrr@10
|
526 |
- type: cosine_map@100
|
527 |
+
value: 0.6458333333333333
|
528 |
name: Cosine Map@100
|
529 |
- task:
|
530 |
type: information-retrieval
|
|
|
534 |
type: dim_256
|
535 |
metrics:
|
536 |
- type: cosine_accuracy@1
|
537 |
+
value: 0.5
|
538 |
name: Cosine Accuracy@1
|
539 |
- type: cosine_accuracy@3
|
540 |
+
value: 0.75
|
541 |
name: Cosine Accuracy@3
|
542 |
- type: cosine_accuracy@5
|
543 |
value: 1.0
|
|
|
546 |
value: 1.0
|
547 |
name: Cosine Accuracy@10
|
548 |
- type: cosine_precision@1
|
549 |
+
value: 0.5
|
550 |
name: Cosine Precision@1
|
551 |
- type: cosine_precision@3
|
552 |
+
value: 0.25
|
553 |
name: Cosine Precision@3
|
554 |
- type: cosine_precision@5
|
555 |
value: 0.2
|
|
|
558 |
value: 0.1
|
559 |
name: Cosine Precision@10
|
560 |
- type: cosine_recall@1
|
561 |
+
value: 0.5
|
562 |
name: Cosine Recall@1
|
563 |
- type: cosine_recall@3
|
564 |
+
value: 0.75
|
565 |
name: Cosine Recall@3
|
566 |
- type: cosine_recall@5
|
567 |
value: 1.0
|
|
|
570 |
value: 1.0
|
571 |
name: Cosine Recall@10
|
572 |
- type: cosine_ndcg@10
|
573 |
+
value: 0.7326691395183482
|
574 |
name: Cosine Ndcg@10
|
575 |
- type: cosine_mrr@10
|
576 |
+
value: 0.6458333333333333
|
577 |
name: Cosine Mrr@10
|
578 |
- type: cosine_map@100
|
579 |
+
value: 0.6458333333333333
|
580 |
name: Cosine Map@100
|
581 |
- task:
|
582 |
type: information-retrieval
|
|
|
586 |
type: dim_128
|
587 |
metrics:
|
588 |
- type: cosine_accuracy@1
|
589 |
+
value: 0.5
|
590 |
name: Cosine Accuracy@1
|
591 |
- type: cosine_accuracy@3
|
592 |
+
value: 0.5
|
593 |
name: Cosine Accuracy@3
|
594 |
- type: cosine_accuracy@5
|
595 |
value: 1.0
|
|
|
598 |
value: 1.0
|
599 |
name: Cosine Accuracy@10
|
600 |
- type: cosine_precision@1
|
601 |
+
value: 0.5
|
602 |
name: Cosine Precision@1
|
603 |
- type: cosine_precision@3
|
604 |
+
value: 0.16666666666666666
|
605 |
name: Cosine Precision@3
|
606 |
- type: cosine_precision@5
|
607 |
value: 0.2
|
|
|
610 |
value: 0.1
|
611 |
name: Cosine Precision@10
|
612 |
- type: cosine_recall@1
|
613 |
+
value: 0.5
|
614 |
name: Cosine Recall@1
|
615 |
- type: cosine_recall@3
|
616 |
+
value: 0.5
|
617 |
name: Cosine Recall@3
|
618 |
- type: cosine_recall@5
|
619 |
value: 1.0
|
|
|
622 |
value: 1.0
|
623 |
name: Cosine Recall@10
|
624 |
- type: cosine_ndcg@10
|
625 |
+
value: 0.7153382790366966
|
626 |
name: Cosine Ndcg@10
|
627 |
- type: cosine_mrr@10
|
628 |
+
value: 0.625
|
629 |
name: Cosine Mrr@10
|
630 |
- type: cosine_map@100
|
631 |
+
value: 0.625
|
632 |
name: Cosine Map@100
|
633 |
- task:
|
634 |
type: information-retrieval
|
|
|
638 |
type: dim_64
|
639 |
metrics:
|
640 |
- type: cosine_accuracy@1
|
641 |
+
value: 0.5
|
642 |
name: Cosine Accuracy@1
|
643 |
- type: cosine_accuracy@3
|
644 |
+
value: 0.75
|
645 |
name: Cosine Accuracy@3
|
646 |
- type: cosine_accuracy@5
|
647 |
value: 1.0
|
|
|
650 |
value: 1.0
|
651 |
name: Cosine Accuracy@10
|
652 |
- type: cosine_precision@1
|
653 |
+
value: 0.5
|
654 |
name: Cosine Precision@1
|
655 |
- type: cosine_precision@3
|
656 |
+
value: 0.25
|
657 |
name: Cosine Precision@3
|
658 |
- type: cosine_precision@5
|
659 |
value: 0.2
|
|
|
662 |
value: 0.1
|
663 |
name: Cosine Precision@10
|
664 |
- type: cosine_recall@1
|
665 |
+
value: 0.5
|
666 |
name: Cosine Recall@1
|
667 |
- type: cosine_recall@3
|
668 |
+
value: 0.75
|
669 |
name: Cosine Recall@3
|
670 |
- type: cosine_recall@5
|
671 |
value: 1.0
|
|
|
674 |
value: 1.0
|
675 |
name: Cosine Recall@10
|
676 |
- type: cosine_ndcg@10
|
677 |
+
value: 0.7326691395183482
|
678 |
name: Cosine Ndcg@10
|
679 |
- type: cosine_mrr@10
|
680 |
+
value: 0.6458333333333333
|
681 |
name: Cosine Mrr@10
|
682 |
- type: cosine_map@100
|
683 |
+
value: 0.6458333333333333
|
684 |
name: Cosine Map@100
|
685 |
---
|
686 |
|
687 |
# zenml/finetuned-snowflake-arctic-embed-m-v1.5
|
688 |
|
689 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-m-v1.5](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1.5). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
690 |
|
691 |
## Model Details
|
692 |
|
|
|
696 |
- **Maximum Sequence Length:** 512 tokens
|
697 |
- **Output Dimensionality:** 768 tokens
|
698 |
- **Similarity Function:** Cosine Similarity
|
699 |
+
<!-- - **Training Dataset:** Unknown -->
|
|
|
700 |
- **Language:** en
|
701 |
- **License:** apache-2.0
|
702 |
|
|
|
734 |
model = SentenceTransformer("zenml/finetuned-snowflake-arctic-embed-m-v1.5")
|
735 |
# Run inference
|
736 |
sentences = [
|
737 |
+
'How does ZenML utilize type annotations in step outputs to enhance data handling between pipeline steps?',
|
738 |
+
'🗄️Handle Data/Artifacts\n\nStep outputs in ZenML are stored in the artifact store. This enables caching, lineage and auditability. Using type annotations helps with transparency, passing data between steps, and serializing/des\n\nFor best results, use type annotations for your outputs. This is good coding practice for transparency, helps ZenML handle passing data between steps, and also enables ZenML to serialize and deserialize (referred to as \'materialize\' in ZenML) the data.\n\n@step\ndef load_data(parameter: int) -> Dict[str, Any]:\n\n# do something with the parameter here\n\ntraining_data = [[1, 2], [3, 4], [5, 6]]\n labels = [0, 1, 0]\n return {\'features\': training_data, \'labels\': labels}\n\n@step\ndef train_model(data: Dict[str, Any]) -> None:\n total_features = sum(map(sum, data[\'features\']))\n total_labels = sum(data[\'labels\'])\n \n # Train some model here\n \n print(f"Trained model using {len(data[\'features\'])} data points. "\n f"Feature sum is {total_features}, label sum is {total_labels}")\n\n@pipeline \ndef simple_ml_pipeline(parameter: int):\n dataset = load_data(parameter=parameter) # Get the output \n train_model(dataset) # Pipe the previous step output into the downstream step\n\nIn this code, we define two steps: load_data and train_model. The load_data step takes an integer parameter and returns a dictionary containing training data and labels. The train_model step receives the dictionary from load_data, extracts the features and labels, and trains a model (not shown here).\n\nFinally, we define a pipeline simple_ml_pipeline that chains the load_data and train_model steps together. The output from load_data is passed as input to train_model, demonstrating how data flows between steps in a ZenML pipeline.\n\nPreviousDisable colorful loggingNextHow ZenML stores data\n\nLast updated 4 months ago',
|
739 |
+
" your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder to authenticate to GCP and access the GCP Cloud Build services, it is recommended to leverage the many features provided by the GCP Service Connector such as auto-configuration, best security practices regarding long-lived credentials and reusing the same credentials across multiple stack components.\n\nIf you don't already have a GCP Service Connector configured in your ZenML deployment, you can register one using the interactive CLI command. You also have the option to configure a GCP Service Connector that can be used to access more than just the GCP Cloud Build service:\n\nzenml service-connector register --type gcp -i\n\nA non-interactive CLI example that leverages the Google Cloud CLI configuration on your local machine to auto-configure a GCP Service Connector for the GCP Cloud Build service:\n\nzenml service-connector register <CONNECTOR_NAME> --type gcp --resource-type gcp-generic --resource-name <GCS_BUCKET_NAME> --auto-configure\n\nExample Command Output\n\n$ zenml service-connector register gcp-generic --type gcp --resource-type gcp-generic --auto-configure\nSuccessfully registered service connector `gcp-generic` with access to the following resources:\n┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\n┃ RESOURCE TYPE │ RESOURCE NAMES ┃\n┠────────────────┼────────────────┨\n┃ 🔵 gcp-generic │ zenml-core ┃\n┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\n\nNote: Please remember to grant the entity associated with your GCP credentials permissions to access the Cloud Build API and to run Cloud Builder jobs (e.g. the Cloud Build Editor IAM role). The GCP Service Connector supports many different authentication methods with different levels of security and convenience. You should pick the one that best fits your use case.\n\nIf you already have one or more GCP Service Connectors configured in your ZenML deployment, you can check which of them can be used to access generic GCP resources like the GCP Image Builder required for your GCP Image Builder by running e.g.:",
|
740 |
]
|
741 |
embeddings = model.encode(sentences)
|
742 |
print(embeddings.shape)
|
|
|
780 |
* Dataset: `dim_384`
|
781 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
782 |
|
783 |
+
| Metric | Value |
|
784 |
+
|:--------------------|:-----------|
|
785 |
+
| cosine_accuracy@1 | 0.5 |
|
786 |
+
| cosine_accuracy@3 | 0.75 |
|
787 |
+
| cosine_accuracy@5 | 1.0 |
|
788 |
+
| cosine_accuracy@10 | 1.0 |
|
789 |
+
| cosine_precision@1 | 0.5 |
|
790 |
+
| cosine_precision@3 | 0.25 |
|
791 |
+
| cosine_precision@5 | 0.2 |
|
792 |
+
| cosine_precision@10 | 0.1 |
|
793 |
+
| cosine_recall@1 | 0.5 |
|
794 |
+
| cosine_recall@3 | 0.75 |
|
795 |
+
| cosine_recall@5 | 1.0 |
|
796 |
+
| cosine_recall@10 | 1.0 |
|
797 |
+
| cosine_ndcg@10 | 0.7327 |
|
798 |
+
| cosine_mrr@10 | 0.6458 |
|
799 |
+
| **cosine_map@100** | **0.6458** |
|
800 |
|
801 |
#### Information Retrieval
|
802 |
* Dataset: `dim_256`
|
803 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
804 |
|
805 |
+
| Metric | Value |
|
806 |
+
|:--------------------|:-----------|
|
807 |
+
| cosine_accuracy@1 | 0.5 |
|
808 |
+
| cosine_accuracy@3 | 0.75 |
|
809 |
+
| cosine_accuracy@5 | 1.0 |
|
810 |
+
| cosine_accuracy@10 | 1.0 |
|
811 |
+
| cosine_precision@1 | 0.5 |
|
812 |
+
| cosine_precision@3 | 0.25 |
|
813 |
+
| cosine_precision@5 | 0.2 |
|
814 |
+
| cosine_precision@10 | 0.1 |
|
815 |
+
| cosine_recall@1 | 0.5 |
|
816 |
+
| cosine_recall@3 | 0.75 |
|
817 |
+
| cosine_recall@5 | 1.0 |
|
818 |
+
| cosine_recall@10 | 1.0 |
|
819 |
+
| cosine_ndcg@10 | 0.7327 |
|
820 |
+
| cosine_mrr@10 | 0.6458 |
|
821 |
+
| **cosine_map@100** | **0.6458** |
|
822 |
|
823 |
#### Information Retrieval
|
824 |
* Dataset: `dim_128`
|
|
|
826 |
|
827 |
| Metric | Value |
|
828 |
|:--------------------|:----------|
|
829 |
+
| cosine_accuracy@1 | 0.5 |
|
830 |
+
| cosine_accuracy@3 | 0.5 |
|
831 |
| cosine_accuracy@5 | 1.0 |
|
832 |
| cosine_accuracy@10 | 1.0 |
|
833 |
+
| cosine_precision@1 | 0.5 |
|
834 |
+
| cosine_precision@3 | 0.1667 |
|
835 |
| cosine_precision@5 | 0.2 |
|
836 |
| cosine_precision@10 | 0.1 |
|
837 |
+
| cosine_recall@1 | 0.5 |
|
838 |
+
| cosine_recall@3 | 0.5 |
|
839 |
| cosine_recall@5 | 1.0 |
|
840 |
| cosine_recall@10 | 1.0 |
|
841 |
+
| cosine_ndcg@10 | 0.7153 |
|
842 |
+
| cosine_mrr@10 | 0.625 |
|
843 |
+
| **cosine_map@100** | **0.625** |
|
844 |
|
845 |
#### Information Retrieval
|
846 |
* Dataset: `dim_64`
|
847 |
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
848 |
|
849 |
+
| Metric | Value |
|
850 |
+
|:--------------------|:-----------|
|
851 |
+
| cosine_accuracy@1 | 0.5 |
|
852 |
+
| cosine_accuracy@3 | 0.75 |
|
853 |
+
| cosine_accuracy@5 | 1.0 |
|
854 |
+
| cosine_accuracy@10 | 1.0 |
|
855 |
+
| cosine_precision@1 | 0.5 |
|
856 |
+
| cosine_precision@3 | 0.25 |
|
857 |
+
| cosine_precision@5 | 0.2 |
|
858 |
+
| cosine_precision@10 | 0.1 |
|
859 |
+
| cosine_recall@1 | 0.5 |
|
860 |
+
| cosine_recall@3 | 0.75 |
|
861 |
+
| cosine_recall@5 | 1.0 |
|
862 |
+
| cosine_recall@10 | 1.0 |
|
863 |
+
| cosine_ndcg@10 | 0.7327 |
|
864 |
+
| cosine_mrr@10 | 0.6458 |
|
865 |
+
| **cosine_map@100** | **0.6458** |
|
866 |
|
867 |
<!--
|
868 |
## Bias, Risks and Limitations
|
|
|
880 |
|
881 |
### Training Dataset
|
882 |
|
883 |
+
#### Unnamed Dataset
|
884 |
+
|
885 |
|
|
|
886 |
* Size: 36 training samples
|
887 |
* Columns: <code>positive</code> and <code>anchor</code>
|
888 |
+
* Approximate statistics based on the first 1000 samples:
|
889 |
| | positive | anchor |
|
890 |
|:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
891 |
| type | string | string |
|
892 |
+
| details | <ul><li>min: 13 tokens</li><li>mean: 23.14 tokens</li><li>max: 38 tokens</li></ul> | <ul><li>min: 31 tokens</li><li>mean: 311.83 tokens</li><li>max: 512 tokens</li></ul> |
|
893 |
* Samples:
|
894 |
+
| positive | anchor |
|
895 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
896 |
+
| <code>What are the necessary steps to deploy the KubernetesSparkStepOperator, and what configurations are required for running Spark on Kubernetes?</code> | <code>ator which runs Steps with Spark on Kubernetes."""def _backend_configuration(<br> self,<br> spark_config: SparkConf,<br> step_config: "StepConfiguration",<br> ) -> None:<br> """Configures Spark to run on Kubernetes."""<br> # Build and push the image<br> docker_image_builder = PipelineDockerImageBuilder()<br> image_name = docker_image_builder.build_and_push_docker_image(...)<br><br># Adjust the spark configuration<br> spark_config.set("spark.kubernetes.container.image", image_name)<br> ...<br><br>For Kubernetes, there are also some additional important configuration parameters:<br><br>namespace is the namespace under which the driver and executor pods will run.<br><br>service_account is the service account that will be used by various Spark components (to create and watch the pods).<br><br>Additionally, the _backend_configuration method is adjusted to handle the Kubernetes-specific configuration.<br><br>When to use it<br><br>You should use the Spark step operator:<br><br>when you are dealing with large amounts of data.<br><br>when you are designing a step that can benefit from distributed computing paradigms in terms of time and resources.<br><br>How to deploy it<br><br>To use the KubernetesSparkStepOperator you will need to setup a few things first:<br><br>Remote ZenML server: See the deployment guide for more information.<br><br>Kubernetes cluster: There are many ways to deploy a Kubernetes cluster using different cloud providers or on your custom infrastructure. For AWS, you can follow the Spark EKS Setup Guide below.<br><br>Spark EKS Setup Guide<br><br>The following guide will walk you through how to spin up and configure a Amazon Elastic Kubernetes Service with Spark on it:<br><br>EKS Kubernetes Cluster<br><br>Follow this guide to create an Amazon EKS cluster role.<br><br>Follow this guide to create an Amazon EC2 node role.<br><br>Go to the IAM website, and select Roles to edit both roles.<br><br>Attach the AmazonRDSFullAccess and AmazonS3FullAccess policies to both roles.<br><br>Go to the EKS website.<br><br>Make sure the correct region is selected on the top right.</code> |
|
897 |
+
| <code>How do I set up a GCP Service Connector within ZenML to authenticate and access GCP Cloud Build services?</code> | <code> your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder to authenticate to GCP and access the GCP Cloud Build services, it is recommended to leverage the many features provided by the GCP Service Connector such as auto-configuration, best security practices regarding long-lived credentials and reusing the same credentials across multiple stack components.<br><br>If you don't already have a GCP Service Connector configured in your ZenML deployment, you can register one using the interactive CLI command. You also have the option to configure a GCP Service Connector that can be used to access more than just the GCP Cloud Build service:<br><br>zenml service-connector register --type gcp -i<br><br>A non-interactive CLI example that leverages the Google Cloud CLI configuration on your local machine to auto-configure a GCP Service Connector for the GCP Cloud Build service:<br><br>zenml service-connector register <CONNECTOR_NAME> --type gcp --resource-type gcp-generic --resource-name <GCS_BUCKET_NAME> --auto-configure<br><br>Example Command Output<br><br>$ zenml service-connector register gcp-generic --type gcp --resource-type gcp-generic --auto-configure<br>Successfully registered service connector `gcp-generic` with access to the following resources:<br>┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓<br>┃ RESOURCE TYPE │ RESOURCE NAMES ┃<br>┠────────────────┼────────────────┨<br>┃ 🔵 gcp-generic │ zenml-core ┃<br>┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛<br><br>Note: Please remember to grant the entity associated with your GCP credentials permissions to access the Cloud Build API and to run Cloud Builder jobs (e.g. the Cloud Build Editor IAM role). The GCP Service Connector supports many different authentication methods with different levels of security and convenience. You should pick the one that best fits your use case.<br><br>If you already have one or more GCP Service Connectors configured in your ZenML deployment, you can check which of them can be used to access generic GCP resources like the GCP Image Builder required for your GCP Image Builder by running e.g.:</code> |
|
898 |
+
| <code>How do I register and activate a ZenML stack with a new GCP Image Builder while ensuring proper authentication?</code> | <code> build to finish. More information: Build Timeout.We can register the image builder and use it in our active stack:<br><br>zenml image-builder register <IMAGE_BUILDER_NAME> \<br> --flavor=gcp \<br> --cloud_builder_image=<BUILDER_IMAGE_NAME> \<br> --network=<DOCKER_NETWORK> \<br> --build_timeout=<BUILD_TIMEOUT_IN_SECONDS><br><br># Register and activate a stack with the new image builder<br>zenml stack register <STACK_NAME> -i <IMAGE_BUILDER_NAME> ... --set<br><br>You also need to set up authentication required to access the Cloud Build GCP services.<br><br>Authentication Methods<br><br>Integrating and using a GCP Image Builder in your pipelines is not possible without employing some form of authentication. If you're looking for a quick way to get started locally, you can use the Local Authentication method. However, the recommended way to authenticate to the GCP cloud platform is through a GCP Service Connector. This is particularly useful if you are configuring ZenML stacks that combine the GCP Image Builder with other remote stack components also running in GCP.<br><br>This method uses the implicit GCP authentication available in the environment where the ZenML code is running. On your local machine, this is the quickest way to configure a GCP Image Builder. You don't need to supply credentials explicitly when you register the GCP Image Builder, as it leverages the local credentials and configuration that the Google Cloud CLI stores on your local machine. However, you will need to install and set up the Google Cloud CLI on your machine as a prerequisite, as covered in the Google Cloud documentation , before you register the GCP Image Builder.<br><br>Stacks using the GCP Image Builder set up with local authentication are not portable across environments. To make ZenML pipelines fully portable, it is recommended to use a GCP Service Connector to authenticate your GCP Image Builder to the GCP cloud platform.</code> |
|
899 |
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
900 |
```json
|
901 |
{
|
|
|
989 |
- `dataloader_num_workers`: 0
|
990 |
- `dataloader_prefetch_factor`: None
|
991 |
- `past_index`: -1
|
992 |
+
- `disable_tqdm`: True
|
993 |
- `remove_unused_columns`: True
|
994 |
- `label_names`: None
|
995 |
- `load_best_model_at_end`: True
|
|
|
1050 |
</details>
|
1051 |
|
1052 |
### Training Logs
|
1053 |
+
| Epoch | Step | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
|
1054 |
|:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
|
1055 |
+
| **1.0** | **1** | **0.625** | **0.6458** | **0.6458** | **0.6458** |
|
1056 |
+
| 2.0 | 3 | 0.625 | 0.6458 | 0.6458 | 0.6458 |
|
1057 |
+
| 3.0 | 4 | 0.625 | 0.6458 | 0.6458 | 0.6458 |
|
1058 |
|
1059 |
* The bold row denotes the saved checkpoint.
|
1060 |
|
1061 |
### Framework Versions
|
1062 |
+
- Python: 3.9.6
|
1063 |
+
- Sentence Transformers: 3.0.1
|
1064 |
+
- Transformers: 4.44.0
|
1065 |
+
- PyTorch: 2.5.1
|
1066 |
+
- Accelerate: 0.33.0
|
1067 |
+
- Datasets: 2.20.0
|
1068 |
- Tokenizers: 0.19.1
|
1069 |
|
1070 |
## Citation
|
|
|
1087 |
#### MatryoshkaLoss
|
1088 |
```bibtex
|
1089 |
@misc{kusupati2024matryoshka,
|
1090 |
+
title={Matryoshka Representation Learning},
|
1091 |
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},
|
1092 |
year={2024},
|
1093 |
eprint={2205.13147},
|
|
|
1099 |
#### MultipleNegativesRankingLoss
|
1100 |
```bibtex
|
1101 |
@misc{henderson2017efficient,
|
1102 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
1103 |
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},
|
1104 |
year={2017},
|
1105 |
eprint={1705.00652},
|
config.json
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
"pad_token_id": 0,
|
20 |
"position_embedding_type": "absolute",
|
21 |
"torch_dtype": "float32",
|
22 |
-
"transformers_version": "4.
|
23 |
"type_vocab_size": 2,
|
24 |
"use_cache": true,
|
25 |
"vocab_size": 30522
|
|
|
19 |
"pad_token_id": 0,
|
20 |
"position_embedding_type": "absolute",
|
21 |
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.44.0",
|
23 |
"type_vocab_size": 2,
|
24 |
"use_cache": true,
|
25 |
"vocab_size": 30522
|
config_sentence_transformers.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "3.
|
4 |
-
"transformers": "4.
|
5 |
-
"pytorch": "2.5.1
|
6 |
},
|
7 |
"prompts": {
|
8 |
"query": "Represent this sentence for searching relevant passages: "
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.44.0",
|
5 |
+
"pytorch": "2.5.1"
|
6 |
},
|
7 |
"prompts": {
|
8 |
"query": "Represent this sentence for searching relevant passages: "
|