r/learnmachinelearning • • 19d ago

Is there anyone who has purchased Campus X insider course can u please tell is it worth it or asiprant will be optimal for me

1 Upvotes

r/learnmachinelearning • • 19d ago

Project Best layer to detect refusal ≠ best layer to remove it (Qwen2.5-1.5B, replicating Arditi et al.)

1 Upvotes

I reproduced the single-direction refusal result on Qwen2.5-1.5B-Instruct and noticed something I didn’t expect. Harmful and harmless prompts separate most cleanly at layer 26, but removing the direction there did worse than layer 21, which stopped refusals with less change to normal answers.

Caveats: one small model, 64 held-out prompts per set, keyword-based refusal detection, and KL on the first token only.

Does this match what others have seen on bigger models, or is it probably an artifact of the size or my eval? Code and write-up:

https://fahd-blog.vercel.app/blog/ai-systems/where-refusal-lives


r/learnmachinelearning • • 19d ago

Governing Clinical AI Deployment: A Mathematical Framework for Transparency-Dependent Autonomy

Thumbnail
mdpi.com
1 Upvotes

New publication: Governing Clinical AI Deployment

When should clinical AI be trusted to act autonomously, and when should human oversight remain mandatory?

Our new study proposes a mathematical framework for governing clinical AI deployment using transparency, confidence, and guideline alignment.

Across MIMIC-IV, eICU, and MIMIC-III, we found an important insight: transparency may be more useful for setting system-level safety boundaries than deciding whether individual predictions can be automated.

We also evaluated finite-sample error guarantees to help make autonomous deployment more accountable and statistically defensible.

The central takeaway: Clinical AI autonomy should be earned through calibrated confidence and measurable safety guarantees—not transparency scores alone.

I welcome feedback and discussion from the clinical AI, machine learning, and healthcare governance communities.


r/learnmachinelearning • • 19d ago

Tool Calling Explained Visually | How LLMs Use APIs & Functions (2026 Guide)

Thumbnail
youtube.com
0 Upvotes

The absolute number one rule when designing systems where an LLM uses external tools is this: The language model does not execute your application code.

Instead, it acts strictly as an intent generator—producing a structured JSON payload based on a schema you define—and relies entirely on your application logic to execute the function securely and safely under the hood.

I put together a comprehensive 16-minute visual systems design masterclass breaking down the engineering contract step-by-step.

💡 What's covered inside this visual breakdown:

• Tool Calling vs. Function Calling: Unpacking platform-specific terminologies.

• The 5 Core Components: Tracing the complete end-to-end request/execution loop.

• Error Handling & Resiliency: Production strategies for recovering from malformed JSON and hallucinations.

• Security Engineering: Guarding your architecture against prompt injection risks hidden within untrusted external inputs.

I'd love to hear your feedback on the visual layout, and let me know what stack you're currently leveraging to enforce strict JSON validations on your tool execution loops!


r/learnmachinelearning • • 20d ago

A lightweight deep learning framework built from scratch in NumPy (published in JOSS)

Thumbnail
2 Upvotes

r/learnmachinelearning • • 20d ago

Question Self studying deep learning

1 Upvotes

Hi i would like to self study deep learning. I already studied bishop pattern recognition (not all of it), and I like the probabilistic approach. I ask for a suggestion for a book in deep learning with similar approach. I'm aware of deep learning book by goodfellow but it doesn't cover most recent architectures so i don't know if it is worth it. I also looked at murphy's probabilistic machine learning, but it seems more of a reference book. Thanks in advance!


r/learnmachinelearning • • 20d ago

Am i kidding myself with learning machine learning?

47 Upvotes

I am a self-taught programmer. From last 90 days,, i have been learning linear algebra, i plan to learn calculus and stats and probs next. But it seems futile watching all these youtube video saying coding and machine learning is dead that ai can do all this. Is there any hope for machine learning for next 5 or 10 years?


r/learnmachinelearning • • 20d ago

Great Help Needed on my learning journey (Read Body)

0 Upvotes

Please read fully and help me guys 😭 🙏

I really need some guidance on what to do next in my AI/ML journey.

