uniem icon indicating copy to clipboard operation
uniem copied to clipboard

转onnx问题

Open sunzx8 opened this issue 11 months ago • 1 comments

🚀 The feature

在用optimun转换为onnx之后,我发现输出多了一个: image 请问为什么会这样?您给出的推理示例直接输入了整个句子,我在构建输入的时候是只用给input_id 和attention_mask吗?token_type_ids需不需要输入?

sunzx8 avatar Mar 05 '24 06:03 sunzx8

token_type_ids 是不需要输入的,输出多个也是正常的,token_embeddings 可以忽略掉(是每个 token 的编码),用 sentence_embedding 就可以了(是整句话的编码)

wangyuxinwhy avatar Mar 06 '24 10:03 wangyuxinwhy