File size: 59,212 Bytes
f1fa80d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 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 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 |
---
language:
- en
license: apache-2.0
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3284
- loss:MatryoshkaLoss
- loss:MultipleNegativesRankingLoss
base_model: Snowflake/snowflake-arctic-embed-m-v1.5
widget:
- source_sentence: Does ZenML officially support Macs running on Apple Silicon, and
are there any specific configurations needed?
sentences:
- 'ding ZenML to learn more!
Do you support Windows?ZenML officially supports Windows if you''re using WSL.
Much of ZenML will also work on Windows outside a WSL environment, but we don''t
officially support it and some features don''t work (notably anything that requires
spinning up a server process).
Do you support Macs running on Apple Silicon?
Yes, ZenML does support Macs running on Apple Silicon. You just need to make sure
that you set the following environment variable:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
This is a known issue with how forking works on Macs running on Apple Silicon
and it will enable you to use ZenML and the server. This environment variable
is needed if you are working with a local server on your Mac, but if you''re just
using ZenML as a client / CLI and connecting to a deployed server then you don''t
need to set it.
How can I make ZenML work with my custom tool? How can I extend or build on ZenML?
This depends on the tool and its respective MLOps category. We have a full guide
on this over here!
How can I contribute?
We develop ZenML together with our community! To get involved, the best way to
get started is to select any issue from the good-first-issue label. If you would
like to contribute, please review our Contributing Guide for all relevant details.
How can I speak with the community?
The first point of the call should be our Slack group. Ask your questions about
bugs or specific use cases and someone from the core team will respond.
Which license does ZenML use?
ZenML is distributed under the terms of the Apache License Version 2.0. A complete
version of the license is available in the LICENSE.md in this repository. Any
contribution made to this project will be licensed under the Apache License Version
2.0.
PreviousCommunity & content
Last updated 3 months ago'
- 'Registering a Model
PreviousUse the Model Control PlaneNextDeleting a Model
Last updated 4 months ago'
- 'Synthetic data generation
Generate synthetic data with distilabel to finetune embeddings.
PreviousImprove retrieval by finetuning embeddingsNextFinetuning embeddings with
Sentence Transformers
Last updated 21 days ago'
- source_sentence: How can I change the logging verbosity level in ZenML for both
local and remote pipeline runs?
sentences:
- 'ncepts covered in this guide to your own projects.By the end of this guide, you''ll
have a solid understanding of how to leverage LLMs in your MLOps workflows using
ZenML, enabling you to build powerful, scalable, and maintainable LLM-powered
applications. First up, let''s take a look at a super simple implementation of
the RAG paradigm to get started.
PreviousAn end-to-end projectNextRAG with ZenML
Last updated 21 days ago'
- 'Configuring a pipeline at runtime
Configuring a pipeline at runtime.
PreviousUse pipeline/step parametersNextReference environment variables in configurations
Last updated 28 days ago'
- "Set logging verbosity\n\nHow to set the logging verbosity in ZenML.\n\nBy default,\
\ ZenML sets the logging verbosity to INFO. If you wish to change this, you can\
\ do so by setting the following environment variable:\n\nexport ZENML_LOGGING_VERBOSITY=INFO\n\
\nChoose from INFO, WARN, ERROR, CRITICAL, DEBUG. This will set the logs to whichever\
\ level you suggest.\n\nNote that setting this on the client environment (e.g.\
\ your local machine which runs the pipeline) will not automatically set the same\
\ logging verbosity for remote pipeline runs. That means setting this variable\
\ locally with only effect pipelines that run locally.\n\nIf you wish to control\
\ for remote pipeline runs, you can set the ZENML_LOGGING_VERBOSITY environment\
\ variable in your pipeline runs environment as follows:\n\ndocker_settings =\
\ DockerSettings(environment={\"ZENML_LOGGING_VERBOSITY\": \"DEBUG\"})\n\n# Either\
\ add it to the decorator\n@pipeline(settings={\"docker\": docker_settings})\n\
def my_pipeline() -> None:\n my_step()\n\n# Or configure the pipelines options\n\
my_pipeline = my_pipeline.with_options(\n settings={\"docker\": docker_settings}\n\
)\n\nPreviousEnable or disable logs storageNextDisable rich traceback output\n\
\nLast updated 21 days ago"
- source_sentence: How can I autogenerate a template yaml file for my specific pipeline
using ZenML?
sentences:
- "Autogenerate a template yaml file\n\nTo help you figure out what you can put\
\ in your configuration file, simply autogenerate a template.\n\nIf you want to\
\ generate a template yaml file of your specific pipeline, you can do so by using\
\ the .write_run_configuration_template() method. This will generate a yaml file\
\ with all options commented out. This way you can pick and choose the settings\
\ that are relevant to you.\n\nfrom zenml import pipeline\n...\n\n@pipeline(enable_cache=True)\
\ # set cache behavior at step level\ndef simple_ml_pipeline(parameter: int):\n\
\ dataset = load_data(parameter=parameter)\n train_model(dataset)\n\nsimple_ml_pipeline.write_run_configuration_template(path=\"\
<Insert_path_here>\")\n\nWhen you want to configure your pipeline with a certain\
\ stack in mind, you can do so as well: `...write_run_configuration_template(stack=<Insert_stack_here>)\n\
\nPreviousFind out which configuration was used for a runNextCustomize Docker\
\ builds\n\nLast updated 21 days ago"
- 'Deleting a Model
Learn how to delete models.
PreviousRegistering a ModelNextAssociate a pipeline with a Model
Last updated 4 months ago'
- 'Load artifacts into memory
Often ZenML pipeline steps consume artifacts produced by one another directly
in the pipeline code, but there are scenarios where you need to pull external
data into your steps. Such external data could be artifacts produced by non-ZenML
codes. For those cases, it is advised to use ExternalArtifact, but what if we
plan to exchange data created with other ZenML pipelines?
ZenML pipelines are first compiled and only executed at some later point. During
the compilation phase, all function calls are executed, and this data is fixed
as step input parameters. Given all this, the late materialization of dynamic
objects, like data artifacts, is crucial. Without late materialization, it would
not be possible to pass not-yet-existing artifacts as step inputs, or their metadata,
which is often the case in a multi-pipeline setting.
We identify two major use cases for exchanging artifacts between pipelines:
You semantically group your data products using ZenML Models
You prefer to use ZenML Client to bring all the pieces together
We recommend using models to group and access artifacts across pipelines. Find
out how to load an artifact from a ZenML Model here.
Use client methods to exchange artifacts
If you don''t yet use the Model Control Plane, you can still exchange data between
pipelines with late materialization. Let''s rework the do_predictions pipeline
code as follows:
from typing import Annotated
from zenml import step, pipeline
from zenml.client import Client
import pandas as pd
from sklearn.base import ClassifierMixin'
- source_sentence: How can I create a Kubernetes cluster on EKS and configure it to
run Spark with a custom Docker image?
sentences:
- 'View logs on the dashboard
PreviousControl loggingNextEnable or disable logs storage
Last updated 21 days ago'
- "Datasets in ZenML\n\nModel datasets using simple abstractions.\n\nAs machine\
\ learning projects grow in complexity, you often need to work with various data\
\ sources and manage intricate data flows. This chapter explores how to use custom\
\ Dataset classes and Materializers in ZenML to handle these challenges efficiently.\
\ For strategies on scaling your data processing for larger datasets, refer to\
\ scaling strategies for big data.\n\nIntroduction to Custom Dataset Classes\n\
\nCustom Dataset classes in ZenML provide a way to encapsulate data loading, processing,\
\ and saving logic for different data sources. They're particularly useful when:\n\
\nWorking with multiple data sources (e.g., CSV files, databases, cloud storage)\n\
\nDealing with complex data structures that require special handling\n\nImplementing\
\ custom data processing or transformation logic\n\nImplementing Dataset Classes\
\ for Different Data Sources\n\nLet's create a base Dataset class and implement\
\ it for CSV and BigQuery data sources:\n\nfrom abc import ABC, abstractmethod\n\
import pandas as pd\nfrom google.cloud import bigquery\nfrom typing import Optional\n\
\nclass Dataset(ABC):\n @abstractmethod\n def read_data(self) -> pd.DataFrame:\n\
\ pass\n\nclass CSVDataset(Dataset):\n def __init__(self, data_path:\
\ str, df: Optional[pd.DataFrame] = None):\n self.data_path = data_path\n\
\ self.df = df\n\ndef read_data(self) -> pd.DataFrame:\n if self.df\
\ is None:\n self.df = pd.read_csv(self.data_path)\n return\
\ self.df\n\nclass BigQueryDataset(Dataset):\n def __init__(\n self,\n\
\ table_id: str,\n df: Optional[pd.DataFrame] = None,\n project:\
\ Optional[str] = None,\n ):\n self.table_id = table_id\n self.project\
\ = project\n self.df = df\n self.client = bigquery.Client(project=self.project)\n\
\ndef read_data(self) -> pd.DataFrame:\n query = f\"SELECT * FROM `{self.table_id}`\"\
\n self.df = self.client.query(query).to_dataframe()\n return self.df"
- 'e the correct region is selected on the top right.Click on Add cluster and select
Create.
Enter a name and select the cluster role for Cluster service role.
Keep the default values for the networking and logging steps and create the cluster.
Note down the cluster name and the API server endpoint:
EKS_CLUSTER_NAME=<EKS_CLUSTER_NAME>
EKS_API_SERVER_ENDPOINT=<API_SERVER_ENDPOINT>
After the cluster is created, select it and click on Add node group in the Compute
tab.
Enter a name and select the node role.
For the instance type, we recommend t3a.xlarge, as it provides up to 4 vCPUs and
16 GB of memory.
Docker image for the Spark drivers and executors
When you want to run your steps on a Kubernetes cluster, Spark will require you
to choose a base image for the driver and executor pods. Normally, for this purpose,
you can either use one of the base images in Spark’s dockerhub or create an image
using the docker-image-tool which will use your own Spark installation and build
an image.
When using Spark in EKS, you need to use the latter and utilize the docker-image-tool.
However, before the build process, you also need to download the following packages
hadoop-aws = 3.3.1
aws-java-sdk-bundle = 1.12.150
and put them in the jars folder within your Spark installation. Once that is set
up, you can build the image as follows:
cd $SPARK_HOME # If this empty for you then you need to set the SPARK_HOME variable
which points to your Spark installation
SPARK_IMAGE_TAG=<SPARK_IMAGE_TAG>
./bin/docker-image-tool.sh -t $SPARK_IMAGE_TAG -p kubernetes/dockerfiles/spark/bindings/python/Dockerfile
-u 0 build
BASE_IMAGE_NAME=spark-py:$SPARK_IMAGE_TAG
If you are working on an M1 Mac, you will need to build the image for the amd64
architecture, by using the prefix -X on the previous command. For example:
./bin/docker-image-tool.sh -X -t $SPARK_IMAGE_TAG -p kubernetes/dockerfiles/spark/bindings/python/Dockerfile
-u 0 build
Configuring RBAC'
- source_sentence: How can I configure a pipeline with a YAML file in ZenML?
sentences:
- 'atically retry steps
Run pipelines asynchronouslyControl execution order of steps
Using a custom step invocation ID
Name your pipeline runs
Use failure/success hooks
Hyperparameter tuning
Access secrets in a step
Run an individual step
Fetching pipelines
Get past pipeline/step runs
🚨Trigger a pipeline
Use templates: Python SDK
Use templates: Dashboard
Use templates: Rest API
📃Use configuration files
How to configure a pipeline with a YAML
What can be configured
Runtime settings for Docker, resources, and stack components
Configuration hierarchy
Find out which configuration was used for a run
Autogenerate a template yaml file
🐳Customize Docker builds
Docker settings on a pipeline
Docker settings on a step
Use a prebuilt image for pipeline execution
Specify pip dependencies and apt packages
Use your own Dockerfiles
Which files are built into the image
How to reuse builds
Define where an image is built
📔Run remote pipelines from notebooks
Limitations of defining steps in notebook cells
Run a single step from a notebook
🤹Manage your ZenML server
Best practices for upgrading ZenML
Upgrade your ZenML server
Using ZenML server in production
Troubleshoot your ZenML server
Migration guide
Migration guide 0.13.2 → 0.20.0
Migration guide 0.23.0 → 0.30.0
Migration guide 0.39.1 → 0.41.0
Migration guide 0.58.2 → 0.60.0
📍Develop locally
Use config files to develop locally
Keep your pipelines and dashboard clean
⚒️Manage stacks & components
Deploy a cloud stack with ZenML
Deploy a cloud stack with Terraform
Register a cloud stack
Reference secrets in stack configuration
Implement a custom stack component
🚜Train with GPUs
Distributed Training with 🤗 Accelerate
🌲Control logging
View logs on the dashboard
Enable or disable logs storage
Set logging verbosity
Disable rich traceback output
Disable colorful logging
🗄️Handle Data/Artifacts
How ZenML stores data
Return multiple outputs from a step
Delete an artifact
Organize data with tags
Get arbitrary artifacts in a step'
- 'Security best practices
Best practices concerning the various authentication methods implemented by Service
Connectors.
Service Connector Types, especially those targeted at cloud providers, offer a
plethora of authentication methods matching those supported by remote cloud platforms.
While there is no single authentication standard that unifies this process, there
are some patterns that are easily identifiable and can be used as guidelines when
deciding which authentication method to use to configure a Service Connector.
This section explores some of those patterns and gives some advice regarding which
authentication methods are best suited for your needs.
This section may require some general knowledge about authentication and authorization
to be properly understood. We tried to keep it simple and limit ourselves to talking
about high-level concepts, but some areas may get a bit too technical.
Username and password
The key takeaway is this: you should avoid using your primary account password
as authentication credentials as much as possible. If there are alternative authentication
methods that you can use or other types of credentials (e.g. session tokens, API
keys, API tokens), you should always try to use those instead.
Ultimately, if you have no choice, be cognizant of the third parties you share
your passwords with. If possible, they should never leave the premises of your
local host or development environment.
This is the typical authentication method that uses a username or account name
plus the associated password. While this is the de facto method used to log in
with web consoles and local CLIs, this is the least secure of all authentication
methods and never something you want to share with other members of your team
or organization or use to authenticate automated workloads.'
- "━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━┛$ zenml orchestrator connect\
\ <ORCHESTRATOR_NAME> --connector aws-iam-multi-us\nRunning with active stack:\
\ 'default' (repository)\nSuccessfully connected orchestrator `<ORCHESTRATOR_NAME>`\
\ to the following resources:\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n\
┃ CONNECTOR ID │ CONNECTOR NAME │ CONNECTOR TYPE │ RESOURCE\
\ TYPE │ RESOURCE NAMES ┃\n┠──────────────────────────────────────┼──────────────────┼────────────────┼───────────────────────┼──────────────────┨\n\
┃ ed528d5a-d6cb-4fc4-bc52-c3d2d01643e5 │ aws-iam-multi-us │ \U0001F536 aws \
\ │ \U0001F300 kubernetes-cluster │ zenhacks-cluster ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n\
\n# Register and activate a stack with the new orchestrator\n$ zenml stack register\
\ <STACK_NAME> -o <ORCHESTRATOR_NAME> ... --set\n\nif you don't have a Service\
\ Connector on hand and you don't want to register one , the local Kubernetes\
\ kubectl client needs to be configured with a configuration context pointing\
\ to the remote cluster. The kubernetes_context stack component must also be configured\
\ with the value of that context:\n\nzenml orchestrator register <ORCHESTRATOR_NAME>\
\ \\\n --flavor=kubernetes \\\n --kubernetes_context=<KUBERNETES_CONTEXT>\n\
\n# Register and activate a stack with the new orchestrator\nzenml stack register\
\ <STACK_NAME> -o <ORCHESTRATOR_NAME> ... --set\n\nZenML will build a Docker image\
\ called <CONTAINER_REGISTRY_URI>/zenml:<PIPELINE_NAME> which includes your code\
\ and use it to run your pipeline steps in Kubernetes. Check out this page if\
\ you want to learn more about how ZenML builds these images and how you can customize\
\ them.\n\nYou can now run any ZenML pipeline using the Kubernetes orchestrator:\n\
\npython file_that_runs_a_zenml_pipeline.py"
datasets: []
pipeline_tag: sentence-similarity
library_name: sentence-transformers
metrics:
- cosine_accuracy@1
- cosine_accuracy@3
- cosine_accuracy@5
- cosine_accuracy@10
- cosine_precision@1
- cosine_precision@3
- cosine_precision@5
- cosine_precision@10
- cosine_recall@1
- cosine_recall@3
- cosine_recall@5
- cosine_recall@10
- cosine_ndcg@10
- cosine_mrr@10
- cosine_map@100
model-index:
- name: zenml/finetuned-snowflake-arctic-embed-m-v1.5
results:
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 384
type: dim_384
metrics:
- type: cosine_accuracy@1
value: 0.1863013698630137
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.4794520547945205
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.6602739726027397
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.7972602739726027
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.1863013698630137
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.1598173515981735
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.13205479452054794
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.07972602739726026
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.1863013698630137
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.4794520547945205
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.6602739726027397
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.7972602739726027
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.47459290361092754
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.3725994781474232
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.37953809566266083
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 256
type: dim_256
metrics:
- type: cosine_accuracy@1
value: 0.18356164383561643
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.4876712328767123
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.6602739726027397
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.7917808219178082
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.18356164383561643
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.16255707762557076
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.1320547945205479
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.07917808219178081
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.18356164383561643
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.4876712328767123
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.6602739726027397
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.7917808219178082
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.47334554819769054
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.3724179169384647
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.37931260226095775
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 128
type: dim_128
metrics:
- type: cosine_accuracy@1
value: 0.18356164383561643
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.4684931506849315
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.6356164383561644
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.7780821917808219
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.18356164383561643
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.1561643835616438
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.12712328767123285
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.07780821917808219
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.18356164383561643
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.4684931506849315
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.6356164383561644
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.7780821917808219
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.46219638130094637
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.3628680147858229
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.37047490630037583
name: Cosine Map@100
- task:
type: information-retrieval
name: Information Retrieval
dataset:
name: dim 64
type: dim_64
metrics:
- type: cosine_accuracy@1
value: 0.2054794520547945
name: Cosine Accuracy@1
- type: cosine_accuracy@3
value: 0.4767123287671233
name: Cosine Accuracy@3
- type: cosine_accuracy@5
value: 0.6273972602739726
name: Cosine Accuracy@5
- type: cosine_accuracy@10
value: 0.7534246575342466
name: Cosine Accuracy@10
- type: cosine_precision@1
value: 0.2054794520547945
name: Cosine Precision@1
- type: cosine_precision@3
value: 0.15890410958904108
name: Cosine Precision@3
- type: cosine_precision@5
value: 0.12547945205479452
name: Cosine Precision@5
- type: cosine_precision@10
value: 0.07534246575342465
name: Cosine Precision@10
- type: cosine_recall@1
value: 0.2054794520547945
name: Cosine Recall@1
- type: cosine_recall@3
value: 0.4767123287671233
name: Cosine Recall@3
- type: cosine_recall@5
value: 0.6273972602739726
name: Cosine Recall@5
- type: cosine_recall@10
value: 0.7534246575342466
name: Cosine Recall@10
- type: cosine_ndcg@10
value: 0.46250756548591326
name: Cosine Ndcg@10
- type: cosine_mrr@10
value: 0.37069906501413347
name: Cosine Mrr@10
- type: cosine_map@100
value: 0.37874559284369463
name: Cosine Map@100
---
# zenml/finetuned-snowflake-arctic-embed-m-v1.5
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.
## Model Details
### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [Snowflake/snowflake-arctic-embed-m-v1.5](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1.5) <!-- at revision 3b5a16eaf17e47bd997da998988dce5877a57092 -->
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
<!-- - **Training Dataset:** Unknown -->
- **Language:** en
- **License:** apache-2.0
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
### Full Model Architecture
```
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, '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})
(2): Normalize()
)
```
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("zenml/finetuned-snowflake-arctic-embed-m-v1.5")
# Run inference
sentences = [
'How can I configure a pipeline with a YAML file in ZenML?',
'atically retry steps\n\nRun pipelines asynchronouslyControl execution order of steps\n\nUsing a custom step invocation ID\n\nName your pipeline runs\n\nUse failure/success hooks\n\nHyperparameter tuning\n\nAccess secrets in a step\n\nRun an individual step\n\nFetching pipelines\n\nGet past pipeline/step runs\n\n🚨Trigger a pipeline\n\nUse templates: Python SDK\n\nUse templates: Dashboard\n\nUse templates: Rest API\n\n📃Use configuration files\n\nHow to configure a pipeline with a YAML\n\nWhat can be configured\n\nRuntime settings for Docker, resources, and stack components\n\nConfiguration hierarchy\n\nFind out which configuration was used for a run\n\nAutogenerate a template yaml file\n\n🐳Customize Docker builds\n\nDocker settings on a pipeline\n\nDocker settings on a step\n\nUse a prebuilt image for pipeline execution\n\nSpecify pip dependencies and apt packages\n\nUse your own Dockerfiles\n\nWhich files are built into the image\n\nHow to reuse builds\n\nDefine where an image is built\n\n📔Run remote pipelines from notebooks\n\nLimitations of defining steps in notebook cells\n\nRun a single step from a notebook\n\n🤹Manage your ZenML server\n\nBest practices for upgrading ZenML\n\nUpgrade your ZenML server\n\nUsing ZenML server in production\n\nTroubleshoot your ZenML server\n\nMigration guide\n\nMigration guide 0.13.2 → 0.20.0\n\nMigration guide 0.23.0 → 0.30.0\n\nMigration guide 0.39.1 → 0.41.0\n\nMigration guide 0.58.2 → 0.60.0\n\n📍Develop locally\n\nUse config files to develop locally\n\nKeep your pipelines and dashboard clean\n\n⚒️Manage stacks & components\n\nDeploy a cloud stack with ZenML\n\nDeploy a cloud stack with Terraform\n\nRegister a cloud stack\n\nReference secrets in stack configuration\n\nImplement a custom stack component\n\n🚜Train with GPUs\n\nDistributed Training with 🤗 Accelerate\n\n🌲Control logging\n\nView logs on the dashboard\n\nEnable or disable logs storage\n\nSet logging verbosity\n\nDisable rich traceback output\n\nDisable colorful logging\n\n🗄️Handle Data/Artifacts\n\nHow ZenML stores data\n\nReturn multiple outputs from a step\n\nDelete an artifact\n\nOrganize data with tags\n\nGet arbitrary artifacts in a step',
"━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━┛$ zenml orchestrator connect <ORCHESTRATOR_NAME> --connector aws-iam-multi-us\nRunning with active stack: 'default' (repository)\nSuccessfully connected orchestrator `<ORCHESTRATOR_NAME>` to the following resources:\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┓\n┃ CONNECTOR ID │ CONNECTOR NAME │ CONNECTOR TYPE │ RESOURCE TYPE │ RESOURCE NAMES ┃\n┠──────────────────────────────────────┼──────────────────┼────────────────┼───────────────────────┼──────────────────┨\n┃ ed528d5a-d6cb-4fc4-bc52-c3d2d01643e5 │ aws-iam-multi-us │ 🔶 aws │ 🌀 kubernetes-cluster │ zenhacks-cluster ┃\n┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┛\n\n# Register and activate a stack with the new orchestrator\n$ zenml stack register <STACK_NAME> -o <ORCHESTRATOR_NAME> ... --set\n\nif you don't have a Service Connector on hand and you don't want to register one , the local Kubernetes kubectl client needs to be configured with a configuration context pointing to the remote cluster. The kubernetes_context stack component must also be configured with the value of that context:\n\nzenml orchestrator register <ORCHESTRATOR_NAME> \\\n --flavor=kubernetes \\\n --kubernetes_context=<KUBERNETES_CONTEXT>\n\n# Register and activate a stack with the new orchestrator\nzenml stack register <STACK_NAME> -o <ORCHESTRATOR_NAME> ... --set\n\nZenML will build a Docker image called <CONTAINER_REGISTRY_URI>/zenml:<PIPELINE_NAME> which includes your code and use it to run your pipeline steps in Kubernetes. Check out this page if you want to learn more about how ZenML builds these images and how you can customize them.\n\nYou can now run any ZenML pipeline using the Kubernetes orchestrator:\n\npython file_that_runs_a_zenml_pipeline.py",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
## Evaluation
### Metrics
#### Information Retrieval
* Dataset: `dim_384`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.1863 |
| cosine_accuracy@3 | 0.4795 |
| cosine_accuracy@5 | 0.6603 |
| cosine_accuracy@10 | 0.7973 |
| cosine_precision@1 | 0.1863 |
| cosine_precision@3 | 0.1598 |
| cosine_precision@5 | 0.1321 |
| cosine_precision@10 | 0.0797 |
| cosine_recall@1 | 0.1863 |
| cosine_recall@3 | 0.4795 |
| cosine_recall@5 | 0.6603 |
| cosine_recall@10 | 0.7973 |
| cosine_ndcg@10 | 0.4746 |
| cosine_mrr@10 | 0.3726 |
| **cosine_map@100** | **0.3795** |
#### Information Retrieval
* Dataset: `dim_256`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.1836 |
| cosine_accuracy@3 | 0.4877 |
| cosine_accuracy@5 | 0.6603 |
| cosine_accuracy@10 | 0.7918 |
| cosine_precision@1 | 0.1836 |
| cosine_precision@3 | 0.1626 |
| cosine_precision@5 | 0.1321 |
| cosine_precision@10 | 0.0792 |
| cosine_recall@1 | 0.1836 |
| cosine_recall@3 | 0.4877 |
| cosine_recall@5 | 0.6603 |
| cosine_recall@10 | 0.7918 |
| cosine_ndcg@10 | 0.4733 |
| cosine_mrr@10 | 0.3724 |
| **cosine_map@100** | **0.3793** |
#### Information Retrieval
* Dataset: `dim_128`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.1836 |
| cosine_accuracy@3 | 0.4685 |
| cosine_accuracy@5 | 0.6356 |
| cosine_accuracy@10 | 0.7781 |
| cosine_precision@1 | 0.1836 |
| cosine_precision@3 | 0.1562 |
| cosine_precision@5 | 0.1271 |
| cosine_precision@10 | 0.0778 |
| cosine_recall@1 | 0.1836 |
| cosine_recall@3 | 0.4685 |
| cosine_recall@5 | 0.6356 |
| cosine_recall@10 | 0.7781 |
| cosine_ndcg@10 | 0.4622 |
| cosine_mrr@10 | 0.3629 |
| **cosine_map@100** | **0.3705** |
#### Information Retrieval
* Dataset: `dim_64`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
| Metric | Value |
|:--------------------|:-----------|
| cosine_accuracy@1 | 0.2055 |
| cosine_accuracy@3 | 0.4767 |
| cosine_accuracy@5 | 0.6274 |
| cosine_accuracy@10 | 0.7534 |
| cosine_precision@1 | 0.2055 |
| cosine_precision@3 | 0.1589 |
| cosine_precision@5 | 0.1255 |
| cosine_precision@10 | 0.0753 |
| cosine_recall@1 | 0.2055 |
| cosine_recall@3 | 0.4767 |
| cosine_recall@5 | 0.6274 |
| cosine_recall@10 | 0.7534 |
| cosine_ndcg@10 | 0.4625 |
| cosine_mrr@10 | 0.3707 |
| **cosine_map@100** | **0.3787** |
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 3,284 training samples
* Columns: <code>positive</code> and <code>anchor</code>
* Approximate statistics based on the first 1000 samples:
| | positive | anchor |
|:--------|:----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| type | string | string |
| details | <ul><li>min: 10 tokens</li><li>mean: 22.7 tokens</li><li>max: 48 tokens</li></ul> | <ul><li>min: 17 tokens</li><li>mean: 316.5 tokens</li><li>max: 512 tokens</li></ul> |
* Samples:
| positive | anchor |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| <code>How does ZenML help in integrating machine learning with operational processes?</code> | <code>ZenML - Bridging the gap between ML & Ops<br><br>Legacy Docs<br><br>Bleeding EdgeLegacy Docs0.67.0<br><br>🧙♂️Find older version our docs<br><br>Powered by GitBook</code> |
| <code>How can I configure a data integrity check step in ZenML to perform outlier sample detection and string length verification on a dataset with specific conditions?</code> | <code>ks. For example, the following step configuration:deepchecks_data_integrity_check_step(<br> check_list=[<br> DeepchecksDataIntegrityCheck.TABULAR_OUTLIER_SAMPLE_DETECTION,<br> DeepchecksDataIntegrityCheck.TABULAR_STRING_LENGTH_OUT_OF_BOUNDS,<br> ],<br> dataset_kwargs=dict(label='class', cat_features=['country', 'state']),<br> check_kwargs={<br> DeepchecksDataIntegrityCheck.TABULAR_OUTLIER_SAMPLE_DETECTION: dict(<br> nearest_neighbors_percent=0.01,<br> extent_parameter=3,<br> condition_outlier_ratio_less_or_equal=dict(<br> max_outliers_ratio=0.007,<br> outlier_score_threshold=0.5,<br> ),<br> condition_no_outliers=dict(<br> outlier_score_threshold=0.6,<br> )<br> ),<br> DeepchecksDataIntegrityCheck.TABULAR_STRING_LENGTH_OUT_OF_BOUNDS: dict(<br> num_percentiles=1000,<br> min_unique_values=3,<br> condition_number_of_outliers_less_or_equal=dict(<br> max_outliers=3,<br> )<br> ),<br> },<br> ...<br>)<br><br>is equivalent to running the following Deepchecks tests:<br><br>import deepchecks.tabular.checks as tabular_checks<br>from deepchecks.tabular import Suite<br>from deepchecks.tabular import Dataset<br><br>train_dataset = Dataset(<br> reference_dataset,<br> label='class',<br> cat_features=['country', 'state']<br>)<br><br>suite = Suite(name="custom")<br>check = tabular_checks.OutlierSampleDetection(<br> nearest_neighbors_percent=0.01,<br> extent_parameter=3,<br>)<br>check.add_condition_outlier_ratio_less_or_equal(<br> max_outliers_ratio=0.007,<br> outlier_score_threshold=0.5,<br>)<br>check.add_condition_no_outliers(<br> outlier_score_threshold=0.6,<br>)<br>suite.add(check)<br>check = tabular_checks.StringLengthOutOfBounds(<br> num_percentiles=1000,<br> min_unique_values=3,<br>)<br>check.add_condition_number_of_outliers_less_or_equal(<br> max_outliers=3,<br>)<br>suite.run(train_dataset=train_dataset)<br><br>The Deepchecks Data Validator</code> |
| <code>How can I develop a custom data validator in ZenML?</code> | <code>custom data validator<br><br>📈Experiment Trackers<br><br>CometMLflow<br><br>Neptune<br><br>Weights & Biases<br><br>Develop a custom experiment tracker<br><br>🏃♀️Model Deployers<br><br>MLflow<br><br>Seldon<br><br>BentoML<br><br>Hugging Face<br><br>Databricks<br><br>Develop a Custom Model Deployer<br><br>👣Step Operators<br><br>Amazon SageMaker<br><br>Google Cloud VertexAI<br><br>AzureML<br><br>Kubernetes<br><br>Spark<br><br>Develop a Custom Step Operator<br><br>❗Alerters<br><br>Discord Alerter<br><br>Slack Alerter<br><br>Develop a Custom Alerter<br><br>🖼️Image Builders<br><br>Local Image Builder<br><br>Kaniko Image Builder<br><br>Google Cloud Image Builder<br><br>Develop a Custom Image Builder<br><br>🏷️Annotators<br><br>Argilla<br><br>Label Studio<br><br>Pigeon<br><br>Prodigy<br><br>Develop a Custom Annotator<br><br>📓Model Registries<br><br>MLflow Model Registry<br><br>Develop a Custom Model Registry<br><br>📊Feature Stores<br><br>Feast<br><br>Develop a Custom Feature Store<br><br>Examples<br><br>🚀Quickstart<br><br>🔏End-to-End Batch Inference<br><br>📚Basic NLP with BERT<br><br>👁️Computer Vision with YoloV8<br><br>📖LLM Finetuning<br><br>🧩More Projects...<br><br>Reference<br><br>🐍Python Client<br><br>📼Global settings<br><br>🌎Environment Variables<br><br>👀API reference<br><br>🤷SDK & CLI reference<br><br>📚How do I...?<br><br>♻️Migration guide<br><br>Migration guide 0.13.2 → 0.20.0<br><br>Migration guide 0.23.0 → 0.30.0<br><br>Migration guide 0.39.1 → 0.41.0<br><br>Migration guide 0.58.2 → 0.60.0<br><br>💜Community & content<br><br>❓FAQ<br><br>Powered by GitBook</code> |
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
```json
{
"loss": "MultipleNegativesRankingLoss",
"matryoshka_dims": [
384,
256,
128,
64
],
"matryoshka_weights": [
1,
1,
1,
1
],
"n_dims_per_step": -1
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 4
- `per_device_eval_batch_size`: 16
- `gradient_accumulation_steps`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 4
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.1
- `tf32`: False
- `load_best_model_at_end`: True
- `optim`: adamw_torch_fused
- `batch_sampler`: no_duplicates
#### All Hyperparameters
<details><summary>Click to expand</summary>
- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: epoch
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 4
- `per_device_eval_batch_size`: 16
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 16
- `eval_accumulation_steps`: None
- `torch_empty_cache_steps`: None
- `learning_rate`: 2e-05
- `weight_decay`: 0.0
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `max_grad_norm`: 1.0
- `num_train_epochs`: 4
- `max_steps`: -1
- `lr_scheduler_type`: cosine
- `lr_scheduler_kwargs`: {}
- `warmup_ratio`: 0.1
- `warmup_steps`: 0
- `log_level`: passive
- `log_level_replica`: warning
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `save_safetensors`: True
- `save_on_each_node`: False
- `save_only_model`: False
- `restore_callback_states_from_checkpoint`: False
- `no_cuda`: False
- `use_cpu`: False
- `use_mps_device`: False
- `seed`: 42
- `data_seed`: None
- `jit_mode_eval`: False
- `use_ipex`: False
- `bf16`: False
- `fp16`: False
- `fp16_opt_level`: O1
- `half_precision_backend`: auto
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: False
- `local_rank`: 0
- `ddp_backend`: None
- `tpu_num_cores`: None
- `tpu_metrics_debug`: False
- `debug`: []
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_prefetch_factor`: None
- `past_index`: -1
- `disable_tqdm`: True
- `remove_unused_columns`: True
- `label_names`: None
- `load_best_model_at_end`: True
- `ignore_data_skip`: False
- `fsdp`: []
- `fsdp_min_num_params`: 0
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
- `fsdp_transformer_layer_cls_to_wrap`: None
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `deepspeed`: None
- `label_smoothing_factor`: 0.0
- `optim`: adamw_torch_fused
- `optim_args`: None
- `adafactor`: False
- `group_by_length`: False
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `skip_memory_metrics`: True
- `use_legacy_prediction_loop`: False
- `push_to_hub`: False
- `resume_from_checkpoint`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `eval_do_concat_batches`: True
- `fp16_backend`: auto
- `push_to_hub_model_id`: None
- `push_to_hub_organization`: None
- `mp_parameters`:
- `auto_find_batch_size`: False
- `full_determinism`: False
- `torchdynamo`: None
- `ray_scope`: last
- `ddp_timeout`: 1800
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `dispatch_batches`: None
- `split_batches`: None
- `include_tokens_per_second`: False
- `include_num_input_tokens_seen`: False
- `neftune_noise_alpha`: None
- `optim_target_modules`: None
- `batch_eval_metrics`: False
- `eval_on_start`: False
- `eval_use_gather_object`: False
- `batch_sampler`: no_duplicates
- `multi_dataset_batch_sampler`: proportional
</details>
### Training Logs
| Epoch | Step | Training Loss | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
|:----------:|:------:|:-------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
| 0.3893 | 10 | 1.7142 | - | - | - | - |
| 0.7786 | 20 | 0.4461 | - | - | - | - |
| 0.9732 | 25 | - | 0.3544 | 0.3592 | 0.3674 | 0.3523 |
| 1.1655 | 30 | 0.1889 | - | - | - | - |
| 1.5547 | 40 | 0.1196 | - | - | - | - |
| 1.9440 | 50 | 0.0717 | - | - | - | - |
| 1.9830 | 51 | - | 0.3672 | 0.3727 | 0.3728 | 0.3797 |
| 2.3309 | 60 | 0.0474 | - | - | - | - |
| 2.7202 | 70 | 0.0418 | - | - | - | - |
| **2.9927** | **77** | **-** | **0.3722** | **0.3772** | **0.3798** | **0.3783** |
| 3.1071 | 80 | 0.0355 | - | - | - | - |
| 3.4964 | 90 | 0.0351 | - | - | - | - |
| 3.8856 | 100 | 0.0276 | 0.3705 | 0.3793 | 0.3795 | 0.3787 |
* The bold row denotes the saved checkpoint.
### Framework Versions
- Python: 3.12.3
- Sentence Transformers: 3.0.1
- Transformers: 4.44.0
- PyTorch: 2.5.0+cu124
- Accelerate: 0.33.0
- Datasets: 2.20.0
- Tokenizers: 0.19.1
## Citation
### BibTeX
#### Sentence Transformers
```bibtex
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
```
#### MatryoshkaLoss
```bibtex
@misc{kusupati2024matryoshka,
title={Matryoshka Representation Learning},
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},
year={2024},
eprint={2205.13147},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
```
#### MultipleNegativesRankingLoss
```bibtex
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
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},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
--> |