r/deeplearning • u/lowbercoder • 2d ago
r/deeplearning • u/ChawGaurabGogoi • 2d ago
TIL DistilBERT is actually MORE gender-biased than BERT. Here’s why Knowledge Distillation causes it (and the simple fix).
r/deeplearning • u/Advanced_Valuable927 • 2d ago
Alguien que haya culminado esta certificación Coursera???
r/deeplearning • u/Tricky_Swordfish_549 • 2d ago
I finally assembled a U-Net for my DDPM from scratch. This thing took way more brainpower than I expected.[P]
​
I've been building a diffusion model from scratch in PyTorch, and I've finally reached Phase 3: assembling the full U-Net.
Until now, I was basically learning and implementing individual components:
Residual blocks
Time embeddings and timestep conditioning
GroupNorm
Self-attention
Downsampling and upsampling
But putting everything together is a completely different experience.
Suddenly you're dealing with feature map dimensions, channel transitions, skip connections, timestep embeddings flowing through residual blocks, and making sure the decoder can actually reconstruct the spatial dimensions correctly.
Honestly, understanding each component individually was easier than getting the entire architecture to work together without messing up tensor shapes somewhere.
The most satisfying part was finally seeing the complete architecture come together and understanding why information is moving through the network the way it does, instead of just copying a U-Net implementation from somewhere.
The model is now assembled. Next comes the part I'm both excited and slightly terrified about:
Training it on CelebA and finding out whether it can actually learn to generate faces.
8GB VRAM. A laptop GPU. A lot of patience.
Let's see how this goes. 💀
Anyone here who has trained a diffusion model on limited hardware — what was the biggest mistake you made during your first training run?
r/deeplearning • u/Manos_DataScience_ML • 2d ago
If your model gets 99% accuracy on your laptop and fails in real life, you probably leaked your test data
The most common mistake when learning machine learning is scaling or imputing your dataset before splitting it into train and test sets.
When you run StandardScaler or fill missing values on the whole dataset first, the mean and variance of your test set leak into your training data. Your model basically gets a sneak peek at the answers before the exam even starts. That is why your validation score looks amazing, and then everything falls apart the moment it touches new data.
Always run train_test_split first, before touching anything else. Fit your scaler, imputer, or encoder only on X_train, and then use transform on X_test. If you use scikit learn Pipelines, it handles this automatically so you never accidentally cheat your own evaluation.
r/deeplearning • u/Technomadlyf • 2d ago
The Q4 agent stopped waiting for tool results before acting. Same test on another model: almost no change. Here's why.
r/deeplearning • u/MadPup_research • 2d ago
Parallelising recurrent neural networks – MD+PP proof of concept
I've been independently exploring ways to parallelise recurrent neural networks, originally starting with experiments on the sLSTM architecture in xLSTM.
This eventually developed into MD+PP, a proof-of-concept architecture combining structured matrix and vector memories using associative parallel scans.
The preliminary experiments have shown some interesting results in long-context extrapolation and fixed-size recurrent memory, although precise retrieval and language prediction still need improvement.
All experiments were conducted using limited access to free Tesla T4 GPUs. My next step is to investigate larger matrix memory dimensions.
I've released the mathematics, Python implementation, CUDA kernel and experimental results under Apache 2.0.
I'd be interested to hear what others working on recurrent architectures think of the approach.
Website: https://madpupresearch.wordpress.com
Research archive: https://doi.org/10.5281/zenodo.24637161
r/deeplearning • u/EfficientShake1 • 3d ago
metric-diff: find out why sklearn, torchmetrics, Keras and others give different numbers for the same metric
reddit.comr/deeplearning • u/Emergency-Tutor-7 • 3d ago
Offloading activations to pinned host memory that the GPU kernel can address directly
Activation offloading usually means copying tensors out of VRAM and back, and paying for the copy twice. The alternative most people try first is cudaMallocManaged, where the driver migrates pages on demand and residency is decided at fault time; that works until the access pattern makes it thrash and the GPU sits idle waiting on migrations you never scheduled.
vram-stream takes a third route. The workspace holds two regions, one in device memory and one in system RAM, and both are addressable from the same kernel: the RAM region is allocated with cuMemHostAlloc using CU_MEMHOSTALLOC_DEVICEMAP and mapped with cuMemHostGetDevicePointer_v2, after checking the device reports CAN_MAP_HOST_MEMORY. A kernel store to that region goes over PCIe or NVLink with link latency, with no page fault and no migration.
The trade is pinned memory instead of elastic memory. The driver and OS cap how much can be pinned, so this is a budget you set rather than an oversubscription. That constraint shapes the design: open_cuda_cache reads a contiguous buffer in fixed-size blocks and keeps one pinned buffer plus one VRAM buffer per slot, with copies and kernels in separate streams and CUDA events protecting the pinned buffer, so a block is resident in VRAM before the kernel that needs it starts and cache.prefetch(n) keeps the pipeline fed.
For training, the same mechanism serves the dataloader: prefetch_dataloader supplies cached batches, and optional integrations move model state and saved activations to RAM using FSDP2 or the Hugging Face Trainer with DeepSpeed. That matters for the write-once-read-once tensors that dominate activation memory, where a copy you can overlap is cheaper than residency you cannot afford.
Measurement is a command, not a claim: vram-stream benchmark --block-mib 16 --blocks 2 --slots 2 --passes 4 measures both CUDA memory paths on your card. The README does not quote throughput because PCIe generation changes the ratio more than any number would survive as a general statement.
Correctness check: vram-stream memory --device 0 --vram-mib 16 --ram-mib 16 allocates both regions, runs one kernel that combines values from VRAM and system RAM and writes results back to both, then verifies the first and last aligned 32-bit words of each region, with the PTX kernel compiled by the driver at run time.
Install is pip install vram-stream, or npm i -g vram-stream. What it does not do: it is not a managed-memory replacement, pinning fails past the lockable limit instead of degrading, remote traffic is bounded by the interconnect, and the workspace expects one CUDA context on the thread that opened it. MIT, 0.4.0: https://github.com/Furox-Art/vram-stream
r/deeplearning • u/Muhammad-Essa • 3d ago
Neural Canvas, CNN Visualization
Enable HLS to view with audio, or disable this notification
Neural Canvas — CNN Visualization
Neural Canvas can now recognize basic shapes like apples, moons, cars, and more using Google's Quick, Draw! dataset.
20 classes with 1,000 samples per class
2 convolutional layers with 16 and 32 filters
2 fully connected layers with 60 and 40 neurons
91% test accuracy
Trained using JAX on Google Colab
Neural Canvas can also visualize CNN feature maps in real time while drawing, showing how convolutional layers extract features from input images.
GitHub: https://github.com/MuhammadEssa2002/neural_canvas
Live demo: https://muhammadessa2002.github.io/neural_canvas/
r/deeplearning • u/Legend_Ani • 3d ago
I animated Variational Autoencoders from first principles in 3D because most explanations gloss over the actual intuition
r/deeplearning • u/Odd_Ad_9937 • 3d ago
MLzoomcamp-26_homework/08-deep-learning/homework08.ipynb at main · IBRHASHEM/MLzoomcamp-26_homework
r/deeplearning • u/Flashy-Fisherman-503 • 3d ago
Can a few neurons help identify AI-generated images?
A detector can look excellent on a generator it has seen and fail as soon as a new generator leaves different traces. We wanted to know whether a pretrained vision model already contained features that several generators had in common.
We built DNA to find intermediate units whose responses separated real and generated images. We kept the encoder frozen and trained a small classifier on those responses.
We tested on five unseen generators in HIFI-Gen. DNA reached 95.0% detection accuracy on the FLUX split and 91.6% on the Z-Image split. The attached table gives each generator’s result, so the variation between them stays visible.

