Got stuck while setting up for lab 2 of week 2. Didn’t see any issues with torch when doing the pip install but later on when loading the model, in referencing ‘torch.bfloat16’
original_model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
got this error -
NameError Traceback (most recent call last)
Cell In[11], line 3
1 model_name=‘google/flan-t5-base’
----> 3 original_model = AutoModelForSeq2SeqLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
4 tokenizer = AutoTokenizer.from_pretrained(model_name)
NameError: name ‘torch’ is not defined
How do I fix this?