code: def test_batch_generation_padd(self):
      path_560m = "bigscience/bloom-560m"
      model = BloomForCausalLM.from_pretrained(
          path_560m, use_cache=True, revision="gs555750"
      ).cuda()
      model = model.eval()
      tokenizer = BloomTokenizerFast.from_pretrained(
          path_560m, padding_side="left"
      )
  
      input_sentence = [
          "I enjoy walking with my cute dog",
          "Hello my name is",
      ]
      input_sentence_without_pad = "Hello my name is"
  
      input_ids = tokenizer.batch_encode_plus(
          input_sentence, return_tensors="pt", padding=True
      )
      input_ids_without_pad = tokenizer.encode(
          input_sentence_without_pad, return_tensors="pt"
      )
  
      greedy_output = model.generate(
          input_ids["input_ids"].cuda(),
          attention_mask=input_ids["attention_mask"],
          max_length=50,
          do_sample=False,
      )
      greedy_output_without_pad = model.generate(
          input_ids_without_pad.cuda(), max_length=50, do_sample=False
      )
  
      # test token values
      self.assertEqual(
          greedy_output[-1, 3:].tolist(),
          greedy_output_without_pad[0, :-3].tolist(),
      )
  
      # test reconstructions
      self.assertEqual(
          tokenizer.decode(
              greedy_output[-1, 3:], skip_special_tokens=True
          ),
          tokenizer.decode(
              greedy_output_without_pad[0, :-3],
              skip_special_tokens=True,
          ),
      )
  
imports: import math
  import unittest
  from transformers import BloomConfig, is_torch_available
  from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device
  from ...generation.test_generation_utils import GenerationTesterMixin
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
label_desc: Use image node_id 15 for calling the BloomModelTest obj's underlying member method code with example usage: obj.test_batch_generation_padd() without return types