def _generate(self, prepared_inputs: Dict[str, Any]) -> str:
        """
        Generates text based on prepared inputs. The text is decoded from token IDs generated by the model.
        """
        generate_ids = self._model.generate(
            **prepared_inputs,
            eos_token_id=self._processor.tokenizer.eos_token_id,
            max_new_tokens=self.max_new_tokens,
            temperature=self.temperature,
            do_sample=False,
        )
        generate_ids = generate_ids[:, prepared_inputs["input_ids"].shape[1] :]
        return self._processor.batch_decode(
            generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
        )[0]

        Generates text based on prepared inputs. The text is decoded from token IDs generated by the model.
        
llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-huggingface/llama_index/multi_modal_llms/huggingface/base.py