Skip to content

提示注入攻擊(prompt injection attack)的防禦筆記

[已解決] RuntimeError: view size is not compatible with input tensor’s size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(…) instead.

Last Updated on 2024-02-22 by Clay

問題描述

在使用 PyTorch 進行深度學習模型的建設時,我們免不了一次又一次地調整神經層與輸入輸出的形狀,這顯然是每位 AI 工程師必經的道路 —— 而在 PyTorch 的形狀變換 view() 方法中,顯然存在一個有趣的小陷阱:

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
Read More »[已解決] RuntimeError: view size is not compatible with input tensor’s size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(…) instead.

[已解決] 使用 SFTTrainer 時,如果訓練資料中存在多個 response_template,會從何處開始計算 loss

Last Updated on 2024-04-01 by Clay

問題描述

SFTTrainer 是 HuggingFace 所提供的一個進行 LLM 微調任務的訓練工具,可以快速調整多項超參數與細項配置在大型語言模型的微調任務中。其中,response_template 是訓練資料中我們必須傳遞的特殊字串模板,在這個模板字串後的所有內容,都會在訓練時參與 loss 的計算。

Read More »[已解決] 使用 SFTTrainer 時,如果訓練資料中存在多個 response_template,會從何處開始計算 loss

[論文閱讀] RAGAS: Automated Evaluation of Retrieval Augmented Generation

Last Updated on 2024-07-25 by Clay

前言

2023 年是生成式 AI 大爆發的一年,各式各樣的 AI 應用層出不窮。其中在自然語言處理NLP)領域中,大型語言模型Large Language Model, LLM)絕對是最重要的技術。只要把 LLM 訓練好、減少幻覺,就會在各式各樣的任務上減少人力。

Read More »[論文閱讀] RAGAS: Automated Evaluation of Retrieval Augmented Generation
Exit mobile version