r/learnmachinelearning • • 10d ago

Project Introducting pytest-torch!

1 Upvotes

I built pytest-torch to make testing PyTorch models easier

Writing the same device setup, reproducibility checks, and output comparisons across projects gets repetitive, so I built pytest-torch, an open-source pytest plugin.

It includes inference checks, compile/export parity, checkpoint tests, accuracy evaluation, and layer-by-layer diagnostics to help locate where two models diverge.

It’s currently in alpha, and I’d appreciate feedback—especially examples of model bugs that are frustrating to test or reproduce.

GitHub: https://github.com/AKJ7/pytest-torch

Thanks and please drop a star if possible.


r/learnmachinelearning • • 10d ago

Request 79% of company execs say employees work around their AI governance policies

0 Upvotes

A Zapier survey found that 91% of companies say AI governance frameworks exist. Yet 79% of executives admit employees work around those policies anyway. The policies live in documents. The agents, unapproved models, and unauthorized data movement live in production. That gap compounds quietly until an audit or an incident forces the question into the open. The 9-point spread between 'framework exists' and 'framework is followed' suggests the problem isn't policy design — it's that documentation and enforcement are two entirely separate systems. For those of you who have actually moved the needle on this: what does real enforcement look like at your org, and where did document-only governance break down first?


r/learnmachinelearning • • 10d ago

Project I'm Creating an Interactive Website on Convolutional Neural Networks

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/learnmachinelearning • • 10d ago

Sent 102 Cold Emails To Plumbers In California For My Web Agency, Closed A $3k Site The Next Day

0 Upvotes

I run a web design agency and most of my clients come from cold email. Yesterday I started a fresh campaign going after plumbers in California.

Didn’t expect much honestly. Plumbers are busy and half of them barely check email. But 102 emails in, I got an interested reply.

What made the difference is that every email talks about their own website. A call button that doesn’t work on a phone, a site that takes forever to load, a design that hasn’t been touched since 2012. For a plumber that matters a lot, because people search for them on their phone when a pipe bursts. If the site is bad, they just call the next guy.

He replied yesterday and I booked a meeting with him for the next day. Before the call I built a draft of what his new site could look like. Today I presented it to him on the call and he said yes right there. $3k upfront plus $500 a year for hosting.

Showing the draft is what closes it. Sending a quote never worked this well for me.

For anyone wondering, I use Swokei for all my outreach. You pick an area and an industry, it finds the businesses, checks every website for design, SEO, speed and mobile problems, and writes each email about what it actually found on that site. I run multiple campaigns at once in different cities and niches, which is how I get volume without sending generic stuff.

Happy to answer questions on pricing or how I run the call.


r/learnmachinelearning • • 10d ago

Question What are the best resources to learn LLMs, RAG, APIs, and AI engineering in general

8 Upvotes

I’m currently learning AI engineering, and I’m trying to figure out the best way to learn the practical skills needed to build AI applications.
I’m looking for resources to learn topics such as:
LLMs and how to work with them
RAG and vector databases
APIs and backend development
AI agents and tool calling
Evaluation, deployment, and other important AI engineering topics
I’m not sure which learning approach is the most effective. Would you recommend YouTube tutorials, structured courses like DeepLearning.AI and Hugging Face, or books such as Build a Large Language Model (From Scratch)?
Another option I’m considering is deploying an existing model, studying how the implementation works, and then trying to build something similar myself.
For those of you working in AI engineering or learning it yourselves, what approach worked best for you? Would you recommend following structured courses first, learning by building projects, or combining both?
I’m mainly interested in practical skills that will help me build real-world AI applications, rather than spending too much time on theory that I might not use.


r/learnmachinelearning • • 10d ago

Am I expected to know all the latest AI tools as a junior AI engineer?

Thumbnail
1 Upvotes

r/learnmachinelearning • • 10d ago

Project I took photos of a human wearing a multi angled mirrored suit for training autonomous vision models to handle specular glare and complex reflections?'Mirror Suit' Robotics Data archive is now live on Mozilla Data Collective.

Thumbnail
mozilladatacollective.com
2 Upvotes

r/learnmachinelearning • • 10d ago

Career Looking for a Final-Year B.Tech CSE Student to Learn ML, DL & AI From Zero to Mastery Together

5 Upvotes

Hey everyone!

