Skip to content

Commit

Permalink
Merge branch 'main' into feature/damian/adjust_non_kv_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogunowicz authored Oct 18, 2023
2 parents 3bf37cd + 5ad3913 commit 7b088a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/deepsparse/transformers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Making a request:
```python
import requests

url = "http://localhost:5543/v2/models/setiment_analysis/infer" # Server's port default to 5543
url = "http://localhost:5543/v2/models/sentiment_analysis/infer" # Server's port default to 5543

obj = {"sequences": "Snorlax loves my Tesla!"}

Expand Down
14 changes: 11 additions & 3 deletions src/deepsparse/transformers/pipelines/mnli_text_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ class MnliTextClassificationConfig(BaseModel):
description="Index of mnli model outputs which denotes contradiction", default=2
)
multi_class: bool = Field(
description="True if class probabilities are independent, default False",
description="Whether or not multiple candidate labels can be true. "
"If `False`, the scores are normalized as the softmax of entailment"
" score. If `True`, the labels are considered independent and probabilities "
"are normalized for each candidate by doing a softmax of the entailment score "
"vs. the contradiction score. Default is `False`.",
default=False,
)

Expand All @@ -95,8 +99,12 @@ class MnliTextClassificationInput(ZeroShotTextClassificationInputBase):
default=None,
)
multi_class: Optional[bool] = Field(
description="True if class probabilities are independent, default False. "
"If provided, overrides the multi_class value in the config.",
description="Whether or not multiple candidate labels can be true. "
"If `False`, the scores are normalized as the softmax of entailment score. "
"If `True`, the labels are considered independent and probabilities are "
"normalized for each candidate by doing a softmax of the entailment score "
"vs. the contradiction score. Default is `False`. If provided, overrides "
"the multi_class value in the config.",
default=None,
)

Expand Down

0 comments on commit 7b088a8

Please sign in to comment.