Update modeling_iquestcoder.py
Browse files- modeling_iquestcoder.py +1 -6
modeling_iquestcoder.py
CHANGED
|
@@ -48,7 +48,6 @@ from transformers.modeling_rope_utils import ROPE_INIT_FUNCTIONS, dynamic_rope_u
|
|
| 48 |
from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
|
| 49 |
from transformers.processing_utils import Unpack
|
| 50 |
from transformers.utils import (
|
| 51 |
-
LossKwargs,
|
| 52 |
auto_docstring,
|
| 53 |
can_return_tuple,
|
| 54 |
is_torch_flex_attn_available,
|
|
@@ -705,10 +704,6 @@ class IQuestCoderModel(IQuestCoderPreTrainedModel):
|
|
| 705 |
# Model Heads
|
| 706 |
# =============================================================================
|
| 707 |
|
| 708 |
-
class KwargsForCausalLM(FlashAttentionKwargs, LossKwargs):
|
| 709 |
-
...
|
| 710 |
-
|
| 711 |
-
|
| 712 |
@auto_docstring
|
| 713 |
class IQuestCoderForCausalLM(IQuestCoderPreTrainedModel, GenerationMixin):
|
| 714 |
"""IQuestCoder Model with a language modeling head on top for causal LM."""
|
|
@@ -759,7 +754,7 @@ class IQuestCoderForCausalLM(IQuestCoderPreTrainedModel, GenerationMixin):
|
|
| 759 |
output_hidden_states: Optional[bool] = None,
|
| 760 |
cache_position: Optional[torch.LongTensor] = None,
|
| 761 |
logits_to_keep: Union[int, torch.Tensor] = 0,
|
| 762 |
-
**kwargs
|
| 763 |
) -> CausalLMOutputWithPast:
|
| 764 |
r"""
|
| 765 |
Args:
|
|
|
|
| 48 |
from transformers.modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
|
| 49 |
from transformers.processing_utils import Unpack
|
| 50 |
from transformers.utils import (
|
|
|
|
| 51 |
auto_docstring,
|
| 52 |
can_return_tuple,
|
| 53 |
is_torch_flex_attn_available,
|
|
|
|
| 704 |
# Model Heads
|
| 705 |
# =============================================================================
|
| 706 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 707 |
@auto_docstring
|
| 708 |
class IQuestCoderForCausalLM(IQuestCoderPreTrainedModel, GenerationMixin):
|
| 709 |
"""IQuestCoder Model with a language modeling head on top for causal LM."""
|
|
|
|
| 754 |
output_hidden_states: Optional[bool] = None,
|
| 755 |
cache_position: Optional[torch.LongTensor] = None,
|
| 756 |
logits_to_keep: Union[int, torch.Tensor] = 0,
|
| 757 |
+
**kwargs
|
| 758 |
) -> CausalLMOutputWithPast:
|
| 759 |
r"""
|
| 760 |
Args:
|