Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hiworldwzj authored Sep 4, 2024
1 parent 9323669 commit ec45729
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
13 changes: 0 additions & 13 deletions format_out/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,6 @@ def gen_number_v2(self, max_new_tokens=None, prefix_regex=None):
retry_count=self.default_retry_count,
)

def gen_number_v2(self, max_new_tokens=None, prefix_regex=None):
"""
包含分数的支持
"""
if max_new_tokens is None:
max_new_tokens = 100
return self.generate(
r"-?(\d+(\.\d+)?|\d+/\d+|\d+/\d+\.\d+)",
max_new_tokens=max_new_tokens,
prefix_regex=prefix_regex,
retry_count=self.default_retry_count,
)

def gen_json_object(self, obj: BaseModel, max_new_tokens=512, prefix_regex=None, whitespace_pattern=r"[\s]{0,12}"):
json_schema = obj.model_json_schema()
regex_str = build_regex_from_schema(json.dumps(json_schema), whitespace_pattern=whitespace_pattern)
Expand Down
2 changes: 0 additions & 2 deletions lightllm/server/httpserver/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ async def generate(

sampling_params.stop_sentences_to_token_ids(self.tokenizer)

sampling_params.stop_sentences_to_token_ids(self.tokenizer)

# 统计信息变量
start_time = time.time()
out_token_counter = 0
Expand Down

0 comments on commit ec45729

Please sign in to comment.