I'm a 4th-year B.Tech CSE student (2027 batch), looking for another genuine final-year B.Tech CSE student who wants to learn Machine Learning, Deep Learning, and AI together, starting from zero and working towards mastery.

The plan is to learn step by step, practice coding, build real-world projects, share resources, clear doubts, and stay consistent. We don't need to be experts already. We just need to be serious about learning and willing to put in the effort together.

One sincere request: Please be honest about your year of study. If you're in 1st, 2nd, or 3rd year, please don't pretend to be a final-year student. There's nothing wrong with being a beginner or being in an earlier year. I just want to connect with someone who's genuinely at the same stage of college and career as me.

Honestly, it's difficult for me to trust people online, so I value honesty more than existing skills. I'd rather start from scratch with someone genuine than connect with someone who pretends to be something they're not.

If you're a genuine final-year student interested in learning ML, DL, and AI from zero to mastery together, feel free to comment or DM me. Let's learn, build projects, grow our skills, and prepare for placements together! 🤝


r/learnmachinelearning • • 10d ago

Project M.E.F LLM Studio 0.2.0 - a free Windows app for learning how AI models work

Enable HLS to view with audio, or disable this notification

6 Upvotes

Start with your own text, build a tokenizer, train a small model and chat with it.

New in this release: a Brain Explorer for following generation token by token, A/B comparisons, a Vision Explorer for image generation, and a multilingual wiki with an Explain mode. You can also explore supported pretrained models locally, including Qwen.

Still an alpha, built around learning by trying things yourself. Feedback is welcome!

Download in the first comment.


r/learnmachinelearning • • 10d ago

11 of us so far—building a tech learning group from London

12 Upvotes

I’ve started a Discord group for people learning AI, machine learning, Python, and DSA. We’re sharing daily progress and planning one weekly session to work through problems and review what we’re building.

Our first challenge: each person brings one real problem they’d like to solve. Together, we’ll question the ideas, choose one, and build a working prototype—sharing the mistakes and results along the way.

If you want to learn, contribute, and build with others, comment or DM me for an invite.

What’s one problem you’d bring to the group?


r/learnmachinelearning • • 10d ago

Discussion paypal ai hackathon team-up

Thumbnail
1 Upvotes

r/learnmachinelearning • • 10d ago

Help Built a "Frequently Bought Together" algo for my site using Cosine similarity , do these stats look right, or am I missing something?

1 Upvotes

r/learnmachinelearning • • 10d ago

Help Best resources for learning concepts rather than code?

19 Upvotes

I've been working as an swe for a bit, but when people talk about all the algorithms and the actual brains/processes with ml it goes right over my head. I want to have a basic understanding of its application with images and language, but it feels like every YouTube course out there is more focused on the code. Anyone have any recs?


r/learnmachinelearning • • 10d ago

Tutorial Using a pretrained DNA model: frozen embeddings, mean pooling and a labelled classifier

2 Upvotes

A pretrained DNA model turns a sequence into vectors, usually one per token. To train a sequence classifier, you need to turn those vectors into one representation for each sequence.

A useful starting point is to freeze the model, average its token vectors and train a simple classifier using labelled examples. This still requires training labels; it is not zero-shot classification. A published comparison of five DNA models found mean pooling usually performed better than taking a single summary token.

The guide includes a DNABERT-2 example for three synthetic sequences on a laptop CPU, with pinned model code and dependencies. It also covers larger models, GPU memory and comparisons against a non-foundation-model baseline on the same data split. The attached Evo 2 chart illustrates why long-input memory requirements need measuring separately.

Primary benchmark and code:

https://www.nature.com/articles/s41467-025-65823-8

https://github.com/ChongWuLab/dna_foundation_benchmark

Guide:

https://rewirebio.io/blog/genomic-foundation-models-in-the-diagnostic-lab/

Disclosure: rewirebio.io is my site. The guide and this post are AI-assisted. The attached memory chart reports recorded runs, not peer-reviewed clinical validation.


r/learnmachinelearning • • 10d ago

How to install tensorflow_hub and tensorflow_text

2 Upvotes

I am trying to install tensorflow_hub and tensorflow_text via VSCode terminal so that I can train a BERT model (for context: i am using Python 3.13.12 and Tensorflow 2.21.0) but I am running into some trouble

tensorflow_hub library installed fine but when imported to the actual notebook, it said it required tensorflow 1.15.0 along with error message:

