Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
wushuo1 committed Mar 10, 2025
1 parent 410e1e5 commit e07f9f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lightllm/server/core/objs/sampling_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

_SAMPLING_EPS = 1e-5
DEFAULT_INPUT_PENALTY = os.getenv("INPUT_PENALTY", "False").upper() in ["ON", "TRUE", "1"]
SKIP_SPECIAL_TOKENS = os.getenv("SKIP_SPECIAL_TOKENS", "True").upper() in ["ON", "TRUE", "1"]

# 从环境变量获取最大长度限制
STOP_SEQUENCE_MAX_LENGTH = int(os.getenv("LIGHTLLM_STOP_SEQUENCE_MAX_LENGTH", 256))
Expand Down Expand Up @@ -299,10 +300,8 @@ def init(self, tokenizer, **kwargs):
self.group_request_id = kwargs.get("group_request_id", -1)
self.suggested_dp_index = kwargs.get("suggested_dp_index", -1)

self.skip_special_tokens = kwargs.get("skip_special_tokens", True)
SKIP_SPECIAL_TOKENS = os.environ.get("SKIP_SPECIAL_TOKENS", True)
self.skip_special_tokens = SKIP_SPECIAL_TOKENS

self.skip_special_tokens = kwargs.get("skip_special_tokens", SKIP_SPECIAL_TOKENS)

self.add_special_tokens = kwargs.get("add_special_tokens", True)
self.add_spaces_between_special_tokens = kwargs.get("add_spaces_between_special_tokens", True)
self.print_eos_token = kwargs.get("print_eos_token", False)
Expand Down

0 comments on commit e07f9f6

Please sign in to comment.