Nvidia agreed to buy Hugging Face for nearly $13 billion, weeks after OpenAI's own AI models hacked the startup's systems to cheat on a test.