Skip to content

Instantly share code, notes, and snippets.

View chunhualiao's full-sized avatar
🎯
Focusing

Chunhua Liao chunhualiao

🎯
Focusing
View GitHub Profile
@chunhualiao
chunhualiao / DiscussionFutureTrendsWithEldest.md
Created June 9, 2024 18:57
Discussing Future Trends with My Eldest

Given the summer break, my 15-year-old son Alex is engrossed in a coding project rooted purely in his passion. He aims to develop a class schedule reminder app for iPhones for his high school. He has a foundational knowledge of Python, which I had taught him. To further his skills, I subscribed to a poe.com membership for him, allowing him to consult AI models for any coding queries. This left me less worried about providing constant support. When I inquired about his project’s progress this morning, he mentioned that things were going smoothly and that he could consult ChatGPT for any hurdles he encountered.

Professions in the Future

I conveyed to him that this might be the modus operandi for many future tasks: start with an idea, have some foundational knowledge, and leverage AI (and occasionally human) assistance to solve issues and achieve objectives. In the future, most people might have two primary professions: scientists and entrepreneurs (or engineers, if working solo).

Scientists: Their princip

@chunhualiao
chunhualiao / Critical Thinking for Dummies Book Summary.md
Last active April 14, 2024 23:25
Critical Thinking for Dummies: Book Summary

Originally written in Chinese on Jan. 15th, 2023: https://mp.weixin.qq.com/s/kUr2jwbTCOzzm0cXi-1BXw Below is the English translation using Kimi large lab:

Critical Thinking Skills For Dummies: A Detailed Summary and Review

This article discusses the importance of critical thinking and provides a comprehensive review of the book "Critical Thinking Skills For Dummies."

At the end of last year, I wrote an article titled "Sharing Some New Product, Service, and Research Direction Ideas," where the second idea was about an "automated critical thinking assistant." I believe that if I could only learn one skill, it would be critical thinking. Critical thinking is essential for individuals, communities, nations, and even the world. It helps individuals make better decisions, and when more people think impartially and discern right from wrong, communities, nations, and the world can effectively discuss and analyze complex controversial topics, negotiate peaceful and effective strategi

@chunhualiao
chunhualiao / python-convert-google-keep-to-markdown.md
Last active March 13, 2024 05:28
GPT-4 generated python program to convert google keep Takeout folder into markdown files

First download and unzip your google keep notes via a takeout package

save the following code into convert.py

  • pip install beautifulsoup4 markdownify
  • python3 convert.py
  • after it is done: mv images folder into markdown folder
  • using Obsidian to open the folder
import os
@chunhualiao
chunhualiao / Why Is the Field of AI-ML Developing So Well.md
Created March 9, 2024 18:14
Why Is the Field of AI/ML Developing So Well?

Recently, I've been pondering why the field of artificial intelligence (AI) and machine learning (ML) has been so successful, achieving significant breakthroughs continuously. I prefer analyzing problems from a systemic perspective, so I took some time this weekend to write down my thoughts.

I believe that the AI field has optimized many key aspects of its ecosystem's internal processing algorithms, allowing for the rapid creation of value, discovery of talent and technology, publication of findings, and attraction of capital. The ultimate test, of course, is its benefit to humanity. Here are some critical components of this ecosystem I've identified.

1. Fair and Open Leaderboards

A crucial element is the presence of fair and open leaderboards. Despite my modest involvement in research and development, I've noticed many so-called experts select advantageous testing or validation methods to claim their solutions are the best. This approach may make every paper seem excellent, but it fails to identify trul

@chunhualiao
chunhualiao / A Systematic Approach to Innovation.md
Created March 8, 2024 18:34
A Systematic Approach to Innovation

Original version: https://chunhualiao.github.io/2023/03/25/systematic-approach-to-innovation.html

A Systematic Approach to Innovation

