do foundation models process the data in the matrix form