How to finetune Llama2
Why and how we finetune open source LLMs?

Recently, Meta published its latest LLM, Llama2[], and gained tremendous interest in open source community. Different studies have been undertaken to evaluate Llama2 and therefore utilize Llama2 to improve their own vertical domain LLM that can acquire both domain capability and general LLM skills using both proprietary and public datasets. Before we dive into the tutorial on finetuning Llama2, we have to consider one question: “Why should we finetune Llama2 or must we?”
Typically we want to finetune a large language model with such following hope or objective: it might perform better if I feed it with more domain knowledge. Well. that’s true but should be with more tricks and computation.
From the course provided by Sharon Zhou[2], we can acquire the reason why we should finetune under some specific circumstances and the common differences between finetuning and prompt. We can conclude the finetuning advantages and disadvantages as follows:
Llama2 info
- Parameter 70B
Llama2 Performance
As it said Llama2 is almost the same powerful as GPT-3.5 except for coding whereas codeLlama can make up the shortage [].
Other LLMs based on Llama 2
- Lemur (Pre-training,100B Token with code and text) & Lemur-Chat (Supervised Fine-tuning with 300K examples)
Computation estimation
With all these above, we perhaps can not hesitate to finetune some open-source LLMs (e.g. Llama 2 and ChatGLM).