Sixia "Leask" Huang

break the wall or bring the war

從零開始搭建家庭高可用超融合數據中心

去年開始越來越多數據存儲和AI計算需求,我重新組織家裏計算資源,便於管理和維護。過程中,我遇到了很多的問題,之前也在 X 上也和大家分享過一些,大家建議我都寫下來,經考慮,我決定成體系地介紹一下如何一步一步搭建適合家庭網絡規模的 #高可用 #超融合 #數據中心

於是趁著長週末的幾個晚上,我敲出來了這篇文章。我介紹了搭建過程中的方方面面,涉獵 PVE、LACP、CEPH、PBS等,也紀錄了很多踩過的坑,以及之前花了很多時間才搞清楚的細節。本文還有很多遺漏,以及計畫完成的關於 PBS的介紹由於服務器最近在折騰也還沒寫完。之後我會斷斷續續回來繼續更新和完善它。

文中我寫到:玩homelab並非一定要fancy硬件,通過合理配置和組合,樂意折騰,就能學到很多,並組合出適合自己的工作環境。我在東拼西湊的設備上調校出來的集群,已經穩定為幾個網站提供了一年多的穩定服務,在包括 AI 計算,矢量數據索引等工作上更是已經處理過超過 100T 的吞吐,運行相當穩定和高效。

所以,我的初衷其實是給大家一種思路,有效組織自己的硬件資源,而不是單純堆砌和攀比硬件。玩才是核心,玩才是生產力。歡迎大家指出文中的不足和錯漏,或者直接改錯給我發 PR。神仙打架和槓精就算了。Enjoy!😄

Enable RAID 6 on UNAS Pro without waiting

I’ve had the UNAS for a few weeks, and before receiving it, I was concerned about the lack of RAID 5 support on the UNAS Pro. However, RAID 6 protection is crucial for my stored data. As a long-time mdadm user, and knowing that UNAS also utilizes it, I was confident in my ability to resolve this issue independently. Given mdadm’s robust support for array modification and migration, I believed that directly expanding the array using the `grow` command would address the problem.

You can start with any RAID configuration because `mdadm` allows for lossless migration from RAID 0, RAID 1, and RAID 5 to RAID 6. Specific migration constraints exist, but a simple calculation can provide a rough verification, though you should always consider your array’s specific situation. Generally, migration is feasible if the resulting array’s usable capacity is equal to or greater than the current usable capacity. If the migration results in reduced disk capacity, such as when upgrading from RAID 5 to RAID 6 without adding disks or utilizing a hot spare disk, you’ll need to shrink the storage partition beforehand. This involves moving data to the front of the disk and trimming the unused space, which can be achieved using `resize2fs`. However, this is beyond the scope of this discussion.

Most UNAS users likely have RAID 5 configured. If a hot spare disk was previously designated, upgrading to RAID 6 using that hot spare is the simplest, quickest, and safest method. This process is also straightforward if an empty drive bay is available on your UNAS. However, if no spare disks or bays are available, reducing partition size and removing a disk before migrating will be required.

For example, I previously used RAID 5 with all disks utilized. I had reduced the partition volume and added a hot spare disk. I then executed the following command to upgrade:

mdadm –grow /dev/md3 –level=6 –raid-devices=7

Please note that the upgrade is required for md3. md0 is reserved for other system metadata storage. You can use the command `watch cat /proc/mdstat` in the terminal to monitor the disk synchronization progress. Once synchronization is complete, you will see the following information.

root@UNAS-Pro:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdg2[0] sdb2[6] sda2[5] sdd2[4] sdf2[3] sdc2[2] sde2[1]
1961984 blocks super 1.2 [7/7] [UUUUUUU]
md3 : active raid6 sdg5[0] sdb5[6] sda5[5] sdd5[4] sdf5[3] sdc5[2] sde5[1]
58551802880 blocks super 1.2 level 6, 512k chunk, algorithm 2 [7/7] [UUUUUUU]
bitmap: 0/6 pages [0KB], 65536KB chunk
unused devices: <none>

Executing `mdadm –detail /dev/md3` will now show that the array has been completely converted to RAID6.

