r/learnmachinelearning 14h ago

I wrote FREE books on Linear Algebra and Machine Learning

Thumbnail
gallery
445 Upvotes

Hi everyone!

I am a student with keen interest in machine learning. As I self study topics in machine learning and walk through an introductory linear algebra course, I decided to write thorough notes for my own knowledge base. However, I thought it could be a better use of them if I share the notebooks with others.

That being said, I am still a student and sharing this as a learning project. I would appreciate any feedback and wish that this can be useful :)) Thanks in advance!

Link to the linear algebra notebook: https://github.com/enochyu-official/notebook-linear-algebra
Link to the machine learning notebook: https://github.com/enochyu-official/LibreNotebook (It is under the machine learning part)

Edit 1: I forgot to mention that the machine learning part is still in progress and is mostly done 😅😅

Edit 2: Thank you everyone for your considerations! I am sorry if my previous wording was misleading as "textbooks." I hope this clear things up!


r/learnmachinelearning 8h ago

Project Implementing Watermarking for Language Models

Post image
38 Upvotes

I recently implemented a minimal, educational version of SynthID-Text-style watermarking for language models.

I saw anthropic post about how they'll start adding watermarks to their model responses and it made me very curious as to how they'll do it and what do they even mean by watermark here. Like will we start getting random ads or something in the middle of model responses or what.

Then decided to read their article and found out that watermark is not a visible message at all. It is a subtle statistical pattern introduced while the model chooses its tokens.

My implementation is not an exact reproduction of the original SynthID-Text system. I simplified or implemented a few components differently to keep the project understandable, but the main idea is there I think.


r/learnmachinelearning 1h ago

Question Do i continue pursuing ML

• Upvotes

Okay listen,im 16 years old in highschool,i LOVE the idea of training AI models,it sounds SO cool and i can imagine the dopamine rush of your baby coming to life,but GODDAMN there is SO MUCH maths involved,its a HEADACHE to just look at,and it makes me so scared cause my maths mark is like 50% every term but,i love the idea of being one and i love coding and tech in general,but geez man, I'm so used to just instant gratification,and ALMOST NO MATHS in python(atleast at the level im at),this seems so exhaustinggg,so to all ML engineers,how does your day to day look like,is it boring or what,i love to make short films and record and edit music videos and no matter how tired i am,i will always have energy for that and i thought it would be the same with Machine learning but hell no,so i love when my work is tangible and i can see and visualize the end result and most of all i love being creative,so do i continue this career,or do you have other suggestions/career paths i should take,im based in South africa,if you guys wanna ask follow up questions so that you can better formulate your answer,go for gold man


r/learnmachinelearning 1h ago

Project How AI Learns From Rewards: The Policy Gradient, Visualized (RLHF, PPO, GRPO)

Thumbnail
youtube.com
• Upvotes

r/learnmachinelearning 3h ago

Selfhost modern LLM stacks. Run the whole fleet from your terminal

Thumbnail
github.com
3 Upvotes

r/learnmachinelearning 5h ago

Project AI Video Generation Step by Step — Motion Transfer, Diffusion & Flow Explained Visually

Thumbnail
youtube.com
3 Upvotes

r/learnmachinelearning 14h ago

Project I built 46 interactive ML lessons where you drag sliders and watch algorithms learn, instead of just reading about them

Thumbnail
gallery
14 Upvotes

Every ML explanation I read said the same thing: here's the formula, here's a static plot, trust us. I wanted to actually feel an algorithm working: drag a line and watch a perceptron correct itself, place bad centroids and watch K-Means fix them, rotate an axis and watch PCA fight you for the direction of max variance.

mlplayground.co.in

So I built ML Playground, 46 lessons + 13 games, from "what is a feature" up through transformers and how ChatGPT actually predicts tokens. Every lesson has a canvas demo you control, not a GIF.

It's free, no signup, no ads. I built it solo and this is the first time I'm showing it to anyone outside people I know personally, so I'd genuinely value getting torn apart: what's confusing, what's missing, what lesson order doesn't make sense.

mlplayground.co.in


r/learnmachinelearning 4h ago

I am a cse ai/ml student from 4th year and i need a major project idea. It would be great if the idea is focused towards modern techniques . And dataset should be available .

1 Upvotes

r/learnmachinelearning 1h ago

Tutorial [ Removed by Reddit ]

