mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-26 18:24:18 +00:00
update prompt for decoding
This commit is contained in:
parent
40e4ac480c
commit
16f18080be
@ -280,10 +280,14 @@ def decode_one_batch(
|
|||||||
feature_len = feature_len.to(device, dtype=dtype)
|
feature_len = feature_len.to(device, dtype=dtype)
|
||||||
|
|
||||||
messages = [[
|
messages = [[
|
||||||
{"role": "system", "content": "你是一个能处理音频的助手。"},
|
{"role": "user", "content": f"{DEFAULT_SPEECH_TOKEN}请转写音频为文字"},
|
||||||
{"role": "user", "content": f"请转写音频为文字 {DEFAULT_SPEECH_TOKEN}"},
|
|
||||||
{"role": "assistant", "content": ""},
|
{"role": "assistant", "content": ""},
|
||||||
]] * len(feature)
|
]] * len(feature)
|
||||||
|
# messages = [[
|
||||||
|
# {"role": "system", "content": "你是一个能处理音频的助手。"},
|
||||||
|
# {"role": "user", "content": f"请转写音频为文字 {DEFAULT_SPEECH_TOKEN}"},
|
||||||
|
# {"role": "assistant", "content": ""},
|
||||||
|
# ]] * len(feature)
|
||||||
|
|
||||||
input_ids, attention_mask = preprocess(
|
input_ids, attention_mask = preprocess(
|
||||||
messages, tokenizer, max_len=128
|
messages, tokenizer, max_len=128
|
||||||
|
Loading…
x
Reference in New Issue
Block a user