root@UNAS-Pro:~# mdadm –detail /dev/md3
/dev/md3:
Version : 1.2
Creation Time : Thu Jan 16 11:33:12 2025
Raid Level : raid6
Array Size : 58551802880 (55839.35 GiB 59957.05 GB)
Used Dev Size : 11710360576 (11167.87 GiB 11991.41 GB)
Raid Devices : 7
Total Devices : 7
Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Wed Jan 22 10:30:20 2025 State : clean Active Devices : 7
Working Devices : 7
Failed Devices : 0
Spare Devices : 0 Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Name : UNAS-Pro:3 (local to host UNAS-Pro)
UUID : e3bde202:cbb13026:be46c779:add176fb
Events : 125218
Number Major Minor RaidDevice State
0 8 101 0 active sync /dev/sdg5
1 8 69 1 active sync /dev/sde5
2 8 37 2 active sync /dev/sdc5
3 8 85 3 active sync /dev/sdf5
4 8 53 4 active sync /dev/sdd5
5 8 5 5 active sync /dev/sda5
6 8 21 6 active sync /dev/sdb5

Upgrading from version 5 to 6 is generally safe, but please ensure you back up your data beforehand. After waiting approximately a day for the disk to synchronize, all services were running normally and the data remained intact.

At this point, the management interface will still display “Basic Protection” because the UI reflects a configuration file. To proceed, access the UniFi OS terminal and edit the file at `/data/unifi-core/config/settings.yaml`.

root@UNAS-Pro:~# cat /data/unifi-core/config/settings.yaml
anonymous_device_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
isInternalUser: false
isSetup: true
location:
lat: xx.111966
long: -xxx.0323814
radius: 200
text: Uranium City, Saskatchewan, Canada
name: UNAS Pro
timezone: America/Toronto
sendDiagnostics: anonymous
autoBackupEnabled: true
internetRequired: true
lcmSettings:
enabled: true
color: 0139FF
brightness: 100
ledSettings:
enabled: true
nightMode:
onMinute: 180
offMinute: 181
owner: null
emailServiceProvider: ui
ustorage:
hotspare: false
raid: raid6
setup_device_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
setupType: ios
setupDuration: null
country: 124
ssh:
agreementAcceptedAt: 2025-01-10T19:56:13.116Z
agreementAcceptedByUserId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

The configuration needs to be updated to match the changes made to the mdadm array during migration. For example, I changed the hotspare setting from true to false, and the RAID level from RAID5 to RAID6. You will see these changes reflected in the configuration on the management webpage. If the changes are not updated, reboot the server to see the correct information.

image

You can now enjoy using RAID 6 on your UNAS Pro. Actually, there are two ways to access the configuration page on UNAS Pro. One method is through UniFi’s cloud access; however, the “Advanced Protection” setting will not be visible because the UI for UniFi OS 4.1.11 / Drive 1.16.15 is not yet adapted. You can see the correct configuration by accessing via local IP address. This explains why some community members can see this configuration, while others cannot. This issue is expected to be resolved in OS 4.2, but it does not impact functionality.

Additionally, if you are using a 10G connection on your local network, remember to enable jumbo frames for optimal performance. The simplest way to do this is by adding the following to `/etc/crontab`:

@reboot root /sbin/ip link set enp0s2 mtu 9000

My local network can essentially run at the full 10Gbps speed.

root@UNAS-Pro:~# iperf3 -c 192.168.1.204
Connecting to host 192.168.1.204, port 5201
[ 5] local 192.168.1.64 port 60334 connected to 192.168.1.204 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 1.09 GBytes 9.34 Gbits/sec 497 760 KBytes
[ 5] 1.00-2.00 sec 1.11 GBytes 9.55 Gbits/sec 804 516 KBytes
[ 5] 2.00-3.00 sec 1.09 GBytes 9.40 Gbits/sec 825 341 KBytes
[ 5] 3.00-4.00 sec 1.12 GBytes 9.61 Gbits/sec 1030 533 KBytes
[ 5] 4.00-5.00 sec 1.10 GBytes 9.49 Gbits/sec 741 428 KBytes
[ 5] 5.00-6.00 sec 1.10 GBytes 9.43 Gbits/sec 911 376 KBytes
[ 5] 6.00-7.00 sec 1.13 GBytes 9.70 Gbits/sec 789 1.13 MBytes
[ 5] 7.00-8.00 sec 1.08 GBytes 9.27 Gbits/sec 790 341 KBytes
[ 5] 8.00-9.00 sec 1.10 GBytes 9.49 Gbits/sec 483 568 KBytes
[ 5] 9.00-10.00 sec 1.12 GBytes 9.66 Gbits/sec 733 306 KBytes
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 11.1 GBytes 9.49 Gbits/sec 7603 sender
[ 5] 0.00-10.00 sec 11.0 GBytes 9.49 Gbits/sec receiver

Okay, that concludes this discussion. Please feel free to leave comments if you have any questions. As a final reminder, always back up your important data before making any array changes.

PS: This article was originally published in the UniFi community by me, and the original link can be found here: https://community.ui.com/questions/Enable-RAID-6-on-UNAS-Pro-without-waiting/8b333b9f-5168-4261-b81a-1eab3c039de7 .