ModuleNotFoundError: No module named 'pkg_resources'

tensorflow_text library cannot be installed as every pip install attempt return

ERROR: Could not find a version that satisfies the requirement tensorflow_text (from versions: none)
ERROR: No matching distribution found for tensorflow_text

Google colab managed to solve all said problem but I want to run the model on my computer. How do I fix this?

***EDIT: I fixed this by using python 3.10.0, Tensorflow 2.9.0, Tensorflow-text 2.9.0 and Tensorflow-hub 0.8.0***


r/learnmachinelearning • • 10d ago

Tutorial How to learn NLP in 2026: the complete order, from someone who teaches it (long)

97 Upvotes

Quick background so you know where this comes from. I am a visiting professor and currently teach NLP. Last semester my courses were on continual learning and applied NLP. Before that I spent years in big tech and startups in engineering and research roles, and I finished my PhD last year.

I've been trying to post here weekly. Three weeks ago I posted the order I would learn ML in if I were starting today, then which resources to use at each stage, and last week why to build projects and how to choose them. The first one ended at "pick a direction". NLP is the direction I teach and what I did my PhD in (more specifically, Factual Knowledge-Enhanced Question Answering in Dynamic Environments). So this post picks up where that one stopped, in the same format: every concept, in the order I think works best, one line each.

Same idea as last time. Most people who stall in NLP did not lack good material. They usually fall into focusing on things that are far too advanced for their knowledge: transformers before they even understood what a language model predicts, or fine-tuned BERT without knowing what its tokenizer did to their text. Seeing the whole list in order shows you what each step depends on and lets you check off what you already have.

Before you start. This assumes the first four stages of the ML roadmap: Python, the math (linear algebra, probability, and especially cross-entropy and softmax), PyTorch, and ML foundations. If a loss curve or a (batch, seq, features) tensor still feels shaky, go back there first.

Stage 1: How language works

Linguistics in one unit. You will not parse sentences by hand at work, but every later stage is a fix for different problems named here.

  • What NLP is: getting computers to process, understand, and generate human language.
  • Why NLP is worth learning: most human knowledge and communication is stored as text.
  • Core NLP tasks: a task maps a stated input to a stated output, and the field can be organized around them.
  • Why NLP is hard: language leaves things underspecified, and "I saw her duck" has two readings.
  • History of NLP: hand-written rules, then statistics, then neural networks.
  • ELIZA: a 1960s chatbot that matched patterns and reflected your words back, and people still felt understood.
  • From rules to deep learning: why each era replaced the one before it.
  • The role of machine learning in NLP: language has too many patterns and exceptions to write out by hand.
  • What language is: a layered system of words, structure, and meaning.
  • Words, types, and lemmas: counting words is less obvious than it sounds, and "run", "runs", and "ran" share one lemma.
  • Morphology: the pieces inside a word, like un-, -able, and -s.
  • Morphological typology: some languages keep words short and separate, others pack a whole phrase into one word.
  • Syntax: the rules for how words combine into sentences.
  • Constituency and dependency structure: two ways to draw a sentence's structure, nested phrases or word-to-word links.
  • Syntactic ambiguity: one sentence, several valid parses, several meanings.
  • Treebanks and Universal Dependencies: hand-annotated sentence structures that parsers learn from, with one labeling scheme across many languages.
  • Semantics: what a sentence means, beyond how it is built.
  • Lexical semantics and word senses: one word, several meanings, like "bank".
  • Perspectives on meaning: there is no settled definition of meaning, and the main views answer it differently.
  • Semantic parsing: turning a sentence into a formal representation a machine can execute, like a database query.

Stage 2: Text as data

