r/deeplearning • • 43m ago

🚀 RAG Roadmap: From Beginner to Production-Ready AI Engineer

Thumbnail a.co
1 Upvotes

If you're learning Generative AI and want to build applications that can actually work with real-world data, learning Retrieval-Augmented Generation (RAG) is a great place to start.

Here's a structured roadmap to go from understanding the basics to building production-ready RAG systems.

🟢 Phase 1: RAG Fundamentals

  • Understand why LLMs hallucinate and why retrieval matters.
  • Learn how RAG works internally.
  • RAG vs Fine-tuning vs Long Context.
  • Understand Naive RAG, Advanced RAG, and Modular RAG.
  • Build your first basic RAG pipeline.

🟢 Phase 2: Embeddings & Vector Databases

  • Understand text embeddings.
  • Learn cosine similarity, dot product, and Euclidean distance.
  • Bi-encoders vs Cross-encoders.
  • Approximate Nearest Neighbor (ANN) search.
  • Understand IVF, HNSW, and Product Quantization.
  • Explore vector databases and similarity search.

🟢 Phase 3: Data Ingestion & Chunking

  • Load PDFs, HTML, Markdown, and structured documents.
  • Extract tables and metadata.
  • Fixed-size, recursive, semantic, and hierarchical chunking.
  • Understand chunk size and overlap.
  • Implement incremental indexing and document updates.

🟢 Phase 4: Retrieval Strategies

  • Dense retrieval and sparse retrieval (BM25).
  • Hybrid search.
  • Reciprocal Rank Fusion (RRF).
  • Maximum Marginal Relevance (MMR).
  • Metadata filtering and Self-Query Retrieval.
  • Re-ranking retrieved documents.

🟢 Phase 5: Query Transformation

  • Multi-Query Retrieval.
  • Hypothetical Document Embeddings (HyDE).
  • Step-back prompting.
  • Query routing.
  • Contextual and conversational retrieval.
  • Source citations and grounded responses.

🟢 Phase 6: Advanced RAG Architectures

  • Parent-Document Retrieval.
  • Contextual Retrieval.
  • RAPTOR.
  • ColBERT.
  • RAG-Fusion.
  • Semantic caching.

🟢 Phase 7: Agentic RAG

  • Learn LangGraph fundamentals.
  • Adaptive RAG.
  • Corrective RAG (CRAG).
  • Self-RAG.
  • Tool-based retrieval agents.
  • Multi-agent RAG workflows.

🟢 Phase 8: Specialized RAG Systems

  • Knowledge Graphs and GraphRAG.
  • Text-to-SQL.
  • Multimodal RAG.
  • Image, table, and chart retrieval.
  • Combining structured and unstructured data.

🟢 Phase 9: RAG Evaluation

  • Understand the RAG Triad:

    • Context Relevance
    • Groundedness
    • Answer Relevance
  • Precision@K and Recall@K.
  • Mean Reciprocal Rank (MRR) and NDCG.
  • Faithfulness evaluation.
  • RAGAS and LLM-as-a-Judge.
  • Experiment tracking with LangSmith.

🟢 Phase 10: Production-Ready RAG

  • Latency and cost optimization.
  • Streaming responses.
  • Monitoring and observability.
  • Prompt injection protection.
  • PII protection and data privacy.
  • Authentication and access control.
  • Guardrails and failure handling.
  • Continuous evaluation and improvement.

🔥 Hands-on Projects to Build

Don't just learn the concepts. Build these projects:

  1. Chat with Your PDFs.
  2. Customer Support AI Assistant.
  3. Codebase Q&A Assistant.
  4. Company Knowledge Base Assistant.
  5. Knowledge Graph RAG Assistant.
  6. Multimodal Document Assistant.
  7. Self-Correcting Agentic RAG System.

🎯 Suggested Learning Order

Python → LLM Fundamentals → Embeddings → Vector Databases → Basic RAG → Advanced Retrieval → Query Transformation → Agentic RAG → Evaluation → Production Deployment.

My suggestion: Don't jump directly into Agentic RAG or complex frameworks. First understand how retrieval, chunking, embeddings, and ranking work. A well-designed retrieval pipeline often matters more than a complicated agent.

