condition_on_prev_tokens doesn't work!
#51
by
skycyou
- opened
I notice that gen_kwargs
now can set "condition_on_prev_tokens"
but it seems not work.
gen_kwargs = {
"max_new_tokens": 100,
# "num_beams": 1,
"condition_on_prev_tokens": "这是普通话对话.",
"language": "chinese",
}
inputs = processor(
samples, sampling_rate=target_sampling_rate, return_tensors="pt",torch_dtype=torch_dtype)
inputs= inputs.to(device, dtype=torch_dtype)
pred_ids = model.generate(**inputs, **gen_kwargs)
pred_text = processor.batch_decode(pred_ids, skip_special_tokens=True, decode_with_timestamps=False)
print(pred_text)
and it print['走錯路,早晨便到800米後到達途經典']
but use openai api it print[00:00.000 --> 00:03.700] 走错路,导航变道。