It is not thinking at all. The model is just transforming the text input into a new representation and then based on stochasticts predicted the next word.
This is something everyone needs to be aware of when they want to rely on LLMs in general. All these models are just predicting the next word. It does not understand the input at all. It just knows based on the input what the most likely next token is based on the training data. So this is why when you enter new texts and new problems, it will most likely what we call hallucinate, meaning it is making a response, because based on its technology it has to create an output.
And since it is not able to look up anything in the internet, this is very dangerous. I heard of CTOs that asked the model what kind of cookies their website were using and if this is harmful. The model obviously cannot have any idea about the cookies a specific website is using, so it made up a response. As a result the CTO asked every developer to quickly fix the security issues which do not exist.
People need to understand how this model is working to use it correctly.