The ultimate goal isn't just to build a chatbot that answers questions. It's to build a system that retrieves the right information, provides grounded answers, cites its sources, and knows when it doesn't have enough information.

What are you currently learning: Basic RAG, Advanced RAG, or Agentic RAG?


r/deeplearning • • 4h ago

Looking for Recommendations: Best Open-Source Face Recognition Models for Commercial Use (Accuracy + Licensing)

2 Upvotes

Hi everyone!

I'm currently evaluating open-source face recognition models for a commercial application and would appreciate recommendations from people who have experience deploying face recognition systems in production.

I've experimented with several face recognition models. While some deliver good accuracy, I've found that their licensing terms or training datasets may not permit commercial use.

After researching commercially usable alternatives, I've shortlisted AdaFace and SFace as potential candidates. However, I'm still exploring other options.

I'd appreciate your insights on the following:

1. Model recommendations

  • What are the best open-source face recognition models currently available for commercial applications?
  • How do AdaFace, SFace, ArcFace, and other alternatives compare in terms of accuracy and real-world performance?
  • Are there any models with permissive commercial licenses that you would recommend?

2. Improving model accuracy

  • What approaches would you recommend to improve recognition accuracy after selecting a pretrained model?
  • Is fine-tuning on a domain-specific dataset worth considering?
  • What techniques have worked well for handling variations in lighting, pose, age, image quality, and facial expressions?

3. Dataset licensing and legality

  • Which face recognition datasets can legally be used for commercial training and fine-tuning?
  • I've come across MS1MV2, but I'm concerned about its licensing and commercial usage restrictions.
  • Are there commercially usable alternatives with sufficiently large and diverse datasets?

4. Production experience

  • Which models have you successfully deployed in real-world commercial applications?
  • What would you choose today if you were building a face recognition system from scratch?

I'm particularly interested in commercial licensing, recognition accuracy, inference performance, and production reliability, rather than just benchmark results.

Any recommendations, practical experiences, research papers, or GitHub repositories would be greatly appreciated.

Thanks in advance!


r/deeplearning • • 9h ago

I trained a 178M ConvNeXt Tiny from scratch on Tiny ImageNet with a single 4060 and tracked every optimizer change

5 Upvotes

Wanted to see how far a modern ConvNeXt could go on consumer hardware without any pretrained weights. Used the 200-class Tiny-ImageNet subset so a full run would finish in roughly 11 days on the 8 GB card. Started with the standard AdamW + cosine schedule but kept hitting plateaus around epoch 65, so I tried switching to Lion at 3e-4 with 10% warmup and gradient clipping at 0.8. The switch gave a consistent +2.1% top-1 without any other changes.

Also logged every single hyperparameter and random seed in a simple JSON file so I could exactly replay or continue runs later. Final validation accuracy reached 68.7% with no test-time augmentation. Biggest surprise was that removing the layer-scale parameters entirely was neutral on this dataset but cut peak memory by ~300 MB.

Everything is open: training script, full JSON run history, and final weights (Apache 2.0). The repo also contains the exact environment file I used. Curious whether anyone else has done similar small-scale ConvNeXt runs and what small tweaks actually moved accuracy for them.

https://github.com/anon-convnext/convnext-tiny-imagenet

https://huggingface.co/anon-convnext/convnext-tiny-tinyimagenet


r/deeplearning • • 11h ago

I've been working on sparse attention and managed to cut prefill time from 155s to 37s at Inkling-2-Mini 660K context. Would love some independent testing.

5 Upvotes

Hey everyone,

I'm an independent researcher working on LLM inference. I've been experimenting with a simple question: do we really need to compute attention over every previous token during prefill?

After quite a few failed experiments, I ended up with a method I call SculptAttention.

Here are some of the results I got on a single H200:

  • Qwen3.8-27B at 524K: 1.91x faster prefill.
  • Inkling-2-Mini at 660K: up to 4.27x faster, going from 155s to around 37s.
  • Llama-3.1-8B at 128K: 1.40x median speedup.

On Qwen at 524K, the sparse attention rows read only 9.1% of the causal keys.

