Brief Notes on GenAI from April

1 · Machine–Learning Model Taxonomy 🔗1.1 Discriminative vs Generative 🔗 Discriminative models learn the conditional distribution $P(y\mid x)$ to separate classes. Primary use · classification/regression. Typical nature · often deterministic at inference. Examples · Logistic Regression, SVM, plain Feed‑forward NNs, ResNet‑like CNNs. Generative models learn the joint distribution $P(x,y)=P(x\mid y)P(y)$ and can synthesize new x. Primary use · both classification and data generation/simulation. Typical nature · probabilistic/stochastic. Examples · Naïve Bayes, Hidden Markov Models, GANs, VAEs, Diffusion models.

Read article →

Anatomy of a prompt

Quick Announcement 🔗I started this blog to reflect on my learning and write down my ideas in a more digestible format. I kind of deviated from that by making it very textbook-style, code-centric articles. They were also extremely long, so—based on feedback—I’d like to start over and do some mix-and-match. While I’ll still occasionally write code-heavy articles, I’ll also do these small “TILs” to jot down raw notes in a more standard format.

Read article →

Node.js Module Caching

Introduction 🔗In this article we will discuss NodeJs process of optimize application by caching modules. We will also discuss how Class definitions are cached, but new instances are not and Singleton patterns allow caching class instances manually Node.js optimizes performance by caching imported modules to prevent redundant execution. This means that when a module is required or imported multiple times, it is loaded and executed only once—subsequent imports simply reuse the cached version.

Read article →