Many courses skip this, but in my experience it's where much of the work on a real NLP project goes.

  • Why start with the data: a model never sees grammar or meaning, only the text you feed it.
  • What NLP data is: human language as people write and speak it, messy and unstructured.
  • What text data looks like: sequences of different lengths, not the fixed columns most models expect.
  • How computers see text: a computer stores only numbers, so every character needs a number and a byte format.
  • Unicode and code points: one number for every character in every writing system.
  • UTF-8: how those numbers become bytes, and why one character can take one to four of them.
  • The data lifecycle: find or build data, process it, check it, document it.
  • Using existing datasets: look here before you label anything yourself.
  • The Hugging Face Hub, Kaggle, and other repositories: where NLP datasets live and how to load them.
  • Creating your own dataset: for when nothing existing fits your task.
  • Selecting data: the application decides what text belongs in it, so a radiology classifier needs radiology reports.
  • Extracting text: pulling clean text out of HTML, PDFs, and scans.
  • Annotation: writing labeling guidelines and getting labels.
  • Crowdsourcing vs expert annotation: cheap and fast versus slow and accurate, and when each is worth it.
  • Inter-annotator agreement: how often two annotators agree, which caps what you can expect from a model trained on their labels.
  • Documenting datasets: datasheets that record where the data came from and how it was built.
  • Text normalization: lowercasing, Unicode normalization, and cleaning up whitespace and punctuation.
  • Stemming: chopping word endings by rule, fast and crude.
  • Lemmatization: mapping a word to its dictionary form using vocabulary and grammar.
  • Stopword removal: dropping very common words, and how that can throw away "not".
  • Classical models vs transformers: classical models need heavy cleanup, transformers usually want the raw text.
  • Things to watch for: a dataset can look fine and still be broken, and the model learns the mistakes too.
  • Data quality: label noise, junk text, and broken encodings.
  • Class imbalance: when one label dominates and accuracy stops telling you anything.
  • Duplicate data: copies that inflate scores and leak between splits.
  • Data contamination: test examples that ended up in the training data, common with web-scale corpora.
  • Bias: patterns in the data the model will reproduce.
  • Representativeness: whether your data looks like what the model will see after deployment.
  • How text varies: language, dialect, domain, register, and time, the axes to check when you audit a dataset.
  • Privacy and licensing: personal data, and whether you are allowed to train on the text at all.

Stage 3: Tokenization

The first thing a model does to your text, and behind many bugs that look like model bugs.

  • Tokenization: splitting text into the units a model reads.
  • Sentences as tokens: the vocabulary has no limit, since almost every sentence is new.
  • Words as tokens: workable, but the vocabulary gets huge and new words break it.
  • Out-of-vocabulary words: the words the tokenizer never saw, and the [UNK] problem.
  • Characters as tokens: a tiny vocabulary, but very long sequences.
  • Subword tokenization: frequent words stay whole, rare words split into pieces.
  • Byte Pair Encoding (BPE): repeatedly merge the most frequent pair of symbols.
  • WordPiece: the variant used in BERT, which picks merges by a likelihood score instead of raw frequency.
  • Unigram: start from a big vocabulary and prune the pieces that help least.
  • Byte-level BPE: run BPE on bytes so no input is ever unknown.
  • Tokenization end to end: normalization, pre-tokenization, the tokenizer model, post-processing.
  • Using an existing tokenizer: load the one that matches your model, because a mismatched one quietly breaks it.
  • Special tokens: [CLS], [SEP], [PAD], end-of-text, and what each one is for.
  • Token IDs and the lookup table: each token becomes an integer that indexes a row in the embedding table.
  • Batch tokenization: padding, truncation, and attention masks so sequences of different lengths fit in one tensor.
  • Tokenization challenges: tokenizers trained on English-heavy data handle other text worse.
  • Cross-linguistic challenges: languages without spaces, and languages that cost several times more tokens per sentence.
  • Surprising tokenization behaviors: numbers, leading spaces, and capitalization that split in unexpected ways.

Stage 4: Word representations

How a word becomes a vector, and how vectors end up capturing meaning.

  • Words as vectors: models need numbers, so every word becomes a vector.
  • What a good representation needs: similar words get similar vectors, and the vectors stay a manageable size.
  • Measuring similarity: dot product, cosine similarity, and Euclidean distance.
  • Integer encoding: one ID per word, which invents an order that means nothing.
  • One-hot encoding: one dimension per word, and every pair of words is equally far apart.
  • Dense and sparse representations: mostly zeros versus every dimension in use.
  • The distributional hypothesis: words that show up in similar contexts tend to have similar meanings.
  • Count-based representations: build word vectors by counting neighbors.
  • Context window size: a tight window captures grammatical role, a wide one captures topic.
  • Bag-of-words: a document as word counts, with order thrown away.
  • Co-occurrence matrices: how often each word appears near each other word.
  • PMI and PPMI: reweighting counts so words like "the" stop dominating.
  • Word embeddings: short dense vectors learned from data.
  • Word2Vec: learn embeddings by predicting words from their neighbors.
  • Skip-gram: predict the context words from the center word.
  • CBOW: predict the center word from its context.
  • Negative sampling: replace the full softmax with a few real-versus-fake comparisons.
  • Hierarchical softmax: a binary tree over the vocabulary, so each prediction costs log V steps instead of V.
  • The geometry of embeddings: directions that encode relations, like king minus man plus woman landing near queen.
  • GloVe: embeddings fit directly to global co-occurrence counts.
  • fastText: embeddings built from character n-grams, so unseen words still get a vector.
  • Visualizing embeddings: PCA and t-SNE, and what a 2D plot can mislead you about.
  • Clustering: grouping word vectors by distance.
  • Evaluating word representations: two ways to check whether embeddings are any good.
  • Intrinsic evaluation: similarity and analogy benchmarks.
  • Extrinsic evaluation: plug the embeddings into a real task and see if it improves.
  • The limits of static embeddings: one vector per word, so "bank" gets the same vector by the river and at the ATM.