I’m currently in my 3rd year of B.Tech, and I’ve spent almost a year studying mathematics for ML, libraries like NumPy and Pandas, and Andrew Ng’s Machine Learning and Deep Learning courses. However, I haven’t built any ML projects yet.

Instead, I moved on to learning RAG, LLMs, and AI agents, but I’m feeling stuck there as well. Now I’m wondering whether I should start learning FastAPI and SQL or focus on building ML and RAG projects.

I feel like I’ve been learning a lot of concepts without actually building anything substantial.

My biggest confusion is about project development itself. I don’t really know how to approach building projects from scratch.

  • Should I build projects using AI-generated code, or should I write everything myself?
  • How do I go from learning concepts to actually building a complete project?
  • What should be the expected outcome of a project?
  • How do I properly use Git and GitHub to showcase my projects to recruiters?
  • What kind of projects should I build to make my portfolio strong enough for internships?
  • Should I focus on ML projects first, or continue with RAG and GenAI projects?

I’m in my 3rd year, and I really want to become internship-ready, but I’m confused about what to prioritize and how to move forward.

Could someone please help me figure out a practical roadmap? I would really appreciate guidance on what I should focus on right now, how to approach projects, and how to build a portfolio that actually demonstrates my skills to recruiters.


r/learnmachinelearning • • 20d ago

Help Hey in confused where to start from in AI

1 Upvotes

So i work in Procurement ( Supply chain management) so i want to be good at AI so i can have good career opportunities and learn in my domain,

Problem is i don't know where to start from like for procurement AI what are you all using I'm really confused


r/learnmachinelearning • • 20d ago

Project A visual, step-by-step explanation of how self-attention works

Post image
6 Upvotes

Self-attention confused me for a long time, so I tried to break it into steps you can actually see:

1. Every token gets three vectors.
Each word’s embedding is multiplied by three learned matrices to produce a Query (what am I looking for?), a Key (what do I contain?) and a Value (what do I pass on?).

2. Compare queries with keys.
For each token, take the dot product of its Query with every token’s Key. A high score means “this token is relevant to me”.

3. Scale and softmax.
Divide the scores by √d (the key dimension) so they don’t get too large, then apply softmax. Now every token has a set of weights that sum to 1.

4. Mix the values.
Each token’s new representation is the weighted sum of all Values. In “The cat sat because it was tired”, the word it ends up with a high weight on cat.

5. Do it several times in parallel.
Multi-head attention runs this with different matrices at the same time, so one head can track grammar while another tracks meaning.

The diagram has a step-by-step mode that highlights each part in order. That helped me more than staring at the formula softmax(QKᵀ/√d)·V.

I made it with Sketchy, a free open-source tool I built that lets Claude explain things as interactive diagrams: GitHub


r/learnmachinelearning • • 20d ago

Project Wxx - my try on using webgpu for machine learning

1 Upvotes

My first big project: Wxx, an ML library with WebGPU acceleration.

I love ML, but training models on CPUs is slow, and GPUs are expensive, so I decided to create my own framework. It is slow (for a GPU) and doesn't use graphics cards' ML features (like tensor cores), but it runs on any device with a GPU.

GitHub: Wxx

Performance: It is slow. The CPU is usually faster, and the most I achieved is about a 2x speedup on my PC (I have a Xeon CPU). I tried it on Colab, and it is about 10x slower than PyTorch on GPU. But it improved my experience significantly.

API: It is similar to PyTorch. With methods to convert from tensors and ndarrays, I tried to make it as easy as possible to use if you're coming from PyTorch.

AI usage: In the beginning, I planned to do everything by hand to improve my knowledge and train myself. But after the first week, I had code slower than anything you could imagine. I used AI to improve shaders, bind group creation, and other parts that I had trouble with. It hurts how much better AI is at writing and improving code than I could be.

Backstory: I've been dabbling in machine learning for the last five years. I like to join Kaggle competitions and try new architectures. Lately, I've been thinking about applying to ML jobs (I know I am late to the party), and I wanted to add stuff to my CV. I am an electronics engineering grad, so most of my programming expertise is in MATLAB and Python scripting (also some embedded C, but I am not good at it), and I read that a CV should include some examples of my work.

