LLMs from Theory to Application