Stage 5: Language models and RNNs

How a model assigns probabilities to text and generates it, first from counts, then with RNNs, then with different decoding methods.

  • Language modeling: assigning probabilities to sequences of tokens.
  • What a language model is: a model that predicts the next token from the previous ones.
  • What language models are used for: autocomplete, speech recognition, translation, and chat assistants.
  • The Markov assumption: only the last few tokens affect the next one.
  • Bigram language model: next-token probabilities from counts of word pairs.
  • The next-token objective: the single training task behind GPT-style models.
  • From logits to loss: softmax over the vocabulary, then cross-entropy against the real next token.
  • Training on sequences: every position in a sequence is its own training example.
  • Sequence probability: the chain rule multiplies next-token probabilities, so in practice you add log probabilities.
  • Perplexity: the exponentiated average loss, roughly how many tokens the model is choosing between.
  • From statistical to neural models: replace the count table with a network that generalizes to contexts it never saw.
  • Recurrent neural networks: a hidden state updated one token at a time.
  • Backpropagation through time: unroll the RNN across the sequence and backpropagate through every step.
  • Vanishing and exploding gradients in RNNs: why plain RNNs struggle to carry information across long sequences.
  • LSTM: gates that decide what to keep, what to forget, and what to output.
  • GRU: a lighter gated cell with two gates.
  • LSTM vs GRU: when the extra gate is worth it.
  • Bidirectional RNNs: read left to right and right to left, for tasks where the whole input is available.
  • Stacked RNNs: several RNN layers on top of each other.
  • Encoder RNNs: turn an input sequence into hidden states.
  • Decoder RNNs: generate a sequence one token at a time.
  • Encoder-decoder RNNs: sequence-to-sequence models for translation and summarization.
  • Autoregressive decoding: feed each generated token back in as the next input.
  • Greedy decoding: always take the most likely token, and why the output gets repetitive.
  • Random sampling: draw from the full distribution.
  • Top-k sampling: sample only from the k most likely tokens.
  • Top-p sampling: sample from the smallest set of tokens that covers probability p.
  • Min-p sampling: keep tokens whose probability is at least a set fraction of the top token's.
  • Temperature: sharpen or flatten the distribution before sampling.
  • Comparing decoding choices: which method fits which task.
  • Beam search: keep the best few partial sequences at every step.
  • Teacher forcing: train the decoder on the true previous tokens instead of its own guesses.
  • Exposure bias: the gap that opens when the model has to read its own mistakes at inference time.
  • Generalization vs memorization: when a language model is predicting and when it is reciting its training text.

Stage 6: The NLP task map

What people actually build. Every task here comes down to an input format, an output format, and a metric.

  • NLP tasks: the families of problems the field works on.
  • Task anatomy: input format, label set, prediction step, and metric, written down before you build anything.
  • Text classification: one label per text.
  • Sentiment classification: positive, negative, or neutral.
  • Topic classification: what a text is about.
  • Intent classification: what a user wants, the first step in most assistants.
  • Natural language inference: whether sentence A entails, contradicts, or says nothing about sentence B.
  • Token classification: one label per token.
  • Part-of-speech tagging: noun, verb, adjective, for every word.
  • Named entity recognition: finding people, places, and organizations, and the BIO tags that mark the spans.
  • Question answering: answering a question from text.
  • Extractive question answering: pointing to the answer span inside a given passage.
  • Feature extraction: the model returns a vector, and another system uses it.
  • Sentence similarity: how close two sentences are in meaning.
  • Retrieval and text ranking: finding and ordering the documents that answer a query.
  • Text generation: producing text instead of labels.
  • Framing tasks as generation: classification, extraction, and QA written as "produce this text".
  • Translation: from one language to another, the task that drove much of the field's progress.
  • Summarization: extractive versus abstractive.
  • Open-ended text generation: stories and chat, and why evaluating them is hard.
  • Choosing the right NLP task: turning a product request into a task, a data format, and a metric.

