generative_ai_with_langchain
generative_ai_with_langchain copied to clipboard
Hugging Face Transformers, code issue in Chapter 3
I am working on Windows 11. After executing the code:-
from transformers import pipeline import torch
generate_text = pipeline( model="aisquared/dlite-v1-355m", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", framework="pt" ) generate_text("In this chapter, we'll discuss first steps with generative AI in Python.")
I am getting the error:-
TypeError: transformers.generation.utils.GenerationMixin.generate() got multiple values for keyword argument 'pad_token_id'
Please help.