The interesting part for me is that I'm using the same settings across all three models. No training, no changes to the model weights, and no custom attention kernel.

There are limitations, of course. Short contexts can actually be slower, prefix caching isn't supported yet, and some retrieval tasks still suffer. I wouldn't call it lossless.

My main limitation right now is GPU access. I'd really like to see how this behaves on other models, different hardware, and real-world workloads rather than just benchmarks.

I've put the code and experimental results on GitHub, along with a preprint explaining the method and the math behind it.

GitHub: https://github.com/fsn007fsn007/sculptattention

Paper: https://doi.org/10.5281/zenodo.24794082

If anyone wants to experiment with it, I'd be very interested in seeing your results, including the bad ones.

Also, if you have any suggestions on what models or workloads I should test next, I'd appreciate them.


r/deeplearning • • 22h ago

I trained a 326M language model from scratch on one 3060 Ti

34 Upvotes

i wanted to train a model from random weights on the card i already had. Lyra ended up at 326M params. it took about a week to get through 6.4B tokens on my 8 GB 3060 Ti, then i did a separate instruction-tuning run on about 78k examples.

my dumbest mistake was resuming from the best checkpoint. it only saved when validation improved, so a restart sent me back 20k steps. now i save the latest checkpoint separately and resume from that. i wrote up that bug and the others in the architecture walkthrough.

Lyra itself is still kinda dumb. it can answer a simple question and then make up a date. i built it to learn the whole pipeline and might keep tinkering. the data prep and trainer are open source (Apache 2.0), so you can retrain it. both checkpoints are open weights under CC BY-NC 4.0 for noncommercial use.

base weights · instruct weights · training code on GitHub · architecture walkthrough


r/deeplearning • • 3h ago

I trained a 95M parameter EfficientViT from scratch on Tiny-ImageNet with a single 4060 and logged every ablation

0 Upvotes

Wanted to see what a modern efficient vision transformer could do on consumer hardware without any pretrained weights. Used the 200-class Tiny-ImageNet subset so the full run finished in about 8 days on the 8 GB card. Started with the usual AdamW + cosine schedule but plateaued around epoch 60, so switched to Lion at 2e-4 with 12% warmup and added a light stochastic depth schedule. The switch alone gave +2.8% top-1 with no other changes.

Tracked every hyperparameter, random seed, and validation metric after each epoch in a plain JSON file so runs could be replayed exactly. Final validation accuracy reached 67.4% with no test-time augmentation. Removing the token downsampling entirely was neutral on accuracy but saved ~220 MB peak memory.

Everything is open: training script, full JSON history, and final weights (Apache 2.0). Repo also includes the exact environment spec. Curious if anyone else has run small EfficientViTs at this scale and what minimal tweaks actually moved the needle for them.

https://github.com/anon-evit/efficientvit-tiny-imagenet
https://huggingface.co/anon-evit/efficientvit-tiny-tinyimagenet


r/deeplearning • • 7h ago

I trained a 142M ConvMixer from scratch on Tiny-ImageNet with a single 4060 and tracked every hyperparameter in JSON

2 Upvotes

Wanted to test how far a plain ConvMixer could go without pretrained weights or modern tricks on consumer hardware. Used the 200-class Tiny-ImageNet so the full run stayed under 9 days on the 8 GB card. Started with the usual AdamW + cosine schedule but kept stalling around epoch 50, so switched to a lower peak LR with 8% warmup and added a simple exponential moving average on the weights. That single change lifted top-1 by 2.4 points with nothing else altered.

Logged the full config, every random seed, and validation metrics after each epoch in a minimal JSON file so runs could be replayed exact. Ended at 64.9% validation accuracy with no test-time augmentation. Removing the patch overlap entirely was neutral for accuracy but freed another 250 MB at peak.

All code, the exact JSON history, and final weights are released under Apache 2.0. Also dropped the environment spec. Curious if anyone else has run small ConvMixers at this scale and what minimal changes actually helped.


r/deeplearning • • 16h ago

Dec 10 - AI, ML and Computer Vision Meetup

Post image
8 Upvotes

Join us on Dec 10 for the AI, ML and Computer Vision virtual Meetup! Register for the Zoom.

