Update modeling_custom.py
Browse files- modeling_custom.py +3 -2
modeling_custom.py
CHANGED
@@ -87,8 +87,9 @@ class LlamaForRewardModelWithGating(LlamaPreTrainedModel):
|
|
87 |
def __init__(self, config):
|
88 |
config.torch_dtype = torch.bfloat16
|
89 |
super().__init__(config)
|
90 |
-
self.model = AutoModelForSequenceClassification.from_pretrained(
|
91 |
-
|
|
|
92 |
self.num_labels = config.num_labels
|
93 |
config_dict = config.to_dict()
|
94 |
self.num_objectives = config_dict.get("num_objectives", 19)
|
|
|
87 |
def __init__(self, config):
|
88 |
config.torch_dtype = torch.bfloat16
|
89 |
super().__init__(config)
|
90 |
+
#self.model = AutoModelForSequenceClassification.from_pretrained(
|
91 |
+
# "Skywork/Skywork-Reward-Llama-3.1-8B", num_labels=1, torch_dtype=torch.bfloat16, use_flash_attention_2=True).model
|
92 |
+
self.model = LlamaModel(config).to(torch.bfloat16)
|
93 |
self.num_labels = config.num_labels
|
94 |
config_dict = config.to_dict()
|
95 |
self.num_objectives = config_dict.get("num_objectives", 19)
|