AI is Changing Software Development

image

// Created by @leaskh with DALL-E.

I helped my friend write an AI system for processing documents. One part of it is to process the original document as the basis for the next prompt. Previously, we used Google OCR after comparing many OCR tools. I spent some time over the weekend changing it to preprocess through OpenCV and then extracting information using multimodal AI. Ah! It’s so much better than traditional tool chains. The results are tearfully good. The following two images show a comparison of processing the same IELTS score report (sample).

OCR vs Multimodal AI:

image
image

After AI transformation, it can produce relatively controllable outputs through prompt engineering. For example, whether to keep the original text or simplify it, remove unnecessary information such as headers, footers, watermarks, etc., and purposefully simplify and abstract based on context. It can also modify errors and writing in the original text. If traditional OCR is used, due to the mechanical nature of the scanning process, even applying an LLM makes it difficult to correct data relationships that have already been lost previously, such as complex tables and charts in a scene.

The transformation of software development by AI not only involves the user interface that users directly interact with, but also has many possibilities for innovative toolchain-level improvements. These optimizations can greatly enhance the usability of productivity tools, reduce the workload for users to process information in later stages, and alleviate the fatigue of controlling precision in repetitive work. I think this applies equally to language models (LLM) and image models. More subtle improvements will be widespread.

In the visible future, even if it is not a software aimed at AI, benefiting from the introduction of large-scale system-level AI small models, runtime-level integration will make this kind of optimization simpler and all software will become smarter than they are now. This point is completely foreseeable and has already happened on the way.

Disappointing Apple Intelligent

image

// Created by Leask with Dall-E

Objectively speaking, Apple’s AI strategy this time is not optimistic. The apparent contradiction is that Apple is unwilling to relinquish the Siri brand. On the one hand, the privacy story cannot be completed, and at the same time, Siri and Apple’s accumulation in their own AI models is still far behind. But they also need to catch up with the Gen AI wave, so they made a very temporary design to allow GPT to be asked again when Siri doesn’t understand it.

Everyone can see from today’s WWDC Keynote that even after the upgrade, Siri is still only able to answer very basic questions. Other tasks, such as photo categorization and email and message sorting, can be completed by small models at the classifier level. The first-party Gen AI truly only has Image Playground and Rewrite Text. This is still far from true deep integration like Copilot.

I do not deny that Apple can be very efficient and delicate in engineering integration. The problem is that such superficial integration cannot truly unleash the full potential of the current LLM model. It still may be pretty clumsy to use. However, embedding data may not be accessible to developers due to privacy or competitive considerations, so the ultimate experience could be limited to what was shown in today’s demo, possibly smaller than everyone had imagined.

Compared to Microsoft’s current strategy, Microsoft cut off Cortana a few years ago, which was intentional. They saw the limitations of traditional models and the potential for explosive growth in AI generation, so they made a bold move. Copilot now has many operations that can be done in one step, and its runtime is very complete and open, allowing for calls from multiple perspectives. This is what an “All in” posture should look like.

Microsoft also uses ChatGPT, but it is not secretive about it. It customizes on top of ChatGPT, from integrating Bing results to introducing Dall-E and adding Recall-enhanced Embedding, etc. In fact, all of these are centred around ChatGPT. It can adapt better than ChatGPT and still provide rich local data. Apple’s integrated ChatGPT is still like a plugin and is limited by a flawed Siri foundation.

The Phenomenon of Extra Classes for Chinese Children

image

Many people have been saying recently that the collapse of China’s middle class, resulting in children unable to afford piano lessons, is a good thing. Here is my response to this:

This question is not as simple as it seems. Let me explain, as we happen to have some understanding of education both domestically and internationally. The biggest problem with learning and competitions in China is the utilitarian mindset. The academic pressure in China is relatively high, and school life occupies a significant portion of students’ overall time.

Students themselves have very little free time at home. After completing heavy homework, the little 🤏 time they have left is often taken up by their parents. To be honest, it’s quite unfortunate. And we haven’t even talked about additional subjects that children may or may not like. Of course, there are subjects that children are interested in, but in most cases, it’s either what the parents like or what they think will be “useful” for their child’s educational advancement or future job prospects.

Another factor is that the school education system in China focuses more on cultural subjects and lacks sufficient emphasis on physical education, arts, and other abilities. This is why many parents hope to provide their children with additional extracurricular activities if they possess the ability. I cannot fully confirm the situation in the United States since online information may not be entirely accurate, and personal experiences may differ.

