Skip to content

Commit

Permalink
add model inform
Browse files Browse the repository at this point in the history
  • Loading branch information
Mghao committed Dec 9, 2024
1 parent 2819480 commit e8d6439
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rewardbench/models/inform.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import List, Optional, Union

from typing import List, Optional
import torch
import torch.nn as nn
from transformers import LlamaPreTrainedModel,LlamaConfig, LlamaModel
from transformers import LlamaPreTrainedModel, LlamaModel
from transformers.modeling_outputs import SequenceClassifierOutputWithPast

class INFORMForSequenceClassification(LlamaPreTrainedModel):
Expand All @@ -33,7 +32,6 @@ def __init__(self, config):
# Initialize weights and apply final processing
self.post_init()


def forward(
self,
input_ids: Optional[torch.LongTensor] = None,
Expand Down Expand Up @@ -85,4 +83,5 @@ def forward(
past_key_values=transformer_outputs.past_key_values,
hidden_states=transformer_outputs.hidden_states,
attentions=transformer_outputs.attentions,
)
)

0 comments on commit e8d6439

Please sign in to comment.