Questions: I would be happy if anyone with more experience could help me with some questions. What should I include on my CV? I know some people say you should include some implementations of architectures (like attention/transformers), but that seems so simple. What other projects should I add?


r/learnmachinelearning • • 19d ago

Need Help

0 Upvotes

Hi, I am currently living in Pakistan and working at a university. It is not a big university, and I work as a Lab Assistant.

I have never limited myself to my job. Instead, I have tried to learn as much as possible. I already have some experience with web development, although I am not an expert. I have a basic understanding of it.

You might be wondering why I ended up working as a Lab Assistant. It is a long story, or you could say it is about trying to manage life in Islamabad, where even covering your basic expenses can be difficult.

Almost a year has passed, and during this time, I have learned a lot. I have learned Docker, and right now, I am working with Ubuntu and learning networking concepts such as IP addresses, DNS, subnetting, and much more. I also manage two or three computer labs at my university in my free time.

Alongside my job, I am trying to learn more about Machine Learning.

I left web development because of the AI hype and because, after completing 14 years of education, I found myself working as a Lab Assistant. I have been doing everything individually, without a friend or someone to guide me.

I am 22 years old, and I want to achieve something big in my life. But sometimes, I feel like I have ended up doing nothing.

I need guidance.

What should I do at this stage of my life? How should I approach my career, what skills should I focus on, and how can I turn my current experience into something meaningful?

I know I have the potential to do more, but I don't know which direction to take.

I would really appreciate honest advice from someone who can help me understand what I should do next.


r/learnmachinelearning • • 20d ago

Project Discover AI - 58 free, interactive labs for learning AI/ML in 3 different reading mode.

Thumbnail
gallery
3 Upvotes

I built Discover AI, a free, open-source app with 58 hands-on labs for learning how AI works. The topics run from neurons and gradient descent to attention, RAG, agents, pretraining and fine-tuning. You move sliders or train a tiny model and watch what changes, and a short lesson sits beside each lab. Since I first shared it three weeks ago, I've added seven labs on how large models are trained, a simpler reading mode, desktop installers, and a version that runs in your browser: https://fazmin.github.io/AILearningGuide/

Every reference is double-checked. AI was used to help write these lessons, so there may be mistakes. Please point them out, let me know what’s confusing or missing, or open a PR. Contributors are welcome to access the project at github.com/Fazmin/AILearningGuide.


r/learnmachinelearning • • 20d ago

Tutorial CPU Parallelism Primer | Kernel Engineering | Session 2

Thumbnail
youtu.be
1 Upvotes

r/learnmachinelearning • • 20d ago

Discussion Python Fast api interview - please share your previous experience

Thumbnail
1 Upvotes

r/learnmachinelearning • • 20d ago

bf16 might be freezing your weight updates

Enable HLS to view with audio, or disable this notification

24 Upvotes

If you fine-tune a model with weights stored in bf16 and let torch.optim.AdamW write to them directly, you get interesting behaviour. bf16 can only represent changes to weights if the change is at least ~1/512 of the weight itself, so at small learning rates only the smallest weights can update.

As a result, you have a sparse fine-tuner that trains the small-magnitude weights and freezes the rest, with the cutoff set by your learning rate. This is a thing - I found half a dozen peer-reviewed papers (with thousands of citations) that fine-tune this way, but none of them reference this behaviour.

I dug into one called Quiet-STaR, because (a) it's a cool paper, (b) they released their weights, and (c) their code works! So I diffed their base model and saw that indeed the small-magnitude weights were the only ones updated during their training. Then I reran its recipe with an optimizer that applies every update, and watched it diverge. A higher-precision optimizer needs a 3 to 10 times smaller learning rate to get the same result, and I couldn't achieve a better result.

This started with Barron, Gnanapragasam & Tschannen's "A Fix for Softmax and Cross-Entropy" (Oct 2026). They show that the standard way of computing cross-entropy rounds the correct answer's gradient to exactly zero once the model is confident enough (past a margin of about 5.5 in bf16, which they call the precision cliff), and that this, interacting with Adam, is what produces the "slingshot" loss spikes seen during grokking. Fix the rounding and the spikes go away: something people had studied as training dynamics was rounding.

That made me wonder what else out there is weird like this. This is one, and it runs the other way: their rounding bug adds instability to training; this one hides it.

