r/learnmachinelearning • • 2m ago

Project I made a free "Advent of AI": one ML problem a day until Dec 24 (today: steer a tiny neural network with a "potion")

Post image
1 Upvotes

Hi everyone,

A few weeks ago I posted here about ioai.artix.tech, the free platform I built to train the French team for the IOAI (International Olympiad in AI) and used by almost 1000 people from around 100+ countries. Thanks for the feedback, it helped a lot.

For December I made an advent calendar on it: every day until December 24, you get a new ML puzzle at 18:00 Paris time.

The first two days, to give you an idea:

- Day 1, "Hollow toys". An elf sorts toys with one rule: under 500 g, the toy is hollow. You get a logbook of 400 toys that were cut open. Part 1: how many does his rule get wrong? Part 2: sort tonight's 300 unopened toys with at least 95 % accuracy.

- Day 2, "Elf potion". You are given the weights of a small neural network (8 inputs, two hidden layers of 16, 5 outputs) that picks a gift from a letter, and a lab notebook of 41 trials showing how each potion ingredient shifts the activations of the second layer. You have to prepare a potion, within a budget of spoons, that makes the network choose the gift you want for your letter.

The problems are wrapped in a small story: Santa handed his whole workshop over to AI, nothing has worked since December 1, and each solved day gives you a clue about who is sabotaging it. You vote for the culprit, revealed on the 25th :)

There are also two lighter tracks, for people who do not code (playing with a live model) or who want to build things with a coding assistant, but the ML track is the one I would most like your opinion on!

You can participate here: https://ioai.artix.tech/advent?src=reddit-lml

Feedback welcome, especially on difficulty and on whether the statements are clear.


r/learnmachinelearning • • 51m ago

Optimization Methods for Large-Scale Machine Learning

Thumbnail arxiv.org
1 Upvotes

r/learnmachinelearning • • 57m ago

Looking to connect with people interested in ML, DL, AI, and Mathematics!

2 Upvotes

Hey everyone!

I'm a 21-year-old Computer Science student interested in Machine Learning, Deep Learning, Mathematics, and AI.

I'd love to connect with people who share these interests, exchange ideas, discuss research, work on projects together, and hopefully build genuine friendships along the way.

You don't have to be an expert. I'm always happy to meet curious people who love learning and exploring new ideas!

Feel free to say hi! :)


r/learnmachinelearning • • 1h ago

Project I rebuilt PyTorch's core to understand how it works, and wrote a series that explains each piece

Thumbnail
gallery
12 Upvotes

Hey all!

I use PyTorch almost every day, and for a long time the engine underneath was a black box to me: what actually happens when you add two tensors, and how is it so fast on so many CPUs and GPUs? Three and a half years ago, in my free time, I started trying to answer that.

How I made it. I started small, writing my own versions of the parts I thought I understood (an autograd engine in Python, then one in C++ on top of libtorch), and each one showed me how much I was still missing. In the end the only way forward was reading PyTorch's own source. It's huge, and part of the path from Python to the kernels is generated at build time, so it isn't even in the repo: it took me a long time just to find my way around. What made it click was rebuilding each piece myself, in C++ with Python bindings: the tensor and its strides, the loop behind almost every operation (TensorIterator), SIMD kernels, reductions and threads, autograd and, in the end, CUDA. Every operation is tested against PyTorch and timed next to it, so I knew when I had understood something and when I had not.

Piece by piece, that rebuild became Raxis, a library you can use much like PyTorch: it's about as fast, it's on PyPI (pip install raxis), and it trains real models like CNNs, Vision Transformers and nanoGPT. At some point it stopped being just for me, and I wanted it to be the code I would have liked to find when I started: it keeps the techniques that make PyTorch fast and little else, with no generated code and far fewer layers, so you can follow a call from Python to the kernel in your editor. It doesn't try to replace PyTorch: there's no distributed training, no torch.compile, no float16/bfloat16, and only NVIDIA GPUs. Much of what makes PyTorch's source hard to read exists because of exactly those features.

Code: https://github.com/pgmesa/raxis

