@@ -82,7 +82,7 @@ def test_inference_no_head(self):
82
82
Test inference
83
83
"""
84
84
model = OPTModel .from_pretrained (
85
- "facebook/ opt-350m" , from_pt = True , return_dict = True
85
+ "opt-350m" , from_pt = False , return_dict = True
86
86
)
87
87
input_ids = Tensor (
88
88
[[0 , 31414 , 232 , 328 , 740 , 1140 , 12695 , 69 , 46078 , 1588 , 2 ]],
@@ -116,21 +116,21 @@ def setUp(self):
116
116
Set up.
117
117
"""
118
118
super ().setUp ()
119
- self .path_model = "facebook/ opt-350m"
119
+ self .path_model = "opt-350m"
120
120
121
121
@pytest .mark .download
122
122
def test_load_model (self ):
123
123
r"""
124
124
Test load model
125
125
"""
126
- _ = OPTForCausalLM .from_pretrained (self .path_model , from_pt = True )
126
+ _ = OPTForCausalLM .from_pretrained (self .path_model , from_pt = False )
127
127
128
128
@pytest .mark .download
129
129
def test_logits (self ):
130
130
r"""
131
131
Test logits
132
132
"""
133
- model = OPTForCausalLM .from_pretrained (self .path_model , from_pt = True )
133
+ model = OPTForCausalLM .from_pretrained (self .path_model , from_pt = False )
134
134
model = model .set_train (False )
135
135
tokenizer = OPTTokenizer .from_pretrained (self .path_model )
136
136
@@ -221,7 +221,7 @@ def test_generation_pre_attn_layer_norm(self):
221
221
r"""
222
222
Test Generation
223
223
"""
224
- model_id = "facebook/ opt-350m"
224
+ model_id = "opt-350m"
225
225
226
226
EXPECTED_OUTPUTS = [
227
227
"Today is a beautiful day and I want to" ,
@@ -251,7 +251,7 @@ def test_batch_generation(self):
251
251
r"""
252
252
Test batch generation
253
253
"""
254
- model_id = "facebook/ opt-350m"
254
+ model_id = "opt-350m"
255
255
256
256
tokenizer = OPTTokenizer .from_pretrained (model_id )
257
257
model = OPTForCausalLM .from_pretrained (model_id )
@@ -301,7 +301,7 @@ def test_generation_post_attn_layer_norm(self):
301
301
r"""
302
302
Test generation
303
303
"""
304
- model_id = "facebook/ opt-350m"
304
+ model_id = "opt-350m"
305
305
306
306
EXPECTED_OUTPUTS = [
307
307
"Today is a beautiful day and I want to" ,
0 commit comments