Error running https://builds.modular.com/builds/llama3/python example
Hi I am trying out one of the examples per https://builds.modular.com/builds/llama3/python. I followed all the instructions on the page and in addition after CD ing into the pipelines/python folder I ran the "magic shell" to activate the environment. However I am stuck with the following error:
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
...
ValueError: cannot reshape array of size 12679776 into shape (4096,11760)
MAX Builds
A showcase of how to solve common AI problems, including LLMs, GenAI, vision, recommenders and more in the most performant way possible using the power of Mojo and Max.
3 Replies
Please file and issue here and fill in the details https://github.com/modularml/max/issues
GitHub
Issues · modularml/max
A collection of sample programs, notebooks, and tools which highlight the power of the MAX Platform - Issues · modularml/max
Ehsan, these Build posts (llama2, llama3, replit) all have instructions based on old (global) instructions. Currently, they say to install max, git clone, then run python. No mention of project creation, no mention of entering changing directory into the project, no mention of adding pytorch or any other requirements. Then, they ask the user to run
python3 pipelines.py llama3 --prompt "I believe the meaning of life is"
Imo, they all need to be rewritten. The replit
example has pip install numpy transformers
as one of the needed commands. The llama2
leads with the punchline magic run llama2 --prompt "I believe the meaning of life is"
yet no amount of following the installation instructions before or after will result in that working. Whereas the llama3
example puts the punchline at the end, unfortunately the punchline is python3 pipelines.py llama3 --prompt "I believe the meaning of life is"
resulting in the OP's error. This is only because a project was created and shell invoked by me - both instructions not on the page.
You have seen the gh issue though additional issue are the incorrect instructions.Yes, thanks! We're aware. We'll revamp max build in a new project.