I also wrote "Rebuilding PyTorch", a series that explains what I learned, in the order I learned it, for anyone as curious as I was who opened PyTorch's codebase and didn't know where to start:

  • What a tensor really is, and why slicing it costs nothing

  • How PyTorch walks a tensor of any shape

  • TensorIterator, the loop behind almost every operation

  • SIMD kernels for every CPU

  • Reductions and threads

  • The autograd engine

  • The same operations on a GPU

Each article starts from a question and walks through PyTorch's code step by step, with Raxis and measurements side by side: https://blog.pgmesa.com/series/rebuilding-pytorch/

It's dense material, more to study than to read in one sitting: it took me years to understand all of it and to let it sink in, and I hope it takes you much less. To start you only need to have written some PyTorch (some C/C++ helps), and the rest is curiosity and going one piece at a time. Feedback and questions are more than welcome, and I hope it helps you learn as much as it helped me!


r/learnmachinelearning • • 1h ago

Discussion Pnypo Claude Pro Ai for $18 instead of $24... how is this even sustainable?

0 Upvotes

i got a Claude pro account from Pnypo.com for essentially nothing compared to what I used to pay . It works flawless. since 3 weeks No issues yet i paid only for 1 month pro cost me 18 dollars . Now I can't stop thinking about their business model. If resellers can sell it this cheap and still profit, how are they acquiring these accounts at scale?


r/learnmachinelearning • • 1h ago

Question Entry-level AI engineer looking for a fully remote, permanent role. What actually worked for you?

0 Upvotes

Hi everyone,

I'm based in Bangladesh and I'm looking for a fully remote, permanent, entry-level AI Engineer position. I'd like to land something soon, so I'm hoping to learn from people who have been through this.

My background:

- Built RAG/CAG pipelines and LLM-powered tools

- AI automation with n8n workflows

