-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from timfanda35/posts/2024-08-10
docs(article): [筆記] COSCUP 2024
- Loading branch information
Showing
9 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
--- | ||
categories: | ||
- note | ||
keywords: | ||
- note | ||
- coscup | ||
- ai | ||
- gemma | ||
- ruby | ||
- rails | ||
comments: true | ||
date: 2024-08-10T08:00:00+08:00 | ||
title: "[筆記] COSCUP 2024" | ||
url: /2024/08/10/note-coscup-2024/ | ||
images: | ||
- /images/2024-08-10/note-coscup-2024.png | ||
--- | ||
|
||
[COSCUP 2024 議程表](https://coscup.org/2024/zh-TW/session) | ||
|
||
## Day 1 | ||
|
||
### 只有 Status page 還不夠!講人話才知道 Infra 發生什麼事 | ||
|
||
- [投影片](https://speakerdeck.com/line_developers_tw/status-page-with-ai-and-uptime-kuma) | ||
- [Blog 文章](https://nijialin.com/2024/08/05/line-bot-gemini-for-status-page-analyze/#more) | ||
- [相關 Repo - line-bot-status-analyze](https://github.com/louis70109/line-bot-status-analyze) | ||
|
||
講者架設 [Uptime Kuma](https://github.com/louislam/uptime-kuma) 來監控服務狀態,並作為 Status Page 展示。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810001.jpg" alt="uptime kuma status page" caption="Source: [Uptime Kuma](https://github.com/louislam/uptime-kuma)" >}} | ||
|
||
當服務發生錯誤時,會透過 LLM 分析錯誤訊息,再依照嚴重程度通知不同 Line 群組。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810002.jpg" alt="notify flow" caption="Source: [投影片](https://speakerdeck.com/line_developers_tw/status-page-with-ai-and-uptime-kuma)" >}} | ||
|
||
### Build an Advanced RAG with Fine-tuned Gemma | ||
|
||
- [共筆](https://hackmd.io/@coscup/SyhEsGdFR) | ||
- [投影片](https://docs.google.com/presentation/d/1yz_W_LUjWesJb-EwJDhoFCRp8_iDMCMjXPG3s65xsP0/mobilepresent?pli=1&slide=id.g1f133acde25_5_4) | ||
- [Gemma/PaliGemma Cookbook](https://github.com/google-gemini/gemma-cookbook) | ||
- [相關 Repo - workshop-gemma](https://github.com/jimmyliao/workshop-gemma) | ||
|
||
[PaliGemma](https://ai.google.dev/gemma/docs/paligemma?hl=zh-tw) 是視覺語言模型(Vision Language Model),可以將圖片和文字做為輸入內容。文件上是說大多數 PaliGemma 模型都必須**進行微調**才會產生實用的結果。 | ||
- PaliGemma - 一般用途預先訓練模型,可對各種任務微調。 | ||
- PaliGemma-FT: 研究導向模型,使用特定研究資料集微調。 | ||
|
||
在 CoLab 上面可以對 Gemma2-2B 進行微調,但 T4 Runtime 需要花不少時間。有更好的硬體可以加速訓練時間。 | ||
|
||
### 透過Gemma實踐FT-RAG | ||
|
||
- [投影片](https://docs.google.com/presentation/u/0/d/1tElOOHKs-c7s7zaKStP_WwC0FMDzYqm-/mobilepresent) | ||
|
||
LLM 進步很快,未來會越來越強,不要再用 GPT3.5 了。 | ||
|
||
有提供使用不同顯卡的微調時間數據,用高級的顯卡能大量縮短訓練時間。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810003.jpg" alt="fine tune time" caption="Source: [投影片](https://docs.google.com/presentation/u/0/d/1tElOOHKs-c7s7zaKStP_WwC0FMDzYqm-/mobilepresent)" >}} | ||
|
||
> 時間就是金錢,金錢可以換時間 | ||
訓練模型要因材施教,每個模型本身能理解的問題題型有所限制。再怎麼給予訓練資料,不會的題型就是不會。20B 以上的模型微調效果會比較好。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810004.jpg" alt="LLM skill" caption="Source: [投影片](https://docs.google.com/presentation/u/0/d/1tElOOHKs-c7s7zaKStP_WwC0FMDzYqm-/mobilepresent)" >}} | ||
|
||
### LLM 初體驗 - Running Google Gemma locally | ||
|
||
- [投影片下載頁面](https://www.weithenn.org/2024/07/running-google-gemma-locally.html) | ||
|
||
使用 [Ollama](https://ollama.com/) + Gemma 在本機端 Live Demo,在現場看操作與效果。 | ||
|
||
## Day 2 | ||
|
||
### 簡單用 Chrome Extension 接 Gemini API (下 Prompt) 就能實作文章摘要工具參加 Google 百萬美金挑戰賽 | ||
|
||
- [Blog 文章](https://wolkesau.medium.com/%E7%B0%A1%E5%96%AE%E7%94%A8-chrome-extension-%E6%8E%A5-gemini-api-%E4%B8%8B-prompt-%E5%B0%B1%E8%83%BD%E5%AF%A6%E4%BD%9C%E6%96%87%E7%AB%A0%E6%91%98%E8%A6%81%E5%B7%A5%E5%85%B7%E5%8F%83%E5%8A%A0-google-%E7%99%BE%E8%90%AC%E7%BE%8E%E9%87%91%E6%8C%91%E6%88%B0%E8%B3%BD-ac2adda60c6f) | ||
|
||
投影片內容基本上就是從 Blog 文章來的,可以參照 Blog 文章教學建立一個使用 Gemini API 的 Chrome Extension。 | ||
|
||
在網路上也看到蠻多人是透過 [AI Studio](https://aistudio.google.com) 用問答的方式從頭由 AI 協助打造符合自己需求的 Chrome Extension。 | ||
|
||
### Let’s Talk About LOVE to/with Gemini | ||
|
||
- [Blog 文章](https://chinchilla-shuan.medium.com/%E8%AC%9B%E8%80%85%E5%B0%8F%E7%AD%86%E8%A8%98-2024-coscup-lets-talk-about-love-to-with-gemini-ddfa18689218) | ||
|
||
[Google AI Studio](https://ai.google.dev/aistudio?hl=zh-tw) 有提示庫,可以參考怎麼寫 Prompt。 | ||
|
||
[Vertex AI Studio](https://cloud.google.com/generative-ai-studio?hl=zh-TW) 比 [Google AI studio](https://ai.google.dev/aistudio?hl=zh-tw) 答案可信度高。 | ||
|
||
用 Google 的 [IDX](https://idx.dev/) 開發小工具很方便,目前還是 Beta 免費。 | ||
|
||
用 [Dialogflow CX](https://cloud.google.com/dialogflow?hl=zh-TW),可以用 Auto Generate 直接串接 Chatbot webhook 與 Gemini API,免費試用期很長。 | ||
|
||
### 如何為公共場域的AI客服聊天機器人建構知識宇宙? | ||
|
||
以 N 型未來學院的 Line Chatbot 為實際案例說明。 | ||
|
||
使用 Google AI Studio 的 Gemini 1.5 flash,免費額度是 15 RPM。目前還足夠使用。 | ||
|
||
Chatbot 在回覆開頭說自己是 AI 助理,使用者比較能容忍不合理的回覆內容。 | ||
|
||
AI 生成回應需要時間,我們可以讓 Line 有打字動畫,使用者就比較有耐心等待。 | ||
|
||
9 成問題可以單靠用 prompt 搞定。因為知識庫還不夠多,所以靠 prompt 就能處理的差不多了。具體做法是在 System 中塞約 30 個條件讓 AI 自己判斷。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810005.jpg" alt="Prompt Sample" caption="Source: 現場拍攝" >}} | ||
|
||
{{< figure src="/images/2024-08-10/20240810006.jpg" alt="Prompt Explain" caption="Source: 現場拍攝" >}} | ||
|
||
Gemini 是很愛閒聊的大語言模型,所以在一些情境下我們會叫 Gemini 不要太多嘴。 | ||
|
||
因為發現使用者都是一來一回的單一問題,所以後來就變成單次對話的設計,沒有特別做連續對話情境的處理。 | ||
|
||
### 以Rails(Ruby on Rails)與鯨魚(Docker)開源技術打造醫院數位轉型生態系 | ||
|
||
- [投影片](https://drive.google.com/file/d/1DLvX0EM3RoldLy2xml2P00kwnOx3GCoL/view?usp=drive_link) | ||
|
||
在醫院中推廣使用 [Rails](https://rubyonrails.org/) 開發系統。 | ||
|
||
喜歡 Ruby 與 Rails 的理念。 | ||
|
||
{{< figure src="/images/2024-08-10/20240810007.jpg" alt="The Rails Doctrine" caption="Source: [投影片](https://drive.google.com/file/d/1DLvX0EM3RoldLy2xml2P00kwnOx3GCoL/view?usp=drive_link)" >}} | ||
|
||
在 Rails 中可以很容易地串接多種不同的資料庫。ORM 能夠協助簡化對資料庫的操作。由於現有的資料庫中有超過 2000 張表,透過動態建立對應的 Model Class,即可透過 ORM 進行操作,節省許多設定工作。 | ||
|
||
對於無法改動的舊系統,不是在原有的應用程式上面修改串接,而是直接讓 Rails 連接到舊系統的資料庫,用 ORM 直接對資料表進行操作。 | ||
|
||
使用 Docker 打包 Rails 應用程式,透過 GitLab CI 進行整合測試與部署。 | ||
|
||
## 感興趣但沒聽到的議程投影片 | ||
|
||
- [如何實作一個 GPT 客服 LINE Bot](https://docs.google.com/presentation/d/1xFEsAV6WuS_J97p8NeCIzHomVDrTeGITArqVWcbGzAk/edit#slide=id.p) | ||
- [小心!你的 Rails 有被打過嗎?](https://drive.google.com/file/d/1UMxphxFxwRf7wbrw4_Hr56KGPzpLU3Ef/view) | ||
|
||
## Ruby Taiwan Community | ||
|
||
題外話做個宣傳,觀迎加入 [Ruby Taiwan Community Discord Server](https://discord.gg/yaYHWQsmcz) 一起聊天。 | ||
|
||
- [Linktr.ee](https://linktr.ee/rubytaiwan2008) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.