Code Monkey home page Code Monkey logo

Comments (11)

tloen avatar tloen commented on July 24, 2024 8

This code doesn't work on multi-GPU yet; I'm still running it on my single RTX 4090. Might adapt to multi-GPU in a bit to speed up training.

(Also please git pull if you haven't recently; I fixed a bug in the dataset generation code)

from alpaca-lora.

sooftware avatar sooftware commented on July 24, 2024 5

Just accelerate launch finetune.py.
It works.

from alpaca-lora.

tloen avatar tloen commented on July 24, 2024 2

The PEFT code needs to be adapted to make better use of accelerate. I think there are some examples of how to do it in the huggingface/peft repo but I can't test them as I don't have a multi-GPU setup myself.

from alpaca-lora.

janmaltel avatar janmaltel commented on July 24, 2024

Might adapt to multi-GPU in a bit to speed up training.
Could you point me to the reason why this is not working on multiple GPUs? I.e., which part is breaking it? The LoRA stuff or the 8-bit stuff? Something else? Thanks!

from alpaca-lora.

C00reNUT avatar C00reNUT commented on July 24, 2024

The PEFT code needs to be adapted to make better use of accelerate. I think there are some examples of how to do it in the huggingface/peft repo but I can't test them as I don't have a multi-GPU repo myself.

That would be neat. Kaggle already offers 2xT4 with 2x16GB RAM, which would be probably quite slow but probably enough to train 13B model.

from alpaca-lora.

huijiawu0 avatar huijiawu0 commented on July 24, 2024

this may work for you: https://discord.com/channels/1086739839761776660/1087706061022187641/1087944493564698674

This link seems to be a private link. What is it about?

from alpaca-lora.

LiuChen19960902 avatar LiuChen19960902 commented on July 24, 2024

I use the following command to run normally on multi-gpu
CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch finetune.py`
But actually only gpu 0 and 1 are used.
I don't know why

from alpaca-lora.

yayeoCddy avatar yayeoCddy commented on July 24, 2024

I use only one GPU, add some codes in beginning

gpu_list = [7]
gpu_list_str = ','.join(map(str, gpu_list))
os.environ.setdefault("CUDA_VISIBLE_DEVICES", gpu_list_str)
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

device assign the one GPU to torch

from alpaca-lora.

srogatch avatar srogatch commented on July 24, 2024

I use the following command to run normally on multi-gpu CUDA_VISIBLE_DEVICES=0,1,2,3 accelerate launch finetune.py` But actually only gpu 0 and 1 are used. I don't know why

Try to enable all the GPUs by running accelerate config

from alpaca-lora.

jpgard avatar jpgard commented on July 24, 2024

fwiw solution for me was to not use torchrun to launch the script. I was having an issue where single-GPU training worked fine, but with multi-GPU training after a single update step, the model would freeze -- gpu-util was at 100% but no more updates happened. Getting rid of torchrun and simply calling the python script solved it and seems to use DDP fine.

would be great to have more guidance on what kinds of setups work for launching multi-GPU jobs. would be happy to contribute information about my setup for that as well :)

from alpaca-lora.

scotgopal avatar scotgopal commented on July 24, 2024

fwiw solution for me was to not use torchrun to launch the script. I was having an issue where single-GPU training worked fine, but with multi-GPU training after a single update step, the model would freeze -- gpu-util was at 100% but no more updates happened. Getting rid of torchrun and simply calling the python script solved it and seems to use DDP fine.

would be great to have more guidance on what kinds of setups work for launching multi-GPU jobs. would be happy to contribute information about my setup for that as well :)

Are you able to do multi-GPU inferencing?

from alpaca-lora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.