# FinQwen

## tag: https://developer.hpccube.com/codes/modelzoo/finqwen_pytorch/-/tree/v1.0


| 序号  | batchsize | 类型 | 加速卡类型                          | 软件栈    | 计算类型 | 精度         | 性能                                                |
|-----|:---------:|------|--------------------------------|--------|------|--------------------|------------------------------------------------------------|
| 1   |     1     | 微调 | A800 * 4<br />(80G, 1512 MHz)  | cuda12.2 | fp16 | train_loss=0.23167 | train_runtime: 22962.5534, train_samples_per_second: 0.118 |
| 2   |     1     | 推理 | A800 * 4<br />(80G, 1512 MHz)  | cuda12.2 | fp16 | eval_loss=0.1089 | eval_runtime：257.4066, eval_samples_per_second:1.165|
| 3   |     1     | 微调 | K100 * 4<br />(64G, 1270Mhz)| dtk24.04 | fp16 | train_loss=0.2362 | train_runtime:53605.9178, train_samples_per_second: 0.05 |
| 4   |     1     | 推理 | K100 * 4<br />(64G, 1270Mhz) | dtk24.04 | fp16 | eval_loss=0.10986 | eval_runtime: 632.984, eval_samples_per_second:0.474 |




备注（选填，用于快速复现，主要是展示超参数）：

1,2,3,4： ds_zero3_work.sh
```
bash 
```

主要（默认）超参数:
deepspeed --master_port $(shuf -n 1 -i 10000-65535)  --include="localhost:0,1,2,3" /home/wanglch/projects/LLaMA-Factory/src/train_bash.py \
    --deepspeed /home/wanglch/projects/LLaMA-Factory/deepspeed.json \
    --stage sft \
    --do_train \
    --model_name_or_path /home/wanglch/projects/FinQwen/Tongyi-Finance-14B-Chat \
    --dataset fingpt_sentiment \
    --dataset_dir /home/wanglch/projects/LLaMA-Factory/data \
    --template qwen \
    --finetuning_type lora \
    --lora_target all \
    --output_dir /home/wanglch/projects/saves/Tongyi-Finance-14B-Chat/lora_multi_cuda/sft \
    --overwrite_output_dir \
    --cutoff_len 1024 \
    --preprocessing_num_workers 1 \
    --per_device_train_batch_size 1 \
    --per_device_eval_batch_size 1 \
    --gradient_accumulation_steps 1 \
    --lr_scheduler_type cosine \
    --logging_steps 10 \
    --warmup_steps 20 \
    --save_steps 100 \
    --eval_steps 10 \
    --evaluation_strategy steps \
    --load_best_model_at_end \
    --learning_rate 5e-5 \
    --num_train_epochs 1.0 \
    --max_samples 3000 \
    --val_size 0.1 \
    --ddp_timeout 180000000 \
    --plot_loss True \
    --fp16
```