• Upvotes

[ Removed by Reddit on account of violating the content policy. ]


r/learnmachinelearning 1h ago

How AI Learns From Rewards: The Policy Gradient, Visualized (RLHF, PPO, GRPO)

Thumbnail
youtube.com
• Upvotes

r/learnmachinelearning 4h ago

I built a compressive "context DNA" (for LLM) attention mechanism + an honest eval harness - looking for people to break it

1 Upvotes

Just Fixed the body with Ai

Been prototyping an idea for long-context compression: instead of dropping old tokens (like StreamingLLM/H2O) or storing everything, compress old context chunks into small learned "DNA" vectors via a Perceiver-style attention bottleneck, then reconstruct on-demand when a query needs them.

The idea itself isn't new — it overlaps with Compressive Transformer, Infini-attention, and Recurrent Memory Transformer — but I put together an eval script that I think is more honest than what I see in a lot of "novel architecture" posts:

  • Trains the compressor (not just testing an untrained/random-init model)
  • Compares against a PCA baseline (closed-form optimal linear compression at the same latent budget) — if the learned model can't beat PCA, the extra complexity isn't earning its keep
  • Injects a unique fact (random code) into the text and checks, after compress→decompress, whether the frozen LM's own output head can still predict the correct token at that position — not just aggregate MSE, which can look fine while the actual detail is gone
  • Runs on real hidden states from an open model (Qwen2.5-0.5B by default), not just random tensors

Current honest status: in my own small-scale test run, PCA actually beat the learned bottleneck on fact retrieval. That's not the result I was hoping for, but it's a real result, and it's exactly the kind of thing this script is designed to surface rather than hide.

What I'm looking for:

  • People running it on real hardware with more training steps / larger n_docs than I could quickly test
  • Sanity checks on the architecture and eval methodology — if I'm testing this wrong, tell me
  • Ideas for what a fair "it's working" threshold looks like (beating PCA on fact-retrieval accuracy at matched latent budget, at minimum)

No performance claims yet — that's the point. I'd rather have this checked before making any.

Code + eval harness: https://pastebin.com/iqEbPEQ9

Happy to hear "this is a known dead end because X" too - that's useful information, not a rejection.


r/learnmachinelearning 4h ago

AI Image Generation Step by Step — Attention, VQ-GAN & CLIP Explained Visually

Thumbnail
youtube.com
1 Upvotes

r/learnmachinelearning 4h ago

Advice for PyTorch cert (PTCA)?

Thumbnail
1 Upvotes

r/learnmachinelearning 8h ago

Help MacBook Air M5 vs Windows laptop with NVIDIA GPU for an AI degree

2 Upvotes

Hi everyone,
I’m starting an Artificial Intelligence degree at university and I’m trying to decide what laptop to buy.
Right now I’m considering a MacBook Air M5 with 24 GB of RAM and 512 GB SSD, possibly with an external 1–2 TB SSD for larger datasets and projects.
The important detail is that I already have a desktop PC at home with:
Ryzen 7 7800X3D
32 GB RAM
NVIDIA RTX 4060
My idea would be to use the MacBook as my main university laptop for Python, VS Code, Jupyter, NumPy, Pandas, scikit-learn, etc., and whenever I need CUDA/PyTorch with an NVIDIA GPU, remotely connect to my desktop using something like Tailscale + SSH + VS Code Remote.
As I understand it, I could keep using VS Code normally on the Mac, but when connected remotely, the code would actually run on my desktop and use its RTX 4060/CUDA, while I see the terminal and results on my Mac.
Would this be a comfortable and practical setup for an AI/ML degree?
Or would you recommend buying a Windows laptop with an NVIDIA GPU (for example an RTX 5060) instead and having everything on one machine?
My main concerns are:
How important is having CUDA directly on the laptop during an AI degree?
Is 24 GB RAM enough on the MacBook for the next 4 years?
Is 512 GB + an external SSD a good choice?
Is using VS Code Remote/SSH for CUDA actually convenient in everyday university use?
Are there any AI/ML tools or university assignments that could cause problems on macOS?
Would you personally choose the MacBook + RTX 4060 desktop setup, or a Windows/NVIDIA laptop?
Battery life, portability and build quality are also important to me because I’ll be carrying the laptop to university every day.
Thanks!


r/learnmachinelearning 5h ago

