Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[User] Dependency Installation steps for ubuntu linux #1146

Closed
4 tasks done
TheNotary opened this issue Apr 23, 2023 · 10 comments
Closed
4 tasks done

[User] Dependency Installation steps for ubuntu linux #1146

TheNotary opened this issue Apr 23, 2023 · 10 comments

Comments

@TheNotary
Copy link

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Expected Behavior

When following the provided documentation, I expect to be able to successfully set up and use the software, with clear and complete instructions guiding me through each step of the process. This includes:

  1. Instructions for installing any dependencies and prerequisites.
  2. A step-by-step guide for configuring the software, including any necessary configuration files, environment variables, or command-line options.
  3. Clear and concise examples of how to use the software, demonstrating its main features and functionalities.
  4. Troubleshooting tips or common issues that users may encounter during the setup and usage process, along with their corresponding solutions.
  5. Reference to a comprehensive API documentation, if applicable, to allow for customization and integration with other projects.
    By following the documentation, I should be able to achieve the desired results and utilize the software as intended by the developers.

Current Behavior

When attempting to follow the provided documentation, I am unable to successfully set up and use the software due to several gaps and inconsistencies in the instructions. The current issues I am facing missing information on installing dependencies and prerequisites, making it difficult to determine which versions or packages are required for the software to function correctly.

Environment and Context

OS: Ubuntu 20.04 (running on Windows 11 through WSL2)

Current Efforts on reconstructing dependency installation steps

sudo apt-get install make cmake build-essentials python3 pip

make clean
make
python3 -m pip install -r requirements.txt

cd ..
git clone https://huggingface.co/chavinlo/gpt4-x-alpaca
@CRD716
Copy link
Contributor

CRD716 commented Apr 24, 2023

What errors are you getting when you try to build?

@TheNotary
Copy link
Author

Error Message

When attempting to build the project by following the instructions provided in the documentation, I encountered the following error:

bash: make: command not found

This error indicates that the make command is not installed on my system, even though it is required to build the project as per the instructions. The documentation did not mention the need to install make or provide any guidance on how to do so.

@CRD716
Copy link
Contributor

CRD716 commented Apr 24, 2023

sudo apt install make

Honestly, if you don't know how to install something in Linux, I would suggest just using cmake on windows or downloading a pre-compiled build for windows.

@TheNotary
Copy link
Author

Thank you for your suggestion. I understand that using cmake on Windows or downloading a pre-compiled build for Windows could be a potential workaround for my current issue. However, as a user following the project documentation, I expect the instructions to be complete and accurate for the target platform, which in this case is Ubuntu.

Since the project documentation specifically targets Ubuntu users and provides CLI commands for dependency installation, it would be helpful to include the necessary steps for installing make or any other required tools on Ubuntu as well. This will allow users to have a seamless experience when setting up and using the software, regardless of their familiarity with installing software on Linux.

For those who might be interested in using the software on Windows directly, it would be a great addition to the documentation to include instructions on how to build the project with cmake on Windows, or to provide a link to pre-compiled builds for Windows users.

@SlyEcho
Copy link
Collaborator

SlyEcho commented Apr 24, 2023

You can see the build commands for Ubuntu in full.Dockerfile

Just one package is needed, build-essential for building the project executables, it includes make and gcc.

For the Python script there are also python3 and python3-pip which have their own commands which are in requirements.txt, and those are actually two pip packages: numpy and sentencepiece

@TheNotary
Copy link
Author

Thanks @SlyEcho, I'll spare you the output from GPT, needless to say it's pretty convinced the information should be included in the readme, though perhaps it's better to just post a link to that Dockerfile. I worked in a lot of shops, but have never seen that specific docker location used before and assumed there wasn't any infra-code available outside the readme file.

I believe there's also the issue of describing the model weights setup. I didn't realize what this section's header was talking about, but after looking closer (and researching elsewhere) I see the significance. I think it's worth clarifying that and moving it up in the readme to where those files are first referenced would help people make sense of the project better and what's needed to get it working.

Setup the 7b model weights

To make use of this system, you must install the Alpaca 7b model weights into the models folder. Because these weights belong to Facebook, the official path to obtaining the weights should be followed. While it's true that most researchers using the Alpaca weights obtained them from a magnet link to a torrent file, linking or sharing that magnet link should not be done in this repo due to the questionability of violating FaceBook's IP rights and also (not to be an alarmist here) the potential for these weights to cause harm.

@yukiteruamano
Copy link
Contributor

No need to be rude, you have been answered and the answer is correct @TheNotary

For more info, I have been able to successfully install Dalai Llama both on Docker and without Docker following the procedure described (on Debian) without problems.

Alpaca and Llama weights are downloaded as indicated in the documentation.

@syl-00110111
Copy link

i add "git-lfs" package for the downloading of models; it's needed to make git manage large files

@SlyEcho
Copy link
Collaborator

SlyEcho commented Apr 25, 2023

@syl-00110111 yes, it's very easy to clone HF data with git-lfs. However do note that it stores a second copy of the data in the .git directory which can be a significant waste of space with the sizes of files these models have.
Something like this can also be used:

curl.exe -C - -O -L 'https://huggingface.co/chavinlo/gpt4-x-alpaca/resolve/main/pytorch_model-[00001-00006]-of-00006.bin'

(Yes, Windows has curl.exe now)

@TheNotary
Copy link
Author

TheNotary commented Apr 25, 2023

That's great advice, thanks for sharing that practice, Sly.

Regarding the rude behavior, I'm sure it's well intentioned but it's easy for confusion to seep into all this GH issues stuff. Your feelings are important to me.

No need to be rude, you have been answered and the answer is correct @TheNotary

For more info, I have been able to successfully install Dalai Llama both on Docker and without Docker following the procedure described (on Debian) without problems.

Alpaca and Llama weights are downloaded as indicated in the documentation.

I apologize if my previous responses seemed to deviate from the main purpose of this issue. My intention is to help improve the README documentation to make it easier for future users to set up and use the project.

Based on the information provided, it seems that you have been able to successfully install and use the project on your system. That's great to hear! However, the current documentation might still benefit from some additional details to ensure a smooth experience for all users, especially those who may not be as familiar with the installation process on Linux.

To address this issue constructively,

I'm willing to lend time towards reflowing the getting started aspect of the readme in a PR from the perspective of a fresh consumer. If you'd like any direct support there please let me know and thanks for sharing this code @ggerganov, it's pretty amazing stuff 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants