Building AI Models from Scratch