paddlenlp/taskflow/text_generation.py
def _construct_model(self, model):
        """
        Construct the inference model for the predictor.
        """
        model_instance = GPTForGreedyGeneration.from_pretrained(
            self.model, max_predict_len=32)
        # Load the model parameter for the predict
        model_instance.eval()
        self._model = model_instance

        Construct the inference model for the predictor.
        
Construct the inference model for the predictor.
Construct the inference model for the predictor .
def _construct_model(self, model):
        model_instance = GPTForGreedyGeneration.from_pretrained(
            self.model, max_predict_len=32)
        model_instance.eval()
        self._model = model_instance
def _construct_model ( self , model ) : model_instance = GPTForGreedyGeneration . from_pretrained ( self . model , max_predict_len = 32 ) model_instance . eval ( ) self . _model = model_instance
Construct the inference model for the predictor.
Construct the inference model for the predictor .
"""
        Construct the inference model for the predictor.
        """ # Load the model parameter for the predict
self
model