LLMs are probabilistic models, meaning they predict the next word (or more precisely token) based on the probability of its occurence. You can influence these probabilities by adjusting parameters to include or exclude less likely tokens in the response the LLM is to return.
Traditionally, optimizing LLMs involved manual experimentation with prompts, parameters, and other variables. However, automated optimization has now appeared.
Key Decision: Manual vs. Algorithmic Optimization:
- Manual Optimization:
- You specify critical values based on your understanding and experience.
- This approach offers more control but can be time-consuming.
- Algorithmic Optimization:
- The algorithm tests different values and identifies optimal settings.
- This is more efficient but requires careful algorithm design and evaluation.
- It can be time-consuming at the beginning but afterwards you are getting a powerful tool that you can re-use repeatedly.
What to Optimize:
- Model Architecture: Choose the best model for your task.
- Prompts: Structure, content, and length.
- Parameters: Temperature, top_p, and more.

Leave a Reply