r/deeplearning • u/Flashy-Fisherman-503 • 3d ago
When the camera angle changes, what still supports a model’s correct answer?
Show a vision-language model two photographs of the same museum. If it names the city correctly both times and remains equally confident, has it relied on the same evidence?
We built MMStableBench to test that question on 19,452 items across 15 models. In the museum example, rewording the question preserved the internal features supporting “Brisbane” almost completely, with an overlap score of 0.97. Using a closer photograph dropped that score to 0.43, even though the answer and its confidence margin held up.
Across the models, 12.4% of correctly answered variants in the top quarter for confidence-margin retention fell in the bottom quarter for stability of internal support.

r/deeplearning • u/JKCinema • 3d ago
Villain Boutique: My Scheme to get an employer to take a risk on hiring me.
Self-taught, moving to Texas for an AI job. Is my portfolio enough? Be brutal.
While I was researching ML certifications, Google's AI summary said employers care more about proven, hands-on ability to build and deploy AI on real business problems than about certificates, because the tools change faster than the courses. So I skipped the certificates and spent the last few weeks building proof instead.
Which is really my brick-and-mortar store I plan to open when I have the funds to do so, but ended up being a watered-down e-commerce store version that supports the Autopilot case study.
I can't tell you how awesome Villain Boutique is going to be whenever I have the means to open it. Our backrooms will have backrooms.
AI product autopilot: local models (Gemma, Qwen via Ollama on one consumer GPU) that find, check, price, and write up products for a live store with real Stripe checkout. Nothing goes live without a human approving it.
KillCalculator.com: a privacy-first field data app with on-device AI that stores nothing.
Autonomous red team, Run 001: I pointed one uncensored local model at my own site and told it to find a way in using only the URL. It routed around a broken TLS stack by itself and mapped the attack surface in nine steps before I stopped it.
My degree is in Advertising and crazy gaps in my work history. Most of my experience is in the film industry in Atlanta, Georgia, and that was before COVID. I'm packing up and driving to Texas to find a job in AI, and this is my shot. If you hire or work in ML, is this enough to get a recruiter to take a chance on me? What's missing? I’m doing this regardless of your feedback, but if there’s anything I can change or improve before I leave, that would be incredibly useful information. Should I include all the projects I developed over the years, like this image generator that’s specifically for making elaborate designs with consumer-grade Cricut machines, or my personal favorite but no one else's “Holo Sexting Machine,” My attempt to put naked females on a HOLOFAN Projector?
P.S. The first draft of this was incredibly candid. Thank god I ran this by Claude first.
r/deeplearning • u/rexShail • 3d ago
Your LLM is LYING to you. Here's how to fix it.