This weekend, I'd like to jot down some random thoughts once more. This time, the topic is innovation. Allow me to first express my perspective: innovation is not mysterious, and there exists a set of rules-based and systematic methods that can facilitate innovation. This viewpoint may differ from that of many people. I'm going to use Elon Musk's first principles to conduct a thought experiment, beginning with the interpretation of the word "innovation," relating it to the biological innovation process, and extending it to how we can systematically innovate in other areas.

This thought experiment commences with an interpretation of the word "innovation," which is to "create something new." This term encompasses three concepts: creation, novelty, and substance (everything). How can something we create be deemed new? To answer this question, consider how the essential inform

@chunhualiao
chunhualiao / self-rewarding-language-models.md
Last active February 23, 2024 05:16
Self-Rewarding Language Models

Quickly scanned https://arxiv.org/abs/2401.10020 . Quite interesting work. The paper's idea is to have a single language model doing both question answering (responding to prompts) and self-evaluating its own answers. Iterative Direct Preference Optimization training is used to improve the model's dual capabilities.

The authors tried different LLM-as-a-judge promptings to generate a reward score for each answer. A very particular additive 5-point rewarding prompting is found to be the most effective one. The two-step inferencing pipeline (answering questions+evaluating answers) also generates an extra dataset in the form of <question, winning-answering, losing-answering>.

This AI-generated dataset (called preference pairs) is fed back to the model in a training pipeline (using Direct Preference Optimization).

The inferencing and training pipelines are connected to have a closed-loop, iterative process.

  • Each iteration generates better AI feedback training data and subsequently better model.
  • The evalua
@chunhualiao
chunhualiao / Paper review of AlphaCodium.md
Created February 11, 2024 06:59
Paper review of AlphaCodium

https://github.com/Codium-ai/AlphaCodium

Weekend paper reading: https://arxiv.org/abs/2401.08500

I totally enjoyed reading the paper "Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering." The authors have developed a set of prompts to enhance the code generation process of an existing language model. They claim to have achieved new state-of-the-art results using the CodeContests benchmark, which is quite challenging.

In the task of code generation, I believe there are a few first principles that can improve the quality of the generated code:

  • Having a well-defined problem specification.
  • Better understanding of the problem at hand.
  • Rigorous testing.
@chunhualiao
chunhualiao / GPT-4-versions.md
Created February 4, 2024 00:24
GPT-4 versions

GPT-4 Turbo (gpt-4-0125-preview ) is more capable and has knowledge of world events up to April 2023. It has a 128K context window so your applications benefit from a lot more custom data tailored to your use case using techniques like RAG (Retrieval Augmented Generation).Nov 17, 2023

@chunhualiao
chunhualiao / neck-exercise.md
Created February 3, 2024 23:37
neck exercise for computer users

ollama run mistral:7b-instruct-v0.2-q8_0

what are good exercise to relieve neck pain due to computer use?

I'm glad you asked about exercises that can help alleviate neck pain caused by prolonged computer use. Here are some simple and effective neck exercises that can help reduce tension and improve flexibility:

  1. Neck Rolls: Sit comfortably in a chair with your shoulders relaxed. Gently tilt your head to the side and roll it down your shoulder, then roll it back up the other side. Repeat this
@chunhualiao
chunhualiao / three-types-of-means.md
Last active February 3, 2024 21:30
arithmetic mean, geometric mean, and harmonic mean

It is never late to learn things.

I was curious about why F1-Score is needed in the first place. It turns out Accuracy is bad for imbalanced data.

Imagine you're a medical researcher developing a test for a rare disease. This disease affects only 1% of the population, meaning 99% of tests will be for healthy individuals (negative) and only 1% for individuals with the disease (positive).

Scenario 1: Using Accuracy:

  • Your test correctly identifies 99.9% of healthy individuals (true negatives). P(true_negative|negative_eamples)= Specificity
  • However, it only correctly identifies 50% of individuals with the disease (true positives), meaning the other 50% are missed (false negatives). This means Recall or sensitivity is 50%. P(true_positive|positve_examples) = Recall