Question about how to use this model

#11
by devifr - opened

Hi, I’m trying to understand how to use this model for a simple text classification task. Could someone explain the recommended input format?

Thanks for the helpful discussion. I’m also interested in understanding the recommended setup for using this model efficiently.

im so active

OpenBMB org

For a small causal LM like MiniCPM5-1B, the most reliable way to do text classification is to fine-tune it (SFT) on data shaped as instruction → label:

  • Prompt (user turn): the task instruction + the closed set of allowed labels + the text to classify
  • Answer (assistant turn): just the label, nothing else

Example training sample (chat format):

{
"messages": [
{"role": "user", "content": "Classify the sentiment of the following review as one of: positive, negative, neutral.\n\nReview: The battery lasts all day and the screen is gorgeous.\n\nLabel:"},
{"role": "assistant", "content": "positive"}
]
}

suhmily changed discussion status to closed

Sign up or log in to comment