MK0727 commited on
Commit
f1635e5
·
verified ·
1 Parent(s): 134df9b

Upload lambda-160m pretrained model

Browse files
Files changed (1) hide show
  1. modeling_myllm.py +2 -1
modeling_myllm.py CHANGED
@@ -98,6 +98,7 @@ class MyLLMForCausalLM(PreTrainedModel, GenerationMixin):
98
  def forward(
99
  self,
100
  input_ids: torch.Tensor | None = None,
 
101
  labels: torch.Tensor | None = None,
102
  past_key_values: KeyValueCache | None = None,
103
  use_cache: bool | None = None,
@@ -108,7 +109,7 @@ class MyLLMForCausalLM(PreTrainedModel, GenerationMixin):
108
  # Accept the standard AutoModelForCausalLM argument names and
109
  # delegate the actual tensor computation to the PyTorch model.
110
  # ---------------------------------------------------------
111
- del kwargs
112
 
113
  if input_ids is None:
114
  raise ValueError("input_ids is required")
 
98
  def forward(
99
  self,
100
  input_ids: torch.Tensor | None = None,
101
+ attention_mask: torch.Tensor | None = None,
102
  labels: torch.Tensor | None = None,
103
  past_key_values: KeyValueCache | None = None,
104
  use_cache: bool | None = None,
 
109
  # Accept the standard AutoModelForCausalLM argument names and
110
  # delegate the actual tensor computation to the PyTorch model.
111
  # ---------------------------------------------------------
112
+ del attention_mask, kwargs
113
 
114
  if input_ids is None:
115
  raise ValueError("input_ids is required")