This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
modelscope
/
ModelScope
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
0
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
fix generate
master
hemu
3 years ago
parent
355da866c5
commit
876058556d
2 changed files
with
4 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-0
modelscope/models/nlp/gpt3/modeling_gpt3.py
+1
-2
requirements/nlp.txt
+ 3
- 0
modelscope/models/nlp/gpt3/modeling_gpt3.py
View File
@@ -346,3 +346,6 @@ class GPT3Model(PreTrainedModel):
}
model.load_state_dict(state_dict)
return model
def prepare_inputs_for_generation(self, input_ids, *args, **kwargs):
return {'input_ids': input_ids}
+ 1
- 2
requirements/nlp.txt
View File
@@ -14,5 +14,4 @@ spacy>=2.3.5
subword_nmt>=0.3.8
text2sql_lgesql
tokenizers
# recent 4.23.1 update introduce breaking api change, limit upper version temporarily.
transformers>=4.12.0,<=4.22.0
transformers
Write
Preview
Loading…
Cancel
Save