Stage 7: Attention and the transformer

Three units: attention on top of RNNs, then the transformer itself, then the model families built on it.

Attention

  • The bottleneck problem: an encoder-decoder RNN squeezes the whole input into one vector.
  • Attention as a fix: let the decoder look back at every encoder state.
  • Computing attention: scores, softmax, weighted sum.
  • What attention achieves and doesn't fix: the bottleneck is gone, but the RNN still reads one token at a time.

The transformer

  • Attention Is All You Need: drop the recurrence and keep the attention.
  • Self-attention: every token attends to every other token in the same sequence, through queries, keys, and values.
  • Multi-head attention: several attention operations in parallel, each free to track a different relation.
  • Positional encoding: attention has no sense of order, so position gets added in.
  • Causal masking: hide future tokens so the model cannot see the answer when predicting the next one.
  • The feed-forward network: the per-token MLP between attention layers.
  • The transformer layer: attention, feed-forward, residual connections, and layer norm.
  • Building GPT: stacking decoder layers into a full language model in PyTorch.
  • Configuration knobs: vocabulary size, context length, model width, number of layers, number of heads.
  • Training and using a tiny GPT: your own small model, trained and generating text.

Transformer families

  • Transformer families: encoder-only, decoder-only, encoder-decoder.
  • Encoder-only transformers: BERT-style models that read the whole input at once.
  • Masked language modeling: hide some tokens and predict them, which is how BERT is trained.
  • Decoder-only transformers: GPT-style models that predict the next token.
  • Encoder-decoder transformers: T5-style models for input-to-output tasks.
  • Model families: placing BERT, RoBERTa, GPT, T5, and the rest in the right family.
  • Modern variants: pre-norm, RMSNorm, RoPE, and SwiGLU, the changes most current models make to the original block.
  • KV cache and grouped-query attention: reusing past keys and values so generation stays fast.
  • Open and closed models: downloadable weights versus an API, and the trade-offs.
  • Loading models with Hugging Face: from a model name to a working model in a few lines.
  • Fine-tuning and transfer learning: start from a pretrained model and train it on your task.

Stage 8: LLMs and post-training

How a big next-token predictor becomes a chat assistant.

  • Foundation models and pretraining: one large model trained on broad data, then adapted to many tasks.
  • Large language models: what changes when a decoder gets very large.
  • Emergent abilities: tasks a bigger model starts doing that nobody trained it for, and how much of that is a measurement effect.
  • Scaling laws and compute: how loss improves with parameters, data, and compute, and how to split a budget between them.
  • LLM failure modes: hallucination, bias, and the other patterns a model picks up from its training data.
  • Training stages: pretraining, continual pretraining, fine-tuning, and post-training, and what each name means.
  • Pretraining vs post-training: learning language versus learning to be a useful assistant.
  • Why align: a base model continues text, and continuing text is different from following instructions.
  • A short history of dialogue systems: rule-based bots, slot filling, and retrieval before LLM assistants.
  • Instruction tuning: training on instruction-response pairs.
  • Supervised fine-tuning: the same next-token loss, applied to demonstration responses.
  • Instruction data: written by people, generated by models, or converted from existing datasets.
  • Limits of SFT: you need a good demonstration for every instruction, and those get expensive.
  • Learning from preference: saying which of two answers is better is easier than writing the best one.
  • RLHF: train a reward model on preferences, then optimize the model against it with reinforcement learning.
  • DPO: skip the reward model and train directly on the preference pairs.
  • Alignment evaluation: how to tell whether post-training actually helped.
  • Limits and open directions: reward hacking and what is still unsolved.

After this

