mingsc (@mingsc) header
mingsc (@mingsc) profile picture

Software engineer

Joined August 2007
Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)Photo by mingsc (@mingsc)
I write a demo ios app homework about my idol @albertocontador ,his fighting sprint is always inspiring me. Thank you Alberto Contador.
5
Jalen Brunson’s reaction to the Knicks trading for Josh Hart 😁 Hart and Brunson were college teammates at Villanova in 2017!
12
159
54
1,240
138,516
Chieh-Hsien Chen represents everything that a captain must be for a baseball team. Being named Premier12 2024 MVP is recognition of his leadership on and off the field. Now, he has left his mark on Premier12 history, becoming the third MVP in the history of the tournament. #Premier12
1
40
179
15,875
Yu-Min Lin on how the @premier12 gold transforms baseball in his country: “It changes a lot. Now every Taiwan player — young guys, old guys — knows we can be champions too. We’re not just a normal country, a small country. Small countries can be world champions.” ⁦
58
882
75
4,720
327,478
mingsc retweeted
Learning how to be a more romantic developer in 2024
226
603
59
6,609
425,405
爆火的 17.4K Star⭐️《LLMs-from-scratch》作者 @rasbt 带来开源新作 - litgpt(7K Star ⭐️),基于自定义数据来预训练、微调、评估和部署 20+ 顶级开源 LLM,Llama3、Mistral MoE等 1. SOTA 优化技术:Flash Attention v2、LoRA 等⚡️ 2. 提供多篇论文研究与教程上手实验 github.com/Lightning-AI/litg…
2
110
2
341
38,126
学习,一个 138 亿年的奇迹。
3
6
14
2,883
mingsc retweeted
話說大語言模型 LLM 的運算和推論成本都是用 Tokens 數量來計算的,輸入的內容都得轉成 Tokens 序列來運算,輸出則轉回來。 但是呢,其實每一家用的 Tokenizer (分詞器)都不太一樣,因此相同的文本,拆出來的 tokens 數量是不一樣的。因此很多模型的推論成本比較、Context window 長度限制比較等等,實際應用時都不太準確,特別是非英文的語言,各家差異非常大。 一樣的文本,若能用比較少的 Tokens 數來表示,推論速度會比較快、成本也會比較划算,畢竟計價也是用 tokens 數計算的,先予敘明。 具體會差多少,以下是我的測試結果,使用了繁體中文約八萬多個字(政府報告和管理學講義)做出來的實驗結果。另外也做了英文也是約八萬字(兩篇部落格文章)。 先看大家關心的繁體中文結果,以 OpenAI 為基準來比較的話,見圖一(紅色)。 沒想到差距竟然可以達到兩倍這麼多,除了 Llama 2 之外都比 GPT3.5 & GPT-4 還要節省 Tokens 數,OpenAI 的 Tokenizer 對繁體中文真的很不友善啊! * 表現最好的是聯發科 Breeze 約節省 50% 的 tokens 數 👍👍👍 果然是針對繁體中文最佳化 * Cohere Command R+ 約節省 47% 👍👍👍 * Google Gemini 約節省 46% 👍👍👍 * Claude 3 約節省 22% 👍👍 * Mistral 約節省 12% 👍 * Llama 2 比 OpenAI 還差,還增加了 20% 👎 讓我換句話說: * 1K MediaTek Breeze Tokens 約等於 2K GPT-4 Tokens * 1K Command-R Tokens 約等於 1.9K GPT-4 Tokens * 1K Gemini Tokens 約等於 1.8K GPT-4 Tokens * 1K Claude 3 Tokens 約等於 1.3K GPT-4 Tokens * 1K Mistral Tokens 約等於 1.1K GPT-4 Tokens * 1K Llama 2 Tokens 約等於 837 gpt-4 Tokens (表現比 OpenAI 還差) 至於英文的測試結果見圖二(藍色),跟繁體中文差異很大,這裡 OpenAI 是第一名了,其他家都會花比 GPT-3.5&4 更多的 tokens 數。Llama 2 一樣敬陪末座。 總之,以後看各家模型的 Token 成本和 Context Window 限制時,都得分別心底換算一下了。
4
26
5
131
18,981
Have you ever wanted to train LLMs in pure C without 245MB of PyTorch and 107MB of cPython? No? Well now you can! With llm.c: github.com/karpathy/llm.c To start, implements GPT-2 training on CPU/fp32 in only ~1,000 lines of clean code. It compiles and runs instantly, and exactly matches the PyTorch reference implementation. I chose GPT-2 to start because it is the grand-daddy of LLMs, the first time the LLM stack was put together in a recognizably modern form, and with model weights available.
251
1,775
329
12,355
1,662,265
小问题虽小,但是经常出来恶心人 执行得好好的命令放到crontab中就不行了; 执行得好好的命令放到ssh/ansible中也不行了(图1); 这是没搞清楚 login shell 和 no-login shell 的区别 login shell加载环境变量的顺序是: ① /etc/profile ② ~/.bash_profile ③ ~/.bashrc ④ /etc/bashrc 而non-login shell加载环境变量的顺序是: ① ~/.bashrc ② /etc/bashrc 加载的环境变量不一样,那么PATH、参数等都不一样,所以差别大 在centos执行好好的脚本放到Ubuntu上就不行了,报语法错误? 如果到ubuntu上用 bash shell.sh是可以的,但是sh shell.sh就报语法错误,但是在centos上执行:sh或者bash shell.sh 都可以通过。 在centos上执行 ls -lh /usr/bin/sh 可以看到 /usr/bin/sh link到了 /usr/bin/bash 也就是sh等同于bash,所以都可以通过不足为奇。 但是在ubuntu上执行 ls -lh /usr/bin/sh 可以看到 /usr/bin/sh link到了 **/usr/bin/dash** , 这就是为什么ubuntu上会报错 sh 跟bash的区别,实际上是bash有没开启POSIX模式的区别。 简单说,sh是bash的一种特殊的模式,sh就是开启了POSIX标准的bash, /bin/sh 相当于/bin/bash --posix
12
95
2
469
54,631
上周黄仁勋在斯坦福做了一次访谈和演讲,这一个小时的演讲内容量很大,主要的包括公司治理的经验和要点以及人工智能未来的发展问题。 翻译了一下这个视频并且给每个部分加上了时间戳,下面是简要的文字内容介绍: 演讲者Jensen Huang是Nvidia公司的CEO,他在AI及其所需的创新、技术和人力资源方面具有前瞻性的见解。 Jensen分享了他的个人经历,从九岁移民美国到成为Nvidia公司CEO的过程。他强调了教育和技术创新的重要性。Nvidia公司通过重塑计算,将深度学习的计算成本降至接近零,使AI能够从互联网提取和理解人类知识成为可能。 Jensen认为,AI是21世纪最重要的技术发明。Nvidia开发的GPU芯片和架构,大幅提升了深度学习和AI的计算能力,并广泛应用于各行业的数据中心。未来,AI计算机将能进行持续学习、合成数据生成和强化学习,并通过真实世界的经验来完善。 Jensen强调AI要以人类价值观为基础。聊天GPT通过强化学习和人类反馈,将AI与人类价值观联系起来。未来AI需要建立世界模型,理解多模态概念,具备推理和规划能力。他预测5年内AI可能通过各类人类测试,实现类似人类的智能(AGI)。 AI有望帮助人类理解生物学,如蛋白质的功能和意义。它将改变人类获取信息和知识的方式。未来,人人都能通过自然语言与AI交互,无需掌握编程。各国需要在主权AI领域进行投资,保护自己的数据、智能和文化。 Jensen分享了他的管理理念——通过不断评估、统一激励方式和信息透明来保持员工的积极性。他认为公司文化的塑造需要坚持品质、经历磨砺,重视过程和结果。Nvidia欢迎合作伙伴在其AI生态系统的基础上进行适度的定制化开发。 时间戳及分段标题: 00:00 介绍Jensen Huang及其在AI领域的贡献 01:15 John Shoveon是一位杰出的建筑师和经济学教授 02:02 演讲者欢迎John Shoveon并感谢其贡献 03:17 Jensen的个人经历:从移民到与妻子的爱情故事 04:46 Jensen在技术领域取得的成就和荣誉 05:57 Jensen当选为国家工程院院士 07:02 讨论开场白及晶体管技术的重要性 08:10 技术变革和新型计算方法的发展 09:14 计算成本的降低使AI能够代替人类编写软件 10:11 深度学习推动了计算成本的快速降低 11:03 利用计算机从互联网提取和理解人类知识 12:00 AI能够理解氨基酸序列和蛋白质的结构功能 12:49 AI是21世纪最重要的技术发明 13:51 Nvidia芯片的性能和成本优势 15:04 通过芯片创新将数据中心缩小到一个芯片 16:02 未来计算机的特点:重量重、液冷、持续学习 17:03 AI通过交互数据和合成数据持续学习和想象 18:01 未来AI将结合合成数据生成和强化学习 18:55 计算成本降低带来的可能性和市场变化 19:55 使用AI进行推理的过程和Nvidia GPU的作用 20:50 推理的难点在于吸引更多用户和软件应用 21:44 架构的普及和用户基础是推理问题的关键 22:30 竞争对手和客户带来的竞争威胁 23:31 Nvidia的架构优势:加速算法和可编程性 24:30 Nvidia在计算领域的标准地位和广泛应用 25:27 Nvidia芯片的总运营成本优势 26:27 Nvidia面临的竞争和对AGI的道歉 27:25 多模态学习对AI未来发展的重要性 28:21 AI要建立在人类价值观基础上 29:24 AI需理解多模态概念和掌握推理能力 30:16 AI目前在长时间思考和推理方面的局限性 31:03 未来人机交互方式的变化和AGI的定义问题 31:59 对AGI的测试标准和实现时间的预测 32:56 AI在药物发现和理解蛋白质功能中的作用 33:54 未来与AI对话获取信息的方式 34:56 AI帮助人类理解生物学意义的潜力 35:57 给创业者的建议:拥抱困境和磨砺 37:16 公司品质来自经历苦难而非智慧 38:13 如何保持员工积极性:统一激励和信息透明 39:28 不进行私下沟通,信息快速流动,唯才是用 40:34 每天寻找机会灌输公司文化 41:19 预测未来AI增长对半导体制造能力的需求 42:28 未来计算方式将基于实时生成而非预先录制 43:27 AI将根据个人上下文生成所需信息 44:27 算法改进和技术进步将抵消算力需求增加 45:21 编程和创业格局的变化趋势 46:17 自然语言交互取代传统编程,人人皆可编程 47:16 提示工程的重要性和控制AI的方法 48:10 AI普及将消除技术鸿沟,惠及所有人 49:12 无需编程也能与AI交互,揭示CS的重大贡献 50:10 美国限制AI出口,各国投资主权AI的重要性 51:17 国家需要保护自己的数据、智能和文化 52:19 讨论公司竞争对手和定制化解决方案 53:22 芯片成本高昂的原因:多组件和大量软件 54:14 芯片定制化的意义:安全性和保密性
20
597
12
1,276
252,745
I love reading such detailed technical articles, those guys took Kafka apart and managed to understand the cause of their 3 seconds write latency in Kafka producers. Turns out it was caused by the flush/commit of the ext4 file system journal metadata. Of course doesn't mean ext4 is bad it's just not a fit for Kafka's workload. So they end up switching to XFS and improve the writes by 82%! The way they discovered this is interesting, all the tooling they wrote for Java/Kernel is just amazing, recommend you guys checking it out. full article blog.allegro.tech/2024/03/ka… I'll make a video covering this in details once I get a chance, I want to learn more about XFS and ext4, my knowledge there is limited. I did a brief summary on the article on my second channel for those interested youtu.be/gxxeZum6BjE
14
216
9
1,511
139,757
看到隊長在ig po出影片比較他當年在Paris-Nice同路段攻擊的比較影片 Alberto Contador's instagram: Same race, same stage, same climb and same strategy. instagram.com/reel/C4VxBkLM6… youtube.com/watch?v=2KDRYfFK… procyclingstats.com/race/par…
3
21
Which ORM is better for your .NET project? I'm sure the answer will surprise you. 🔥 Let's compare EF Core and Dapper: - Level of abstraction - Performance - Features 1. 𝗟𝗲𝘃𝗲𝗹 𝗼𝗳 𝗔𝗯𝘀𝘁𝗿𝗮𝗰𝘁𝗶𝗼𝗻 EF Core abstracts away the underlying database structure. This lets you work with your data using a more object-oriented approach. EF can be easier to work with if you're new to databases or dealing with a complex data model. Dapper is a more lightweight ORM that provides a minimal abstraction over your database. You'll have more control over the SQL queries, which can be helpful if you want to optimize the performance of your queries. You must understand the underlying database structure well and be comfortable working with raw SQL queries. 2. 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲 Dapper provides less abstraction and can be faster than EF Core when executing complex queries. Dapper runs SQL queries you provide from your code, whereas EF Core generates them based on the data model you've defined. Although EF 8 has raw SQL support, similar to Dapper. Performance isn't on par yet. The performance difference between EF Core and Dapper is not always significant. In some cases, EF Core can be just as fast as Dapper. 3. 𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀 EF Core includes support for a wide range of features: - LINQ queries - Migrations - Multiple database providers - Change tracking (unit of work) Dapper is a more focused tool designed for working with SQL databases. The main feature is mapping SQL queries to POCOs. But you can also execute stored procedures and functions. Is it even worth comparing them? Yes, because it's important to understand the differences. But here's what I do in my applications. I choose to work with both EF Core and Dapper. For example, you can write most of your queries with EF. Then, you can reach for Dapper if you need to squeeze out more performance. Dapper is still more powerful for UPDATE and DELETE queries, so there's an advantage. P.S. If you want to accelerate your .NET and software architecture skills, consider joining The .NET Weekly - my newsletter with 42,000+ engineers. Subscribe here → milanjovanovic.tech/?utm_sou… What do you think about using EF Core and Dapper together?
15
41
1
185
17,844
This article will teach you how to install and manage Apache Kafka on Kubernetes with the Strimzi operator ➜ piotrminkowski.com/2023/11/0…
21
101
7,494
Open AI传奇研究员Andrej Karpathy的新课,教你理解和构建GPT Tokenizer。 他可以把相当复杂的LLM概念用非常好理解的方式讲出来。希望了解LLM的强烈建议听一下他的课,包括一些历史课程。 用GPT-4翻译了一下这节课,感兴趣可以听一下。字幕文件下载和历史课程会放在下面⬇️
New (2h13m 😅) lecture: "Let's build the GPT Tokenizer" Tokenizers are a completely separate stage of the LLM pipeline: they have their own training set, training algorithm (Byte Pair Encoding), and after training implement two functions: encode() from strings to tokens, and decode() back from tokens to strings. In this lecture we build from scratch the Tokenizer used in the GPT series from OpenAI.
21
389
11
1,060
258,840
谢谢 @lainbojc 推荐的这个工具 youglish.com/ 确实很方便,输入一个单词,可以直接在 Youtube 中找一个视频,跳转到读音的具体位置,并且配有字幕,可以很完美的感受这个单词的发音。 同时还有多种语言,其他语言也不在话下,特别适合突然遇到一个单词读不准的情形下。
Replying to @vikingmute
Improve your English pronunciation using YouTube youglish.com/ 推荐一个网址,他的作用是在Youtube中搜索你输入的句子,找到包含这一句的视频,让你听听外国人是怎么说的(但是他需要指定语种, 你的这个词语我也不清楚语种所以查不到)
6
75
1
245
39,091
mingsc retweeted
I’m thrilled to announce the tech preview of Skip: dual-platform app development in Swift. You write a modern iOS app in Swift and SwiftUI. Skip’s Xcode plugin generates a native Android Kotlin and Compose version! Docs: skip.tools/docs Video: skip.tools/tour
81
223
96
1,207
238,113
游錫堃童年時期家境貧寒1960年代初,游父在颱風災害中離世,游錫堃被迫輟學返家務農數年。 在戒嚴時一系列政治事件(如美麗島事件、林宅血案等)刺激影響下,游錫堃轉志進入政界,於1981年當選為無黨派的台灣省議員。 1989年,游錫堃代表民進黨贏得宜蘭縣縣長選舉,任內興建了羅東運動公園等設施,提倡普及台灣本地語言教育並創立宜蘭童玩節等大型活動。 2000年民進黨贏得總統選舉,首次取得國家執政權後,游錫堃受命出任行政院副院長。後來因嘉義縣八掌溪事件處置不利而辭職,轉任總統府秘書長。 2002年2月,受命重返行政院接替張俊雄出任行政院院長。行政院院長任內,其率領內閣抵擋了網際網路泡沫造成的經濟壓力,實質性謀劃推動了員山子分洪道、雪山隧道等大型公共工程的建設進程,解決高雄市自來水供應等延宕問題並進行了第一次金融改革。 2005年2月卸任行政院院長後,曾再度出任總統府秘書長,並於2006年至2007年間擔任民進黨主席。 在陳水扁執政期間,游錫堃為任職時間最久的閣揆,長達三年整。 2002年2月,受命重返行政院接替張俊雄出任行政院院長。 2005年2月卸任行政院院長後,曾再度出任總統府秘書長,並於2006年至2007年間擔任民進黨主席。 陳水扁執政期間,游錫堃為任職時間最久閣揆,長達三年整。 2014年,接受民進黨徵召,復出參與新北市市長選舉,最終落敗於爭取連任的中國國民黨的朱立倫。 2019年,被民進黨列入2020不分區立法委員,後於2020年2月1日當選為立法院院長 2024年2月1日爭取連任立法院院長失利,隨後發表聲明宣布請辭立法委員 謝謝水牛伯為台灣的奉獻
60
367
13
3,537
151,250