Week1 - error with the notebook execution of model flanT5 module

Week1 - lab / I am unable to run the code with the loading of the Flan T5 model as it is gives me an error on the module not found error

model_name=‘google/flan-t5-base’

model = AutoModelForSeq2SeqLM. from_pretrained(model_name)

ModuleNotFoundError

return

importlib. import_module(“.” + module_name, self.

name

125
– > 126 return

Traceback (most recent call last)
File /opt/conda/lib/python3.11/site-packages/transformers/utils/import_utils.py:1126, in _LazyModule. get_module(self, module_name)
1125 try:
→ 1126
1127 except Exception as e:
I tried to update the kernel and run it again and then seemed to have another shorter error now.

NameError: name ‘AutoModelForSeq2SeqLM’ is not defined
Can anyone advise how to fix it?

Hi @konkothrajesh

This is mainly due to not running some of the above cells. Ensure that all necessary cells above have been run, and consider restarting the kernel if errors persist.

Hope it helps! Feel free to ask if you need further assistance.

1 Like