Building Intelligence: Creating a GenAI Model from Scratch