Answers.Body: <p>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.</p>
  <p>That said, if the generalist network is large enough and the prompt is good enough to &quot;turn-on&quot; 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.</p>
  <p>The paper <a href="https://arxiv.org/pdf/2104.08691.pdf" rel="nofollow noreferrer">The Power of Scale for Parameter-Efficient Prompt Tuning</a> shows indeed how &quot;Prompt Tuning&quot; can be as good as fine tuning for large networks.</p>
  <p><a href="https://i.sstatic.net/frI98.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/frI98.png" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-04T21:21:11.070Z
Answers.Text: Thanks, i guess one question is how to find the optimal prompt that will approximate fine tuning
Answers.UserDisplayName: Imran Q
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-04T22:11:21.107Z
Answers.Text: That is what "prompt tuning" and similar techniques do. Training the network + prompt  to be accurate, but keeping the network frozen.
Answers.UserDisplayName: Rexcirus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-04T22:17:11.607Z
Answers.Text: https://ai.googleblog.com/2022/02/guiding-frozen-language-models-with.html
Answers.UserDisplayName: Rexcirus
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-13T15:09:22.903Z
Answers.Text: 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
Answers.UserDisplayName: Imran Q
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-03T20:18:20.677Z
Answers.LastActivityDate: 2023-01-03T20:18:20.677Z
Answers.UserDisplayName: Rexcirus
Body: <p>These days large language models cover a vast amount of topics and information, but I wanted to understand: <em>For specific tasks, is it better to fine-tune models on examples or just use prompting with the context of the task?</em></p>
  <p>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?</p>
  
Tags: <natural-language-processing><comparison><training><fine-tuning><language-model>
Title: For specific tasks, is it better to fine-tune models on examples or just use prompting with the context of the task?
UserDisplayName: Imran Q
ThreadText: # For specific tasks, is it better to fine-tune models on examples or just use prompting with the context of the task?
  
  (Asked by: username_0 on 2023-01-03)
  
  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?
  
  **Tags:** natural-language-processing, comparison, training, fine-tuning, language-model
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-01-03. Score: 2 | Accepted answer
  
  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](https://arxiv.org/pdf/2104.08691.pdf) shows indeed how "Prompt Tuning" can be as good as fine tuning for large networks.
  
  [![enter image description here](https://i.sstatic.net/frI98.png)](https://i.sstatic.net/frI98.png)
  
  > **Comments:**
  > **username_0**: Thanks, i guess one question is how to find the optimal prompt that will approximate fine tuning  
  > **username_1**: That is what "prompt tuning" and similar techniques do. Training the network + prompt  to be accurate, but keeping the network frozen.  
  > **username_1**: https://ai.googleblog.com/2022/02/guiding-frozen-language-models-with.html  
  > **username_0**: 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  
  
  ---
  
  