Parte 2 - LLM
Corso Principi di Intelligenza Artificiale per Ingegneria
LLM Internals
- LLM explained briefly (3Blue1Brown video lectures)
- Transformer Explainer: LLM Visually Explained
- Prompt caching: 10x cheaper LLM tokens, but how? By the end of this post you will...understand, at a deeper level, how LLMs work; have built some new intuition for why LLMs work the way they do.
- How LLMs Choose Their Words: A Practical Walk-Through of Logits, Softmax and Sampling Large Language Models (LLMs) can produce varied, creative, and sometimes surprising outputs even when given the same prompt. This randomness is not a bug but a core feature of how the model samples its next token from a probability distribution. In this article, we break down the key sampling strategies.
- Tokenizer LLM process text using tokens, which are common sequences of characters found in a set of text. The models learn to understand the statistical relationships between these tokens, and excel at producing the next token in a sequence of tokens...You can use this tool below to understand how a piece of text might be tokenized by a language model, and the total count of tokens in that piece of text.
- Gallery of LLM architectures A curated reference for modern language-model architectures. Compare architecture diagrams, implementation links, release dates, attention mechanisms, decoder types, and compact fact sheets without digging through individual posts.
- Check the knowledge embedded in LLM weights What LLMs know about you?
- Open-source is NOT the same as open-weight Too many people —this morning it was editors and writers at The New York Times among others—are failing to distinguish the two.
Personal working notes
LLM nella vostra vita professionale e personale
Quando usarli
- Writing to think The reason they teach writing to kids in school is not to generate endless essays on history or books but to create a space to practice reasoning. By delegating writing to AI, my son might be reducing his time spent doing homework. But he’s missing the chance to think more clearly about the topic at hand. Writing forces you to slow down, focus your attention, and think deeply. …Writing is the process by which you realize that you do not understand what you are talking about. (If you want to read only one thing from this collection, then read this one).
- Should You Use AI for a Task? Here’s a Simple Way to Decide The writing assignments I give my students are gym tasks, not work tasks. I ask them to write policy memos not because the world needs more policy memos. I assign them because the very act of writing, which includes thinking and outlining and drafting and editing, making and criticizing and revising arguments, will help develop the critical thinking skills they will need in their future careers. And without this constant mental exercise, those skills will atrophy (July 2026).
Prestazioni reali
- Vedi LLM Performance.
- Nelle attività di coding sono ormai diventati uno strumento irrinunciabile. La necessità di persone competenti però rimane e rimarrà. Chi afferma il contrario non sa di cosa sta parlando (secondo me e secondo molti). Vedi LLM Coding,
Economic impact
- Ford hired AI and sacked humans. It backfired badly Ford has admitted to rehiring hundreds of human workers after its aggressive AI adoption strategy backfired. The US automaker hired over 350 veteran engineers, referred to internally as “gray beards”, over the past three years in order to address mistakes made by automated systems. The staff will lead quality reviews after the automation issues cost the company billions of dollars, Bloomberg reported, while some workers will also help improve and train the AI systems (June 2026).
- Starbucks scraps AI inventory tool across North America Starbucks terminated an AI program workers used for automating certain inventory counts this week, nine months after deploying it across its North American stores (May 2026).
-
After redeploying 4000 employees and automating their work with AI agents, Salesforce executives admit: we were more confident about LLM capabilities Salesforce, one of the world's most valuable enterprise software companies, is pulling back from its heavy reliance of LLM after encountering reliability issues that have shaken executive confidence.
-
The GenAI Divide STATE OF AI IN BUSINESS 2025 - MIT Despite $30–40 billion in enterprise investment into GenAI, this report uncovers a surprising result in that 95% of organizations are getting zero return (July 2025).
- Is AI Profitable? This site tracks cumulative spend versus revenue across most major AI companies in one place, allowing you to see approximately how much money is flowing into the industry and how far it is from breaking even (January 2026).
Invention vs Innovation
- AI as Normal Technology We explain why we think that transformative economic and societal impacts will be slow (on the timescale of decades), making a critical distinction between AI methods, AI applications, and AI adoption, arguing that the three happen at different timescales (April 2025).
- From Spark to System (Part I) - Why the Real AI Revolution Hasn’t Happened Yet The thing everyone is calling the AI revolution...may not be the revolution at all. It may be the precondition for one... we are misreading the moment. We are celebrating the spark when what matters is the system that makes the spark reliable, scalable, and safe enough to hand to the world...Invention is the creation of something genuinely new: a concept, a technique, an architecture that did not exist before. Innovation is the application of something, new or existing, in a way that creates value for real people in the real world. The two are not the same thing, and conflating them has been one of the most persistent and costly errors in technology development generally, and in AI specifically (March 2026).
- AI Mania Is Eviscerating Global Decision-Making All of the AI projects we have observed as a team are failing. Every single one – we have seen 0% success in a year and a half, not only amongst projects we have been asked to participate in, but even within projects that we have observed in passing while doing totally unrelated work. Even if you grant that AI tooling accelerates specific workloads, the method and scale of the current investments is senseless (July 2026).
Advanced Topics
- Foundations of LLM - Xiao, Zhu - https://arxiv.org/abs/2501.09223
- Introduction to LLM - Jurafsky - Stanford https://web.stanford.edu/\~jurafsky/slp3/slides/LLM24aug.pdf
- LLM: the basics - Duh - Johns Hopkins https://www.cs.jhu.edu/\~kevinduh/a/llm-tutorial/2406-JSALT-LLM.pdf
-
Transformers and LLMs - Amidi and Amidi - Stanford Course
- Syllabus (videos, slides) https://cme295.stanford.edu/syllabus/
- Slides https://github.com/sinchro1/cme295-stanford-slides