元編程參考文件

微調

2 個節點

本頁內容 2

微調語言模型

函數

Fine-tunes a LoRA adapter for a language model on a dataset file and saves it to a folder.

簽名
微調語言模型 -> (適配器: 文字, 損失: 數字陣列)
    模型: 文字
    資料集: 文字
    輸出資料夾: 文字
    設定: Fine Tune Settings
string FineTuneLanguageModel(
    string model,
    string dataset,
    string outputFolder,
    FineTuneSettings settings,
    out double[] losses)

參數

名稱型別預設值說明
模型文字—The base model: a repository id or a folder.
資料集文字—A JSON Lines, JSON or CSV file of examples.
輸出資料夾文字—Where the adapter is saved (adapter_config.json and adapter_model.safetensors).
設定Fine Tune Settings—How it trains; empty for the defaults.

返回

適配器文字
損失數字陣列
所屬發行版
元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
微調
所屬包
機器學習

寫入訓練樣本

函數

Writes examples to a JSON Lines file in the prompt-and-response shape Fine-Tune Language Model reads: one line per pair.

簽名
寫入訓練樣本 -> 文字
    路徑: 文字
    提示詞: 文字陣列
    回覆: 文字陣列
string WriteTrainingExamples(
    string path,
    string[] prompts,
    string[] responses)

參數

名稱型別預設值說明
路徑文字—The file to write.
提示詞文字陣列—What the user says in each example.
回覆文字陣列—What the model should answer, in the same order.

返回

路徑文字
所屬發行版
元編程(專業版)
可用的圖種類
事件 例程 狀態機狀態
宣告於
微調
所屬包
機器學習