python3 rec.
py --base_model 'Viet-Mistral/Vistral-7B-Chat' --data_path
'./data/books.json' --output_dir './checkpoint'
git clone
https://longcule123:[email protected]/Viet-
Mistral/Vistral-7B-Chat
wget https://longcule123:[email protected]/longcule123/vi_book_data/
resolve/main/shuffled_data_out.json
"torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 8.00 GiB. GPU 0
has a total capacity of 14.58 GiB of which 3.12 GiB is free. Including non-PyTorch
memory, this process has 11.45 GiB memory in use. Of the allocated memory 11.20 GiB
is allocated by PyTorch, and 144.70 MiB is reserved by PyTorch but unallocated. If
reserved but unallocated memory is large try setting
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See
documentation for Memory Management
(https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
0%| " lỗi gì đây
git clone
https://fubaoineverland:[email protected]/bkai-
foundation-models/vietnamese-llama2-7b-40GB
scp -r -oProxyCommand="ssh -W %h:%p [email protected]" LightGBM
[email protected]:/data2/Dang_DHCN/projects/longvv
#!/bin/bash
python src/cli_demo.py \
--model_name_or_path './vistral' \
--adapter_name_or_path './lora' \
--template default \
--finetuning_type lora
#!/bin/bash
CUDA_VISIBLE_DEVICES=0 python ../../src/train_bash.py \
--stage sft \
--do_train \
--model_name_or_path './vistral-model' \
--dataset ./data/books.json \
--dataset_dir ../../data \
--template default \
--finetuning_type lora \
--lora_target q_proj,v_proj \
--output_dir ../../saves/vistral/lora/sft \
--overwrite_cache \
--overwrite_output_dir \
--cutoff_len 1024 \
--per_device_train_batch_size 64 \
--per_device_eval_batch_size 64 \
--gradient_accumulation_steps 8 \
--lr_scheduler_type cosine \
--logging_steps 10 \
--save_steps 100 \
--eval_steps 100 \
--evaluation_strategy steps \
--load_best_model_at_end \
--learning_rate 5e-5 \
--num_train_epochs 3.0 \
--max_samples 3000 \
--val_size 0.1 \
--plot_loss \
--fp16
#!/bin/bash
#SBATCH --job-name=personReid # define job name
#SBATCH --nodes=1 # define node
#SBATCH --gpus-per-node=1 # define gpu limmit in 1 node
#SBATCH --ntasks=1 # define number tasks
#SBATCH --cpus-per-task=24 # There are 24 CPU cores
#SBATCH --time=2-00:00:00 # Max running time = 10 minutes
#SBATCH --output="slurm-result/slurm-%j-%x.out"
nvidia-smi
echo "-----------------------------"
echo "## Print Python and cuda"
# Load module
# Some module avail:
## pytorch-extra-py39-cuda11.2-gcc9
## tensorflow2-extra-py39-cuda11.2-gcc9
## horovod-pytorch-py39-cuda11.2-gcc9
## horovod-tensorflow2-py39-cuda11.2-gcc9
## xgboost-py39-cuda11.2-gcc9
## fastai2-py39-cuda11.2-gcc9
#module load pytorch-extra-py39-cuda11.2-gcc9
# ACTIVATE ANACONDA
eval "$(conda shell.bash hook)"
conda activate longfinetune
python3 --version
sh ./run.sh
echo "------------PIP LIST-----------"
python3 -m pip list
echo "-----------------------------"
echo "SLURM_GPUS_ON_NODE=$SLURM_GPUS_ON_NODE"
echo "SLURM_GPUS_PER_NODE=$SLURM_GPUS_PER_NODE"
echo "SLURM_JOB_GPUS=$SLURM_JOB_GPUS"
echo "-----------------------------"
echo "Exit worker node"
3f9b45f4a5bb49fcc71427dbbc7e5b196eccc685
aa4154856b62393aed6f02643db5db5b1912a361
8a03185bb147440aaba6458866728473c40e0aff
9f768cbe57d833c8de44b9d59bf6d0b3c2fa8f7e
"books_vi": {
"file_name": "books.json",
"file_sha1": "b258b9d8e5abdd17a075d2abcffa0512455c0b0e",
"ranking": true
}
python src/export_model.py \
--model_name_or_path './vistral-model' \
--adapter_name_or_path './saves/vistral/lora/sft' \
--template default \
--finetuning_type lora \
--export_dir './model-out' \
--export_size 2 \
--export_legacy_format False