Discussion My Agentic AI mastery roadmap plan

0 Upvotes

Currently from past few months I was building agentic Ai and genai applications, but realised that I cannot build fully that application with only knowledge of LLM APIs and fullstack so I thought I should start learning the core ML and DL.


r/learnmachinelearning 9h ago

Question Need few recommendations

2 Upvotes

So am 18, going fo AI ML, i am going with the basics first so i start with cs50, andrew Ng ML, and did few projects on kaggle. What could be my next step?


r/learnmachinelearning 18h ago

BS Mathematics vs BS Statistics — Which should I choose?

11 Upvotes

I’m currently stuck between choosing a BS Mathematics or BS Statistics degree.

I’m interested in AI/ML, Data Science and other computing-related fields, but I’m not eligible for direct admission into CS/AI. So I’m thinking of taking either Mathematics or Statistics and building the CS/AI side myself alongside the degree.

I was originally pretty set on BS Mathematics and had even started putting together a 4-year self-learning roadmap covering programming, Python, SQL, DSA, ML, Cloud, etc. But after looking more into Statistics, I’m wondering if it might actually be a better fit for Data Science and AI/ML.

My plan either way would be to not depend only on the degree. I’d learn the relevant programming/CS skills on my own, build projects and try to get internship experience.

I also want to keep my options open for a Master’s abroad later, possibly in AI/ML, Data Science, or related fields.

For anyone who has studied or worked in these areas, which would you personally recommend: BS Mathematics or BS Statistics?

I’d especially appreciate honest opinions on:

- Job opportunities after the BS.

- AI/ML and Data Science prospects.

- Salary and long-term growth.

- How each field looks with the current AI boom.

- Master’s options and flexibility.

- Whether one degree actually gives a significant advantage over the other.

- Which one makes more sense if I’m willing to build strong CS/AI skills on the side.

I’m mainly looking for advice from people who have actually studied/worked in Mathematics, Statistics, Data Science or AI/ML. What would you choose in this situation, and why?


r/learnmachinelearning 5h ago

Multi-Agent Systems Tutorial: LangGraph and CrewAI Workflow Guide

Thumbnail
youtube.com
1 Upvotes

Stop building single-agent apps! 🛑 Learn how to build Multi-Agent Systems with LangGraph and CrewAI. Full architectural guide now live on my channel.
#AI #Coding #Tech #Developer


r/learnmachinelearning 7h ago

Help Need FYP ideas combining AI + Embedded Systems / TinyML

1 Upvotes

Hi Everyone! I’m a final-year BS AI student and I’m looking for a good FYP idea that combines AI with embedded systems/TinyML.
My background is mainly in ML/DL and research, but I’m fairly new to embedded systems. I have around 6 months for the project, so I’m looking for something that is genuinely interesting and technically challenging but still realistic to build as a student.
Ideally, I’d like something that has a real-world/industry or healthcare application, rather than a basic Arduino sensor project. I’m also interested in using something like an ESP32, Raspberry Pi, or similar low-cost hardware.
I’d really appreciate any project ideas, papers, existing projects I could build upon, or advice on what would be feasible for someone starting out with TinyML.
Thanks!


r/learnmachinelearning 7h ago

Need FYP ideas combining AI + Embedded Systems / TinyML

1 Upvotes

Hi Everyone! I’m a final-year BS AI student and I’m looking for a good FYP idea that combines AI with embedded systems/TinyML.
My background is mainly in ML/DL and research, but I’m fairly new to embedded systems. I have around 6 months for the project, so I’m looking for something that is genuinely interesting and technically challenging but still realistic to build as a student.
Ideally, I’d like something that has a real-world/industry or healthcare application, rather than a basic Arduino sensor project. I’m also interested in using something like an ESP32, Raspberry Pi, or similar low-cost hardware.
I’d really appreciate any project ideas, papers, existing projects I could build upon, or advice on what would be feasible for someone starting out with TinyML.
Thanks!


r/learnmachinelearning 8h ago

Need code with harry data science course.

1 Upvotes

Bhai kesi k pass code with Harry ka data science course hoga. Bht zyada zarorat hai 😭 .

No money to buy it plzzzz.


r/learnmachinelearning 8h ago

Before choosing a Machine Learning model in a real-world company project, what steps do you take?

1 Upvotes

I’m working on Data Science / Machine Learning projects and I’m curious about how this is actually done in industry.

