xiaohua828
commited on
Commit
·
14333a0
1
Parent(s):
ae8f900
Update modeling_glm.py
Browse files- modeling_glm.py +2 -11
modeling_glm.py
CHANGED
@@ -22,14 +22,5 @@ class CounterModel(PreTrainedModel):
|
|
22 |
x = self.weight * x + self.bias
|
23 |
logits = self.linear(x)
|
24 |
return logits
|
25 |
-
|
26 |
-
|
27 |
-
# import configuration_glm
|
28 |
-
# glmconfig = configuration_glm.GLMConfig()
|
29 |
-
from transformers import PretrainedConfig
|
30 |
-
glm_config = PretrainedConfig.from_json_file("./config.json")
|
31 |
-
glm_model = CounterModel(glm_config)
|
32 |
-
|
33 |
-
|
34 |
-
import login
|
35 |
-
glm_model.push_to_hub(login.name_or_path)
|
|
|
22 |
x = self.weight * x + self.bias
|
23 |
logits = self.linear(x)
|
24 |
return logits
|
25 |
+
def add(self):
|
26 |
+
return self.weight + self.bias
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|