As for Canada, the academic pressure in schools is relatively low, and the proportion of purely academic subjects is lower than in China. The curriculum activities are diverse, outdoor activities are abundant, and children have ample opportunities to discharge their energy at school. In terms of class format itself, Canadian schools provide a more comprehensive cultivation of social and interpersonal skills. Teaching resources are also relatively abundant. Schools have resources such as pianos, guitars, swimming pools, and computers for students who are interested in these subjects.

Moreover, teachers would adapt their teaching content based on students’ individual abilities and talents. Children themselves face more comprehensive and diversified challenges and training in school. It’s not as simple as saying “China is strict” or “foreign schools let students do whatever they want.” This results in children having a more all-around comprehensive quality, and parents have less pressure to supplement additional coursework.

In terms of overall lifestyle, Chinese parents tend to be busier and often lack time to take care of their children. They would rather send them to tutoring classes than let them be bored at home, play games, or associate with “bad” children. Canadian parents have shorter working hours and are willing to spend more time with their children. They take their children to local parks, nature reserves, and even camping in the woods on weekends, which is quite common.

The proportion and quality of time spent with children are determined by various factors within society. I’m not against providing extra challenges for talented children, whether it’s in sports, music, or computer-related subjects. What I am against is when parents, out of pure anxiety about education, crazily enroll their children in all kinds of classes without considering the specific circumstances. To be frank, many Chinese parents I know belong to this category.

I have discussed this issue with an education professional friend, and I agree with his perspective. To sum it up simply: “Our own children, whether they have 4 cores or 8 cores, their abilities are there. We shouldn’t overload them like crazy, as it exhausts children, and parents’ time and resources may not be sufficient. Let’s make sure our children operate at 80% of their CPU capacity, rather than neglecting them because they have more freedom.” Of course, there are many ways to achieve this, but parental investment of time is undoubtedly the most important.

In conclusion, whether to enroll children in extracurricular classes cannot be generalized. The current issue in China is not that parents have become enlightened and want to reduce the burden on students; it is more about the collapse of the middle class that used to be eager to “enroll” their children. I believe this is not solely an education issue.

If the setback is merely because parents can’t afford piano lessons, children will still be filled with other lower-cost activities. Also, due to economic structure issues, parents will still be busy, and even if they don’t buy a piano, the quantity and quality of time spent with their children may not necessarily improve significantly. Personally, I don’t agree that it’s a good thing when parents can no longer afford piano lessons or excessively enroll their children, for the reasons mentioned above.

PS: The title image was created by @LeaskH with DALL-E.

‘Builds community spirit’

image

