Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Qwen-VL_pytorch
Commits
79b14775
Commit
79b14775
authored
Jun 04, 2024
by
wanglch
Browse files
Upload New File
parent
972d2858
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
finetune/finetune_qlora_single.sh
finetune/finetune_qlora_single.sh
+39
-0
No files found.
finetune/finetune_qlora_single.sh
0 → 100644
View file @
79b14775
#!/bin/bash
export
CUDA_DEVICE_MAX_CONNECTIONS
=
1
DIR
=
`
pwd
`
MODEL
=
"Qwen/Qwen-VL-Chat-Int4"
# Qwen/Qwen-VL-Chat-Int4 Set the path if you do not want to load from huggingface directly
# ATTENTION: specify the path to your training data, which should be a json file consisting of a list of conversations.
# See the section for finetuning in README for more information.
DATA
=
"path_to_data"
export
CUDA_VISIBLE_DEVICES
=
0
# Remember to use --fp16 instead of --bf16 due to autogptq
python finetune.py
\
--model_name_or_path
$MODEL
\
--data_path
$DATA
\
--fp16
True
\
--fix_vit
True
\
--output_dir
output_qwen
\
--num_train_epochs
5
\
--per_device_train_batch_size
1
\
--per_device_eval_batch_size
1
\
--gradient_accumulation_steps
8
\
--evaluation_strategy
"no"
\
--save_strategy
"steps"
\
--save_steps
1000
\
--save_total_limit
10
\
--learning_rate
1e-5
\
--weight_decay
0.1
\
--adam_beta2
0.95
\
--warmup_ratio
0.01
\
--lr_scheduler_type
"cosine"
\
--logging_steps
1
\
--report_to
"none"
\
--model_max_length
2048
\
--lazy_preprocess
True
\
--gradient_checkpointing
\
--use_lora
\
--q_lora
\
--deepspeed
finetune/ds_config_zero2.json
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment