4

用 Ollama 加上 ollama-ui (Chrome extension) 測試

 6 months ago
source link: https://blog.gslin.org/archives/2024/03/11/11692/%e7%94%a8-ollama-%e5%8a%a0%e4%b8%8a-ollama-ui-chrome-extension-%e6%b8%ac%e8%a9%a6/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

用 Ollama 加上 ollama-ui (Chrome extension) 測試

ChatGPT 類的應用我最常還是拿來跑翻譯,有些東西不希望透過雲端去翻,試著找本機的方案跑看看。

因為桌機是 Linux 系統,目前比較成熟的方案看起來是 Ollama,可以在本地端跑起來並且開一個 HTTP API 讓其他程式呼叫。

我的作法是寫 systemd 設定,但是不要開機就跑起來,需要的時候再跑 sudo service ollama start 再使用就好,只是要注意第一次跑會需要從 NVMe disk 裡面讀 model,會比較慢一點,後續就正常了...

另外找了一下 GUI,看起來 ollama-ui 算是還 OK,兩個搭起來後拿 mistral-openorca 這組 7B model 跑翻譯,這邊是拿 NHK 網站上面的「政党支持率 自民下落20%台に 立民 維新も伸びず NHK世論調査」這篇翻,看起來還可以:

1710171614-9e4279af.png

不過 7b 的幾個 model 測了一下都不到 GPT-3.5 的程度,要多跑幾次才會出現堪用的 (像上面那樣),之後再多測看看其他的 model...

Related

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 模式下只有…

June 20, 2023

In "API"

玩玩文字轉圖片的 min(DALL·E)

幾個禮拜前看到「Show HN: I stripped DALL·E Mini to its bare essentials and converted it to Torch (github.com/kuprel)」這個東西,有訓練好的 model 可以直接玩文字轉圖片,GitHub 專案在「min(DALL·E) is a fast, minimal port of DALL·E Mini to PyTorch」這邊可以取得。 因為這是包裝過的版本,裝起來 & 跑起來都很簡單,但沒想到桌機的 1080 Ti 還是跑不動,只能用 CPU 硬扛了,速度上當然是比官網上面列出來用 GPU 的那些慢很多,但至少能跑起來玩看看。 首先是拿官方的句子來玩看看,第一次跑會需要下載 model (會放到我們指定的 pretrained 目錄下): #!/usr/bin/env python3 from min_dalle import MinDalle…

July 24, 2022

In "Computer"

在 Fly.io 上面跑 PHP

在 Heroku 把 free tier 拔的差不多後 (「Heroku 公佈了廢止免費方案的時間表」、「Heroku 的替代方案」),大家手上的小專案都往其他的服務跑,目前看起來做的比較有規模的就是 Fly.io 了,一個人可以建很多個 organization,而每個 organization 都有 free quota 可以用... Fly.io 官方的文件 FLy.io Docs 裡面可以看到說明,介紹怎麼把 Laravel 站台跑起來,不過沒介紹怎麼跑純 PHP 站台,所以就看了文件研究看看,發現可以用 Docker container 跑,那就簡單了。 專案放在 GitHub 的 gslin/fly-vanilla-php 上面。 一開始我的 Fly App 用的是 V1 的版本,是跑起來了,但後來還是換到 V2 跑,雖然兩者用起來沒有太大區別 (參考「Fly Apps」這邊的說明),但畢竟官方打算都把 V1 掛上 legacy 了,新的專案就儘量別用了... 另外一開始用 buildpacks…

May 16, 2023

In "Cloud"

a611ee8db44c8d03a20edf0bf5a71d80?s=49&d=identicon&r=gAuthor Gea-Suan LinPosted on March 11, 2024Categories Computer, Murmuring, SoftwareTags ai, learning, llm, machine, ml, model, nerual, network, ollama, ui

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Learn More)

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK