Sentence Similarity
sentence-transformers
Safetensors
English
bert
feature-extraction
Generated from Trainer
dataset_size:1490
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use zenml/finetuned-all-MiniLM-L6-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use zenml/finetuned-all-MiniLM-L6-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("zenml/finetuned-all-MiniLM-L6-v2") sentences = [ "Can you explain how to configure the credentials for authentication to a remote MLflow tracking server in ZenML?", "w_bucket=gs://my_bucket --provider=<YOUR_PROVIDER>You can pass other configurations specific to the stack components as key-value arguments. If you don't provide a name, a random one is generated for you. For more information about how to work use the CLI for this, please refer to the dedicated documentation section.\n\nAuthentication Methods\n\nYou need to configure the following credentials for authentication to a remote MLflow tracking server:\n\ntracking_uri: The URL pointing to the MLflow tracking server. If using an MLflow Tracking Server managed by Databricks, then the value of this attribute should be \"databricks\".\n\ntracking_username: Username for authenticating with the MLflow tracking server.\n\ntracking_password: Password for authenticating with the MLflow tracking server.\n\ntracking_token (in place of tracking_username and tracking_password): Token for authenticating with the MLflow tracking server.\n\ntracking_insecure_tls (optional): Set to skip verifying the MLflow tracking server SSL certificate.\n\ndatabricks_host: The host of the Databricks workspace with the MLflow-managed server to connect to. This is only required if the tracking_uri value is set to \"databricks\". More information: Access the MLflow tracking server from outside Databricks\n\nEither tracking_token or tracking_username and tracking_password must be specified.\n\nThis option configures the credentials for the MLflow tracking service directly as stack component attributes.\n\nThis is not recommended for production settings as the credentials won't be stored securely and will be clearly visible in the stack configuration.\n\n# Register the MLflow experiment tracker\n\nzenml experiment-tracker register mlflow_experiment_tracker --flavor=mlflow \\\n\n--tracking_uri=<URI> --tracking_token=<token>\n\n# You can also register it like this:\n\n# zenml experiment-tracker register mlflow_experiment_tracker --flavor=mlflow \\\n\n# --tracking_uri=<URI> --tracking_username=<USERNAME> --tracking_password=<PASSWORD>\n\n# Register and set a stack with the new experiment tracker", "token_hex\ntoken_hex(32)or:Copyopenssl rand -hex 32Important: If you configure encryption for your SQL database secrets store, you should keep the ZENML_SECRETS_STORE_ENCRYPTION_KEY value somewhere safe and secure, as it will always be required by the ZenML server to decrypt the secrets in the database. If you lose the encryption key, you will not be able to decrypt the secrets in the database and will have to reset them.\n\nThese configuration options are only relevant if you're using the AWS Secrets Manager as the secrets store backend.\n\nZENML_SECRETS_STORE_TYPE: Set this to aws in order to set this type of secret store.\n\nThe AWS Secrets Store uses the ZenML AWS Service Connector under the hood to authenticate with the AWS Secrets Manager API. This means that you can use any of the authentication methods supported by the AWS Service Connector to authenticate with the AWS Secrets Manager API.\n\n\"Version\": \"2012-10-17\",\n\n\"Statement\": [\n\n\"Sid\": \"ZenMLSecretsStore\",\n\n\"Effect\": \"Allow\",\n\n\"Action\": [\n\n\"secretsmanager:CreateSecret\",\n\n\"secretsmanager:GetSecretValue\",\n\n\"secretsmanager:DescribeSecret\",\n\n\"secretsmanager:PutSecretValue\",\n\n\"secretsmanager:TagResource\",\n\n\"secretsmanager:DeleteSecret\"\n\n],\n\n\"Resource\": \"arn:aws:secretsmanager:<AWS-region>:<AWS-account-id>:secret:zenml/*\"\n\nThe following configuration options are supported:\n\nZENML_SECRETS_STORE_AUTH_METHOD: The AWS Service Connector authentication method to use (e.g. secret-key or iam-role).\n\nZENML_SECRETS_STORE_AUTH_CONFIG: The AWS Service Connector configuration, in JSON format (e.g. {\"aws_access_key_id\":\"<aws-key-id>\",\"aws_secret_access_key\":\"<aws-secret-key>\",\"region\":\"<aws-region>\"}).\n\nNote: The remaining configuration options are deprecated and may be removed in a future release. Instead, you should set the ZENML_SECRETS_STORE_AUTH_METHOD and ZENML_SECRETS_STORE_AUTH_CONFIG variables to use the AWS Service Connector authentication method.", "tive Directory credentials or generic OIDC tokens.This authentication method only requires a GCP workload identity external account JSON file that only contains the configuration for the external account without any sensitive credentials. It allows implementing a two layer authentication scheme that keeps the set of permissions associated with implicit credentials down to the bare minimum and grants permissions to the privilege-bearing GCP service account instead.\n\nThis authentication method can be used to authenticate to GCP services using credentials from other cloud providers or identity providers. When used with workloads running on AWS or Azure, it involves automatically picking up credentials from the AWS IAM or Azure AD identity associated with the workload and using them to authenticate to GCP services. This means that the result depends on the environment where the ZenML server is deployed and is thus not fully reproducible.\n\nWhen used with AWS or Azure implicit in-cloud authentication, this method may constitute a security risk, because it can give users access to the identity (e.g. AWS IAM role or Azure AD principal) implicitly associated with the environment where the ZenML server is running. For this reason, all implicit authentication methods are disabled by default and need to be explicitly enabled by setting the ZENML_ENABLE_IMPLICIT_AUTH_METHODS environment variable or the helm chart enableImplicitAuthMethods configuration option to true in the ZenML deployment.\n\nBy default, the GCP connector generates temporary OAuth 2.0 tokens from the external account credentials and distributes them to clients. The tokens have a limited lifetime of 1 hour. This behavior can be disabled by setting the generate_temporary_tokens configuration option to False, in which case, the connector will distribute the external account credentials JSON to clients instead (not recommended)." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!