Coder Social home page Coder Social logo

Running finetune_deepseekcoder.py results in return code = -9 and running script directly results in RuntimeError: 'weight' must be 2-D about deepseek-coder HOT 5 CLOSED

deepseek-ai avatar deepseek-ai commented on July 21, 2024
Running finetune_deepseekcoder.py results in return code = -9 and running script directly results in RuntimeError: 'weight' must be 2-D

from deepseek-coder.

Comments (5)

nstl-zyb avatar nstl-zyb commented on July 21, 2024

Using the sample deepspeed command。The same situation,kill process and return -9. How to fix.

from deepseek-coder.

DejianYang avatar DejianYang commented on July 21, 2024

请检查下你的package版本 以及是否有足够的内存。

from deepseek-coder.

hobpond avatar hobpond commented on July 21, 2024

Thanks for the quick response!

You are right. Looks like an OOM but not VRAM. All 170GB of system ram was used just before the python process died.
I changed pin_memory to false in configs/ds_config_zero3.json for both offload_optimizer and offload_param and that got it to start fine tuning. (I also chnaged the deepspeed param of --per_device_train_batch_size 1 instead of 16.)

    "zero_optimization": {
        "stage": 3,
        "offload_optimizer": {
            "device": "cpu",
            "pin_memory": false
        },
        "offload_param": {
            "device": "cpu",
            "pin_memory": false
        },
        ...

Not sure if I should tune sub_group_size as well but it is fine tuning now so will report back if a better config is found for a single A100 80GB.

Thanks again for the help!

from deepseek-coder.

hobpond avatar hobpond commented on July 21, 2024

Using nvidia-smi to monitor the VRAM, my per_device_train_batch_size was way too small.

from deepseek-coder.

A-Janj avatar A-Janj commented on July 21, 2024

Thanks for the quick response!

You are right. Looks like an OOM but not VRAM. All 170GB of system ram was used just before the python process died. I changed pin_memory to false in configs/ds_config_zero3.json for both offload_optimizer and offload_param and that got it to start fine tuning. (I also chnaged the deepspeed param of --per_device_train_batch_size 1 instead of 16.)

    "zero_optimization": {
        "stage": 3,
        "offload_optimizer": {
            "device": "cpu",
            "pin_memory": false
        },
        "offload_param": {
            "device": "cpu",
            "pin_memory": false
        },
        ...

Not sure if I should tune sub_group_size as well but it is fine tuning now so will report back if a better config is found for a single A100 80GB.

Thanks again for the help!

Hey! Can you tell me the minimum requirement (like GPU VRAM, System RAM, memory) for finetuning using the edits you made in config.json? Actually I am having the same -9 error. Have you found any better config.json?

from deepseek-coder.

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.