Skip to content
AILinkDeepTech

Research

Deep dives into reinforcement learning, computer vision, and robotics research, complete with mathematical formulations and architectural breakdowns.

Reinforcement Learning Medium

Soft Actor-Critic (SAC) Implementation in PyTorch

A PyTorch implementation of Soft Actor-Critic (SAC) with a stochastic squashed Gaussian policy, twin Q-networks with target networks, automatic temperature tuning, and a replay buffer for continuous control.

#SAC #Soft Actor-Critic #Reinforcement Learning #PyTorch #Deep Learning #Continuous Control #Off-Policy
Deep Learning Medium

Neural Radiance Fields (NeRF) Implementation in PyTorch

A PyTorch implementation of Neural Radiance Fields (NeRF): positional encoding for positions and view directions, MLP with skip connections, density/color prediction, stratified sampling, and volumetric rendering.

#NeRF #Neural Radiance Fields #PyTorch #Deep Learning #3D Reconstruction #Volume Rendering #Computer Vision
Deep Learning Medium

Stable Diffusion (DDPM): Minimal PyTorch Implementation

A minimal PyTorch implementation of a Denoising Diffusion Probabilistic Model (DDPM): sinusoidal time embeddings, U-Net with skip connections, forward noising, reverse denoising, and ancestral sampling.

#Stable Diffusion #Diffusion Model #DDPM #PyTorch #Deep Learning #Generative Model #Image Generation
Deep Learning Medium

Transformer Encoder Implementation in PyTorch

A compact PyTorch implementation of a Transformer encoder with multi-head self-attention, sinusoidal positional encoding, feed-forward layers, residual connections, and padding masks.

#Transformer #PyTorch #Deep Learning #Attention #Natural Language Processing
Deep Learning Medium

Direct Preference Optimization (DPO) Implementation in PyTorch

A PyTorch implementation of Direct Preference Optimization (DPO): a small LSTM language model, a preference dataset, and a DPO trainer that optimizes a policy against a frozen reference via the sigmoid logistic DPO loss on chosen/rejected pairs.

#DPO #Direct Preference Optimization #RLHF #Preference Optimization #LSTM #Language Model #PyTorch
Reinforcement Learning Medium

Group Relative Policy Optimization (GRPO) Implementation in PyTorch

A PyTorch implementation of Group Relative Policy Optimization (GRPO): a Group-relative RL approach that partitions sorted trajectories into groups, weights group-relative advantages, and applies clipped surrogate updates with PPO-style ratios.

#GRPO #Group Relative Policy Optimization #PPO #Reinforcement Learning #Policy Gradient #Gym #PyTorch
Reinforcement Learning Advanced

Deep Deterministic Policy Gradient (DDPG) Implementation in PyTorch

A PyTorch implementation of Deep Deterministic Policy Gradient (DDPG): an Actor that outputs tanh-bounded deterministic actions, a Q-value Critic over state-action pairs, a replay buffer, target networks with soft updates, and a smoke test that exercises action selection and a short training loop.

#DDPG #Actor-Critic #Reinforcement Learning #Deterministic Policy #Replay Buffer #Soft Update #PyTorch
Generative Models Medium

Diffusion Transformer (DiT) Implementation in PyTorch

A PyTorch implementation of the Diffusion Transformer (DiT): a patch-embedded Vision Transformer with sinusoidal timestep conditioning, multi-head self-attention, MLP blocks, and a transposed-conv head that predicts the image-space noise.

#DiT #Diffusion Transformer #Generative Model #Diffusion #Vision Transformer #Transformer #PyTorch
Reinforcement Learning Medium

Deep Q-Network (DQN) Implementation in PyTorch

A PyTorch implementation of Deep Q-Network (DQN): a Q-value MLP, a replay buffer, an ε-greedy agent with target network, Bellman loss update, and a CartPole-v1 training/test loop using Gymnasium.

#DQN #Deep Q-Network #Reinforcement Learning #Q-Learning #Replay Buffer #Target Network #PyTorch #Gymnasium
Deep Learning Medium

Low-Rank Adaptation (LoRA) Implementation in PyTorch

A PyTorch implementation of Low-Rank Adaptation (LoRA): low-rank A/B matrices wrapped around a frozen linear layer, scaled by alpha/rank, with shape, freezing, and rank-property tests.

#LoRA #Low-Rank Adaptation #PEFT #Parameter-Efficient Fine-Tuning #PyTorch #Deep Learning #LLM
Deep Learning Medium

