用 ggml 跑的 MPT-30B

Simon Willison 這邊看到的「abacaj/mpt-30B-inference」,介紹了用 ggml 跑的 MPT-30B 專案:「abacaj/mpt-30B-inference」。

MPT-30 是個 open source model,比起同樣也是 open source model 的 Falcon-40B 小了一點,在官方的說明「MPT-30B: Raising the bar for open-source foundation models」可以看到其中一個特性是可以塞進單張 GPU:

The size of MPT-30B was also specifically chosen to make it easy to deploy on a single GPU—either 1x NVIDIA A100-80GB in 16-bit precision or 1x NVIDIA A100-40GB in 8-bit precision. Other comparable LLMs such as Falcon-40B have larger parameter counts and cannot be served on a single datacenter GPU (today); this necessitates 2+ GPUs, which increases the minimum inference system cost.

但即使如此,一般人也應該不會有 A100-40G 這種卡,所以很自然的就會想到可以用 ggml 在 CPU 上跑。

然後提到 ggml... 目前 llama.cpp 在 Falcon-40B 上還是卡關中,這樣看起來 MPT-30B 應該是目前 ggml 能跑的最大的 open source model?

Simon Willison 說他在 M2 MacBook Pro 上跑沒什麼問題,我在 32GB RAM 的 Linux 上也能跑,就照著 README.md 走就可以了,不過在 Python 裡面的預設是使用一半的 CPU core,我改成使用全部的 core,速度看起來有比較快。

然後回答的品質比起之前玩各家 7B 的版本好很多,丟了一些問題給他答,已經蠻有水準了...

Georgi Gerganov 成立公司 GGML

Hacker News 首頁上看到 Georgi Gerganov 成立公司的計畫:「GGML – AI at the Edge (ggml.ai)」,官網在「GGML - AI at the edge」。

如同 Georgi Gerganov 提到的,llama.cpp 這些專案本來是他的 side project,結果意外的紅起來:

另外他提到了 Nat FriedmanDaniel Gross 也幫了一把:

在官網則是有提到是 pre-seed funding:

ggml.ai is a company founded by Georgi Gerganov to support the development of ggml. Nat Friedman and Daniel Gross provided the pre-seed funding.

現在回頭來看,當初 llama.cpp 會紅起來主要是因為 CPU 可以跑 LLaMA 7B,而且用 CPU 跑起來其實也不算慢。

後來吸引了很多人一起幫忙,於是有了不少 optimization (像是「llama.cpp 的載入速度加速」這邊用 mmap 減少需要載入的時間,並且讓多個 process 之間可以重複使用 cache),接下來又有 GPU 的支援...

但不確定他開公司後,長遠的計畫是什麼...?