Chain-of-Model Learning for Language Model