I need to to run a series of pre-trained fine-tuned models from Hugging Face to Jupyter notebook. I have updated to the latest version of both PyTorch and Transformers, but when I run the code
from transformers import pipeline
pipe = pipeline("text-generation", model="abeja/ABEJA-QwQ32b-Reasoning-Japanese-v1.0")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages)
Instead of transformers loading the model I get a long error message ending in:
"ModuleNotFoundError: Could not import module 'pipeline'. Are this object's requirements defined correctly?"
I have tried uninstalling and re-installing PyTorch and Transformers, and running the command as from transformers import AutoTokenizer, AutoModelForCausalLM instead, but nothing's worked so far. The kernel path is currently /Users/Library/Jupyter/kernels/python3. The only other thing that I can think of as significant is it's being run off a Mac Mini M4...I can't see how the hardware would be an issue but have heard people say there can be problems running LLMs on a Mac Mini...
trasformers.pyor foldertransformersand it tries to load from this file/folder instead of moduletransformers.import pipelineinstead offrom transformers import pipeline