Category: LLMs from Scratch

LLM_log #024 Visual Complexity Without an LLM Judge — Head-to-Head Against Gemini

Visual Complexity Without an LLM Judge — Head-to-Head Against Gemini Highlights: LLM/VLM pairwise judges have a structural position bias — the first-shown candidate wins more often than it should, worst-case exactly on close calls. We replace the LLM judge with a transparent, CPU-only alternative: handcrafted complexity features + logistic regression on the signed difference \( \mathbf{d} = f(A) – f(B) \). The same fit gives you a per-image score \( \text{score}(x) = \mathbf{w} \cdot f(x)…
Read more

LLM_log #022: Vision Transformer From Scratch — From Pixels to Tokens (Part 1)

Highlights: An image is just a matrix — but the Transformer eats sequences of vectors. The whole “vision” trick of ViT lives in how that matrix is turned into a sequence. We cut a 224×224 image into a fixed 14×14 grid of 16×16 patches, flatten each, and project it through ONE learned Linear layer. Patches are not sampled — every cell of the grid becomes a token, in fixed order. We prepend a learnable [CLS]…
Read more

LLM_log #020: Language Agents — Memory, Reasoning, and Planning

Highlights: Yu Su’s guest lecture in the UC Berkeley CS294-280 course argues language agents are not “LLM + tools” but a new evolutionary stage of machine intelligence. We walk through the agent-first framing and three concrete research pillars — long-term memory (HippoRAG), implicit reasoning (Grokked Transformers), and model-based planning (WebDreamer) — that map directly to classical AI problems re-examined through the lens of LLMs. Agent-first framing: token generation is itself an action; the inner monologue…
Read more

LLM_log #018: Color Harmony Ranking — Three Methods, 500 Living Rooms

Highlights: Can three completely independent methods agree on which living room has the best colors? We rank 500 interior images using Cohen-Or harmonic templates, Hasler-Süsstrunk colorfulness, and CLIP IQA with 44 color-focused prompts — then measure whether they correlate at all. Method 1 — Cohen-Or: K-means palette → saturation-weighted hue histogram → sweep 7 harmonic templates × 36 rotations → H/T/S composite Method 2 — Hasler-Süsstrunk: opponent channels (rg, yb) → colorfulness + 4×4 spatial…
Read more

LLM_log #013: Latent Space — From AutoEncoders to the Engine Inside Stable Diffusion

Highlights: Every time you use Stable Diffusion, DALL-E, or Sora, the model never touches a single pixel during its main computation. It works entirely inside a compressed, structured space of floating-point numbers — a latent space learned by a VAE. In this post we build that space from scratch. We start from the simplest possible compression — an AutoEncoder on MNIST digits — understand why it fails at generation, fix it with the VAE’s probabilistic…
Read more