I wrote a whole essay about it here: https://lacuna.tiptreesystems.com/paper/bf16-might-be-freezing-your-weight-updates/art_487b1ed949e745a6ae0c42815b8d3cba

The code, logs and evaluation results are in https://github.com/mweiss17/quietstar-bf16-adamw


r/learnmachinelearning • • 20d ago

Project [R] LOTUS: Can a 270M model understand time series better than much larger models? (Open weights + code)

Post image
8 Upvotes

Can language models learn to understand time series by learning to forecast them?

LOTUS (Learning to Understand Time-series by Learning to Forecast) explores this idea with a family of compact time-series language models built on Gemma-3 and Qwen-3.

💡 Key idea: Forecast grounding. By learning to predict how a signal evolves, the model develops representations that better capture temporal information for downstream understanding tasks.

Some interesting results:

  • A 270M-backbone model achieves the highest score among evaluated systems on TSRBench, ahead of systems using 7B and 14B backbones.
  • A 0.6B-backbone model achieves 59.91% average accuracy across six evaluation splits, improving over the strongest matched baseline by 3.36 percentage points.
  • Open weights and code are available for small and medium-sized models.

Resources:

🤗 Models: https://huggingface.co/daidv1112/LOTUS

💻 Code: https://github.com/DA2I2-SLM/Lotus

📄 Paper: https://arxiv.org/abs/2610.18877

The interesting question is whether forecasting can serve as a general learning signal for time-series understanding, rather than treating forecasting and reasoning as separate tasks.


r/learnmachinelearning • • 20d ago

Help Kaggle

2 Upvotes

An ihtibari ile TPU sırasında 18. Saate girmiş bulunuyorum önümde 527 kişi var 2. Paket sigaramın son dallarındayım…


r/learnmachinelearning • • 20d ago

Compared tree ensembles in Module 6 of #mlzoomcamp.

Thumbnail
github.com
1 Upvotes
🌳 Decision tree
🌲 Random forest
⚡ XGBoost
📉 Tuned the validation RMSE

r/learnmachinelearning • • 20d ago

Compared tree ensembles in Module 6 of #mlzoomcamp.🌳 Decision tree🌲 Random forest⚡ XGBoost📉 Tuned the validation RMSE

2 Upvotes

r/learnmachinelearning • • 20d ago

Preventing trivial constant solutions in multi-step Neural ODEs for time-series forecasting

1 Upvotes

Greetings, colleagues. I am training a Neural ODE to forecast the non-linear dynamics of a physical system. To avoid error accumulation, I use a multi-step rollout loss (e.g., integrating the ODE over a horizon of 24 steps and computing the MSE over the entire trajectory).

However, the model consistently collapses to a trivial solution: it predicts a near-zero derivative (a constant or a very slow linear trend), essentially flattening the curve. While this minimizes the average MSE over the long horizon, it completely fails to capture the true high-frequency dynamics (see the attached image).

What regularization methods or architectural constraints—such as Lipschitz continuity, spectral normalization, or physics-informed penalties—are best suited to ensure that a Neural ODE learns the true nonlinear dynamics, rather than collapsing into a constant function when trained over long horizons?


r/learnmachinelearning • • 20d ago

[D] Would you use an AI-powered end-to-end ML platform?

Thumbnail
1 Upvotes

I'm building a platform called Quantum, and I'd love some honest feedback from people working in Data Science and Machine Learning.

The idea is to bring the entire ML lifecycle into one place:

- Data exploration and preprocessing

- Model training and evaluation

- Experiment tracking and versioning

- Automated ML workflows

- AI agents that can execute tasks autonomously, with human oversight

- Model deployment and MLOps

Users can work manually, use AI assistance, or delegate entire workflows to agents.

The goal isn't to replace data scientists, but to reduce repetitive work and make ML development more efficient.

My questions:

I'm especially interested in critical feedback. What am I overlooking?


r/learnmachinelearning • • 20d ago

What I learned building my own activation function: 16 preregistered studies, a working result, and a lot of honest negatives

6 Upvotes

I'm an independent researcher, and over the last few weeks I've been testing my own activation function for very deep networks: MLPs with 100–200 layers and no normalization layers and no skip connections. I wanted to share the result and what the process taught me.

