Model pre-training and fine-tuning
The processes of pre-training and fine-tuning are fundamental in the life cycle of LLMOps. These steps are pivotal in preparing models, especially transformer-based ones, to understand and generate language effectively.
Pre-training
Let’s run through the pre-training process of the sentence “the recent advancements in AI” for a transformer model. This sentence is first tokenized into ["the", "recent", "advance", "ments", "in", ...]
and then applied to the vocabulary mapping we previously created – that is, {"the": 0, "recent": 1, "advance": 2, "ments": 3, "in": 4, ...}
. Each token gets converted into its corresponding ID based on the vocabulary mapping:
["the", "recent", "advance", "ments", "in", ...] [0, 1, 2, 3, 4, ...]
In models similar to Llama 2, which typically...