Views
No views yet
# We need the newest version so clone from github
git clone https://github.com/huggingface/transformers/
git clone https://github.com/huggingface/peft
git clone https://github.com/InternLM/xtunerpip install -e ./xtuner[deepspeed]
apt install git-lfscommand error: 'libGL.so.1: cannot open shared object file: No such file or directory'!# For Ubuntu
sudo apt-get update
sudo apt-get install libgl1-mesa-glx
# For CentOS and Fedora
sudo yum install mesa-libGLError: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.ImportError:
InternLM2Converter requires the protobuf library but it was not found in your environment. Checkout the instructions on thepip install protobufpip install future tensorboard map_num_proc in xtuner/xtuner/dataset
/huggingface.pydef process(dataset,
do_dataset_tokenization=True,
tokenizer=None,
max_length=None,
dataset_map_fn=None,
template_map_fn=None,
max_dataset_length=None,
split='train',
remove_unused_columns=False,
rename_maps=[],
shuffle_before_pack=True,
pack_to_max_length=True,
use_varlen_attn=False,
input_ids_with_output=True,
with_image_token=False,
map_num_proc=32): # modify it to a smaller number, e.g., 4# . means the llava-clip-internlm2-1_8b-pretrain-v1 folder you clone
./data/llava_data
├── LLaVA-Pretrain
├── blip_laion_cc_sbu_558k.json
├── blip_laion_cc_sbu_558k_meta.json
└── images
1# Make sure you have git-lfs installed (https://git-lfs.com)
2git lfs install
3git clone https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain --depth=1# single GPU
xtuner train ./pretrain.py --deepspeed deepspeed_zero2
# multiple GPU
NPROC_PER_NODE=4 xtuner train ./pretrain.py --deepspeed deepspeed_zero2
