Skip to content

Commit

Permalink
fix qlora convert bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
HIT-cwh committed Sep 12, 2024
1 parent 081c8ca commit ee8f5c3
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 ee8f5c3

Please sign in to comment.