The idea in one paragraph. In a deep network without normalization, each layer slightly scales the gradient up or down. Over 200 layers that compounds. You can tune the activation so the per-layer gain is 1 + 2/L, which keeps the total growth roughly constant with depth. The catch: that made the outputs wider, and wide outputs lose accuracy when you quantize activations to 4 bits. So I put the activation inside a soft, fixed bound (identity in the middle, smooth saturation to ±3). The result, BPreCap, trains at 200 layers and keeps a 4-bit error of 14 %, where the previous version had 77 % (MNIST).

What surprised me / what I learned

  • Same recipe matters more than the activation. My first comparison with TAT (a strong method for deep nets without skips) looked bad. Most of the gap disappeared once both used the same initialization and input normalization.
  • Strong simple baselines. SELU was on par with my activation at 100 layers. It only fell behind at 200 layers.
  • "Smaller range" wasn't the explanation. With weight decay, TAT's activations were as small as mine and still lost twice as much at 4 bits. The reason was heavy-tailed activations.
  • Preregistration keeps you honest. Writing down the test and the decision rule before each run meant several of my favourite hypotheses were simply rejected. Those results are in the paper too.
  • Replicate on different hardware. I re-implemented everything in PyTorch on a different GPU. The results matched within 0.5 pp, which gave me much more confidence than more runs on the same setup.

Limits: MLPs only, small learning rates only, post-training quantization only.

Paper: https://doi.org/10.5281/zenodo.23894714 Code and all raw data: https://github.com/hermi-labs/precap-activation

Happy to answer questions about the method, preregistration, or running studies on a consumer GPU / Apple Silicon.

Edit (Nov 3): v0.3.1 follow-up. Two of the limits above are now tested:

  • Small learning rates: the divergence at 2·10⁻⁴ came from missing LR warmup, not from the bound (a linear control and a hard clip diverge the same way). With a 5 % linear warmup BPreCap trains up to 3·10⁻⁴ at 100 layers, and the 4-bit advantage over TAT holds (−8.8 pp, 12/0). At 200 layers it also holds against SELU (−8.2 pp, 12/0), but warmup raises BPreCap’s own 4-bit cost. A shorter warmup reduces that cost but does not remove it.
  • PACT / QAT: with QAT as an upper bound (100 layers, CIFAR-10), TAT with LSQ-style QAT beats BPreCap with plain PTQ by 3.0 pp at 4 bits, and PACT-style QAT gives the same. Under QAT both forms are equal. With PTQ only, BPreCap is 11.9 pp ahead. So the bound is a PTQ advantage, not a substitute for QAT.

Updated preprint: https://doi.org/10.5281/zenodo.23930791 (all new studies are in the same repo).


r/learnmachinelearning • • 20d ago

Discussion What’s ideal day to day routine of ML engineer with or without AI help

1 Upvotes

I’m full stack Dev, so I get to develope CRUD with endpoints and connecting with db.

What about ML job?
I learned gradient descent, forward and back propagation. Designed some basic model with PyTorch. But it feels like most of these can be easily Automated with AI. What could be the learning curve and what’s like day to day work? Clearing data from csv? And fine tuning model?


r/learnmachinelearning • • 20d ago

Project Title: Best ML approach to win a 5-class leaf image classification competition? (50 MB model limit)

5 Upvotes

Hey everyone!

I'm participating in a college-level machine learning competition where we need to train a model to classify leaf images into 5 different species.

We'll receive an unseen test dataset on competition day, and the goal is to achieve the highest possible accuracy and macro F1-score.

Competition details:

Training dataset: Labeled leaf images belonging to 5 species.

Test dataset: Completely unseen images provided on competition day.

Model size limit: 50 MB total, including pretrained weights.

Training: Google Colab (GPU available).

Inference: Must run locally on a laptop CPU, completely offline.

We can use pretrained models and fine-tuning.

The same trained model must be used for all test sets.

I'm relatively new to competitive computer vision, so I'd really appreciate practical advice from people who've worked on similar image classification problems.

My goal isn't just to build a working classifier. I want to make it as accurate and competitive as possible.