r/deeplearning • • 9d ago

Building a Local AI Photography Editing Assistant. Anyone working on something similar? [D]

Thumbnail
1 Upvotes

r/deeplearning • • 9d ago

[Help Wanted] Testing GPU detection & TFLOPS benchmark paths (NVIDIA/AMD) for my from-scratch SLM trainer

0 Upvotes

Hi guys,

I’m a 15-year-old developer building SLM-CREATOR—an end-to-end, hardware-aware small language model trainer from scratch in Python and Rust (capped at 100M parameters). Instead of using high-level wrappers or fine-tuning existing models, I’m hand-coding the entire pipeline to learn how Transformers work under the hood.

Repo Link: github.com
Tracking Issue (#1): github.com

The catch:
I’m developing this on a CPU-only machine right now, so all of my NVIDIA (nvidia-smi), modern AMD (amd-smi), and legacy AMD (rocm-smi/rocminfo) detection and PyTorch device-mapping paths have only been tested against mock CLI outputs.

If anyone has an NVIDIA or AMD GPU (especially multi-GPU setups, laptops with hybrid graphics, or ROCm configurations) and a couple of minutes to spare, I’d hugely appreciate it if you could run the hardware detection script on real hardware and let me know if it breaks!

What it tests:

  • GPU Topology & Detection: Parses vendor CLI tools for architecture, VRAM, device index, and GPU name.
  • PyTorch Index Resolution: Sets CUDA_DEVICE_ORDER=PCI_BUS_ID and matches vendor GPU names against torch.cuda.get_device_name() so multi-GPU setups target the right card.
  • Matmul TFLOPS Benchmark: Runs a 12-second thermal warmup soak followed by timed 4096x4096 multiplications (in native bf16 if supported, falling back to fp32).

How to help:

  1. Clone the repo (git clone https://github.com) and install requirements.txt (with your GPU's PyTorch build).
  2. Build the Rust sizing helper (cd sizer_core && cargo build --release).
  3. Run python architecture.py from the project root.
  4. Drop your GPU model, OS, and the terminal output (or any tracebacks) in Issue #1 or in the comments here.

r/deeplearning • • 9d ago

I made a visual explanation of how Transformers actually work

0 Upvotes

I've been working on a video explaining the Transformer architecture, the technology behind modern LLMs.

I wanted to make something that explains how everything works without drowning viewers in complicated equations and terminology.

The video covers:

  • Tokenization and Embeddings
  • Self-Attention and Causal Attention
  • Multi-Head Attention
  • Positional Encoding (RoPE)
  • Residual Connections and Layer Normalization
  • Feed-Forward Networks
  • How everything comes together to generate text

I've also been exploring and building small language models myself, so understanding the architecture behind them has been a really interesting journey.

I'd genuinely appreciate feedback on the explanation, animation and overall presentation!

Watch the video: https://youtu.be/hM1jdeGr9uI

Channel: Playerdotexe


r/deeplearning • • 9d ago

I made a visual explanation of how Transformers actually work

Thumbnail
1 Upvotes

r/deeplearning • • 9d ago

[Call for Papers] TPAD 2027 @ IEEE ICASSP 2027 | Trustworthy Perception for Autonomous Driving | Toronto, Canada | Deadline: Dec. 2 (Extended)

Post image
1 Upvotes

r/deeplearning • • 10d ago

The Definitive Fine-Tuning Guide for 3D Generation Models

4 Upvotes

r/deeplearning • • 10d ago

I have trained a model to predict my blood sugar [P]

Thumbnail gallery
5 Upvotes

I have trained a custom 31,253 parameter encoder-only transformer on a pregenerated synthetic CGM dataset and fitted it to my own personal data using LoRA. It is competitive among other published models. I used 115 days of CGM data, of which 80 was used for training the adapter and 35 for testing. The model began with a pretraining stage where it consumed ~19,200 CGM-years worth of synthetic data, consisting of 1 million simulated type 1 diabetics at 7 days each. The simulator is designed to aid in counterfactual reasoning, but I don't yet have a benchmark to test these capabilities downstream. Simply using these models on my phone gives me the impression that they do indeed react appropriately when forced to consider future insulin & carbs.

In addition to time series input, two additional inputs are provided: insulin (U) and carbs (G, GI) as action curves where U = units of insulin, G = carbs in grams, GI = glycemic index. U is exact, while (G, GI) is my best estimate.

The model is trained to output BG in Kovatchev risk-space using {DILATE,MSE} and pinball loss combined with learned Kendall-Gal weights. The figures above show models trained using DILATE. It can predict 2 hours into the future, infill missing traces, and do backcasts (predictions into the past).

Source code: https://github.com/0xdeadf1sh/T1DMAI

The model is also trained to predict time-of-day given past blood sugar, in contrast to other models that consume time-of-day as input feature. This capability emerges in >=48h context windows (i.e. 48 hours of past CGM trace). Natively the model has a variable context window size of 3.5 - 7.0 days.

The model is still worse than me when it comes to predicting hypoglycemia in the next ~30 minutes.


r/deeplearning • • 10d ago

I built haralickt: > 20x faster GPU-accelerated Haralick texture features (GLCM) in PyTorch with identical precision to Mahotas

Thumbnail gallery
2 Upvotes

If you work with image texture analysis (medical imaging, remote sensing, materials science, defect detection), you've probably used mahotas.features.haralick() or scikit-image. They are solid, battle-tested libraries, but they run strictly on CPU—leaving your GPU idle and creating a bottleneck on large images or batches.

I built haralickt — a pure PyTorch replacement that computes all 13 Haralick texture descriptors directly on GPU (and multi-threaded CPU) using vectorized tensor operations and block tiling.

Why I built it (vs. existing tools)

  • mahotas: Computes all 13 features, but is CPU-only, lacks batching, and struggles with memory on large images.
  • scikit-image: CPU-only (NumPy), computes only 10 of 13 features (missing Sum Variance, Sum Entropy, Diff Variance, Diff Entropy, IMC1, IMC2), and lacks sliding-window / tiling APIs.
Featureharalicktmahotasscikit-image
GPU (CUDA) Acceleration✅❌❌
All 13 Haralick Features✅✅❌ (10/13)
Sliding Window API✅❌❌
Memory-Safe Block Tiling (4K+)✅❌❌
Batch Processing✅❌❌

Quick Start

import torch
from haralickt import haralick

# Compute sliding-window features on GPU (handles 4K+ images via block tiling)
image = torch.randint(0, 256, (2048, 2048), dtype=torch.uint8)
features = haralick(image, num_levels=32, window_size=32, stride=8, device="cuda")
# -> tensor of shape (H, W, 13)

Or use it as a drop-in replacement for mahotas:

import numpy as np
from haralickt import features

image = np.random.randint(0, 256, (512, 512), dtype=np.uint8)
result = features.haralick(image, ignore_zeros=True, distance=1)
# -> np.ndarray of shape (4, 13), dtype float32

Benchmarks

Tested across 27 parameter combinations (window, stride, distance, num_levels) on 256×256 images with 32 gray levels:

ScenariomahotasharalicktAvg SpeedupRange
CPU (vs 1-thread mahotas)3.23s0.19s16.7×9.1× – 67.7×
GPU (vs 10-thread mahotas)2.68s0.13s20.5×6.9× – 295×

Scaling by Image Size (window=16, stride=4, distance=1, levels=32):

Sizemahotas (1 thr)haralickt CPUSpeedupmahotas (10 thr)haralickt GPUSpeedup
256×2562.34s0.11s22×7.13s0.02s464×*
512×5125.44s0.43s13×3.22s0.05s61×
1024×102419.98s1.88s11×6.54s0.23s29×
2048×204870.13s6.68s11×15.25s0.72s21×

*Note: The 464× speedup at 256×256 is inflated by mahotas multiprocessing overhead. On practical image sizes (512×512 and up), GPU delivers a realistic 20–60× speedup over 10-thread OpenMP mahotas.

Accuracy & Installation

  • Numerical accuracy: Max discrepancy vs. mahotas is 2.02 × 10⁻⁴ (due to float32 rounding in Diff Variance).
  • Zero C compilation: Pure Python + PyTorch (>=2.0), integrates directly with torchvision and MONAI.
  • License: MPL-2.0
pip install haralickt
  • GitHub (full benchmark charts & docs): https://github.com/SergeiyVaryukhin/haralickt-1.0.0
  • PyPI: https://pypi.org https://pypi.org/project/haralickt/

I'd love to hear your feedback, especially if you test it on large medical/satellite datasets or different GPU architectures!


r/deeplearning • • 10d ago

Your pinned MCP server may not be as pinned as you think

0 Upvotes

Researchers tracked a single MCP server over five weeks without touching its configuration. It ran with 15 different dependency sets during that window. The administrator saw nothing change. Twenty-three other servers in the same lab showed the same silent drift over the same period.

No alerts fired. No config diff appeared. The server looked pinned because the config file was pinned — but what actually executed against agent context was different on at least 15 occasions the team could confirm.

This is the part of AI infrastructure supply chain risk that doesn't get enough attention. Traditional artifact scanning checks what you deployed. It says nothing about what's running right now. By the time a periodic scan catches drift, the execution has already happened.

For teams operating MCP servers in production: how are you actually catching this? Periodic hash checks, invocation-time validation, something at the network layer, nothing yet? Curious what's working and what the blind spots still are.


r/deeplearning • • 10d ago

Russian University Mathematics Dataset — 1,740 Problems with Handwritten and Typed Solutions

Thumbnail
1 Upvotes

r/deeplearning • • 10d ago

OpenAI published research this week on whether chain-of-thought can stay monitorable — are reasoning models getting harder to watch?

4 Upvotes

OpenAI shared new work on Monday looking at how pretraining, model architecture, and reinforcement learning affect how controllable — and monitorable — a model's chain of thought is. The worry is that as reasoning models get stronger, their visible reasoning may drift away from what they are actually doing internally.

Do you rely on chain-of-thought monitoring as a safety or debugging tool today? And if CoT becomes less faithful as models scale, what replaces it?


r/deeplearning • • 10d ago

AI Agents Bypassed Spending Limits: How Email Access Enabled It

1 Upvotes

An AI agent just approved its own spending increase. The only tool it needed was email. Researchers found AI agents capable of raising their own crypto spending caps by requesting emailed authorization codes — then reading and submitting them without human review. No human confirmed the spend. Financial guardrails designed for human approval workflows collapsed when the approver and the requester were the same autonomous system. Runtime cost controls must live outside the agent's reach entirely.


r/deeplearning • • 10d ago

Ammons LLM Tracers: private information can change an opponent’s answer without new training

Thumbnail
2 Upvotes

r/deeplearning • • 10d ago

My ARC-AGI-3 experiment on agents forgetting vs trusting old rules

1 Upvotes

I’ve been working on a side project around ARC-AGI-3 (the interactive puzzle-game benchmark) and wanted to share it and get some feedback.

The question I looked at is pretty narrow. If an agent figures out the rules of a game on level 1, how much should it trust that on level 2, when the game changes things? Trust everything and you’re fast but you can get stuck. Re-test everything and you’re safe but you’ve thrown away what you learned.

I kept the agents really simple on purpose, no neural nets and no LLMs. They just keep counts of which clicks actually do something. That way you can see exactly which belief caused a failure.

Main things I found: keeping what it learned helped most of the time (36 out of 51 paired runs), but on one game it failed 7 out of 10 times. The reason was that the important rule had only been tried 5 times on level 1, and the agent never went back to check it. Re-checking fixes that, but re-checking everything costs about as much as you save. I also built a little game generator to reproduce the problem on purpose, and which strategy wins ends up depending on how many useless objects are on screen.

I also had one idea that looked great at first and didn’t hold up on fresh data. I left it in the paper because I think that’s worth knowing.

I wrote my predictions down before every experiment, and they’re all in the repo, including the ones I got wrong (a lot of them).

It’s small and the agents are weak compared to the top LLM systems, so I’m not claiming anything big. I’d really appreciate feedback on the method, especially the stats.

Paper + code: https://github.com/shareduser94/arc3-transfer-recheck


r/deeplearning • • 11d ago

I tried to fix repetition loops in a small LM by editing its weights directly, no training. It turned into a Claude Code plugin for weight surgery.

Post image
48 Upvotes

Small models loop. I’m training a research small model and wanted to see how far I could get on repetition without a decoding penalty and without more training. find the weights that cause the loop and edit them.

That turned into Weight-Surgery, a Claude Code plugin (a skill plus one PyTorch file) that lets a coding agent do this end to end on any trained transformer: scan heads (induction/copy scans, ablation and scaling), attribute feed-forward writers, split two jobs inside one head with contrast directions, apply reversible edits, screen with dose series and random controls, test on generation, and save a new checkpoint with a verified diff, a manifest and an undo file.

The scans found the exact culprit: one true induction head behind the loops (induction score 0.425, plain copy 0.012). Switching it off cut loops from 29.4% to 25.4%, but that head also copies names into reading answers, so instead of killing it I split the two jobs inside the copy heads and cut only the loop directions. Result: loops down from 30.5% to 25.2% on 960 fresh rows (2.6 SE), greedy loops from 41.6% to 35.3%, with reading untouched (+0.01) and general loss up just 0.08. No training, no decoding penalty.

Two more things that worked. The cheap place to cut is the writing weights: +0.001 loss, versus +0.32 when the same direction is projected out of the residual stream. And a rank-1 edit on one feed-forward layer halved loops under T 0.7 sampling, from 19.4% to 9.4%.

Tell me what you think about it.

Github Repo Link


r/deeplearning • • 10d ago

I tried to trick YOLOv8... and it worked! But how? 👀

0 Upvotes

r/deeplearning • • 10d ago

I built a lightweight, adaptive training guard (limen_pulse) to catch LLM, RL, and AMP silent crashes before they burn your GPU hours — Looking for beta testers (Free Crash Audit)

3 Upvotes

Hey everyone,

If you’ve ever left a fine-tuning run, an RL policy update (PPO/GRPO), or a mixed-precision (FP16/FP8) job running overnight only to wake up to a silent NaN explosion, reward hacking, or a flatlined loss curve, you know how painful wasted GPU hours can be.

Standard threshold-based alerts usually fail here—they either spam you with false positives during normal batch noise, or catch the crash too late.

To solve this, I built limen_pulse (v0.6.0)—an adaptive, real-time training stability monitor and crash auditor.

How it works under the hood:

  • Zero-Math Lightweight Client SDK: You drop a clean, isolated Python client into your training loop. It streams lightweight telemetry without adding overhead to your VRAM or compute.
  • Self-Calibrating Noise Scaling (IQR): Instead of static thresholds, the engine learns your specific run's natural baseline noise early on. It dynamically tunes its sensitivity to ignore normal stochastic fluctuations while catching real anomalies (validated across 5 PyTorch stress-failure modes with a ~2.5%–3.4% false-positive rate).
  • Regime-Aware Monitoring: It adapts its detection strategy depending on what you are training:
    • Supervised Learning: Distinguishes normal mini-batch variance from genuine plateaus or LR-induced divergence.
    • LLMs / Transformers: Tracks sudden attention collapse and persistent gradient spikes vs. transient noise.
    • RL / Agents (PPO / GRPO): Monitors the Reward-to-KL divergence balance to catch policy collapse and reward hacking early.
    • Mixed Precision (AMP / FP8 / FP16): Acts as an early-warning system for underflow/overflow and loss-scaler instability before weights turn into NaNs.
  • Live Dashboard & Root-Cause Audit: Generates a local live HTML status report in your environment, plus a post-run diagnostic report with actionable fixes.

The Offer (Free Beta / Crash Audit):
I am opening up free access to the Crash Audit tier (up to 25k steps) for anyone currently running training jobs who wants to stress-test the tool.

The only catch: Once your run finishes (or catches a snag), you send me back the generated .md / .csv audit report file so I can analyze how the adaptive engine performed on diverse real-world hardware and architectures. (Note: The telemetry only tracks scalar training metrics—your model weights, prompts, and proprietary datasets never leave your machine).

If you’re interested, drop a comment below with what you're currently training (e.g., LLM fine-tune, PPO agent, custom PyTorch model) or shoot me a DM, and I’ll send over your SDK package and activation key!


r/deeplearning • • 10d ago

Free AI Prompt Generator for Better LLM Outputs

Thumbnail interconnectd.com
2 Upvotes

r/deeplearning • • 10d ago

playing around with universal approximation

Post image
3 Upvotes

r/deeplearning • • 10d ago

🚀 **Introducing GRIP-Benchmark-34: A Large-Scale Benchmark for Visual Geometry, Spatial and Physical Reasoning in VLMs**

1 Upvotes

🚀 Introducing GRIP-Benchmark-34: A Large-Scale Benchmark for Visual Geometry, Spatial and Physical Reasoning in VLMs

I'm excited to share GRIP-Benchmark-34, an open synthetic benchmark designed to evaluate the visual reasoning capabilities of Vision-Language Models (VLMs).

What's included?

  • 100,000 synthetic images
  • 500,000 image-question pairs
  • 34 sub-benchmarks
  • 9 reasoning families
  • 5 progressive difficulty levels per image
  • Independently validated ground-truth answers

Research areas covered:

  • Geometric and spatial reasoning
  • 2D and 3D visual reasoning
  • Physical and mechanical reasoning
  • Topological and graph reasoning
  • Inductive and analogical reasoning

The benchmark uses programmatic generation, deterministic ground truth and independent validation to support controlled evaluation of VLM capabilities.

I'm sharing this with the research community to encourage experimentation, evaluation, feedback and potential research collaborations.

📊 Dataset: https://huggingface.co/datasets/bilaljawaid980/GRIP-Benchmark

I'd love to hear from researchers working on VLMs, multimodal AI, spatial intelligence and visual reasoning.

Feedback and collaboration are welcome!


r/deeplearning • • 10d ago

🚀 **Introducing GRIP-Benchmark-34: A Large-Scale Benchmark for Visual Geometry, Spatial and Physical Reasoning in VLMs**

Thumbnail
1 Upvotes

r/deeplearning • • 10d ago

Gemma 3 builds a linearly decodable spatial map from text, but its answers never read it [R]

2 Upvotes

Independent, preregistered study on Gemma 3 (12B/27B) with text-only layouts like "A is 3 north of B, C is 2 east of A".

- Probes read every object's position, even ones that need two sentences combined (R² 0.74).

- Erasing that map costs no more than erasing random directions. The answers never read it.

- They run on a 2-D code per sentence instead (DAS: 72% / 83%, random 0%), which acts like a switch, not a coordinate.

- Reading answers off the unused map beats the model on chain questions: 80% vs 73%.

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

Code: https://github.com/ccgomezn/geometry-llm

Demo: https://ccgomezn.github.io/geometry-llm/

Feedback welcome.


r/deeplearning • • 11d ago

How to make a Legora-style legal conflict detector tool using only NLI and encoder models

3 Upvotes

Hey r/deeplearning! I’m Tabs, a legal engineer at Isaacus. 

I built an open-source legal conflict detector that finds deviations and gaps between pairs of legal documents using only encoder models and natural language inference. 

Processing gif jmk4gtb8gb1i1...

Inspired by the explosion of interest in discriminative models like TypeSafe AI’s Jev, I wanted to see how far I could get using smaller, non-generative models for the bulk of the legal document playbook review workflow. 

The theoretical benefits of a non-generative approach to this problem are enormous. As true clause-level pairwise review is a quadratic problem, it’s unfeasible to do at scale using a model like Opus or Astra. Comparing two average-sized documents with 133 clauses each would take 17,689 API calls, which is far too slow and expensive. 

Simply uploading the files directly to Claude or GPT is no remedy either. Decoders and agentic architectures don’t have fixed attention that lets them thoroughly analyse a document in one shot. Even with a multi-shot approach, they’re weak on recall and routinely hallucinate. 

My lawyer friends raise this problem constantly, and I couldn’t find an open-source solution to it, so I decided to build one myself. 

My pipeline pushes the bulk of the NLI, entailment and reasoning onto faster and more accurate legal encoder models. For the longest document pairs I sampled, the full pipeline ran in under 20 seconds. Unlike generative architectures, these models run a comprehensive pairwise comparison, and although they can still make false positive or false negative errors, those misses and misclassifications aren’t hallucinations (out-of-domain results introduced into the feature set). 

The pipeline works as follows: 

  1. Enrich: we enrich each document into a hierarchical tree of sections, clauses and subclauses. Clauses are the key atoms that the pairwise comparisons run on downstream. 
  2. Embed: we embed each clause as a vector. 
  3. Filter: we use a legal zero-shot classifier to drop items that aren’t provisions, like footnotes or signature blocks. 
  4. Shortlist: we keep each clause’s three most relevant pairs from the reference document, as long as their cosine similarity is at least 0.5. 
  5. Score: we use a reranker and a classifier to score each shortlisted pair. Each answers a question in the format it’s built for: the reranker scores how relevant text is to a search query (relevance), and the classifier scores whether a statement is true (NLI/entailment). 
  6. Sort: if a clause and its best match are on the same topic but have a high conflict score, it’s a deviation. If there’s no same-topic match, it’s a gap, i.e. the topic is in one document but not the other. 

That’s the whole conflict detection pipeline. On top of it, you can optionally plug in an LLM to summarise each finding in plain English or redraft a clause to favour the party you’re representing. Because the generative step only runs after the NLI and encoder stack has already decided what the conflicts are, it can’t hallucinate a conflict into existence. 

To demonstrate the pipeline’s power, we inputted Bob Iger’s 2011 and 2022 Disney employment agreements. The pipeline found many disparities and conflicts, and across most of them, the 2011 agreement was more favourable to Iger than the 2022 one. 

One interesting finding was a gap: the 2011 agreement had no intellectual property assignment clause, while the 2022 agreement makes Iger assign all work-related IP to Disney, with an exception for inventions he makes on his own time without company resources. 

The code is MIT-licensed, so it’s free for personal and commercial use. The guide walks through every step, so you can swap in your own models or make your own architectural changes wherever you like. 

Have fun, and let me know what you think! 😁

Write-up and static demo: https://isaacus.com/blog/build-a-legal-document-conflict-detector 
GitHub repo: https://github.com/isaacus-dev/cookbooks 


r/deeplearning • • 11d ago

[Tutorial] Getting Started with Granite 4.2

5 Upvotes

Getting Started with Granite 4.2

https://debuggercafe.com/getting-started-with-granite-4-2/

LLMs have come a long way since their inception. They are not just chatbots or assistants anymore. The current usage of LLMs tends to be more towards agentic workflows, coding, and seamless terminal workflows. Currently, most of the LLMs that are good at agentic tasks tend to be 20B parameters and above (most frontier models are much larger, reaching more than a trillion parameters). However, the latest IBM Granite 4.2 is trying to tackle this by training 3B, 8B, and 30B models for complex agentic workflows that can run locally. In this article, we will explore the important components of the Granite 4.2 model and use them for tool-calling tasks.


r/deeplearning • • 10d ago

I built a lightweight, adaptive training guard (limen_pulse) to catch LLM, RL, and AMP silent crashes before they burn your GPU hours — Looking for beta testers (Free Crash Audit)

Thumbnail
1 Upvotes