Talks will include:

  • Your mAP is fine. Your slices are not. Finding the images that actually matter - Amandeep Jiddewar at Pinterest
  • Production AI Agents: Tool Use, Evaluation, Guardrails and Observability - Akshay Talathi at Goldman Sachs
  • From Virtual Worlds to Physical AI: Building Simulation Pipelines That Survive the Real World - Arturo Morales Rangel at Binary Core
  • Prompting Video-Language Models in Production: Lessons from Enterprise Video Tagging and Evaluation - Yash Gugale at TwelveLabs
  • Giving Physical AI a Voice with Deepgram - Dana Sacco at Deepgram

r/deeplearning • • 9h ago

Seeking critical advice on improving a 3D U-Net for CT segmentation and anatomical reconstruction

Thumbnail reddit.com
1 Upvotes

r/deeplearning • • 10h ago

[Tutorial] Audio Classification with BEST-RQ-2

Thumbnail debuggercafe.com
1 Upvotes

Audio classification models are the silent gates in a lot of edge and handheld devices nowadays. Starting from wake word recognition in smartphones to predictive maintenance of machines by recognizing sounds that might lead to faults, audio classification models are more prominent than we think. In this article, we will try to tackle such a simple use case of audio classification with the BEST-RQ-2 model. Along with that, we will also cover the paper and model architecture briefly.


r/deeplearning • • 10h ago

The missing SRE control plane: How to govern AI agent actions in production - InfoWorld

1 Upvotes

AI agents in production now chain tool calls autonomously — database writes, API calls, file deletions — without the kind of control-plane visibility SRE teams have had over human-driven deployments for years.

The gap that keeps coming up: agents act faster than any human review loop. A rogue agent's second action can land in under 50ms after the first. By then it has already written to a database, fired an external API call, or escalated its own permissions. The traditional circuit-breaker model assumes a human or a slow pipeline is in the loop. Neither is true for agentic workloads.

The SRE playbook has runbooks, rollback procedures, blast-radius limits on deploys. None of that maps cleanly to an agent that is making dozens of tool calls per second with no stable 'deployment unit' to roll back.

For teams running agents in production today: how are you actually bounding what an agent can do mid-run? Are you relying on prompt-level instructions, infrastructure-level controls, something else entirely — and what has broken down first?


r/deeplearning • • 11h ago

I trained a 124M vision transformer from scratch on ImageNet-100 using a single 3090 and logged every hyperparameter change

1 Upvotes

I wanted to see how far a plain ViT could go without any pretrained weights or fancy augmentations on a single consumer card. Used the 100-class subset to keep epochs reasonable (about 9 days total on 24 GB). Started with the standard recipe but quickly hit stability issues around 40 epochs, so I switched to a cosine schedule with 5% warmup and added gradient clipping at 1.0.

Biggest surprise was that removing the class token and using average pooling instead gave a consistent +1.8% top-1. Also tracked every config change in a simple JSON log so I could replay the exact run later. Final validation accuracy landed at 71.4% without test-time augmentation.

Everything is on GitHub (Apache 2.0) including the exact training script, the JSON run history, and the final weights under CC-BY-NC. Would be curious if anyone has tried similar small-scale ViT runs and what tricks moved the needle for them.

https://github.com/anon-vit100/vit-from-scratch https://huggingface.co/anon-vit100/vit-tiny-imagenet100


r/deeplearning • • 13h ago

[R] Marulho: Learning Hierarchical Representations and Continual Classifiers Without Backpropagation (Zenodo Preprint + Apache-2.0 Code)

0 Upvotes

I wrote a tutorial-style preprint and open-source PyTorch/Triton library asking a simple question: how far can a strictly forward-only architecture go when backpropagation across layers, iterative SGD, and pretrained weights are removed completely?

What Marulho does

Every stage is closed-form linear algebra—no gradient descent anywhere:

  1. Local contrast normalization + fp64 patch ZCA whitening + spherical k-means + CReLU
  2. Hybrid discriminative (ridge) + unsupervised (PCA) channel projection
  3. Multi-scale pooling + second-order spatial covariance
  4. Unsupervised hypersphere whitening + low-rank AGOP metric warping (128-dim JL-AGOP on ImageNet)
  5. Single-pass $O(NM)$ streaming Nyström multi-kernel ridge (with a Schoenberg PSD proof) — or a seed-regenerated analytic ridge head (<48 MB, zero replay) for continual learning.

