Skip to content

Commit

Permalink
Update engine.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangjiajun authored Oct 12, 2023
1 parent 986b233 commit 9fa04c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llm/fastdeploy_llm/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _init_predictor(self):
dist_config.enable_dist_model(True)
parent_dir = os.path.abspath(os.path.join(self.model_dir, ".."))
mapping_file = os.path.join(parent_dir, "rank_mapping.csv")
if not os.path.exists(mapping_file):
if self.mp_degree > 1 and not os.path.exists(mapping_file):
raise Exception("There's no file {}.".format(mapping_file))
dist_config.set_comm_init_config(mapping_file)
config.set_dist_config(dist_config)
Expand Down

0 comments on commit 9fa04c3

Please sign in to comment.