GithubHelp home page GithubHelp logo

IndexError: list index out of range - model_path = os.path.join("./model", os.listdir("model")[1]) - train_qlora.py", line 45 about db-gpt-hub HOT 6 CLOSED

eosphoros-ai avatar eosphoros-ai commented on May 19, 2024 1
IndexError: list index out of range - model_path = os.path.join("./model", os.listdir("model")[1]) - train_qlora.py", line 45

from db-gpt-hub.

Comments (6)

zhanghy-sketchzh avatar zhanghy-sketchzh commented on May 19, 2024 1

Yes, you can download large models after installing git lfs, this will increase your download speed and download success, for example you can download the vicuna-13b model with this command git clone https://huggingface.co/Tribbiani/vicuna-13b,"Tribbiani/vicuna-13b" is the address of the model in the hf.

This is because your model file could not be found, the path to each model file may be different, you can try changing the index, e.g. model_path = os.path.join(". /model", os.listdir("model")[0]), I know this approach may not be very smart, we may introduce env later to manage model integration.

This is because your model file could not be found, the path to each model file may be different, you can try changing the index, e.g. model_path = os.path.join(". /model", os.listdir("model")[0]), I know this approach may not be very smart, we may introduce env later to manage model integration.

@zhanghy-sketchzh Thanks, how do we copy models into model directory

Do i have to download this from huggingface

https://huggingface.co/tiiuae/falcon-7b/blob/main/pytorch_model-00002-of-00002.bin and put bin files in model folder ? my model folder is empty

Yes, you can download large models after installing git lfs, this will increase your download speed and download success, for example you can download the vicuna-13b model with this command git clone https://huggingface.co/Tribbiani/vicuna-13b,"Tribbiani/vicuna-13b" is the address of the model in the hf.

from db-gpt-hub.

zhanghy-sketchzh avatar zhanghy-sketchzh commented on May 19, 2024

This is because your model file could not be found, the path to each model file may be different, you can try changing the index, e.g. model_path = os.path.join(". /model", os.listdir("model")[0]), I know this approach may not be very smart, we may introduce env later to manage model integration.

from db-gpt-hub.

sardetushar avatar sardetushar commented on May 19, 2024

This is because your model file could not be found, the path to each model file may be different, you can try changing the index, e.g. model_path = os.path.join(". /model", os.listdir("model")[0]), I know this approach may not be very smart, we may introduce env later to manage model integration.

This is because your model file could not be found, the path to each model file may be different, you can try changing the index, e.g. model_path = os.path.join(". /model", os.listdir("model")[0]), I know this approach may not be very smart, we may introduce env later to manage model integration.

@zhanghy-sketchzh Thanks, how do we copy models into model directory

Do i have to download this from huggingface

https://huggingface.co/tiiuae/falcon-7b/blob/main/pytorch_model-00002-of-00002.bin and put bin files in model folder ? my model folder is empty

from db-gpt-hub.

sardetushar avatar sardetushar commented on May 19, 2024

Thanks I will try

from db-gpt-hub.

sardetushar avatar sardetushar commented on May 19, 2024

I got MemoryError @zhanghy-sketchzh and I am running it on CPU, I don't have GPU in my machine.
laptop RAM is 8 GB

Will this work on google colab ?

bin /home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so
/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
  warn("The installed version of bitsandbytes was compiled without GPU support. "
/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so: undefined symbol: cadam32bit_grad_fp32
CUDA SETUP: Loading binary /home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so...
loading base model ./model/pytorch_model-00001-of-00002.bin...
Traceback (most recent call last):
  File "/home/tushar/TextSQL/DB-GPT-Hub/src/train/train_qlora.py", line 831, in <module>
    train()
  File "/home/tushar/TextSQL/DB-GPT-Hub/src/train/train_qlora.py", line 667, in train
    model = get_accelerate_model(args, checkpoint_dir)
  File "/home/tushar/TextSQL/DB-GPT-Hub/src/train/train_qlora.py", line 276, in get_accelerate_model
    model = AutoModelForCausalLM.from_pretrained(
  File "/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 461, in from_pretrained
    config, kwargs = AutoConfig.from_pretrained(
  File "/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 986, in from_pretrained
    config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/transformers/configuration_utils.py", line 617, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/transformers/configuration_utils.py", line 702, in _get_config_dict
    config_dict = cls._dict_from_json_file(resolved_config_file)
  File "/home/tushar/anaconda3/envs/dbgpt_hub/lib/python3.10/site-packages/transformers/configuration_utils.py", line 793, in _dict_from_json_file
    text = reader.read()
MemoryError
./scripts/spider_qlora_finetune.sh: 11: --source_max_len: not found

from db-gpt-hub.

zhanghy-sketchzh avatar zhanghy-sketchzh commented on May 19, 2024

This project requires a GPU and can work on google colab

from db-gpt-hub.

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.