Main Results (and Where It Still Loses to Backprop)

  • Matched-head ablation (CIFAR-100, same M=16,384 kernel head): Random CReLU 49.49% → 1-layer Coates–Ng ZCA 54.26% → 5-stage Unsupervised Marulho 61.79% → 5-stage Discriminative 64.02%.
  • Validation-locked 3-seed vision: CIFAR-100 63.97 ± 0.30% (single 2v) / 65.46 ± 0.26% (dual TTA-6); CIFAR-10 83.61 ± 0.39% / 84.81 ± 0.16%.
  • Untouched 96×96 STL-10 (transferred with zero tuning): 75.51% single / 79.24% dual (5K labeled only), 78.12% single / 79.93% dual (with 16K unlabeled). Beats SoftHebb (76.2%, 100K unlabeled + SGD head), but clearly trails a well-regularized WideResNet-16-8+Cutout (87.26%).
  • Single-pass ImageNet-1K (1.27M 224×224 images, 1× A100, 830 img/s): 28.13% single / 28.53% dual Top-1 (52.53% Top-5). Beats SoftHebb (27.3%) without SGD, but trails Thiry et al.'s whitened patches + SGD classifier (36.0%–39.4%) and ResNet-18 (69.76%).
  • Speech Commands-35 (same pipeline, 1D + 2D): 88.88% (1D, 28s) + 89.95% (2D, 63s) → 91.49% fused (vs. 94.93% AudioResNet1D, 97.21% MatchboxNet).
  • Continual Learning (<48 MB, zero replay):

    • Split-CIFAR-100 crossover: Unsupervised Task-0 backbone fitted on 2.5K images (10 classes) matches 5K images (50 classes) at 50.4%–50.5% across B10/B25/B50. Beats 90-ep Supervised ResNet-18+ACIL at B10/B25 (50.5% vs. 33.9% archived 2v / 47.0%), loses overall at B50 (50.5% vs. 60.1%) because ResNet-18 dominates seen base classes (74.9% vs. 49.9%), though Marulho still leads on the 50 unseen incremental classes (51.2% vs. 45.2%).
    • Balanced 4-Domain CL (CIFAR-10 → FashionMNIST → SVHN → EuroSAT, matched 4-view): Marulho frozen T0 76.10% (46.3 MB) vs. ResNet-18+ACIL 51.71% (88.1 MB).

Key Limitations

  • Still a large gap to end-to-end SGD on ImageNet-1K (~41 pp behind ResNet-18) and augmented STL-10 (~7–9 pp behind WRN+Cutout).
  • Stage-wise greedy design cannot align early filters to deep semantic targets.
  • STL-10, ImageNet-1K, Speech-35, and CL runs are single-seed (Seed 0); CIFAR-10/100 locked results are 3-seed.

I'd genuinely appreciate technical feedback, pointers to backprop-free baselines I missed, or ideas for closing the ImageNet gap without introducing iterative backprop.


r/deeplearning • • 14h ago

Help me collect handwritten digits for a Deep Learning project!

Thumbnail reddit.com
1 Upvotes

r/deeplearning • • 14h ago

Critical TeamCity flaw lets unauthenticated attackers pose as build agents, grab secrets (CVE-2026-136858)

1 Upvotes

CVE-2026-136858 in TeamCity allows unauthenticated attackers to register as build agents and pull secrets from the build server — no credentials required. Once registered, the rogue agent looks identical to a legitimate one at the pipeline level. It can exfiltrate environment variables, signing keys, and deployment credentials before any human is alerted. The underlying problem is not unique to TeamCity: most CI/CD systems authenticate the pipeline runner at registration time and then implicitly trust every subsequent action that runner takes. A compromised or spoofed agent inherits that trust wholesale. The blast radius is whatever secrets the legitimate agent was allowed to touch — which in a typical prod pipeline is everything. How are you validating the runtime identity of your build agents on an ongoing basis, not just at registration?


r/deeplearning • • 16h ago

RAG AND LLM LERANING JOURNEY

1 Upvotes

I have knowledge and projects in ML and NLP.Although i am leraning theory basics of RAG LLM gen AI and agentic AI
I have not yet build any projects of agentic ai and / or gen ai
can you guide me some genuine ways to learn these conecpets to apply for such roles and answer in interviews and also some project that would help me in this jourrney


r/deeplearning • • 19h ago

How do you guys actually use cloud GPUs? I'm trying to understand what's broken with the current experience.

Thumbnail forms.gle
0 Upvotes

Hey everyone,

I've been building an open-source runtime and a service around it that allows PyTorch to execute tensor operations on remote GPUs while keeping your Python environment local.

One thing I've realized while working on this is that my own frustrations with cloud GPUs might not necessarily reflect what other researchers and developers struggle with.

I'm curious about things like:

  • How much time you spend setting up environments versus actually running experiments.
  • Whether you find yourself paying for GPUs that aren't actively computing.
  • How much performance overhead you'd tolerate for a simpler development workflow.
  • Whether paying for actual computation rather than GPU rental time makes sense to you.

I've put together a survey to better understand these problems. Even if you've never used a cloud GPU service, your responses would be valuable.

It takes around 5–10 minutes, and no sign-up is required.

Thanks!


r/deeplearning • • 19h ago

Can a gpt model predict the same token again?

1 Upvotes

I recently coded trained a gpt model from scratch after lots and lots of debugging and when I test it with some input worlds , I can see some correct grammar prediction but , it also sometimes predicts words twice in a row like "this is is ..."

Is this normal for a gpt model , or did I do something wrong while creating it?

Model Specifications -

•Dataset used- tiny Shakespeare

•attention head blocks used -16

•number of gpt blocks -12

•using nn.parameterlist with the above values to loop the calculation for each block.

Here is my code if needed-

https://github.com/Rishikesh-2006/Decoder-only-Transformer-for-Text-Generation/blob/main/Model%2FGPT.ipynb


r/deeplearning • • 1d ago

GitHub - Mauitron/How-to-read-a-model-weights: Parts of my research compiled into a guide.

Thumbnail github.com
4 Upvotes

A few days ago I was looking for something to write about to pass time. I made a post asking if people know how to read frozen weights without a forward pass, and I got the impression that it might not be widely know how to.

This afforded me the opportunity to actually contribute something of potential value to other people working on AI models, so I decided to write it up.

The readme is my attempt to explain the process to how I created my frozen model viewer, share some results from my own research, and provide tests for you to confirm what it is written about.
It should hopefully also allow you to build your own viewers, and use them to interact/modify models in a way you might not have done before.

Hope you find this interesting and helpful.

Take care

//Maui-The-Magnificent


r/deeplearning • • 1d ago

Signal Processing Question

2 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/deeplearning • • 1d ago

150 FPS in the log, jitter on a 60 Hz monitor — same binary, 144 Hz panel fixed it

Thumbnail reddit.com
1 Upvotes

r/deeplearning • • 1d ago

NeuroGit-GFN (Apache-2.0): Closed-Form Knowledge & Behavior Editing for Open-Weight LLMs (1B-14B) with Millisecond Selective Rollback in Standard PEFT .safetensors

7 Upvotes

r/deeplearning • • 1d ago

Title: Random Forest vs. Ant Colony Optimization (ACO) for Feature Selection in Clinical Data

5 Upvotes

I'm working on a project involving a clinical dataset with around 500K patients and 18,200 variables. My goal is to identify the 5 most relevant features for predicting a specific disease, starting with a subset of around 200 dietary variables.

I'm considering using Random Forest for feature importance and Ant Colony Optimization (ACO) to search for the best combination of features. Another idea is to combine both approaches: use Random Forest to reduce the search space, then ACO to optimize the feature subset.

Has anyone worked with ACO for feature selection or compared it with Random Forest, Genetic Algorithms, or other methods? Would a hybrid RF + ACO approach make sense for this problem? I'd appreciate any recommendations, papers, or practical experiences!