Skip to content
AILinkDeepTech

Archives

All the articles I've archived.

2026 46
August 1
July 2
June 8
May 10
April 12
March 5
February 5
January 3
2025 37
December 4
November 6
October 6
  • 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.

  • Denoising Diffusion Probabilistic Model (DDPM) Implementation in PyTorch

    A PyTorch implementation of a Denoising Diffusion Probabilistic Model (DDPM): a linear-beta forward diffusion, a reverse sampling loop, a time-conditioned UNet denoising network, and a training-free smoke test that forward-diffuses, predicts noise, and samples images.

  • 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.

  • 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.

  • 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.

  • 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.

September 6
August 5
July 3
June 1
May 1
April 3
March 1
February 1