From 6f7d750b73f201ed85e1cb1f1271d2ec58383f07 Mon Sep 17 00:00:00 2001 From: Muhammad Naufil Date: Tue, 24 Sep 2024 17:27:57 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20docstring=20for=20cohere=20model=20rega?= =?UTF-8?q?rding=20unavailability=20of=20prune=5Fhe=E2=80=A6=20(#33253)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed docstring for cohere model regarding unavailability of prune_head() methods The docstring mentions that cohere model supports prune_heads() methods. I have fixed the docstring by explicitly mentioning that it doesn't support that functionality. * Update src/transformers/models/cohere/modeling_cohere.py --------- Co-authored-by: Lysandre Debut --- src/transformers/models/cohere/modeling_cohere.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/transformers/models/cohere/modeling_cohere.py b/src/transformers/models/cohere/modeling_cohere.py index 12586af23f0..d5effba3876 100644 --- a/src/transformers/models/cohere/modeling_cohere.py +++ b/src/transformers/models/cohere/modeling_cohere.py @@ -725,8 +725,7 @@ class CohereDecoderLayer(nn.Module): COHERE_START_DOCSTRING = r""" This model inherits from [`PreTrainedModel`]. Check the superclass documentation for the generic methods the - library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads - etc.) + library implements for all its model (such as downloading or saving, resizing the input embeddings etc.). This model is also a PyTorch [torch.nn.Module](https://pytorch.org/docs/stable/nn.html#torch.nn.Module) subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage