mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 20:49:37 +01:00
damo/nlp_seqgpt-560m pipeline bugfix (#511)
Co-authored-by: chengchen.cc <chengchen.cc@MacBook-Pro-7.local>
This commit is contained in:
@@ -445,9 +445,9 @@ class SeqGPTPipeline(Pipeline):
|
||||
# define the forward pass
|
||||
def forward(self, prompt: str, **forward_params) -> Dict[str, Any]:
|
||||
# gen & decode
|
||||
prompt += '[GEN]'
|
||||
# prompt += '[GEN]'
|
||||
input_ids = self.tokenizer(
|
||||
prompt,
|
||||
prompt + '[GEN]',
|
||||
return_tensors='pt',
|
||||
padding=True,
|
||||
truncation=True,
|
||||
|
||||
Reference in New Issue
Block a user