generative_ai_with_langchain icon indicating copy to clipboard operation
generative_ai_with_langchain copied to clipboard

Hugging Face Transformers, code issue in Chapter 3

Open bdeva1975 opened this issue 10 months ago • 6 comments

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.

bdeva1975 avatar Apr 04 '24 02:04 bdeva1975