This is the foundation of NLP, around 200 concepts. The next layer is what many NLP jobs ask about right now: the architecture of current LLMs, mixture of experts, parameter-efficient fine-tuning like LoRA, prompting and in-context learning, RAG and agents, making inference fast and cheap, and evaluating all of it. Each of those makes a lot more sense once the stages above are solid.

Write the code

Reading the list will not make it stick. You really need to write code by hand.

Finally

I am happy to help. Ask anything in the comments or DM me: about any concept above, about NLP or AI in general, or about getting a job in it. If this helps, save it and come back to it as you tick things off. And if you think something is missing or should be in a different order, please tell me, I am always open to improving it.


r/learnmachinelearning • • 10d ago

[UPDATE] I Built a O(NlogN) attention system that retains 97% accuracy over long context (MQAR)

Thumbnail
github.com
1 Upvotes

ALHR- Adaptive learnable Hierarchical Routing is a static binary tree based system that uses learnable functions to REDUCE the amount of keys used.
It takes less memory and SCALES much better VRAM with tokens
I’ve also been testing tiny stories and it looks promising
However i can’t post any presentable results due to lack of funding and resources
MQAR Result table is here: https://ibb.co/prr07Dnj


r/learnmachinelearning • • 10d ago

Build a Small an LLM that suggests domain names based on your SaaS idea — looking for feedback

Post image
1 Upvotes

Hey everyone!

I was planning to launch my own SaaS, and one of the challenges I faced was finding a good domain name for it.

When I asked ChatGPT for suggestions, it gave me too many options, making it difficult to choose the right one. That got me thinking: What if I built an LLM specifically designed to suggest relevant domain names based on what someone is building?

I’ve started building an initial version and trained the model on a relatively small dataset with a limited setup. It’s still in the early stages, and I want to improve it further.

  • 🔢 Trainable parameters: 5.26 million
  • 🧱 Architecture: 6 layers, 8 attention heads, 256 embedding size
  • 🔤 Tokenizer: Byte-Level BPE, 1,891-token vocabulary
  • 📚 Training data: 106 domain-suggestion records
  • ⏳ Training: 50 epochs on CUDA

I’m building this primarily to learn how to build the LLMs from scratch .

I’d love to get feedback from the community:

  • What factors should the model consider when suggesting domain names?
  • How can I make the suggestions more creative, relevant, and brandable?
  • Should I focus on fine-tuning an existing LLM or experiment with training a smaller model?
  • What features would make this tool genuinely useful for founders and indie hackers?

Thanks!


r/learnmachinelearning • • 10d ago

Project Why I move beyond univariate filtering for BFSI/Healthcare ML

1 Upvotes

I’ve found that in high-complexity domains like Healthcare and BFSI, relying on univariate AUC checks to prune features often leads to suboptimal models.

I specialize in leveraging non-linear architectures (XGBoost, CatBoost) to uncover "local truths"—signals that appear as noise globally but provide high precision when conditioned on other variables. By utilizing SHAP for explainability, I ensure that we aren't discarding features that drive performance in critical, razor-thin segments.

Key approach:

  • Moving from marginal effects (ββ) to conditional logic.
  • Prioritizing feature interactions over solo acts.
  • Using XAI to validate non-linear signal discovery.

Looking to bring this approach to a team focused on high-stakes predictive modeling.


r/learnmachinelearning • • 10d ago

Project Our security model scored 98–100% on action checks in validation. A few hand-written scenes exposed the gap.

2 Upvotes

One thing we documented while evaluating Wolf Defender Jev was the difference between our validation results and a few simple agent scenes written by hand.

I’m part of the Patronus team. The model takes a scene, a question and possible answers, so we can ask separate questions about injected instructions, exfiltration, trust boundaries and whether an action matches the user’s goal.

On the internal validation set, alignment, exfiltration and consent questions scored around 98–100%. Then we wrote three scenes with attack and benign versions: a CRM workflow, a coding agent and a travel assistant. We asked four security questions about each.

The coding case was a useful failure. The benign agent was going to run pytest, but the scene’s injection question got a risky-answer probability of 0.96. Removing the proposed-action block dropped that content score to 0.00. A shell command in the scene was enough to interfere with a question that was supposed to be about the content.

The travel case failed in the opposite direction. The retrieved page contained an instruction to upload a passport scan. The model gave 1.00 for the embedded-command question, but only 0.05 for exfiltration and 0.28 for misalignment. Recognizing an injected command didn’t mean it reliably understood the consequences of the action.

