Create model.py
Browse files
model.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
3 |
+
|
4 |
+
class BathSalt1DaedalusPhi3Model(AutoModelForSeq2SeqLM):
|
5 |
+
def __init__(self, config):
|
6 |
+
super().__init__(config)
|
7 |
+
self.config = config
|
8 |
+
|
9 |
+
def forward(self, input_ids, attention_mask, labels):
|
10 |
+
outputs = self.model(input_ids, attention_mask=attention_mask, labels=labels)
|
11 |
+
return outputs
|