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

i FIND IT DIFFICULT TO SET IT UP #3

Open
RasheedOlaleye opened this issue Jun 21, 2024 · 4 comments
Open

i FIND IT DIFFICULT TO SET IT UP #3

RasheedOlaleye opened this issue Jun 21, 2024 · 4 comments

Comments

@RasheedOlaleye
Copy link

No description provided.

Copy link

codeautopilot bot commented Jun 21, 2024

To help you set up the xLSTM project, I'll provide a step-by-step guide based on the information available in the codebase. This guide will cover the installation and setup process for both the C++ and Python components of the project.

Step 1: Prerequisites

Ensure you have the following prerequisites installed on your system:

  • CMake (version 3.10 or higher)
  • CUDA Toolkit (for GPU acceleration)
  • Python (version 3.6 or higher)
  • pip (Python package installer)

Step 2: Clone the Repository

If you haven't already, clone the xLSTM repository to your local machine:

git clone <repository_url>
cd xlstm

Step 3: Build the C++ Components

The project includes a shell script build.sh that automates the build process for the C++ components. Run the following command to build and install the xLSTM library:

./build.sh

This script will:

  • Configure the CMake build system.
  • Compile the C++ source files.
  • Link against the CUDA library.
  • Install the compiled library.

Step 4: Install Python Dependencies

Navigate to the python directory and install the required Python dependencies using pip:

cd python
pip install -r requirements.txt

Step 5: Build and Install the Python Package

Still in the python directory, build and install the xLSTM Python package:

python setup.py install

Step 6: Verify the Installation

To verify that the installation was successful, you can run one of the provided Python examples. For instance, to run the language model example:

python examples/example_llm.py

This script will:

  • Define an xLSTM-based language model.
  • Set hyperparameters.
  • Create data loaders.
  • Initialize the model.
  • Define the loss function and optimizer.
  • Implement the training loop.
  • Perform validation.
  • Save the trained model.

Additional Information

For more detailed information on the xLSTM architecture, usage examples, and contributing guidelines, refer to the README.md and OVERVIEW.md files.

Troubleshooting

If you encounter any issues during the setup process, consider the following:

  • Ensure all prerequisites are correctly installed.
  • Check for any error messages during the build process and address them accordingly.
  • Consult the README.md file for any additional setup instructions or requirements.

By following these steps, you should be able to set up the xLSTM project successfully. If you have any further questions or run into specific issues, feel free to ask!

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 0.00%

Have feedback or need help?
Discord
Documentation
[email protected]

@jabowery
Copy link

jabowery commented Jun 26, 2024

Sadly, whenever specifying "CUDA Toolkit" one must specify "cuda-toolkit". This is because there is something called "cudatoolkit" that silently poison's one's environment and people often confuse the two.

@jabowery
Copy link

(xLSTM) jabowery@jaboweryML:~/devel/xLSTM$ ./build.sh
-- Configuring done
CMake Error in CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "xlstm_cuda".

CMake Error in CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "xlstm_cuda".

@jabowery
Copy link

jabowery commented Jun 26, 2024

Addressing CUDA_ARCHITECTURES problem by altering build.sh to contain this cmake call:

(xLSTM) jabowery@jaboweryML:~/devel/xLSTM/cuda/build$ cmake .. -DUSE_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_BUILD_TYPE=Release
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    USE_CUDA


-- Build files have been written to: /home/jabowery/devel/xLSTM/cuda/build
(xLSTM) jabowery@jaboweryML:~/devel/xLSTM/cuda/build$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  Makefile
(xLSTM) jabowery@jaboweryML:~/devel/xLSTM/cuda/build$ make
[ 25%] Building CUDA object CMakeFiles/xlstm_cuda.dir/kernels/slstm_kernels.cu.o
/home/jabowery/devel/xLSTM/cuda/kernels/slstm_kernels.cu(111): error: identifier "b_i" is undefined
                             b_i[hidx]);
                             ^

/home/jabowery/devel/xLSTM/cuda/kernels/slstm_kernels.cu(114): error: identifier "b_f" is undefined
                             b_f[hidx]);
                             ^

/home/jabowery/devel/xLSTM/cuda/kernels/slstm_kernels.cu(117): error: identifier "b_z" is undefined
                          b_z[hidx]);
                          ^

/home/jabowery/devel/xLSTM/cuda/kernels/slstm_kernels.cu(120): error: identifier "b_o" is undefined
                             b_o[hidx]);
                             ^

4 errors detected in the compilation of "/home/jabowery/devel/xLSTM/cuda/kernels/slstm_kernels.cu".
make[2]: *** [CMakeFiles/xlstm_cuda.dir/build.make:77: CMakeFiles/xlstm_cuda.dir/kernels/slstm_kernels.cu.o] Error 2
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/xlstm_cuda.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

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

2 participants