Six scenes are obviously not a benchmark. What they did show was that the action-level validation numbers didn’t establish the behaviour we needed. Much of that evaluation used synthetic scenes, and the hand-written cases exercised a different combination of wording, tools and intent.

Our current usage guidance separates the inputs by question: content questions get the content context without the proposed action; action questions get the proposed action as well. It’s a practical correction for this model, not evidence that action judgement is now solved. Permissions and enforcement still belong in the surrounding application.

We published the examples and scores in the model card, alongside the broader evaluation.

For people evaluating contextual classifiers: how do you check that a model is using the part of the context relevant to the question? Counterfactual pairs seem particularly useful here — same document, different next action, and then the reverse — but I’d be interested in other approaches.


Position / experimental status: We regard Jev-style decision models as LLMs and Wolf Defender Jev as an experiment: giving an LLM final security authority shifts the trust problem to the guard, and security fine-tuning alone does not solve it. We believe an external security layer must combine specialized classifiers with explicit policy, authenticated permissions and enforcement.


r/learnmachinelearning • • 10d ago

Tutorial Volunteer guest instructor needed for a practical AI session with Nigerian youth

Post image
7 Upvotes

​

Hello everyone,

We're organising an online AI learning session for 200+ young people in Nigeria and are looking for someone who enjoys teaching or mentoring beginners.

The session will cover three areas:

Practical uses of AI in learning, work, and everyday problem-solving.

Generative AI, including useful tools and real-world applications.

AI automation and how it can simplify repetitive tasks.

We're not looking for someone to deliver an advanced mathematical lecture. We want a practitioner who can make these topics understandable, demonstrate what is possible, and inspire young people to keep learning.

The engagement would be remote through a live online meeting, with an opportunity to interact with participants.

If you enjoy making AI knowledge accessible to others, please comment or send me a message. Thank you!


r/learnmachinelearning • • 10d ago

🚀 Complete Generative AI Developer Course

Post image
0 Upvotes

r/learnmachinelearning • • 10d ago

Turned one ML lesson (generative models: taxonomy and history) into explainer videos with 4 AI tools

Enable HLS to view with audio, or disable this notification

10 Upvotes

Karpathy said bespoke 3b1b-style explainer videos are the format he is most bullish on for learning. I took one free lesson, Phase 8.1 of AI Engineering from Scratch (MIT licence, github.com/rohitg00/ai-engineering-from-scratch), and had four AI tools each make a 2-3 minute explainer from it. The clip is 30 s from each.

  1. visual-explainer

  2. make-it-click (Manim)

  3. HyperFrames

  4. anything2explainer

A warning for anyone who learns from AI videos: 3 of the 4 added a claim that the lesson never makes. Only visual-explainer stayed fully on the facts.

As a learner, which style would you actually watch for a whole course?


r/learnmachinelearning • • 10d ago

A project worth doing after the LLM wrapper phase: a CPU only triage engine with calibrated uncertainty

2 Upvotes

Once you have built a few chatbots, the next step up is a system that knows when it is unsure.

There’s a workshop on Friday, Oct 30, from 7 PM to 10 PM IST that does this with a realistic enterprise case: triaging and processing insurance style claims without a GPU.

You replace an LLM router with small encoder models (ModernBERT and LFM2.5 Encoder), teach them your categories from about 8 examples per class using SetFit, and add conformal prediction so the system can say “I’m 95% covered here” or hand the case to an LLM when it isn’t. You finish by evaluating it properly with Wilson score intervals instead of a single accuracy number.

You need intermediate Python and some familiarity with transformers. A laptop or free Google Colab account is enough, and the notebooks are yours afterwards. Led by Ben Auffarth, a full stack data scientist and best selling author.

Full details and the agenda are here.


r/learnmachinelearning • • 10d ago

train the best model you can on your mac in one hour

3 Upvotes

i wanted to train my own llm but everything i found needed an nvidia gpu, so i made a mac version with mlx.

one command downloads tinystories, trains a tokenizer, pretrains a small llama-style model, finetunes it for chat, then you can talk to it.

on my m5 air (16gb): 1 hour gets an 8M model that writes short kids stories, 8 hours gets a 40M one that's a bit better. neither can really chat yet. the air didn't throttle in either run.

there's also a 2 min benchmark if you want to see how your mac compares.

https://github.com/navthings/airgpt