Skip to content

Commit

Permalink
[Bugs] fix qlora convert bugs (#930)
Browse files Browse the repository at this point in the history
fix qlora convert bugs
  • Loading branch information
HIT-cwh authored Sep 29, 2024
1 parent 081c8ca commit 4a1b201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xtuner/tools/model_converters/pth_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def main():
if 'Reward' in model_name:
use_meta_init = False
cfg.model.llm.pop('quantization_config', None)
if hasattr(cfg.model.llm, 'quantization_config'):
# Can not build a qlora model on meta device
use_meta_init = False

if use_meta_init:
try:
Expand Down

0 comments on commit 4a1b201

Please sign in to comment.