Yen-Ting Lin
Yen-Ting Lin
got the same error with finetuned Mixtral 7bx8
also having the same issue
have the same issue
For quantized model, i only tried with AWQ on vllm. you can find -awq model on my huggingface
如果你自己寫腳本訓練,我建議用 1 就好,簡單有效。 這問題可以回答有深有淺,會關乎你要不要 1. 訓練在 user input / 2. use flash attention? / 3. packing? 等等等,所以我建議你直接熟悉 axolotl 哈哈哈哈 他會幫你準備這些 model input。
有可能是量化時 calibration data 的選用問題。 之後的模型會 *盡量* 量化好一起釋出。
如果你用多(>=8)張高級顯卡 (A/H 系列) 建議用 NVIDIA 原生 [Nemo](https://github.com/NVIDIA/NeMo), Megatron, 或是開源的 [nanotron](https://github.com/huggingface/nanotron/tree/main)。 非以上情境,我個人最喜歡用 [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl),雖然時不時會有小坑哈哈 TRL 是相對乾淨的套件,如果想掌握全程,也蠻推薦的。 BTW twllm 這個 project v1, v2 訓練腳本是幾乎我自己重寫的,但現在建議任何階段都用現有套件就好。
CPT 和 SFT 單純是資料準備 (格式) 不同。 Apply chat template to conversations == text。 要說做 SFT == cPT 技術上沒問題,但可能會造成溝通上的誤會。 btw 有些人做 SFT 會不學習 (不算 loss) user-side 的對話,只學習 assistant-side 的對話。這樣可以加快訓練,但表現上不會有太大差意。
FYI,twllm v3 cPT 和 sft 就是一起做,然後只學習 assistant-side。
只要你的文章是連續的,就可以擺在一起,越長越好。以你的例子應該是`段落`甚至是`文章`。 每一筆資料插入BOS 在最開始, cos 最後面。