The shock to financial markets came from China, where DeepSeek said it had developed a large language model that can compete with U.S. giants but at a fraction of the cost.