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 b7a65ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llm/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@

import numpy as np
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 +362,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 b7a65ab

Please sign in to comment.