morpheushoc commited on
Commit
b46fae5
·
verified ·
1 Parent(s): 8a13ef0

Upload modeling_videochat2_cls.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. modeling_videochat2_cls.py +3 -0
modeling_videochat2_cls.py CHANGED
@@ -17,6 +17,7 @@ class InternVideo2_cls(InternVideo2_VideoChat2):
17
  self.model_config.llm.pretrained_llm_path,
18
  torch_dtype=torch.bfloat16,
19
  token=token,
 
20
  # attn_implementation="flash_attention_2",
21
  )
22
  self.lm = AutoModelForSequenceClassification.from_config(config)
@@ -88,6 +89,8 @@ class InternVideo2_cls(InternVideo2_VideoChat2):
88
  conversation += ("")
89
  return conversation
90
 
 
 
91
 
92
  if __name__ == "__main__":
93
 
 
17
  self.model_config.llm.pretrained_llm_path,
18
  torch_dtype=torch.bfloat16,
19
  token=token,
20
+ num_labels=self.model_config.llm.num_labels
21
  # attn_implementation="flash_attention_2",
22
  )
23
  self.lm = AutoModelForSequenceClassification.from_config(config)
 
89
  conversation += ("")
90
  return conversation
91
 
92
+ def test(self, x):
93
+ return x
94
 
95
  if __name__ == "__main__":
96