[已解決][PyTorch] 編譯(compile)後模型權重多出 "_orig_mod" 的前綴問題
問題描述
在 2023 年初,PyTorch 的 2.0 版本新增了一個 torch.compile()
的新功能,讓我們能夠在模型訓練/推理時能夠進一步提昇速度。與混合精度訓練的協同工作,經常能使我的訓練速度提昇一倍左右。
在 2023 年初,PyTorch 的 2.0 版本新增了一個 torch.compile()
的新功能,讓我們能夠在模型訓練/推理時能夠進一步提昇速度。與混合精度訓練的協同工作,經常能使我的訓練速度提昇一倍左右。
今天我在讀取已經被 torch.compile()
之後儲存起來的模型權重,發現模型權重是使用 OrderedDict 資料結構儲存著,而這種結構本身是有序序列,換言之它的資料內容是需要嚴格遵守排序的。
Neo4j 是一個圖形資料庫(Graph Database),跟一般傳統的資料庫相比,圖形資料庫的重點是『圖』,也就是節點(實體/Entity)之間的關係與連接。每個節點可以代表一個對象(如人、事物、地點...),而邊則表示節點之間的關係(如朋友、擁有、位於...)
Read More »Neo4j 圖形資料庫(Graph Database)安裝與透過 Python 調用There are 3n
piles of coins of varying size, you and your friends will take piles of coins as follows:
RAG-based LLM 是當前使用大型語言模型(Large Language Model, LLM)的一種知名架構,也就是通過『檢索』,來給模型提供訓練時所沒有的先驗知識,讓模型能夠在得知特定資訊的情況下進行問題的回答。
Read More »[論文閱讀] Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection雖然 Linux 號稱鮮少有駭客散佈病毒,但實際上,Linux 做為穩定的伺服器或開發環境依然是非常有價值、非常具有經濟效益的作業系統 —— 所以雖然相比 Windows 數量較少,但 Linux 還是存在許多惡意軟體或駭客攻擊的。
Read More »[Linux] 開源防毒軟體 ClamAV 的安裝與使用You are given a 0-indexed array of strings garbage
where garbage[i]
represents the assortment of garbage at the ith
house. garbage[i]
consists only of the characters 'M'
, 'P'
and 'G'
representing one unit of metal, paper and glass garbage respectively. Picking up one unit of any type of garbage takes 1
minute.
Swap 空間在 Linux 作業系體中扮演著重要角色。它可以被理解為是虛擬記憶體空間,名稱就是交換(swap)的意思,能夠在系統實體記憶體(RAM)不夠用的時候,把記憶體比較少用到的資料暫時寫到一個固定的硬碟空間來保證系統穩定運行 —— 這個空間就是 Swap。
Read More »[Linux] 使用指令增加 Swap 空間來避免記憶體耗盡You are given four integers sx
, sy
, fx
, fy
, and a non-negative integer t
.
In an infinite 2D grid, you start at the cell (sx, sy)
. Each second, you must move to any of its adjacent cells.
You are playing a video game where you are defending your city from a group of n monsters. You are given a 0-indexed integer array dist of size n, where dist[i] is the initial distance in kilometers of the ith monster from the city.
Read More »LeetCode: 1921-Eliminate Maximum Number of Monsters 解題紀錄