Skip to content

Python

使用 snapshot_download 下載 HuggingFace Hub 上的模型

介紹

HuggingFace Model Hub 現在已經是無人不知、無人不曉的重要開源平台了,每天都有無數的人或組織上傳自己訓練出來的最新模型(包含文字、圖像、語音…… 等等不同領域)到這個平台上。可說是現在凡舉是個做 AI 相關工作的人,想必都會經常瀏覽 HuggingFace 他們的家的平台網站。

Read More »使用 snapshot_download 下載 HuggingFace Hub 上的模型

Direct Preference Optimization (DPO) 訓練方法筆記

介紹

DPODirect Preference Optimization, 直接偏好優化)是一種取代 RLHFReinforcement Learning from Human Feedback, 基於人類反饋的強化學習)的微調方式。眾所皆知,大型語言模型在經過非監督式學習後能夠學習到大量的知識與理解能力(有些研究者認為是『壓縮並保存』了知識在神經網路權重中);在監督式學習後學會了流暢地回應我們的問題,或者說是學會了『對話』的能力。

Read More »Direct Preference Optimization (DPO) 訓練方法筆記

LeetCode: 661-Image Smoother 解題紀錄

題目

An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the average of the cell and the eight surrounding cells (i.e., the average of the nine cells in the blue smoother). If one or more of the surrounding cells of a cell is not present, we do not consider it in the average (i.e., the average of the four cells in the red smoother).

Read More »LeetCode: 661-Image Smoother 解題紀錄