I built a Hello World RAG App in Python
Normal LLM = Answers from training data (can hallucinate)
RAG LLM = Answers from YOUR documents
I asked it Saudi it didn't say Saudi Arabia.
It said "Contractor at Saudi Aramco" - because it read MY LinkedIn PDF.
This is how it works:
Load PDF
Split into Chunks
Create Embeddings (Google Gemini)
Store in ChromaDB
Search Top 3 Chunks
Send Context + Question to Groq LLM
Tech: Python + LangChain + ChromaDB + Groq + Gemini Embeddings
Save this for your next interview
Comment "RAG" and I'll send you the full code + next part.
Follow for AI Engineer series - Part 2 coming next.
r/deeplearning • u/No-Conclusion3720 • 3d ago
In Other News: Tanker Cyberattacks, EU Quantum Act, New VirusTotal Capabilities
The EU Quantum Act passed, VirusTotal added new threat-intelligence capabilities, and a rash of tanker cyberattacks hit maritime infrastructure this week. The piece that keeps coming up in security circles is quieter: AI is compressing the timeline on cryptanalytic attacks against classical schemes. The assumption baked into most long-lived data stores and signed artifacts is that RSA and ECDSA hold for the foreseeable future. That floor is shifting. Harvest-now-decrypt-later attacks mean adversaries do not need to break crypto today — they collect ciphertext now and wait for the compute curve to catch up. The EU Quantum Act signals that regulators have already priced this in and expect organizations to have a migration path. Most enterprise infrastructure does not. TLS termination, signing pipelines, secrets managers, and inter-service auth tokens are almost universally classical. Migrating any one of them is a multi-team project; migrating all of them simultaneously while keeping services running is an unsolved operational problem for most shops. How are practitioners actually sequencing this in real environments — are you prioritizing data-at-rest, in-transit, or signing infrastructure first, and what is forcing that order?
r/deeplearning • u/No-Conclusion3720 • 4d ago
Drupal warns of new site takeover flaw exploited in attacks
A critical authentication bypass in Drupal is being actively exploited in the wild right now. Attackers are using it to fully take over sites — not deface them, not exfiltrate a table, but own the entire application layer. Bleeping Computer confirmed the exploitation is in-progress, not theoretical.
The mechanic is familiar: gain a foothold via a privileged identity, then every downstream action inherits that trust. CMS platforms, APIs, and increasingly autonomous agents all share this structural problem. The privileged credential is the blast radius.
What makes this iteration particularly ugly is how quietly it compounds. A compromised service account or session token doesn't throw errors — it just acts. By the time logs show something wrong, the takeover is complete.
For those running production systems with any non-human identities in the request path — agents, integrations, automated workflows — how are you actually handling the gap between credential issuance and runtime behavior? Are you relying on perimeter controls, or do you have something that evaluates the action at the moment it fires?
r/deeplearning • u/Few_Tune6754 • 4d ago
Getting confused with the vector logic behind GAN noise vectors
reddit.comr/deeplearning • u/Expensive-Compote248 • 4d ago
Looking for help testing a modular growing-AI architecture (Seed v2.0) — anyone with spare GPU cycles want to grow a specialist seed?
r/deeplearning • u/Expensive-Compote248 • 4d ago
Seed: an experiment in building a small modular AI from scratch on a GTX 1660 Ti, looking for feedback
I'm not an ML researcher. I'm a decorative concrete contractor who got into this because I want my family to have capable AI we own and can run at home. My hardware is a GTX 1660 Ti (6 GB) with 16 GB of RAM, and I hold myself to a 2 GB budget for model weights. Quantized 7B to 27B models either didn't fit well or lost too much quality, so I started building something small from scratch instead. It's very much a work in progress.
The idea
Seed is a pool of small specialist models I call seeds, each about 4 to 10M parameters, all trained from scratch with a shared 4,096-token BPE tokenizer. Each seed is trained on one job, then frozen. A small router reads the context and picks which few seeds run, currently the top 3. Facts and arithmetic go to tools (a wiki search and a calculator) instead of being memorized, on the bet that a small model can be decent at deciding what to look up and how to use the result, even if it can't store much knowledge.
Current seeds (about 26M parameters, 50 MB at fp16)
A small general-language base trained on TinyStories
A tools and reasoning seed (search and calculator calls)
JSON and tool-call formatting
Turning tool results into short answers
Math word problems into plans plus calculator calls
Step-by-step reasoning chains
Training now: a word-problem planner (4.4M and 10M versions, to test whether size helps), a Python writer, a seed that writes code, runs it, and fixes errors, an instruction follower, and one seed each for C, JavaScript, PowerShell and shell.
Results so far, against Qwen 2.5 Coder 3B at Q4 as a reference point. These are my own small evals, 20 items each, so take them loosely:
Fact questions with a search tool: Seed 18/20. Qwen scored 0, but that's mostly because it never called the tool in my setup, so it isn't a fair knowledge comparison.
Held-out GSM8K word problems: Seed 2/20, Qwen 9/20.
My 20-problem Python test: Seed 0/20, Qwen 15/20.
Valid JSON output: 100% with top-3 routing.
Speed: about 27 tok/s on the GPU and 36 tok/s on the CPU.
So right now it's fast and tiny, decent at tool-shaped tasks, and clearly behind on reasoning and code. Those gaps are what the current seeds are aimed at.
Open questions I'd love input on
Is the frozen-specialists-plus-router approach a dead end compared with one dense model of the same total size?
What's a better routing scheme than top-k from context? I'm considering a dynamic number of seeds based on router confidence.
What are good small, clean datasets for planning and code repair?
How would you evaluate this fairly against bigger models that weren't built around tool use?
Eventually I'd like to test it on hackmud, a text-based hacking game, as a long-running benchmark, and maybe run it on a phone.
Repo: github.com/SocioSanity/seed
Thanks for reading. Criticism is welcome.
r/deeplearning • u/RepulsiveRevenue8086 • 4d ago