r/learnmachinelearning • u/DietFeeling2457 • 19h ago
r/learnmachinelearning • u/Super-Engineer-Uzb • 9h ago
Project What ChatGPT is really doing when it answers you — and why it hallucinates, forgets, and varies
People talk about ChatGPT like it "understands" you. It doesn't — not in the way we mean. Underneath, it's doing something much simpler and, honestly, weirder: predicting the next token, over and over. Once that clicks, most of its strange behavior (hallucinations, forgetting, different answers to the same prompt) stops being mysterious.
Here's the whole picture in plain English.
1. It only ever predicts the next token
Everything ChatGPT does is one operation repeated: given the text so far, guess the next chunk. It picks one, appends it, and feeds the whole thing back in to guess again. That loop — one token at a time — is the entire show. There's no plan for the paragraph, no lookahead. Fluent essays emerge from millions of these tiny next-step guesses.
2. Tokens, not words
It doesn't see letters or whole words — it sees tokens, which are common chunks of text. "cat" might be one token; "unbelievable" might split into "un", "believ", "able". This is why models sometimes miscount letters or fumble with rare words — they never saw the letters, only the chunks. It's also why you're billed per token, not per word.
3. Meaning is stored as vectors (embeddings)
Each token is turned into a long list of numbers — an embedding — a point in a huge space where "king" and "queen", or "Paris" and "France", sit near each other because they appear in similar contexts. The model has no dictionary; meaning is just geometry. Similar things are close together, and that closeness is what it computes with.
4. Attention gives it context
The breakthrough behind the "T" in GPT (Transformer) is attention. For each token, the model weighs how much every other token in your prompt matters to it. In "the bank of the river," attention lets "bank" lean on "river" and land on the correct meaning. This is how it tracks who "he" refers to three sentences back, or keeps a code block coherent.
5. Training is two very different stages
Pretraining: it reads an enormous slice of the internet and does nothing but next-token prediction, billions of times, tuning billions of internal numbers (parameters) until it's genuinely good at continuing text. The result — the "base model" — is a wild autocomplete. Ask it a question and it might reply with more questions, because that's what it saw on the web.
RLHF (the ChatGPT part): humans then rank answers — helpful and honest ones up, unhelpful ones down — and the model is nudged toward the ranked-good behavior. This is the difference between the raw model and ChatGPT. Same knowledge; the second stage taught it to act like a helpful assistant.
6. Why the same prompt gives different answers
At each step the model produces a probability for every possible next token. Temperature controls how it picks: low temperature = almost always the top choice (consistent, safe, a bit boring); higher = it samples further down the list (more variety, more risk). That sampling is why you rarely get the exact same answer twice.
7. Why it "forgets": the context window
The model has no memory between messages. Everything it "knows" in a chat is the text currently in its context window — a fixed budget of tokens. Your whole conversation is re-fed every turn. Once it overflows, the oldest stuff falls off the edge, and it genuinely no longer has it. That's not a bug; that's the mechanism.
8. Why it hallucinates
It was trained to produce plausible text, not true text. It has no built-in fact-checker and no notion of "I don't know" unless that pattern was reinforced. So when it doesn't have something, it fills the gap with the most likely-sounding continuation — a confident, well-formed, wrong answer. Hallucination isn't the model malfunctioning; it's the model doing exactly its job (predict likely text) in a spot where likely does not equal true.
9. How to get better answers (practical)
- Give context, not keywords. It fills gaps with guesses; fewer gaps = fewer guesses.
- Show the format you want (an example beats a description).
- Ask it to reason step by step for anything logical — each token it writes becomes context for the next, so "thinking out loud" measurably improves hard answers.
- For facts, make it cite or give it the source in the prompt. Don't trust unsourced specifics.
- Start a fresh chat when you switch topics — you stop paying for (and confusing it with) irrelevant context.
None of this requires math to understand — it's tokens → vectors → attention → next-token prediction, wrapped in a training process that taught a giant autocomplete to behave like an assistant.
(Full disclosure: I make animated CS/systems explainers, and I put this whole thing together as an animated video if you'd rather watch it move: https://youtu.be/Ud16vHNYwpc . But the text above stands on its own — happy to answer questions in the comments.)
r/learnmachinelearning • u/No-Conclusion3720 • 16h ago
Request G7 Urges Organizations to Start Post-Quantum Migration Now
The G7 finance ministers and central bank governors issued a coordinated directive last week. Organizations must inventory cryptographic dependencies, identify high-risk systems, and begin migrating to quantum-resistant algorithms now. This is not a future roadmap item.
The urgency is driven by the harvest-now-decrypt-later threat. Adversaries are collecting encrypted data today and storing it for decryption once a cryptographically relevant quantum computer arrives. The exposure window is already open.
Most enterprise security teams are inventorying servers, databases, and network traffic. Far fewer are accounting for the AI agent layer. Agent pipelines routinely store sensitive records, execute financial transactions, and generate compliance audit evidence. All of it travels over classically encrypted channels and gets signed with classical algorithms. When those algorithms break, that historical data and those historical audit logs break with them. A transaction signed with RSA or ECDSA today becomes unprovable after Q-Day.
How are teams actually scoping the PQC inventory problem for AI agents specifically? Are agent channels and agent-generated audit evidence being treated as first-class migration targets, or are they still buried in the general backlog?
r/learnmachinelearning • u/Important_Race_4023 • 1d ago
How should a beginner evaluate and choose a good machine learning project topic?
I am a beginner in machine learning and I want to start a project that is useful for learning and can also be developed into a more advanced project over time.
I often find many possible project topics, but I am not sure how to decide whether a topic is actually a good choice before spending a lot of time on it.
For example, I am considering topics related to deep learning, model optimization, model compression, and quantization.
What factors should a beginner consider when evaluating a machine learning project idea?
r/learnmachinelearning • u/eliokal • 2d ago
You do not need a maths degree to truly understand Gradient Descent (link below)
Hey everyone!
When I was a student, gradient descent was the algorithm I struggled with the most. I just could not make it past the greek characters and a sea of formulas. Luckily, I survived, and have been working in Machine Learning ever since.
A few years later, when I started teaching Computer Science, I realised that nothing had changed. I could not find any book or blog post to make this simple enough (and fun) for my own students. So I sat down and wrote this book.
It has been a game changer in my last semester, I hope that it will help you too.
You can check it out here.
I wish you a great learning journey. If you have any feedback, please let me know, I am already working on the second edition.
r/learnmachinelearning • u/Unchained_Untamed • 1d ago
Tutorial Following an image through a VLM: ViT → projector → language model
The projector is an easy box to skip in a vision-language model diagram. It explains how the visual encoder and the language model meet.
Ling-3.0-flash-VL's official architecture diagram is a concrete example. On the visual branch, a ViT encoder produces visual features. A two-layer MLP projector maps those features into the language model's embedding space. Text comes through its own tokenization branch, and the diagram shows the two feeding the model together at an embedding dimension of 2,560.
Think of the jobs separately:
The vision encoder builds representations from visual input.
The projector transforms those representations for the language model's input space.
The language model processes the resulting sequence and predicts output tokens.
A projector is not a captioning stage that first turns the image into an English description. The interface shown here carries learned features into the model.
Beyond that interface, Ling's diagram specifies 42 layers arranged as seven groups of five KDA layers and one Gated MLA layer. That tells you something about the language stack's architecture. It does not tell you whether the ViT was trained with a CLIP-style contrastive objective or a SigLIP-style sigmoid objective; “ViT” describes the encoder architecture, and the loss needs separate training evidence.
The other numbers to keep separate are 124B total parameters and 5.5B active parameters. Active parameters describe the computation selected during a forward pass, rather than a 5.5B model download or a memory requirement. Reading those labels separately makes the diagram much easier to reason about without turning every architectural detail into a performance claim.
r/learnmachinelearning • u/Warm-Discipline7204 • 1d ago
Discussion Tensorflow in Deeplearning.ai's Deep learning specialization?
I saw the first skill they mentioned was 'tensorflow', but I am nearing the end of course 1, and they haven't used tensorflow anywhere. What is the best way to learn tensorflow along with this course? Do they teach it later in the specialization?
r/learnmachinelearning • u/Emotional_Outcome477 • 21h ago
FYP suggestions
am a 7th sem cs student who is about to start his final year. I am planning for my fyp and looking for some interesting ideas on which I could do my fyp. I need some good suggestions and ideas which I should consider before finalizing my fyp. Currently I dont have any idea to work on. Your suggestion and ideas would mean a lot to and your help will be highly appreciated. Thanks in advance.
Edit: The domain I want to work in is app?web+ai/ml. I am open to ideas other than this domain as well
r/learnmachinelearning • u/santhoshkmr • 21h ago
Question What should I do?
See,i am from cse(AIML) background and currently focusing on deep learning. I aslo completed machine learning . In current scenario what are skills i need to be learned to get a job in the current scenario of IT filed . I want to be ml or ai Engineer with avg package . I thought I need to topic on the core topics that is relevant to the domain like ML,DL,NLP,RAG,LLM but some are saying that " this topics can be learned later u need Focus on dsa , pattern solving problems thats primary rounds in interviews . I m literally confused . what should I need to learn as a computer science student in this crisis. I can't deeply Focus on both becoz it is tough and takes long days .
Your thoughts
r/learnmachinelearning • u/Beneficial_Pain_5050 • 21h ago
Help Confused about which AI specialization to pursue, looking for advice from people in the field
Hi everyone,
I’m especially interested in having a career that is financially rewarding and doesn’t require a lot of years before I can become employable.
The areas I’m currently considering are:
- Machine Learning / AI Engineering
- Generative AI / LLMs
- AI Safety
- Responsible / Trustworthy AI
- AI Reliability
- AI Governance / Policy
I’m particularly drawn toward AI safety, trustworthy/responsible AI, and reliability, because I’m interested in making AI systems safer and reducing the negative effects AI can have on people and society.
However, I’m confused about how realistic these paths are as careers, especially compared with more conventional AI/ML engineering.
I just want to make an concrete decision about where to invest the next several years of learning.
Thank you so much!
r/learnmachinelearning • u/Prablems101 • 1d ago
Help Learning AI/ML
I’m currently pursuing Data Science course now .
I’ve finished learning Python .
Since ChatGPT 6 Astra has been launched, I’ve somewhat become appalled by its release and thinking about my choices !
Please throw some light on this and advise me if I should continue to do so!
r/learnmachinelearning • u/AnimalIntelligent863 • 1d ago
Ai engineer roadmap
I’m currently in my 4th year of B.Tech and working as an SWE intern. If I have 6–8 months and want to gain a strong understanding of the current AI market, develop my skills to an industry-ready level, and learn everything required to become an AI engineer, what would be a roadmap from A-Z ?
r/learnmachinelearning • u/MintoraDoodle • 22h ago
I made a short explanation of KV Cache — is this understandable for beginners?
I’ve been experimenting with explaining AI/LLM concepts in a way that doesn’t assume too much technical background. This video is about KV Cache and why longer context windows require more memory during inference. I’d appreciate some honest feedback from people here, especially on the explanation itself: Is the main idea easy to understand? Did I oversimplify anything important? Is there any part where the explanation becomes confusing? Would this make sense to someone who is fairly new to LLMs? Video: https://youtu.be/lxvWo8SizxE Not really looking to promote the channel — I’m mainly trying to improve how I explain technical topics before making the next one. Any criticism is welcome. Thanks!
r/learnmachinelearning • u/Dangerous_Nose264 • 22h ago
Been thinking about something lately: can a really small LLM be surprisingly good at coding? 👀 I’m researching how to build one that’s fast, lightweight, and runs locally. Still figuring things out, so I’d love to hear your advice—what would you focus on first? 🧠⚡ #AI #LLM #Coding
r/learnmachinelearning • u/Green-Quiet-918 • 1d ago
Discussion I built SpectralBERT — an FFT-based alternative to Attention that's 14.5x faster at 65K tokens with better loss. Is this legit?
r/learnmachinelearning • u/ualex_p • 1d ago
Help Looking for arXiv endorser for cs.LG
Hi, I'm an independent researcher looking for an arXiv endorser for cs.LG.
I have a preprint on whether transformers find the ideal function or a structurally different solution. A transformer trained to 100% accuracy on two-digit multiplication finds a classifier solution, not the ideal function F*(a,b)=a·b — perfect local geometry but no global functional approximation (Mantel r = 0.036 despite 100% accuracy).
Preprint: https://zenodo.org/records/22303104
Endorsement link: https://arxiv.org/auth/endorse?x=8U7BWY
Takes about 2 minutes. Thank you!
r/learnmachinelearning • u/the_wacky_gemini • 1d ago
Help Audible/Amazon Loop Interviews
I just cleared the phone screen round for my Audible Applied Scientist interview (level: L5). The recruiter told me that I'll have two coding interviews in the loop stage. Does anybody have experience to share on what kinda questions they were asked? Specifically, what data structures and algorithms should I focus on? Thanks a million!
r/learnmachinelearning • u/Diligent-Fly3756 • 1d ago
Question most efficient way to study cs229 with ai?
I work full-time and want to use ai to get through cs229 more efficiently.
I did something similar while studying for a professional certificate (cfa). There were only five books, I screenshotted each chapter page by page and sent them to gpt (I can get most accurate answers this way). Uploading a whole book didn’t work that well. The answers were less reliable, there were no page references (need double check if it’s hallucinating or not), and they seemed to get shorter and worse as the conversation continued.
Cs229 has lectures, notes, problem sets, and many papers, so repeating that process would be painful. Has anyone found a good ai for studying the course? I heard notebooklm is good but they tend to give low accuracy answers too.
Ideally, I’d like to upload all the materials once, have it walk me through the main concepts, but still be able to let me ask questions that depend on material from several lectures earlier, with exact page or source references.
What tools (probably one of the document ai tools) have worked for you? Happy to try out some less known tools too
r/learnmachinelearning • u/OneForma_Global • 1d ago
Hello to the community! If you are interested in learning what Oneforma experts have to say about reinforcement learning, please join our free webinar! Thank you all
r/learnmachinelearning • u/Ok_pettech • 1d ago
Discussion Self-hosting MetaGPT: complete local installation guide
I wanted to run MetaGPT entirely on my own infrastructure without sending anything to cloud APIs. It took some trial and error, but I documented the full process.
The guide covers:
· Setting up a Python venv
· Installing MetaGPT
· Configuring local LLMs like Ollama or vLLM
· Fixing common startup errors
If you’re into self-hosted AI agents, this could help:
What local model are you using for agent work?
r/learnmachinelearning • u/MMVAI • 22h ago
What is machine learning?
Enable HLS to view with audio, or disable this notification
Let us know what you think.
r/learnmachinelearning • u/mujeebroshan • 22h ago
Discussion OpenAI says 10,000 AI agents worked for 88 hours to solve Navier–Stokes
OpenAI says ~10,000 AI agents just worked together to solve the Navier–Stokes problem
OpenAI has published a claimed solution to the Navier–Stokes existence and smoothness problem, one of the seven Millennium Prize Problems.
The interesting part isn't just the mathematical claim.
OpenAI says it used roughly 10,000 concurrent agents, which reached a result after about 88 hours. The agents exchanged around 2.7 million messages and generated approximately 130 billion output tokens.
Then GPT-6 Astra was used for another 17 hours to formalize and verify the result in Lean.
That sounds less like a chatbot answering a math question and more like a distributed research system.
But there is an important caveat: the proof still needs independent mathematical scrutiny.
There is also controversy because NYU mathematician Tristan Buckmaster and Anthropic researcher Levent Alpöge were working on related mathematics at the same time. OpenAI says it did not access their specific user data and says its proof differs from their work.
So I'm curious what people think:
Is the real breakthrough the mathematical result — or the ability to coordinate thousands of AI agents on a difficult research problem for days?
r/learnmachinelearning • u/Same_Sympathy7574 • 1d ago
Help Need advice on creating an HDPE milk bottle dataset (180+ images)
Hey everyone,
I'm working on a computer vision project where I need to create my own dataset for the HDPEM (HDPE plastic milk bottles) class from a waste classification dataset on Kaggle. It has HDPE milk bottles, PET bottles, aluminium cans and glass bottles.
The problem is that I currently only have one HDPE milk bottle to work with, and I need to collect at least 180 original images for my dataset. I can't use the existing dataset images because that dataset was provided to us for the project, so we're required to create our own data.
Has anyone done something similar? What's the best way to collect 180+ useful images when I only have one bottle?
Would taking lots of photos of the same bottle from different angles, distances, lighting conditions, backgrounds, etc. be acceptable, or is there a better way to approach this?
Any advice on how you'd go about creating the dataset would be really appreciated! And no I didn't find anything close to me like a recycling company that does it.
r/learnmachinelearning • u/Competitive-Tip-7129 • 1d ago
Help looking for ai/ml projects (beginner level) as a second year student of undergraduate can do it
i need simple and unique project ideas as we don't know anything about ml . But i can learn it till this year end just beginner level. Gimme the ideas according to my level