Critical Phase Transition in a Large Language Model