OpenLLM,用 Python 包裝 open source LLM 的套件

Hacker News 上看到「OpenLLM (github.com/bentoml)」,是一個用 Python 寫的軟體,把 open source LLM 包裝起來讓你用。

先拿 Mac 簡單測了一下,看起來包的不錯,可以用 HTTP API 來打。

先用 pip 裝:

pip install openllm

然後就可以把 server 跑起來了,依照範例跑 dolly-v2,第一次跑會比較久,需要下載 model:

openllm start dolly-v2

接下來就可以直接開 http://127.0.0.1:3000/ 來操作了,另外也可以用 command line 跑,像是依照官方的範例來跑:

openllm query --endpoint http://127.0.0.1:3000 "What is the meaning of life?"

目前測到比較明顯的問題是 CPU 模式下只有 single thread,所以雖然會動,但相當慢... 之後再來測試 GPU 的部分。

把 Sennheiser HD 555 升級成 HD 595 的故事

Hacker News 上看到的,只用一隻螺絲起子,就把 Sennheiser HD 555 升級成 HD 595 的方法:「sennheiser hd 555 to hd 595 mod」。

This page will show you how to turn a $199.95 (Canadian – Suggested Retail) pair of Sennheiser HD 555 headphones into a pair of Sennheiser HD 595‘s that cost $349.95. And all you need is a screwdriver.

兩者的差異只在 HD 555 多了一片泡綿 (foam),把他拆出來就好了:

Aside from the aesthetic differences, the only physical difference was an additional piece of foam inside the cheaper HD555 headphones, blocking about 50% of the outside-facing vents. Since both the HD 555 and HD 595 are designed to be “open” headphones, reducing the vent with this foam would alter the frequency response slightly. So to save yourself $150, open your HD 555’s up and remove the foam. Done.

作者說是注意的到的差別:

Yes. The actual sound difference is very slight, but it is noticeable.

在 Hacker News 上的討論「Sennheiser HD 555 to HD 595 Mod (mikebeauchamp.com)」裡面有在猜什麼原因,有可能是硬拉產品線,也有可能是將次級品改裝,但看起來兩個機體本身是相同的沒錯...

不過這兩隻都是老機了,看起來現在沒有再繼續生產。

看起來 Ladybird 瀏覽器會被加速開發?

Ladybird 是一個從零寫起的瀏覽器,可以參考作者在「Ladybird: A new cross-platform browser project」這邊的介紹。

GitHub 上的頁面可以看到「This repository has been archived by the owner on Dec 25, 2022. It is now read-only.」,目前的專案是放在 SerenityOS 裡面:「The Ladybird web browser has moved into the SerenityOS monorepo.」。

結果作者提到收到了 US$100,000 的 sponsor,指名 Ladybird browser:

而他發出來不久以後,又有另外一筆捐款,也是 US$100,000 但是是透過虛擬貨幣,所以他要找會計師:

是個強制加速開發的方式... 現在的瀏覽器幾乎就是 Blink + WebKit 統一天下,用自家 GeckoFirefox 整天在搞事,好像是有機會看到新的 engine 與瀏覽器挑戰了...

AWS 新推出的 m7a 宣稱比 m6a 多 50% 效能?

AWS 在「Introducing Amazon EC2 M7a instances (Preview)」這邊看到 m7a 會比 m6a 快 50% 的宣稱:

These instances deliver up to 50% greater performance on average compared to M6a instances.

目前還是 preview 階段,需要申請才有機會用,所以還不知道他的真實性能是怎麼樣?另外一方面,價錢也還沒查到... 但如果價錢不要漲太多的話,算一下好像有可能跟上 ARMm7g 了?

另外這樣也就蠻值得期待會不會有 t4a

在 Intel 內顯上面直接跑 CUDA 程式的 ZLUDA

Hacker News 首頁上看到的有趣東西:「Zluda: Run CUDA code on Intel GPUs, unmodified (github.com/vosen)」,專案在「CUDA on Intel GPUs」這邊,這是個最後更新在 2021 年的專案。

這個專案的想法可以猜得出來,想要吃 CUDA 的 ecosystem,把現有用 CUDA 的應用程式直接跑在 Intel 的 GPU 上面,這樣對於一些只有 CUDA 卻沒有 OpenCL 的實作就有機會拿來用。

一開始本來以為是給 Intel 新的獨立顯卡 Arc,結果發現是 2021 年就停更的專案,是以內顯來測試的:

ZLUDA performance has been measured with GeekBench 5.2.3 on Intel UHD 630.

從 benchmark 的結果看起來,大多數的功能應該都有 porting 上去,所以至少測試是能跑的,而不是 crash:

不過 Hacker News 的討論上可以看到似乎還是有問題,而且大多數的 AI 應用還是會回頭支援 OpenCL,似乎沒有那麼好用...

紐約州通過法案,禁止「競業條款」