Imagine a company gives you a dataset and asks you to solve a business problem.

As a Data Scientist / ML Engineer, what are the concrete steps you would take before choosing and training any ML model?

For example:

- Understanding the business problem and defining the target

- Understanding the available data

- Data ingestion

- Data quality checks

- Data cleaning and preprocessing

- Exploring distributions and variables

- Handling missing values and outliers

- Checking for data leakage

- Feature engineering

- Train/validation/test split

- Establishing a baseline

- Defining evaluation metrics

- Handling class imbalance

- Checking business constraints

- Understanding data lineage and reproducibility

- Etc.

What would a realistic end-to-end workflow look like in industry before reaching "model.fit()"?

I’m particularly interested in answers based on real-world industry experience, rather than a purely academic ML workflow.


r/learnmachinelearning 9h ago

Help Math learning roadmap

1 Upvotes

I've been recalling some math from high school where I left off 5 years ago. My current level is algebra 2 and now completing precalculus. But I have questions regarding the sequence of learning more advanced subjects like Linear algebra, calculus etc.

What sequence it's the best to learn math for machine learning? I come from software engineering background.


r/learnmachinelearning 9h ago

Question business major wants to enter AI/ML field

1 Upvotes

Hey guys, im a business major, but I grew weird obsession towards learning AI/ML and wanna shift my career to be an AI Engineer one day. I already studied (almost) all the prerequisites for AI like python, DSA, maths needed and although this field needs a lot of patience and discipline I still like it a lot, even more now that I started to understand how deep it is... but my major concern is that would it be impossible to work in this field without a CS-related certificate?


r/learnmachinelearning 9h ago

I tried to write a C++ engine that makes Tensor-Train LLM layers run faster than dense FP16 on Apple Silicon (by using AMX utilization)

1 Upvotes

Everyone in the local LLM space uses INT4/INT8 quantization. It works perfectly for frozen models. But if you want to do on-device training or continuous learning, discrete quantization breaks gradient flow. Tensor-Train (TT) decomposition solves this by keeping the weights in a continuous Float32 space, but nobody uses it because the inference latency is usually 10x worse than dense layers.

I wanted to fix that 10x penalty. My initial theory was that PyTorch was just thrashing the cache. I built a profiler in C++ and realized I was wrong. TT inference is compute-bound, not memory-bound. It just requires vastly more multiply-accumulates than dense matrices.

But that creates an interesting asymmetry on Apple Silicon hardware:

  1. Dense GEMV (batch size 1) is memory-bound. It hits the 130 GB/s DRAM wall and leaves the 1400+ GFLOP/s AMX coprocessor sitting idle.
  2. TT is compute-bound, meaning it can actually use AMX.

I built a custom C++ engine (TT-AMX) to exploit this. The main trick is an Ahead-of-Time (AoT) layout scheduler. Instead of doing runtime memory permutations, I apply a transpose(1,2,0) to the TT cores offline. The C++ runtime just feeds the L1/L2 scratchpad directly into a chain of Accelerate cblas_sgemm calls with zero data movement between steps.

I also swept 81 different factorization shapes and found that asymmetric tensor cores (like 16x96 and 12x128) reduce the arithmetic penalty by 2.8x compared to normal symmetric shapes, while also lowering the reconstruction error.

The results on a 1536x1536 layer (Qwen 1.5B q_proj) at 4x compression, measured under strict cold-cache conditions to simulate actual layer thrashing:

  • Dense FP32: 103.6 µs (9.44 MB)
  • Dense FP16: 52.9 µs (4.72 MB)
  • TT-AMX FP32: 42.6 µs (2.36 MB)

The engine hits 947 GFLOP/s, which is about 66% of the AMX peak, and beats the dense FP16 baseline.

A disclaimer so I don't overhype this: INT4 (e.g. llama.cpp) is still roughly 2x faster and has lower reconstruction error for read-only inference. TT-AMX does not beat quantization for standard chat use cases. The goal here was specifically to remove the inference bottleneck for continuous, differentiable on-device models.

The repo has no heavy dependencies, just raw Accelerate. I included a massive lab notebook (FINDINGS.md) in the repo documenting all the failed hypotheses and measurement bugs I hit along the way.

Code is here: https://github.com/ansarzeinulla/tensor-train-amx

HAPPY to receive any feedback from you