MiniCPM icon indicating copy to clipboard operation
MiniCPM copied to clipboard

[Bad Case]: how can i use model.forward to inference model?

Open ziyanxzy opened this issue 1 year ago • 1 comments

Description / 描述

i want to use model(data) to inference model instead of model.chat(input) to inference. how can i prepared the data??

Case Explaination / 案例解释

i can not get the input dataformat for model.forward, because i dont know the data["position_id"] in forward.

ziyanxzy avatar Jul 04 '24 15:07 ziyanxzy

You should pay more attention to the generate method, because the chat function is an encapsulated generate function, and the generate function is the encapsulated forward

LDLINGLINGLING avatar Jul 05 '24 06:07 LDLINGLINGLING