From 022ac73065003df7b207401f6fac122c7a74e2d5 Mon Sep 17 00:00:00 2001 From: bofeng huang Date: Mon, 24 Apr 2023 09:59:32 +0200 Subject: [PATCH 1/3] Fix docstring --- src/setfit/modeling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setfit/modeling.py b/src/setfit/modeling.py index efdf4f09..89db2a4f 100644 --- a/src/setfit/modeling.py +++ b/src/setfit/modeling.py @@ -113,7 +113,7 @@ class SetFitHead(models.Dense): out_features (`int`, defaults to `2`): The number of targets. If set `out_features` to 1 for binary classification, it will be changed to 2 as 2-class classification. temperature (`float`, defaults to `1.0`): - A logits' scaling factor. Higher values makes the model less confident and higher values makes + A logits' scaling factor. Higher values make the model less confident and lower values make it more confident. eps (`float`, defaults to `1e-5`): A value for numerical stability when scaling logits. From 96d6cd1a0d8e5cddc176b32ea2ab608fc97202f8 Mon Sep 17 00:00:00 2001 From: bofeng huang Date: Mon, 24 Apr 2023 10:41:13 +0200 Subject: [PATCH 2/3] Fix docstring --- src/setfit/modeling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/setfit/modeling.py b/src/setfit/modeling.py index 89db2a4f..2d768260 100644 --- a/src/setfit/modeling.py +++ b/src/setfit/modeling.py @@ -176,8 +176,8 @@ def forward( make sure to store embeddings under the key: 'sentence_embedding' and the outputs will be under the key: 'prediction'. temperature (`float`, *optional*): - A logits' scaling factor. Higher values makes the model less - confident and higher values makes it more confident. + A logits' scaling factor. Higher values make the model less + confident and lower values makes it more confident. Will override the temperature given during initialization. Returns: [`Dict[str, torch.Tensor]` or `Tuple[torch.Tensor]`] From 21c6cf10c6c2f669f5e71a561a200b41b5c232da Mon Sep 17 00:00:00 2001 From: bofeng huang Date: Mon, 24 Apr 2023 10:42:02 +0200 Subject: [PATCH 3/3] Fix docstring --- src/setfit/modeling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setfit/modeling.py b/src/setfit/modeling.py index 2d768260..3eb36487 100644 --- a/src/setfit/modeling.py +++ b/src/setfit/modeling.py @@ -177,7 +177,7 @@ def forward( and the outputs will be under the key: 'prediction'. temperature (`float`, *optional*): A logits' scaling factor. Higher values make the model less - confident and lower values makes it more confident. + confident and lower values make it more confident. Will override the temperature given during initialization. Returns: [`Dict[str, torch.Tensor]` or `Tuple[torch.Tensor]`]