FlashAttention Implementation in PyTorch

A PyTorch implementation of FlashAttention-style multi-head attention: a softmax-scaled dot-product attention block, a tiled/blocked variant that processes sequence chunks for memory efficiency, and basic shape tests.

#FlashAttention #Multi-Head Attention #Tiling #Memory Efficient #Transformer #PyTorch
Deep Learning Medium

Mixture of Experts (MoE) Implementation in PyTorch

A PyTorch implementation of the Mixture of Experts (MoE) layer with a top-k gating network, multiple expert MLPs, and weighted expert outputs for sparse expert routing.

#MoE #Mixture of Experts #PyTorch #Deep Learning #Gating Network #Sparse Routing #Transformer
Generative Models Advanced

ControlNet Implementation in PyTorch

A minimal PyTorch ControlNet implementation: a control encoder with conv blocks, residual skip connections, channel attention, and a zero-initialized projection that adds residual control features into a backbone so that the model behaves as identity at init.

#ControlNet #Conditional Diffusion #Stable Diffusion #Generative Models #Channel Attention #Residual Blocks #PyTorch
Generative Models Advanced

Denoising Diffusion Implicit Model (DDIM) Implementation in PyTorch

A PyTorch implementation of a Denoising Diffusion Implicit Model (DDIM) sampler: a UNet denoiser with GELU time conditioning, an eta-controlled stochastic-to-deterministic reverse process on a sub-sequence of timesteps, and a smoke test that verifies noise addition, model output, sampling shapes, and deterministic reproducibility.

#DDIM #Diffusion #Denoising #Generative Models #Deterministic Sampling #UNet #PyTorch
Generative Models Advanced

Denoising Diffusion Probabilistic Model (DDPM) Implementation in PyTorch

A PyTorch implementation of a Denoising Diffusion Probabilistic Model (DDPM): a UNet denoiser with sinusoidal-free linear time conditioning, a linear-beta forward diffusion, an iterative reverse sampling loop, and a smoke test that verifies noise addition, model output, and sampling shapes.

#DDPM #Diffusion #Denoising #Score-based #Generative Models #UNet #PyTorch
Deep Learning Advanced

DeepSeek Architecture Implementation in PyTorch

A PyTorch implementation of the DeepSeek-style architecture: RMSNorm pre-norm blocks, a multi-head latent attention module, a Mixture-of-Experts (MoE) feed-forward router, and a stack of DeepSeek blocks with token-level residual paths.

#DeepSeek #MoE #Mixture of Experts #RMSNorm #LLM #Transformer #PyTorch
Computer Vision Medium

Vision Transformer (ViT) Implementation in PyTorch

A PyTorch implementation of the Vision Transformer (ViT) with patch embedding, learnable class token and position embeddings, multi-head self-attention, MLP blocks, and classification head.

#Vision Transformer #ViT #PyTorch #Deep Learning #Computer Vision #Image Classification
Deep Learning Medium

LLaMA Transformer Implementation in PyTorch

A from-scratch PyTorch implementation of the LLaMA-style Transformer: RMSNorm, Rotary Position Embeddings (RoPE), GQA-style multi-head attention with causal mask, SwiGLU MLP, and a stack of pre-norm decoder layers.

#LLaMA #Transformer #RMSNorm #RoPE #Rotary Position Embedding #SwiGLU #PyTorch
Generative Models Advanced

3D Gaussian Splatting (3DGS) Implementation in PyTorch

A PyTorch implementation of 3D Gaussian Splatting from scratch: per-Gaussian learnable positions, scales, quaternions and RGBA, 3D covariance via R S Sᵀᵀ, projection to 2D via the perspective Jacobian, splat-based alpha compositing over a pixel grid, and a smoke test that checks initialization, symmetry/orthogonality of covariances, and the rendering output shape and value range.

#3DGS #Gaussian Splatting #Differentiable Rendering #3D Reconstruction #Neural Rendering #Quaternion #PyTorch
Reinforcement Learning Advanced

Asynchronous Advantage Actor-Critic (A3C) Implementation in PyTorch

A PyTorch implementation of Asynchronous Advantage Actor-Critic (A3C): a shared Actor-Critic network with a softmax policy head, multiple Worker processes that collect CartPole trajectories, compute n-step returns and advantages, and sync gradients into a global model, plus a greedy test harness that runs the trained policy in render mode.

#A3C #Actor-Critic #Asynchronous #Reinforcement Learning #Advantage #Policy Gradient #PyTorch #Multiprocessing
Page 1 of 1