--- tags: - sentence-transformers - cross-encoder - reranker - generated_from_trainer - dataset_size:1162 - loss:BinaryCrossEntropyLoss base_model: cross-encoder/ms-marco-MiniLM-L6-v2 pipeline_tag: text-ranking library_name: sentence-transformers --- # CrossEncoder based on cross-encoder/ms-marco-MiniLM-L6-v2 This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [cross-encoder/ms-marco-MiniLM-L6-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search. ## Model Details ### Model Description - **Model Type:** Cross Encoder - **Base model:** [cross-encoder/ms-marco-MiniLM-L6-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L6-v2) - **Maximum Sequence Length:** 512 tokens - **Number of Output Labels:** 1 label - **Supported Modality:** Text ### Model Sources - **Documentation:** [Sentence Transformers Documentation](https://sbert.net) - **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html) - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers) - **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder) ### Full Model Architecture ``` CrossEncoder( (0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'BertForSequenceClassification'}) ) ``` ## 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 CrossEncoder # Download from the πŸ€— Hub model = CrossEncoder("cross_encoder_model_id") # Get scores for pairs of inputs pairs = [ ['Tool name: get_items_for_portfolio\nTool description: List projects, goals, and other items in a portfolio. Returns item names, IDs, and types. Use for portfolio content exploration and management. Supports pagination for portfolios with many items.\nTool input parameters:\n- limit: number (optional) β€” Results per page (1-100)\n- offset: string (optional) β€” Pagination offset token\n- opt_fields: string (optional) β€” Comma-separated list of optional fields to include in the response\n- portfolio_gid: string (required) β€” Globally unique identifier for the portfolio', 'API operationId: getItemsForPortfolio\nAPI method: GET\nAPI path: /portfolios/{portfolio_gid}/items\nAPI summary: Get portfolio items\nAPI description: Required scope: portfolios:read\n\nGet a list of the items in compact form in a portfolio.\nAPI parameters:\n- ref=portfolio_path_gid\n- ref=pretty\n- ref=limit\n- ref=offset\n- opt_fields in=query type=array optional β€” This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to incl…\nAPI request body:\nnone\nAPI security: [{"personalAccessToken":[]},{"oauth2":["portfolios:read"]}]'], ['Tool name: get_items_for_portfolio\nTool description: List projects, goals, and other items in a portfolio. Returns item names, IDs, and types. Use for portfolio content exploration and management. Supports pagination for portfolios with many items.\nTool input parameters:\n- limit: number (optional) β€” Results per page (1-100)\n- offset: string (optional) β€” Pagination offset token\n- opt_fields: string (optional) β€” Comma-separated list of optional fields to include in the response\n- portfolio_gid: string (required) β€” Globally unique identifier for the portfolio', 'API operationId: getGoals\nAPI method: GET\nAPI path: /goals\nAPI summary: Get goals\nAPI description: Required scope: goals:read\n\nReturns compact goal records.\nAPI parameters:\n- ref=pretty\n- portfolio in=query type=string optional β€” Globally unique identifier for supporting portfolio.\n- project in=query type=string optional β€” Globally unique identifier for supporting project.\n- task in=query type=string optional β€” Globally unique identifier for supporting task.\n- is_workspace_level in=query type=boolean optional β€” Filter to goals with is_workspace_level set to query value. Must be used with the workspace parameter.\n- team in=query type=string optional β€” Globally unique identifier for the team.\n- workspace in=query type=string optional β€” Globally unique identifier for the workspace.\n- time_periods in=query type=array optional β€” Globally unique identifiers for the time periods.\n- ref=limit\n- ref=offset\n- opt_fields in=query type=array optional β€” This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to incl…\nAPI request body:\nnone\nAPI security: [{"personalAccessToken":[]},{"oauth2":["goals:read"]}]'], ['Tool name: get_items_for_portfolio\nTool description: List projects, goals, and other items in a portfolio. Returns item names, IDs, and types. Use for portfolio content exploration and management. Supports pagination for portfolios with many items.\nTool input parameters:\n- limit: number (optional) β€” Results per page (1-100)\n- offset: string (optional) β€” Pagination offset token\n- opt_fields: string (optional) β€” Comma-separated list of optional fields to include in the response\n- portfolio_gid: string (required) β€” Globally unique identifier for the portfolio', 'API operationId: searchProjectsForWorkspace\nAPI method: GET\nAPI path: /workspaces/{workspace_gid}/projects/search\nAPI summary: Search projects in a workspace\nAPI description: Required scope: projects:read\n\nTo mirror the functionality of the Asana web app\'s advanced search feature, the Asana API has a project search endpoint that allows you to build complex filters to find and retrieve the exact data you need.\n#### Premium access\nLike the Asana web product\'s advance search feature, this search endpoint will only be available to premium Asana users. A user is premium if any of the following is true:\n\n- The workspace in which the search is being performed is a premium workspace\n- The user is a member of a premium team inside the workspace\n\nEven if a user is only a member of a premium team inside a non-premium workspace, search will allow them to find data anywhere in the workspace, not just inside the premium team. Making a search request using credentials of a non-premium user will result in a `402 Payment Required` error.\n#### Pagination\nSearch results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional [pagination](/docs/pagination) available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the `limit` query parameter.\n#### Eventual consistency\nChanges in Asana (regardless of whether they’re made though the web product or the API) are forwarded to our search infrastructure to be indexed. This process can take between 10 and 60 seconds to complete under normal operation, and longer during some production incidents. Making a change to a project that would alter its presence in a particular search query will not be reflected immediately. This is also true of the advanced search feature in the web product.\nBecause of this delay, the search endpoint is not suited for use cases that require immediate consistency after writes. If you need read-your-write behavior or strongly consistent results, we recommend using [Get multiple projects](/reference/getprojects) instead.\n#### Rate limits\nYou may receive a `429 Too Many Requests` response if you hit any of our [rate limits](/docs/rate-limits).\n#### Custom field parameters\n| Parameter name | Custom field type | Accepted type |\n|---|---|---|\n| custom_fields.{gid}.is_set | All | Boolean |\n| custom_fields.{gid}.value | Text | String |\n| custom_fields.{gid}.value | Number | Number |\n| custom_fields.{gid}.value | Enum | Enum option ID |\n| custom_fields.{gid}.starts_with | Text only | String |\n| custom_fields.{gid}.ends_with | Text only | String |\n| custom_fields.{gid}.contains | Text only | String |\n| custom_fields.{gid}.less_than | Number only | Number |\n| custom_fields.{gid}.greater_than | Number only | Number |\n\n\nFor example, if the gid of the custom field is 12345, the query parameter to find projects where it i…\nAPI parameters:\n- ref=workspace_path_gid\n- ref=pretty\n- text in=query type=string optional β€” Performs full-text search on the project name.\n- sort_by in=query type=string optional β€” One of `due_date`, `created_at`, `completed_at`, `relevance`, or `modified_at`, defaults to `modified_at`.\n- sort_ascending in=query type=boolean optional β€” Default `false`.\n- completed in=query type=boolean optional β€” Filter on project completion status.\n- teams.any in=query type=string optional β€” Comma-separated list of team IDs.\n- owner.any in=query type=string optional β€” Comma-separated list of user identifiers to filter on as project owners. This can either be the string "me", an email, or the gid of a user.\n- members.any in=query type=string optional β€” Comma-separated list of user identifiers to filter on as members. This can either be the string "me", an email, or the gid of a user.\n- members.not in=query type=string optional β€” Comma-separated list of user identifiers to exclude as members. This can either be the string "me", an email, or the gid of a user.\n- portfolios.any in=query type=string optional β€” Comma-separated list of portfolio IDs to filter on.\n- completed_on in=query type=string optional β€” ISO 8601 date string or `null`.\n- completed_on.before in=query type=string optional β€” ISO 8601 date string.\n- completed_on.after in=query type=string optional β€” ISO 8601 date string.\n- completed_at.before in=query type=string optional β€” ISO 8601 datetime string.\n- completed_at.after in=query type=string optional β€” ISO 8601 datetime string.\n- created_on in=query type=string optional β€” ISO 8601 date string or `null`.\n- created_on.before in=query type=string optional β€” ISO 8601 date string.\n- created_on.after in=query type=string optional β€” ISO 8601 date string.\n- created_at.before in=query type=string optional β€” ISO 8601 datetime string.\n- created_at.after in=query type=string optional β€” ISO 8601 datetime string.\n- due_on in=query type=string optional β€” ISO 8601 date string or `null`.\n- due_on.before in=query type=string optional β€” ISO 8601 date string.\n- due_on.after in=query type=string optional β€” ISO 8601 date string.\n- due_at.before in=query type=string optional β€” ISO 8601 datetime string.\n- due_at.after in=query type=string optional β€” ISO 8601 datetime string.\n- start_on in=query type=string optional β€” ISO 8601 date string or `null`.\n- start_on.before in=query type=string optional β€” ISO 8601 date string.\n- start_on.after in=query type=string optional β€” ISO 8601 date string.\n- opt_fields in=query type=array optional β€” This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to incl…\nAPI request body:\nnone\nAPI security: [{"personalAccessToken":[]},{"oauth2":["projects:read"]}]'], ['Tool name: get_items_for_portfolio\nTool description: List projects, goals, and other items in a portfolio. Returns item names, IDs, and types. Use for portfolio content exploration and management. Supports pagination for portfolios with many items.\nTool input parameters:\n- limit: number (optional) β€” Results per page (1-100)\n- offset: string (optional) β€” Pagination offset token\n- opt_fields: string (optional) β€” Comma-separated list of optional fields to include in the response\n- portfolio_gid: string (required) β€” Globally unique identifier for the portfolio', 'API operationId: removeDependentsForTask\nAPI method: POST\nAPI path: /tasks/{task_gid}/removeDependents\nAPI summary: Unlink dependents from a task\nAPI description: Required scope: tasks:write\n\nUnlinks a set of dependents from this task.\nAPI parameters:\n- ref=task_path_gid\n- ref=pretty\nAPI request body:\nrequired\napplication/json: object\n- data: ModifyDependentsRequest (optional)\nAPI security: [{"personalAccessToken":[]},{"oauth2":["tasks:write"]}]'], ['Tool name: create_project_status_update\nTool description: Post a status update to a project or portfolio. Use for project health updates, milestone documentation, or blocker reporting. Returns created status with gid, parent, title, status_type, author, created_at, permalink_url. Exactly one of text or html_text must be provided.\nTool input parameters:\n- text: string (optional) β€” Plain-text status body. Exactly one of text or html_text must be provided.\n- color: string (required) β€” Status color: green (on track), yellow (at risk), red (off track), blue (on hold), complete\n- title: string (required) β€” Status title\n- parent: string (required) β€” GID of the project or portfolio to post the status update to.\n- html_text: string (optional) β€” Exactly one of text or html_text must be provided. Allowed elements only: , , , , , ,
    ,