These days large language models cover a vast amount of topics and information, but I wanted to understand: For specific tasks, is it better to fine-tune models on examples or just use prompting with the context of the task?

For example, if I wanted to train a language model to do question answering for linear algebra, is it better to train it with examples of linear algebra problems and their solutions, or try out different prompts?


1 Answer 1


Fine tuning is superior, since the whole network specialise to solve a given problem only. A specialist will always beat a generalist in the specialised task.

That said, if the generalist network is large enough and the prompt is good enough to "turn-on" the right weights in the large network, the performance can be comparable. In a sense, the prompt is making the generalist network act as a specialist. This is assuming that the specialist network has saturated its performances.

The paper The Power of Scale for Parameter-Efficient Prompt Tuning shows indeed how "Prompt Tuning" can be as good as fine tuning for large networks.

enter image description here

  • $\begingroup$ Thanks, i guess one question is how to find the optimal prompt that will approximate fine tuning $\endgroup$
    – Imran Q
    Jan 4, 2023 at 21:21
  • $\begingroup$ That is what "prompt tuning" and similar techniques do. Training the network + prompt to be accurate, but keeping the network frozen. $\endgroup$
    – Rexcirus
    Jan 4, 2023 at 22:11
  • $\begingroup$ ai.googleblog.com/2022/02/… $\endgroup$
    – Rexcirus
    Jan 4, 2023 at 22:17
  • $\begingroup$ Thanks! That link is fascinating. I think they use a fixed vector, but human engineered prompts can use a variety of sizes so it might be worth trying out varying embedding sizes $\endgroup$
    – Imran Q
    Jan 13, 2023 at 15:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .