Blog — Sal Anvarov
Long-form posts by Sal Anvarov: software architecture, developer experience, PyTorch internals, frontend safety, and the trade-offs behind every line of code.
- Pack Your References: Higher-Quality AI Video on Higgsfield, from Seedance to Kling, Wan and Veo — · Generative AI
The single biggest quality lever I have found for AI video on Higgsfield: package several reference images into one clean sheet. How it works on Seedance, how to adapt it for Kling, Wan, Veo and Gemini Omni, plus the prompt structure, two-pass workflow and shot-chaining habits that keep characters and products consistent. - Practical npm Supply-Chain Defenses for Node.js — · Security
A walkthrough of my nodejs-supply-chain-security repo: a safe .npmrc, a least-privilege CI audit workflow, an install-script scanner, and the Node.js permission model, with the tests that prove each one works. - GSPO Explained: Sequence-Level Importance Ratios for LLM Reinforcement Learning — · Machine Learning
A practical walkthrough of Group Sequence Policy Optimization (GSPO) from the Qwen team, and of my minimal PyTorch implementation that puts it side by side with GRPO. - Node.js Crypto and Secrets, Done Right with node:crypto — · Security
A walkthrough of password hashing, secure tokens, JWT verification, AES-GCM encryption and secret handling in Node.js using only the built-in crypto module, with tests that show each mistake and each fix. - Gated Attention, Explained: One Sigmoid After SDPA — · Machine Learning
A walkthrough of the Qwen team paper on gated attention: what a single head-specific sigmoid gate after scaled dot-product attention changes, and a minimal PyTorch implementation with tests that pin each claim down. - Hardening a Node.js HTTP Server with Zero Dependencies — · Security
A layer-by-layer walkthrough of a hardened node:http server: security headers, body limits, timeouts, rate limiting, CORS and safe error handling, each one proven by a test. - Muon, Explained: Orthogonalized Momentum That Scales to LLMs — · Machine Learning
A practical walkthrough of the Muon optimizer and the Moonshot AI paper that scaled it to LLM training, built around a ~100-line PyTorch implementation and the tests that pin down how it behaves. - Five Injection Bugs in Node.js: The Exploit, the Fix, the Test — · Security
A walkthrough of command injection, SQL injection, path traversal, prototype pollution and ReDoS in Node.js, with the vulnerable code, the fix, and the test that proves each fix works. - Native Sparse Attention, Explained: A Minimal PyTorch Implementation — · Machine Learning
A walkthrough of the Native Sparse Attention paper from DeepSeek-AI: how compression, selection and a sliding window are combined by a learned gate, and how my small PyTorch reference implementation checks each piece against the paper. - Titans Explained: A Neural Memory That Learns While It Reads — · Machine Learning
A practical walkthrough of Google's Titans paper, where a small MLP memory trains itself by gradient descent during the forward pass, and of my minimal PyTorch implementation of it. - Safety Threats in Front-End Development and Mitigation Strategies — · Web Development
This article discusses the safety threats in front-end development and mitigation strategies. - The Art of Software Architecture - Enhancing Engineering Organizations through Decentralized Processes — · Web Development
A decentralized approach to software architecture can help organizations achieve operational efficiency by aligning with larger organizational goals and principles. - Developer Experience: Beyond the Notion of 'Comfort' — · Web Development
It's commonplace for software developers to gravitate towards tools that are egocentrically enjoyable to use, often referring to this as good Developer Experience (DX). However, this criteria largely depends on individual experience and familiarity, which can dilute the utility of the term "good DX" as a substantive measure. - Understanding Hooks: An Essential Technique in PyTorch for Advanced Model Debugging — · Web Development
In the realm of deep learning, debugging models can pose significant challenges. Issues such as tensor shape inconsistencies, gradient explosion, and various other anomalies can arise unexpectedly. Conventional debugging methods often involve cluttering the forward() functions with print statements or embedding breakpoints. While these approaches are straightforward, they are not particularly efficient as they involve a degree of conjecture and can be labor-intensive. - Portfolio template for developers ✨ — · Web Development
A beautiful, minimal and user-friendly portfolio template for Developers which is completely free and open for consumption and contribution.