Modify the parameter passing of the text_generation_pipeline class (#355)

This commit is contained in:
mushenL
2023-07-04 18:42:09 +08:00
committed by GitHub
parent 423e2ce940
commit 95907aed31

View File

@@ -66,7 +66,8 @@ class TextGenerationPipeline(Pipeline, PipelineStreamingOutputMixin):
device=device,
auto_collate=auto_collate,
compile=kwargs.pop('compile', False),
compile_options=kwargs.pop('compile_options', {}))
compile_options=kwargs.pop('compile_options', {}),
**kwargs)
assert isinstance(self.model, Model), \
f'please check whether model config exists in {ModelFile.CONFIGURATION}'