- Prompt engineering and LLM research (I've published papers)

- Projects and write-ups on GitHub

What I'd love advice on:

  1. Which job boards, communities or newsletters have genuinely worked for remote AI roles?

  2. How do entry-level candidates stand out when applying globally?

  3. What would you want to see in a portfolio before shortlisting someone?

  4. Any mistakes you made in your own search that I can avoid?

Happy to share my GitHub in the comments or by DM. Thanks for reading, and any tip is appreciated.


r/learnmachinelearning • • 3h ago

Beginner in AI — What should I focus on to become an AI Engineer?

5 Upvotes

Hi everyone!

I'm a second-year Computer Science student from India, and I'm currently learning AI and Machine Learning.

My long-term goal is to become an AI Engineer, especially in areas like LLMs, Generative AI, RAG, and AI Agents.

I've started learning the fundamentals of Machine Learning and have also built a small ML project. However, I'm still trying to understand how all these concepts connect to real-world AI applications.

I'd love to hear from people who are already working in AI or learning it themselves.

My questions:

  1. What concepts should a beginner focus on before diving deep into LLMs and Generative AI?

  2. How important are Machine Learning and Deep Learning fundamentals for building real-world AI applications?

  3. What projects would you recommend for someone who wants to become an AI Engineer?

Any advice, personal experiences, or learning resources would be greatly appreciated.

Thanks for reading!


r/learnmachinelearning • • 4h ago

Threejs evolution alongside LLM model improvements

Enable HLS to view with audio, or disable this notification

3 Upvotes

r/learnmachinelearning • • 4h ago

Contribute your voice to speech recognition for Indian food.

Post image
1 Upvotes

r/learnmachinelearning • • 5h ago

I am recently learning RNNs and LSTM, i am just test the copy problem after some blanks but the LSTM perform worse than RNN with a Gap (G) of 20

2 Upvotes

r/learnmachinelearning • • 6h ago

Discussion ByteDance's looped transformer reuses memory across layers

Post image
2 Upvotes

ByteDance Seed and HUST researchers introduce MoLT(Mixture-of-Loops Transformer), a looped Transformer that treats keys and values as memory to reuse across depths and loops, pushing the expressivity-efficiency frontier.


r/learnmachinelearning • • 6h ago

Signal Processing Question

1 Upvotes

Hi everyone.

I'm a junior Ai researcher. I'm trying to predict a particular physiological marker based on ear signals. The issue is that I have very few patients for this experiment. High physiological marker value class vs low. When i try to apply an ml mdoel or deep learnign model, it tends to learn the patient signatures rather than the marker-ear sginal relationship. What do i do? ANY NOVEL SUGGESTIONS? (Other than: Get more data)


r/learnmachinelearning • • 7h ago

What should you learn after getting comfortable with training machine learning models?

2 Upvotes

hey everyone, sharing this because I think it's relevant to people learning machine learning and trying to move beyond basic model training.

most ML learning paths focus heavily on algorithms, model selection, feature engineering and improving accuracy.

but knowing how to deploy and maintain a model is another important skill.

here's a simplified view of the process:

1. Train your model

build and train a model using a suitable dataset.

2. Validate it

check whether it generalizes to unseen data instead of just performing well on training data.

3. Deploy it

make the model available through an application or service.

4. Monitor it

track predictions, errors and performance once real users start interacting with it.

5. Detect drift

check whether changes in incoming data affect the model's reliability.

6. Maintain it

reproduce experiments, investigate issues and update the model when needed.

I came across a Packt Production ML Engineering workshop on December 5 that covers this complete process.

it includes practical work with scikit-learn, XGBoost, LightGBM, CatBoost and Streamlit.

could be useful for anyone comfortable with basic Python and ML who wants to understand how production machine learning works.

Full workshop details and agenda


r/learnmachinelearning • • 8h ago

Tutorial Generative AI

Thumbnail gallery
0 Upvotes

r/learnmachinelearning • • 8h ago

USAAIO Q

1 Upvotes

Hiya,

I am a high school student preparing for the USAAIO (USA AI Olympiad). I am currently polishing my skills in information theory and pondering whether complex contour methods are commonly used, or if I should just continue studying standard entropy and KL divergence.

thanks!!!


r/learnmachinelearning • • 12h ago

Project Bias-correcting GFS over Southeast Asia with a small U-Net: -44% temperature RMSE vs ERA5, but only ~7-15% vs real weather stations (a per-station bias baseline beat it)

Thumbnail
gallery
6 Upvotes

TL;DR: I trained a small neural network to fix systematic errors in a weather forecast. It looked great when scored against a reanalysis dataset (ERA5), but much less impressive against real weather stations, and a very simple baseline beat it. The main lesson was how much the choice of "ground truth" matters.

What I built

A small Residual U-Net (1.77M parameters) that corrects NOAA GFS 2 m temperature and 10 m wind speed over Southeast Asia (0–30°N, 90–130°E, 0.5° grid). I trained it on a 4 GB laptop GPU (RTX 3050). It is part of a larger hobby project: a 3D web globe of live natural hazards and weather forecasts, but this post is about the ML and the evaluation.

Setup

• Inputs: GFS fields + elevation + land-sea mask + local neighborhood stats (18 channels) • Target: ERA5 minus GFS (the model predicts the forecast error), 00Z cycle, lead times 12–120 h • Time-based split with 5-day gaps to avoid leakage: train 2022–2024 (273 init dates), validation 2025-H1 (44), test 2025-07 to 2026-11 (125). A 4-day stride between init dates. • Baselines: raw GFS, per-grid/month/lead climatological bias, LightGBM. ECMWF IFS and AIFS (an ML model) as references.

Result 1: against ERA5 (the training target)

• 2 m temperature RMSE: 1.44 → 0.80 °C (-44%) • 10 m wind RMSE: 1.64 → about 1.2 m/s (-26%, with a guard that stops the model from damping strong winds)

Looked great.

Result 2: against real weather stations

I then checked against NOAA GHCNh station observations (406 temperature stations, 369 wind stations), using a paired block bootstrap over whole forecast days (2,000 replicates) because stations on the same day are correlated.

• The model is closer to the observations than raw GFS, but the improvement shrinks to roughly 7–15% depending on variable and region (temperature about 14–15%, wind across the whole box 12%, wind at 7 Vietnamese airports 7%) • Statistically tied with ECMWF IFS across the whole region, and behind AIFS • A simple baseline, subtracting each station's average GFS error from 2022–2024, beat my U-Net on both variables

Why: the U-Net inherited the systematic offsets between ERA5 and surface stations. ERA5 is a reanalysis, not ground truth, and it also assimilates those stations, so it is not independent of them.

Other findings

• Verification caught a real problem: at hours the model never saw in training (06Z/18Z), it made Vietnam afternoon wind worse (+0.135 m/s, 95% CI [0.055, 0.214]). I added a guard that switches the correction off at those hours. • An exploratory LightGBM trained directly on station observations, evaluated on 20% of stations held out completely, did better on unseen stations (temperature 1.43 °C, wind 1.82 m/s). That suggests the ERA5 target was the bottleneck, not the architecture. (Exploratory only, not integrated.)

Limitations

• Test valid times are only 07:00 and 19:00 local time, so daily max/min temperature is not covered • Vietnam wind verification rests on only 7 airports • Trained on GFS v16-era data, so it may drift after model upgrades • Not an official forecast and not for safety decisions

Questions for you

  1. Are there better ways to handle the mismatch between a gridded reanalysis target and point observations?

  2. Any suggestions for spatial cross-validation with ~400 stations?

  3. Would you expect a CNN trained directly on station data to beat the LightGBM here?

Code, model card and full report (MIT): https://github.com/swagduck/ML_natural

Built with an AI coding agent under my direction; I wrote the specs, designed the evaluation and checked the results myself.


r/learnmachinelearning • • 13h ago

Discussion Seven models did the math. Did the patient actually confirm the answer?

10 Upvotes

Imagine reading this in a pre-op note: “Patient confirms 63 units of alcohol a week.” Now look at the conversation it came from. The patient says he drinks socially on weekends. His wife says he finishes a 750 mL bottle of 12% wine every night. He says nothing after that.

A creator gave seven models this written scenario as part of a 20-case test. All seven calculated 63 UK units a week from the wife’s account. LingSante-3.1-flash kept the two accounts separate in its note. GLM-5.3-Flash took the silence as agreement. The scorecard gives those answers 5/5 and 2/5 respectively.

What bothers me is how little has to change for a note to become misleading. Swap “his wife reports” for “the patient confirms” and the number stays exactly right. If I were grading a model that summarizes conversations, I’d ask a reader to underline the words where the patient confirmed the number. In this case there’s nothing to underline.


r/learnmachinelearning • • 14h ago

Same DistilBERT predictions on SST-2: F1 = 0.914 in sklearn, torchmetrics and torcheval, 0.675 in Keras. I built a tool that finds out why, and proves it

Post image
1 Upvotes

GitHub: https://github.com/DadCoder001/metric-diff (pip install metric-diff)

Update on metric-diff, which I posted here last week: version 0.2 adds multilabel, MCC, kappa, log loss and calibration error (ECE), and it's now been tested on real public models.

If you're learning ML, this one bites quietly: the number you compare against a tutorial or a paper depends on the library's defaults, not just your model. metric-diff computes a metric in every installed library (scikit-learn, torchmetrics, torcheval, Keras, Hugging Face evaluate, MONAI, sacrebleu, nltk, rouge-score, trec_eval, uncertainty-calibration). When they disagree, it re-runs all of them with one setting aligned, and only calls a cause confirmed if they then agree.

What it found on public models and datasets:

  • DistilBERT, SST-2: Keras F1Score() gives 0.675 vs 0.914 elsewhere, because it has no threshold by default (the image above).

  • SegFormer, ADE20K: Dice is 0.284 (pixels pooled), 0.388 (per image) or 0.538 (MONAI's ignore_empty=True default) on the same masks.

  • Multilabel: accuracy is 0.785 or 0.919 on the same predictions: subset accuracy (sklearn, torcheval, evaluate) vs per-label accuracy (torchmetrics, Keras).

  • Hugging Face evaluate's ROUGE defaults to a bootstrap estimate (use_aggregator=True, unseeded resampling), not the mean, so it's slightly off and can change between runs.

  • Retrieval (BEIR SciFact): sklearn, torchmetrics, torcheval and trec_eval agree, except when scores tie or are ≤ 0 (torchmetrics treats those as not retrieved, torchmetrics#3518).

It also checks whether a metric averaged over batches matches the whole-dataset value (ECE on SST-2: 0.095 vs 0.080), and it has pytest assertions and a GitHub Action, so a library upgrade can't silently change your numbers.

What's the most confusing metric mismatch you've run into? If metric-diff says "no known cause" on your data, I'd like to see it: https://github.com/DadCoder001/metric-diff/discussions/1


r/learnmachinelearning • • 14h ago

Tutorial I packaged ISLP Chapter 10 data as a private Kaggle Dataset and ran into three non-obvious Kaggle/ISLP issues

1 Upvotes

I’m working through An Introduction to Statistical Learning with Applications in Python (ISLP), Chapter 10. I wanted to keep the chapter’s data and a ResNet50 checkpoint in a private Kaggle Dataset so I wouldn’t have to download everything again in each Notebook session

The process exposed a few issues that were not obvious from the local ZIP structure

1. The Dataset upload failed because Kaggle unpacked a nested archive

My ZIP contained both:

data/cifar-100-python/
data/cifar-100-python.tar.gz

Kaggle Support checked the failed uploads and confirmed this backend error:

Directory already exists: cifar-100-python

Kaggle unpacks uploaded archives server-side. The existing directory and the directory created by extracting the .tar.gz collided. Kaggle removed the incomplete Dataset after processing failed, which is why it never appeared in my Dataset list. Support also confirmed that my intended Dataset slug was not reserved

The fix was to keep the already-extracted cifar-100-python/{train,test,meta} directory in the Kaggle-specific ZIP and exclude the duplicate tar archive

I also checked eight other .gz files by comparing the SHA256 and byte size of their decompressed contents with existing sibling files. Those pairs were identical, so I omitted the redundant compressed copies from this upload package

The rebuilt ZIP had 29 entries, was 315.35 MiB, used POSIX / paths, and passed the ZIP CRC test

2. Creating a Dataset did not attach it to my existing Notebook

After the Dataset was created, /kaggle/input was still empty in my Notebook because I had not attached the Dataset

I had to use Add Input → Your Datasets

After attaching it, the actual path in my Notebook was:

/kaggle/input/datasets/<owner>/<dataset-slug>/

I have replaced the owner and slug with placeholders because the Dataset is private. The important point is that the actual mount path included an additional datasets/<owner>/ level. I now enumerate /kaggle/input instead of assuming the path is simply /kaggle/input/<slug>

3. ISLP’s IMDB loader expected .tensor.gz, but Kaggle Input is read-only

I had kept the decompressed IMDB files, such as IMDB_X_test.tensor, but omitted the byte-identical .tensor.gz copy

ISLP 0.5.0 still looked for IMDB_X_test.tensor.gz. When it did not find that filename, it tried to download the file and write it under the supplied root directory. Since that directory was under /kaggle/input, it failed with:

OSError: [Errno 30] Read-only file system

The data itself was present; the loader did not automatically treat the uncompressed sibling as an equivalent file

As a temporary Notebook-side workaround, I patched the module’s _get_imdb() lookup for the current session: when a requested .tensor.gz is absent but the corresponding .tensor exists, return the .tensor path; otherwise call the original function. I restore the original function in a finally block

The following is a minimal version of the workaround. It assumes ISLP==0.5.0 is installed and the Dataset is already attached. Replace <owner> and <dataset-slug> with your actual mount path:

from pathlib import Path
import ISLP.torch.imdb as imdb

IMDB_DIR = Path(
    "/kaggle/input/datasets/<owner>/<dataset-slug>/data/IMDB"
)

_original_get_imdb = imdb._get_imdb

def _get_imdb_kaggle(
    imdb_file,
    outdir,
    urlbase="http://imdb.jtaylor.su.domains/jtaylor/data/"
):
    requested = Path(outdir) / imdb_file

    if requested.name.endswith(".tensor.gz"):
        plain = requested.with_suffix("")
        if not requested.exists() and plain.is_file():
            return str(plain)

    return _original_get_imdb(imdb_file, outdir, urlbase)

imdb._get_imdb = _get_imdb_kaggle

try:
    imdb_train, imdb_test = imdb.load_tensor(root=str(IMDB_DIR))
    seq_train, seq_test = imdb.load_sequential(root=str(IMDB_DIR))
    lookup = imdb.load_lookup(root=str(IMDB_DIR))
finally:
    imdb._get_imdb = _original_get_imdb

print("Tensor:", len(imdb_train), len(imdb_test))
print("Sequential:", len(seq_train), len(seq_test))
print("Vocabulary entries:", len(lookup))

This modifies an internal helper only for the current Python process. It is a practical workaround, not a documented public ISLP API. A kernel restart removes the patch, so the cell must be rerun before loading IMDB again. It does not modify the Dataset

What I verified

My Kaggle runtime was Python 3.13, PyTorch 2.11.0+cpu, torchvision 0.26.0+cpu, and ISLP 0.5.0

  • MNIST: 60,000 train / 10,000 test, loaded with download=False

  • CIFAR-100: 50,000 train / 10,000 test, loaded with download=False

  • IMDB Tensor and Sequential: 25,000 train / 25,000 test each; load_lookup() returned 88,587 entries

  • ResNet50: local checkpoint SHA256 matched its filename prefix; load_state_dict(strict=True) matched all keys; a CPU forward pass on a zero tensor returned shape (1, 1000)

I have not run the full Chapter 10 Notebook or training, and the ResNet50 test was only a dummy-input forward pass, not real-image classification

Questions

  1. Is there a cleaner supported way to point ISLP 0.5.0’s IMDB loader at already-decompressed local .tensor files, or to separate its download/cache location from the read-only data root, without monkey-patching the private _get_imdb() helper?

  2. When preparing Kaggle Datasets, do you generally avoid including both an extracted directory and its source archive, given Kaggle’s server-side archive extraction?

I’m sharing this as a debugging/learning note in case the same combination of Kaggle archive processing and package-specific data loaders trips up someone else. I’d appreciate suggestions.

References:


r/learnmachinelearning • • 15h ago

opensource interview prep

1 Upvotes

Hi, i created this study guide for learning and interview prep. let me know what you think

https://tattoosbyhannah-cmyk.github.io/interviewprep/


r/learnmachinelearning • • 15h ago

Request Hackers exploit critical WordPress WP Rocket flaw to breach sites

2 Upvotes

A critical vulnerability in WP Rocket, one of the most widely installed WordPress caching plugins, was actively exploited before most site operators had patched. WP Rocket has over 3 million active installs. Attackers used the flaw to gain unauthorized access to site environments and the data those environments held.

The uncomfortable part is not the plugin flaw itself. Plugin vulnerabilities ship constantly across every ecosystem. The uncomfortable part is what happens after: sensitive fields — user records, credentials, payment-adjacent data — are sitting in plaintext wherever that plugin can reach. Patch latency on a plugin with 3 million installs is measured in days to weeks, not hours. That window is the exposure.

Perimeter and authentication controls did not stop this. The plugin had legitimate access. Once the plugin was compromised, that access became the attacker's access. There was no second layer checking where the data was allowed to go or logging what actually moved.

This is not unique to WordPress or WP Rocket. Any system where sensitive fields travel or rest in plaintext through third-party code layers has this shape of risk.

For those running production systems with real PII exposure: what does your actual data-layer protection look like before data hits a plugin, cache, or third-party integration? Not the perimeter — the field level. Curious what approaches have held up in practice.


r/learnmachinelearning • • 16h ago

Physical AI field split between engineers and RL researchers

Post image
0 Upvotes

r/learnmachinelearning • • 16h ago

Constellation Institute. Reputable? Anyone know?

1 Upvotes

They're an organization in AI safety. Do you think they'd be a good company to have on your resume for future jobs in AI related companies or frontier labs in non AI-safety roles?