def METHOD_NAME(self, data, tokenizer):
    """
    Predicts the data labels.
    Args:
        data (obj:`List(str)`): The batch data whose each element is a raw text.
        tokenizer(obj:`PretrainedTokenizer`): This tokenizer inherits from :class:`~paddlenlp.transformers.PretrainedTokenizer`
            which contains most of the methods. Users should refer to the superclass for more information regarding methods.
    Returns:
        results(obj:`dict`): All the predictions labels.
    """
    batchify_fn = lambda samples, fn=Tuple(
        Pad(axis=0, pad_val=tokenizer.pad_token_id, dtype="int64"),  # input
        Pad(axis=0, pad_val=tokenizer.pad_token_type_id, dtype="int64"),  # segment
    ): fn(samples)
    all_embeddings = []
    examples = []
    for idx, text in enumerate(tqdm(data)):
        input_ids, segment_ids = convert_example(
            text, tokenizer, max_seq_length=self.max_seq_length, pad_to_max_seq_len=True
        )
        examples.append((input_ids, segment_ids))
        if len(examples) > self.batch_size:
            input_ids, segment_ids = batchify_fn(examples)
            self.input_handles[0].copy_from_cpu(input_ids)
            self.input_handles[1].copy_from_cpu(segment_ids)
            self.predictor.run()
            logits = self.output_handle.copy_to_cpu()
            all_embeddings.append(logits)
            examples = []
    if len(examples) > 0:
        input_ids, segment_ids = batchify_fn(examples)
        self.input_handles[0].copy_from_cpu(input_ids)
        self.input_handles[1].copy_from_cpu(segment_ids)
        self.predictor.run()
        logits = self.output_handle.copy_to_cpu()
        all_embeddings.append(logits)
    all_embeddings = np.concatenate(all_embeddings, axis=0)
    np.save("corpus_embedding", all_embeddings)