acytoo

LLM Tutorial 3 - Operator Acceleration and Native Multimodality: Computing Chinese, English, and Piano Music Simultaneously with 12.5M Parameters

Series Introduction: In the first two posts (Part 1: From Bigram to GPT-2 and Part 2: Computing Piano Music with GPT-2), we built GPT-2 from scratch with straightforward, readable code and used it to generate Shakespearean text and MIDI piano music separately. However, that pedagogical implementation broke tensor operations into too many tiny steps, resulting in low GPU efficiency. In this post, we first switch to Andrej Karpathy's standard nanoGPT implementation, resolving operator bottlenecks by fusing QKV projections and introducing FlashAttention. Then, without changing a single line of network architecture, we pack Chinese, English, and piano music into the exact same vocabulary to train a native multimodal model with just 12.51 million (12.51M) parameters, running cross-modal "Text-to-Music" and "Music-to-Text" generation end-to-end.

LLM Tutorial 2 - Stripping Away the "Semantic Understanding" Filter: Computing Piano Music Directly with GPT-2

Series Introduction: In Part 1 (From Bigram to GPT-2), we derived the architectural evolution from Bigram models to GPT-2. When people encounter terms like Self-Attention and Token Embeddings, it is easy to view them through a sci-fi lens—as if the neural network truly "understands" the semantics of human language. In reality, under the hood it is entirely tensor operations and conditional probability fitting. Today, without changing a single line of model architecture code, we swap the training dataset from Shakespearean text to MIDI piano pieces, train for 10 minutes on a free Colab T4 GPU, and see what the exact same Decoder-Only Transformer computes.

LLM Tutorial 1 - From Bigram to GPT-2

Series Introduction: Starting from first principles and low-level tensor operators, this series documents the complete journey of building modern Large Language Models (LLMs) from scratch—all the way to Sparse Mixture-of-Experts (Sparse MoE). Part 1 draws inspiration from Andrej Karpathy's Neural Networks: Zero to Hero course, walking through the underlying logic that led from the simplest statistical lookup table (Bigram) to the 2019 GPT-2 architecture.

Wordpress Manually Backup and Migrate

There are many plugins that can backup your wordpress website and migrate it. But because I have modified some files of wordpress, I have to manually backup them. Here is how I do it.

The following solution only works if you serve a wordpress on a linux vps, and you are working on another Linux.