Hacker News Daily 上看到「New York State Senate passes prohibitions on non-competes (ogletree.com)」這篇,原報導在「New York State Senate Passes Prohibitions on Non-Competes」這。

在原報導裡面給的連結就是紐約州的官方連結,提到了兩個法案:

  • Senate Bill S3100A: Prohibits non-compete agreements and certain restrictive covenants
  • Senate Bill S6748: Relates to actions or practices that establish or maintain a monopoly, monopsony or restraint of trade, and authorizes a class action lawsuit in the state anti-trust law

可以看到兩個都已經通過參議院了,下一步看起來就是送給州長了;其中 S3100A 就是這次提到的反「競業條款」法案,裡面最重要的內容也很簡單,就是直接禁止禁業條款:

2. NO EMPLOYER OR ITS AGENT, OR THE OFFICER OR AGENT OF ANY CORPORATION, PARTNERSHIP, LIMITED LIABILITY COMPANY, OR OTHER ENTITY, SHALL SEEK, REQUIRE, DEMAND OR ACCEPT A NON-COMPETE AGREEMENT FROM ANY COVERED INDIVIDUAL.

在這條前面有定義什麼是「人」與「NDA」,後面有救濟措施以及一些避免鑽法律漏洞的敘述。

等正式通過後對整個美國的影響應該會不小?應該會有一陣子觀望,然後看結果後可能會有其他州也加入...

很多 MTurk 的接案者都用 LLM 在解決文字類的問題

剛剛在 Hacker News 上翻到的:「33-46% of workers on MTurk used LLMs in a text production task (arxiv.org)」,論文在「Artificial Artificial Artificial Intelligence: Crowd Workers Widely Use Large Language Models for Text Production Tasks」這邊,這個標題取的很故意... XD

Hacker News 上的標題主要是出自論文 abstract 的這段:

We reran an abstract summarization task from the literature on Amazon Mechanical Turk and, through a combination of keystroke detection and synthetic text classification, estimate that 33-46% of crowd workers used LLMs when completing the task.

想想還蠻正常的?能輕鬆賺當然就輕鬆賺... 但這也代表開發者可以思考 offload 給 LLM 的品質,以及如果需要外部的工人智慧,是不是可以搭配 LLM 再 offload 一些簡單的處理給人類就好?

話說好久沒聽到 MTurk 這個服務了,翻了 wiki 看起來是 2005 年就有的服務。

AWS Aurora Xanadu?

在「Why PostgreSQL High Availability Matters and How to Achieve It (yugabyte.com)」裡面看到 AWS 也在研發類似 GCP 提供的 Spanner 的服務,計畫名稱叫做 Aurora Xanadu:「36328981」。

franckpachot

Google has Spanner. AWS is working on something similar (project Aurora Xanadu). And both have YugabyteDB in their marketplace. Those are Distributed SQL (Global ACID), not Citus. For DataWarehouse which doesn't need ACID, there are other services.

也先把這個連結備份起來,看看後面是不是直接拿這個名字來用?

llama.cpp 有全 GPU 版本了

Hacker News 首頁上看到「Llama.cpp: Full CUDA GPU Acceleration (github.com/ggerganov)」,對應得原頁面在「CUDA full GPU acceleration, KV cache in VRAM #1827」這邊。

裡面是在講 llama.cpp 之前的 GPU 加速還是有不少事情是在 CPU 上面做,這次是把目前 ggml 支援的操作都實作 GPU 版本了:

This PR adds GPU acceleration for all remaining ggml tensors that didn't yet have it. Especially for long generations this makes a large difference because the KV cache is still CPU only on master and gets larger as the context fills up.

蠻多人有不同測試的結果,要注意這次不是把 CPU 搬到 GPU 上面做,而是把本來因為比較 light 而還沒搬上 GPU 的部分搬上去,所以不會是數量級的加速,但看起來改善也已經很不賴了:

Early attempt this morning we're getting ~2.5-2.8x perf increase on 4090s and about 1.8-2x on 3090Ti.

然後 Falcon... 目前看起來還沒有必較好的進展 XD

最近 Reddit 打算大幅調漲 API 費用而進行中的故事

台灣用 Reddit 用的比較少,但在歐美算是超級大站。雖然是 2005 年成立的,但主要是在 2010 年的 Digg 災難後興起。

大幅調漲 API 費用使得目前的 3rd-party client 都無法負擔,像是 Apollo 就需要付 $20M/y 的費用:「Popular Reddit App Apollo Would Need to Pay $20 Million Per Year Under New API Pricing」。

最近的這包事件還在進行,在「Reddit#2023 API changes」這邊有些整理,目前看起來 CEO 是鐵了心要收這筆費用,看起來管理階層覺得不像 2010 年的時候,這次 user 沒有其他地方可以跑?

目前在「List of Active Reddit Alternatives v8」這邊有看到有人整理出來,但不確定這些站能不能撐住這波的流量...

另外補上最近 Reddit 的裁員消息可以交叉看:「Reddit to lay off about 5% of its workforce」。