Hello, my friend! 👋

Welcome to Ethan’s Blog. It is my pleasure to meet you.

I write technical blogs, notes and my personal thoughts here. You can subscribe to my blog via RSS.

For more information about me, you can refer to my introduction.

Liberty is rare yet precious. Chase freedom, live unbound and embrace long-termism.

Deep Generative Model I

The rise of large models has advanced the way of how we move towards to the intelligence. In the past decades, people worked on “discriminative” intelligence, that is, we predict a dog image as a “dog”. To do so, we train on a batch of dataset containing different categories with labels, and train with the goal that every output matches the corresponding classes. The great success of LLM has brought us into a new era: GenAI. Unlike the discriminative model, we generate the image “dog” given the input prompt (text, image, …). This is called generative model. ...

October 21, 2025 · 16 min · 3361 words · Ethan Lyu

Restore the access to remote server via mounted driver

Initially I want to deploy a openai-web on my remote server (Free Oracle Server) to use the DeepSeek API. To protect the service, I can establish a Wireguard connection. So I ask Qwen to generate a template for me. However, the Qwen guides me to modify AllowdIPs=0.0.0.0/0, ::/0 within the wg0.conf. And that leads to my fix to the server the whole afternoon. I lose my connection to the remote server immediately when I apply the above settings. The reason is, all the traffic (including IPv4 and IPv6) is routed through the WireGuard tunnel. This also includes my traffic to the server’s public IP. As a result, when the VPN is activated, the connection to the server breaks because the return traffic is routed through the tunnel instead of directly back to the client. If the server does not have proper routing rules or NAT configured, the return traffic from the server will be sent back through the WireGuard interface instead of the original public interface. This creates a loop or breaks the connection. ...

February 17, 2025 · 5 min · 886 words · Ethan Lyu

Automatically Login to HKU-VPN in shell

HKU uses Cisco AnyConnect protocol and should use the Cisco software to connect the VPN. This post tries to use the openconnect to do the same thing in the command shell and make it all automatic. OpenConnect is a cross-platform multi-protocol SSL VPN client which supports a number of VPN protocols, including Cisco AnyConnect, Juniper SSL, Palo Alto, etc. We can install openconnect on MacOS, brew install openconnect (I believe you know when it is Linux / Windows). Then we have to configure the connection. The basic usage is ...

January 16, 2025 · 4 min · 723 words · Ethan Lyu

[iOS] Send SMS to TG

Recently I’ve moved to Shenzhen, and I am working on establishing an atmosphere for study lol. And keeping myself away from phone is crucial. However, most of the existing logins require my verification code. This post shares the experience of how to automatically forward the SMS message containing “code” to telegram using the shortcut and automation in iOS system. Before you read, you should be aware that iOS system: If you work on Android, you can develop an app very fast. We discuss iOS devices with automation and shortcut only Telegram: I assume you have the access to Telegram. You should be aware of the security of your actions. Do not spread it over the devices that you do not trust, as we will input the token directly. The methods cannot be used in any production environment, where the author of this post (me ofc) will not consume any responsibility for any costs and troubles. Step 1: Create a Telegram bot Search the @botfather in your TG and create a bot by entering /newbot. Type in the bot name and user name. You will receive the token. Keep it secret. ...

January 13, 2025 · 2 min · 363 words · Ethan Lyu

CUDA Programming Model II

Previously, we discuss the basic programming model of CUDA: memory and thread. In this note, we will dive into the hardware implementation. By doing this, we can better understand the philosophy of CUDA programming, so as to accelerate the computation. The GPU architecture is built around a scalable array of multi-threaded Streaming Multiprocessors (SMs). There are usually numerous SMs in every GPU. And every SM can host hundreds of threads. When a CUDA program on the host GPU invokes a kernel grid, the blocks of the grid are enumerated and distributed to multiprocessors with available and distributed to SMs with available execution capacity. ...

November 25, 2024 · 2 min · 380 words · Ethan Lyu