最新哦,分词策略放到cli了
This commit is contained in:
1 parent
fcc94ffd73
commit
f9f9645fa1
9 files changed
+270
-305
No files matched your search
@@ -71,7 +71,7 @@ def load_models():
|
||||
global token_true_id, token_false_id, prefix_tokens, suffix_tokens, max_rerank_length
|
||||
token_false_id = rerank_tokenizer.convert_tokens_to_ids("no")
|
||||
token_true_id = rerank_tokenizer.convert_tokens_to_ids("yes")
|
||||
max_rerank_length = 8192
|
||||
max_rerank_length = 32768
|
||||
|
||||
prefix = "<|im_start|>system\nJudge whether the Document meets the requirements based on the Query and the Instruct provided. Note that the answer can only be \"yes\" or \"no\".<|im_end|>\n<|im_start|>user\n"
|
||||
suffix = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
|
||||
@@ -111,7 +111,6 @@ async def get_embeddings(req: EmbedRequest):
|
||||
input_texts,
|
||||
padding=True,
|
||||
truncation=True,
|
||||
max_length=8192,
|
||||
return_tensors="pt",
|
||||
).to(embed_model.device)
|
||||
|
||||
|
||||
Reference in new issue
Block a user