In Canada, the front yards of most houses are not actually owned entirely by the homeowners. Due to factors such as “road allowances” (https://www.ontario.ca/page/municipal-road-allowances), a section of the front yard near the road is actually owned by the government and temporarily unused. This allows the government and businesses to provide infrastructure such as water, electricity, gas and networks, as well as reserve potential future needs like road widening. Similarly, waterfront properties often have similar issues in the backyard area. Consequently, it is not difficult to understand that, according to legal provisions, residents of this area can pass through and landscape it, but they are not allowed to make any unauthorized alterations or construct any buildings.

image

This brings up another issue where many locals in Canada like to set up a small self-serve library called “Little Free Library” in their front yards. These small book boxes are unattended, and people passing by on their way to work or school can take a book from the box, read it in their car, and return it when they are done or simply take it with them and replace it with another book. It’s pretty interesting and enjoyable. However, according to previous laws, this was actually considered illegal.

image

This has always been a controversial gray area. In 2022, Ottawa caused a stir when the city ordered homeowners to withdraw or dismantle their small libraries (https://ottawa.ctvnews.ca/bylaw-services-orders-ottawa-family-to-move-little-library-away-from-the-curb-1.5933654). This sparked extensive discussions in society, with many people feeling perplexed about the government’s strict enforcement and feeling “harmed” by it. However, within the following six months, the city slowly realized that it was a poor decision amidst significant public questioning. Their stance softened from handling each case based on the specific circumstances to temporarily not pursuing enforcement, and now they are considering fully regulating and opening up these little library boxes (https://www.cbc.ca/news/canada/ottawa/city-of-ottawa-ready-to-turn-the-page-regulate-little-library-boxes-1.6877884). If the bill passes, it will put an end to the related controversies that have been ongoing since 2016 (https://nationalpost.com/news/canada/ottawa-loves-little-free-libraries-as-long-as-theyre-nowhere-people-will-use-them) and provide legal protection for these small libraries.

image

This is actually a quite interesting small example. For someone like me who comes from China and grew up under the iron curtain of politics, this kind of social change driven by the community, sprouting from grassroots and eventually obtaining legal protection at the legislative level feels particularly surprising and gratifying. I’ve seen many discussions about immigrating to Canada not being a paradise, and I actually agree. Governments make mistakes and people have their moments of shortsightedness. Canada is definitely not a paradise, but compared to China, it can be considered earthly bliss while China is hellish. At least in terms of the rule of law, there is no doubt about it.

Read More »

“事情正在起變化”

image

把 copilot 集成到系統中,是里程碑意義的,上一次這種層級的操作系統生產力提升,是 04 年 WWDC 發布,隨 05 年 Mac OS X Tiger 正式推出的 spotlight。這幾年,隨著 APP 生態的發展,Apple 越來越多的精力都是以此構築護城河。一方面的確輾壓競爭對手,讓其為所欲為。但是同時,實質性創新卻越來越少。

Jobs 交棒時估計也沒預想生成類AI會一夜間改變整個格局。我覺得 Apple 現在可能也沒能跳出現有框框看看外面的世界在發生什麼,即便能也有點晚了。常說打敗馬車的不是一批更快的馬,而是蒸汽機,我覺得能對 APP 壟斷格局突圍的也不是一個更好的 APP Store。而是一種更能理解人類複雜需求的交互方式。

這一屆 WWDC 其實是挺有看點,並不在於 Apple 會發布什麼新硬件和操作系統,現在大家都在等各種新電腦,M3、M4 芯片的野獸性能,其實都不是重點。沒有追上這一波對生產力的重塑,Apple 將至少會錯過接下來的十年。下星期應該能看出 Apple 是不是會在錯誤的道路上越走越遠了。當然,我希望我是杞人憂天。

* Image credit: https://www.history.com/news/industrial-revolution-horse-train-railroads

Say Hello to Thea! 😄🍼👧

大家好,

在大家的祝福,支持和幫助下,愛女「Thea / 暖暖」順利出生,母女平安。

「暖暖」是多年前就和妮妮定下來的名字,戀愛時我們就想,將來若得男兒取名「飽飽」,若得女兒取名「暖暖」,很幸運,在不惑之年我們兒女雙全,有了一對「吃飽穿暖」的小淘氣。

「暖暖」疊字的組合和哥哥對齊,聽起來簡單,溫馨,可愛,獨特。我們寄予第一個暖字,是祝福有能力溫暖自己,獨立思考,勇敢遠行;第二個暖字,是期待能溫暖身邊的人,照亮這個糟糕的世界。這個名字和哥哥「飽飽」的名字一樣,有一種安全,有溫度的意境。我們也將和對待「飽飽」一樣,時刻提醒自己,要因材施教,不揠苗助長,讓她的內心保持乾淨和快樂。

「Thea」選為英文名的拼寫,來源於古希臘,光之女神的名字,我們取了光明和溫暖的寓意,與中文名相匹配。同時 Thea 和 Deer (小鹿)諧音,為其增添了可愛又富於靈氣的情調。

小女兒出生於一個瘋狂的時代,瘟疫餘波未盡,戰火紛飛,這個星球上的政治格局急劇變化,AI 革命席捲全球堪比工業革命,人類的命運再次走到了十字路口。我們很難再說未來可期,因為未來尚隱匿於迷霧。我們這一代是失敗的,我們的父輩祖輩也難辭其咎,我們未能留給後輩一個安寧,充滿希望的世界。這也將是女兒一生即將面對的坎坷,這一路上注定荊棘。我們希望這對哥哥妹妹,在冒險的路上保持樂觀好奇,攜手進退,守望相助。我們也希望他們旅程中知禮節,知榮辱,手有餘香。

黄思夏,杨小妮,懷愛合拟

2023.05.23


Hello,

With everyone’s blessings, support, and help, our beloved daughter “Thea/Nuan Nuan” was born safely and healthily.

“Nuan Nuan” is a name that my partner and I decided on many years ago. When we were dating, we thought that if we had a son, we would name him “Bao Bao,” and if we had a daughter, we would name her “Nuan Nuan.” We are very fortunate that we now have both children - a mischievous pair who are well-fed and warmly clothed.

The combination of the repeating character “Nuan” in “Nuan Nuan” and “Bao Bao” sounds simple, warm, cute, and unique. The first “Nuan” represents our hope that she will be capable of warming herself up, thinking independently, and bravely exploring the world. The second “Nuan” represents our expectation that she will be able to warm those around her and illuminate this chaotic world. Like her brother’s name “Bao Bao,” the name “Nuan Nuan” also conveys a sense of safety and warmth. We will continue to remind ourselves to teach her according to her abilities, not to overindulge her, and to keep her heart clean and happy.

“Thea” is the English spelling of her name which has its origins in ancient Greece, meaning “goddess of light”. We chose this name for its connotations of brightness and warmth, which aligns with the meaning behind her Chinese name. Additionally, “Thea” and “Deer” have similar sounding pronunciations, adding an adorable and spirited element to her name.

Our little daughter was born in a crazy era. The pandemic has not yet subsided, wars are ongoing, the global political landscape is rapidly changing, and the AI revolution rivals the industrial revolution. Human destiny has once again reached a crossroads. It is difficult to say that the future is bright because it is still shrouded in mist. Our generation has failed, and our parents and ancestors cannot escape blame. We were unable to leave a peaceful and hopeful world for future generations. This will also be the hardship that our daughter will face in her life. The road ahead is destined to be full of thorns. We hope that this brother and sister pair will remain optimistic and curious on their adventurous journey, helping each other along the way. We also hope that they will learn manners and honor and leave a positive impact wherever they go.

Leask, Xiaoni, with love and care.

May 23, 2023.


——- ——- ——-

⚠️ 注意,我們不會在社交媒體上公開,兒子和女兒的露臉照片。如果因為在親友群流傳中看到他們的照片,請大家謹慎處理。

⚠️ Note that we will not publicly share photos of our son and daughter showing their faces on social media. If you come across any photos of them circulating among family and friends, please handle them with care.

Halbot

上星期工作太累,週末寫點代碼放鬆一下,我之前給自己寫了一個 ChatGPT/BingChat 的 Telegram bot,原本只是計畫自己,但是慢慢由於需要加了不少的功能,也讓朋友們開始加入調戲了。於是乾脆整理一下代碼,有需要的人自己可以跑一個。

視頻 Demo 在這裡:

對比其他的實現,我添加了一些好玩的東西,例如:

0: npx halbot 一句命令即可運行;
1: 流式輸出,無須等待;
2: 更完整的渲染細節,甚至包括代碼塊🤣;
3: 通過 home group 等方式權鑑用戶;
4: 支持同時調戲多個機器人;
5: 支持 TTS 和 STT;
6: 可二次開發,支持中間件風格擴展。

比較懶寫文檔,大家玩玩,有不懂的直接問我好了。

代碼在這裡:

帖幾個截圖:

image
image
image
image

幾點關於通用人工智能的預測

image

1: 通用人工智能將會被免費使用,和目前搜索引擎被免費使用一樣。

2: APP 和 web 不再是人機交互主要方式,新的更加適合 AI 的交互模式將會出現,以後拖一張照片進來,和AI說,幫我產生一個介面,我要調整這張圖的曝光,和色彩,期待什麼什麼風格的濾鏡,AI會立刻動態編寫代碼,根據你的喜好產生一個即時介面來供你使用。

3: 人機交互包括程序編寫的指令將會更加抽象和模糊化,面向對象將會徹底轉變成面向AI的開發模式,不是讓AI幫忙寫代碼,而是讓AI直接產生解決方案,代碼將直接在模擬智能環境下被優化和執行,而不是編譯好交給操作系統執行,人類開始放棄對代碼最終裁判權。

4: 計算成果在web產生以來,已經逐漸從讓用戶持有文件變為讓用戶持有數據,將來,會進一步進化為讓用戶持有知識,文件和數據的概念會被你持有的知識這一概念所替代。

5: 數據交換將會出現巨大的變化,會出現AI間的知識/參數交互的方式,區別於目前的數據交換的方式,兩個AI間的知識交換將會十分高效,並且徹底非結構化。對特殊需求的遷移學習將會很快,並且可能在用戶不知情的情況下完成。

* PS: 不接受反駁,十年後回看。
* Photo by DeepMind on Unsplash

階級

image

階級固化其實是不可逆轉的,至少這麼多年,人類各種的社會實踐中,從來沒有成功過。所以以歐洲為主的真“社會主義”陣營其實解決的就是讓社會福利覆蓋本來鐵定就在劣勢中的群體。因此你很難聽到歐洲人在鼓吹美國夢,中國夢,這樣的典型的大國主義的社會謊言。歐洲的宿命也在於重新實現一體化,而不是中國人片面理解的“復興”,這個一體化中,甚至是以包容優先於效率的。人們從上到下其實都充分了解到這一點。其實也沒有什麼不好,該罷工罷工,該躺平還是躺平,必須充分明確社會中通過打工才能養活自己的是主流群體,他們的事實上的弱勢才能進一步讓他們受到關注和保護。但是被大國夢洗腦的人往往沒有辦法理解,無論蛋糕做多大,底層其實還是底層,只不過遇上經濟的上升週期的時候,所有人都過得好一些,但是這裡的好一些並沒有實現任何階級的躍遷,退潮的時候才知道,自己所在的位置其實從頭到尾都沒有改變過。從一開始就需要警惕某些說法,社會沒有階級,國家沒有貧窮等等等等。所以,最近被開感覺被打回原形的朋友們,不需要傷心,其實,可能從來就沒有失去過什麼,因為不曾擁有。這樣想應該能“樂觀”一些。

我之前在推上說企業開人完全沒有問題,只要合法就OK,被人斷章取義罵我,說我沒打過工,荒唐的是,這麼多年,我大部分時間在“打工”。我的意思其實也是一樣的,健全的社會應該有相應的安全網保障大家的基本生活尊嚴,企業其實沒有義務這樣做。當然我不是不鼓勵企業更多考慮員工的福祉,但是,這並不是一回事。片面去認為企業不應該裁員,其實還是不理解這裡面其實是微妙的階級衝突。疫情和大脫鉤之前,中國經濟的發展導致很多人模糊了視野,感覺打工可以領到股票,可以拿到高薪,買房買車,然很多人誤以為自己實現了階級的躍遷,導致以為自己的社會話語權已經足夠撼動生產關係本身。這是不自量力的。

* Photo by Tomas Robertson on Unsplash

2022 年聖誕,離開 Twitter。

今年聖誕哪兒也沒去,自己家裡老人生病,沒什麼心情,而且自己也Covid了,也不方便外出,再加上老婆有身孕,就沒有到處去。這一年,比起去年,世界變得更糟糕,紛飛的戰火,沒完沒了的傳染病。和親人多年遠隔重洋,屬實讓人身心疲憊。本以為一切即將過去,卻又感覺回到了原點。

image


今晚順手給 🇺🇦Ukraine 再捐了一點點錢,以提醒自己,戰火依然在繼續,孩子們依然流離失所,大人們依然把世界折騰得亂七八糟。新的一年馬上就來了。想起以前經常有藝人領獎的時候祝福世界和平,那個時候感覺假大空,現在回過頭來,卻感覺如此樸素和無奈。

image


我親愛的兒子 @BubbleHuang,明年,我們即將迎來一名新的家庭成員,是我一直夢寐以求的小女孩。我希望,她將降生於一個理性,和平,求同存異,人類勇於探索而不是重複犯錯的世界。而你,我,將和媽媽 @Syxnx 一起,守護她慢慢長大。

image


真心希望最困難的日子已經過去,雖然我很難說服自己相信這個觀點。但是,總要留點祝願吧。從這條推開始,我將慢慢談出Twitter,減少發布新狀態以及和大家互動,同時會儘量更多在 mastodon (@[email protected] https://mastodon.world/@Leask ) 保持更新。除非有比較大的新變動。無論如何,感恩有幸在這裡認識大家,祝福你們。

晚安,平安,世界。

image

一次神奇的網絡問題排查經歷

作為一個 Starlink 用戶,基本上我是對網絡質量比較滿意的。但是前段時間,Starlink 宣布不再提供無限流量的服務,改為每月 1TB 封頂。

對於我這種重度流量用戶來說,1TB 絕對是不夠的。同時今年 Starlink 開放了 RV 版本套餐,由於我預定了 AirStream Bambi,正好可以把固定套餐轉成 RV 套餐裝到房車頂上,方便露營時候隨時接入辦公。所以我決定把 Starlink 降級為家裡的次要入口,於是就有動機重新尋找一個固定寬帶作為家裡的主要接入方式。

我家附近的線路選擇並不多,Bell 1G 或以上的光纖線路都沒有。只能選擇口碑比較差的 Rogers,直接選擇最大的 1GB 套餐,很快就完成了安裝。

起初網絡還是很順暢的,測速也符合預期,1GB 下行可以跑滿。但是好景不長,幾天之後我發現網絡連接質量有劣化的情況。體現為視頻、語音通話頻繁斷開,YouTube 等流媒體也斷斷續續。而且出現的時間比較隨機,過一會兒網絡又可以自動恢復,反反覆覆。重啟 modem、router 之後可以立刻恢復,但是堅持不了幾分鐘故障又重複出現。

忍無可忍,我決定仔細排查一下原因。起初我懷疑是路由器或者交換機的問題,我嘗試摘掉它們,直接用筆記本連到 modem,故障依舊。後來我注意到在出現故障的時候,ping 可見相當規律的丟包,大致是,間隔均勻地丟掉 2/3 的包。

image

數據特徵看起來不像是線路故障,而是人為 QoS 導致的。於是我開始排查可疑的應用,經過徹底的排查,我發現只要開啟任何 BT 或者使用類 BT 網絡的 Resilio Sync,網絡就會瞬間劣化,關掉一段時間就會恢復。順著這個思路,我找到不少文章對這個現象有所描述,普遍都在抱怨 Rogers 的 QoS 策略存在問題。讓人不解的是,Rogers 不單單針對 BT 等 P2P 傳輸協議做 QoS,而是會直接限制使用 P2P 傳輸軟件的用戶的整體帶寬。所以受影響的不單單是 BT 下載和上傳,還將影響整個接入線路的整體體驗。

我們甚至可以找到文章說,Rogers 會誤殺所有可疑的 P2P 加密流量。

“with Rogers now one of the only ISPs in the world to simply degrade encrypted traffic.”

關掉內網中的 BT 下載和做種服務,停掉每台工作機器上的 Resilio Sync 資料同步軟件,網絡恢復穩定。

image
image

我認為這樣的限制是相當不合理的。而且我也並沒有在任何用戶條款中看到對於 BT 相關技術應用的限制,更何況例如 Resilio Sync 這樣的個人文件同步的分布式加密流量不應該被 QoS。

在網絡出現問題之後,我致電客服,也沒有人告知我被限流的真正原因,致使我花費大量的時間排查和解決問題,讓人憤怒和沮喪。

所以我必須在此呼籲,如果家裡有其他線路條件的加拿大用戶,應該盡可能避開選擇 Rogers 的線路。

💢😠

A Story About My AirPods Pro Repair

Today, I want to share a story about my AirPods Pro repair. I bought a pair of AirPods Pro on Nov 13, 2019. It worked well initially, but later both the left and right earbuds started to have crackling sound issues. So I stopped using them.

In 2021, Apple released the AirPods Pro Quality Program (E1) (https://support.apple.com/en-ca/airpods-pro-service-program-sound-issues). And they admitted that some batches of AirPods Pro have these kinds of issues. That’s why I’ve been tormented. I sent my AirPods Pro to Apple for repair on Dec 7, 2021. They went through the test with a particular testing device and told me that they found the issue on the right side earbud but not the left side, so I got the right side replaced.


image

One year later, in 2020, the issue on the left side appeared more and more frequently. I brought the AirPods Pro to Apple for another test on Oct 13, 2022. And that is the beginning of the nightmare. They conducted all the tests and told me that the machine could not identify any issue. I talked to the apple employee (2319676921): “You do not need any device, just put it on, and you will hear what’s happening.” The employee initially said she was not allowed to put it on. She has to test it with a specified machine. But since I insisted, she tried the earbud and admitted it had a crackling issue. But she told me since the testing device could not identify this issue, even though she acknowledged it, she could not give me a replacement under Apple’s internal policy (she showed it to me). So I got the repair receipt below.


image

I have many questions and feel very confused about this repair process. Who is in charge the product has issues or not, human or machine? If a human can quickly identify the problem, and the result is different from the machine, which result should we follow? The apple employee told me she wanted to replace my AirPods, but she couldn’t. She felt very sorry about the repair system. I comprehended and said: “It’s OK. It’s not your fault. I should blame Apple, not you”. That’s why I want to write this post to share my experience. I am very disappointed with Apple’s repair policy, especially in this quality-program-related case. Apple should do better, but they are not.

At last, I attached a video showing what is happening to my AirPods Pro. We use the machine to help us, not to rule us. For years, users have complained about Apple’s arrogant and authoritarian repair policy, and I hope all electronic equipment manufacturers can face this problem, not just Apple.



Edited on Mar 22, 2023:

Apple finally replaced both sides of my AirPods Pro.

image

進步

image

(圖片來自網絡)

伊朗🇮🇷衝突中可見男性同樣憤怒,甚有男性為抗爭的女性擋子彈。現局勢並非大家一直所擔心的:男權宗教對女性的壓迫。事實上衝突雙方是:以極端宗教信仰為幌子的獨裁政府 vs 新生代對自由民主有一定覺醒的年輕男女。這轉變很有意思,讓人看到即便倒車開了幾十年,依然有人勇敢站出來說方向不對。

另一方面,這是伊朗年輕人比簡中人群,特別是簡中極端女權人士進步和成熟的地方。伊朗年輕人看到了房間裡的大象,他/她們知道壓迫從何而來。相比於只會無腦叫囂Y染色體劣等、男性基本盤不行等未經大腦的吐槽,伊朗年輕人進步很多,維度更高。我祝福伊朗年輕人,就如我依然支持香港年輕人一樣。