Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L LLaMA-Factory-Llama3.2_pytorch
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ModelZoo
  • LLaMA-Factory-Llama3.2_pytorch
  • Issues
  • #1

Closed
Open
Created Nov 08, 2024 by yuanfei@yuanfei

多卡微调Qwen72B

家好我遇到一个问题,我在使用四卡海光K100想要lora微调Qwen2.5 72B模型,使用到的是社区gitlab提供的llama-factory框架。我在加载模型的时候,四张卡的显存占用迅速同步上涨,在加载第17个safetensors开始OOM。请问是哪里存在问题?请大家不吝赐教,感谢 image image image image 我的指令如下:

#!/bin/bash
source activate llama_factory
CUDA_VISIBLE_DEVICES=0,1,2,3 llamafactory-cli train
--stage sft
--do_train
--model_name_or_path /root/private_data/my/multimodal/qwen_72B
--dataset alpaca_zh_demo
--dataset_dir ./data
--template qwen
--finetuning_type lora
--output_dir ./saves/qwen_72/lora/sft_2_gpu
--overwrite_cache
--overwrite_output_dir
--cutoff_len 1024
--preprocessing_num_workers 16
--per_device_train_batch_size 2
--per_device_eval_batch_size 1
--gradient_accumulation_steps 8
--lr_scheduler_type cosine
--logging_steps 50
--warmup_steps 20
--save_steps 100
--eval_steps 50
--evaluation_strategy steps
--load_best_model_at_end
--learning_rate 5e-5
--num_train_epochs 5.0
--max_samples 1000
--val_size 0.1
--plot_loss
--fp16
Assignee
Assign to
Time tracking