Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber-pioneer committed Mar 5, 2024
1 parent 2d53e06 commit 5d90acd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llm/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import paddle
import paddle.distributed.fleet.base.topology as tp
import paddle.incubate.multiprocessing as mp
from paddle.base.framework import in_pir_executor_mode
from paddle.distributed import fleet
from utils import (
dybatch_preprocess,
Expand Down Expand Up @@ -360,7 +361,8 @@ def __init__(self, config: PredictorArgument, tokenizer: PretrainedTokenizer = N
inference_config.disable_gpu()
inference_config.disable_glog_info()
inference_config.enable_new_executor()
inference_config.enable_new_ir()
if in_pir_executor_mode():
inference_config.enable_new_ir()

with static_mode_guard():
self.predictor = paddle.inference.create_predictor(inference_config)
Expand Down

0 comments on commit 5d90acd

Please sign in to comment.