BUAADreamer commited on
Commit
c634e6c
1 Parent(s): a71d550

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -30,6 +30,7 @@ from transformers import AutoProcessor, AutoModelForVision2Seq, LlavaConfig
30
  import transformers
31
  from torch import nn
32
 
 
33
  class LlavaMultiModalProjectorYiVL(nn.Module):
34
  def __init__(self, config: "LlavaConfig"):
35
  super().__init__()
@@ -46,8 +47,7 @@ class LlavaMultiModalProjectorYiVL(nn.Module):
46
  hidden_states = self.linear_3(hidden_states)
47
  hidden_states = self.linear_4(hidden_states)
48
  return hidden_states
49
-
50
-
51
  transformers.models.llava.modeling_llava.LlavaMultiModalProjector = LlavaMultiModalProjectorYiVL
52
 
53
  model_id = "BUAADreamer/Yi-VL-34B-hf"
 
30
  import transformers
31
  from torch import nn
32
 
33
+
34
  class LlavaMultiModalProjectorYiVL(nn.Module):
35
  def __init__(self, config: "LlavaConfig"):
36
  super().__init__()
 
47
  hidden_states = self.linear_3(hidden_states)
48
  hidden_states = self.linear_4(hidden_states)
49
  return hidden_states
50
+ # Monkey patch of LlavaMultiModalProjector is mandatory
 
51
  transformers.models.llava.modeling_llava.LlavaMultiModalProjector = LlavaMultiModalProjectorYiVL
52
 
53
  model_id = "BUAADreamer/Yi-VL-34B-hf"