元編程參考文件

微調設定

14 個節點

本頁內容 14

微調設定

函數

Settings for a LoRA or QLoRA fine-tune.

簽名
微調設定 -> Fine Tune Settings
    秩: 整數
    縮放係數: 數字
    隨機失活: 數字
    學習率: 數字
    輪數: 數字
    最大步數: 整數
    批大小: 整數
    梯度累積: 整數
    最大長度: 整數
    四位量化: 真否
    裝置: Compute Device
    種子: 整數
FineTuneSettings FineTuneSettings(
    int rank = 16,
    double alpha = 32,
    double dropout = 0.05,
    double learningRate = 0.0002,
    double epochs = 1,
    int maxSteps = 0,
    int batchSize = 4,
    int gradientAccumulation = 1,
    int maxLength = 512,
    bool fourBit = false,
    ComputeDevice device = ComputeDevice.Auto,
    int seed = 42)

參數

名稱型別預設值說明
秩整數16The adapter's rank: larger learns more and saves a bigger file; 8 to 64 is usual.
縮放係數數字32How strongly the adapter applies; usually twice the rank.
隨機失活數字0.05The share of the adapter's inputs dropped while training, against overfitting.
學習率數字0.0002How big each step is; 1e-4 to 3e-4 suits LoRA.
輪數數字1How many times to go through the data.
最大步數整數0Stop after this many steps whatever the epochs say; 0 for no limit.
批大小整數4How many examples each step sees at once.
梯度累積整數1How many batches add up to one step, for a larger effective batch in the same memory.
最大長度整數512Examples longer than this many tokens are cut.
四位量化真否FalseQLoRA: hold the base model in 4-bit NF4 while training, a quarter of the memory; on a GPU.
裝置Compute Device自動Where it trains.
種子整數42Makes the run repeatable: the adapter's start, the shuffling and the dropout.

返回

微調設定Fine Tune Settings
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

縮放係數

函數

How strongly the adapter applies.

簽名
縮放係數(Fine Tune Settings: Fine Tune Settings) -> 數字
double Alpha(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果數字
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

批大小

函數

Examples per batch.

簽名
批大小(Fine Tune Settings: Fine Tune Settings) -> 整數
int BatchSize(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

裝置

函數

Where it trains.

簽名
裝置(Fine Tune Settings: Fine Tune Settings) -> Compute Device
ComputeDevice Device(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果Compute Device
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

隨機失活

函數

The adapter's dropout.

簽名
隨機失活(Fine Tune Settings: Fine Tune Settings) -> 數字
double Dropout(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果數字
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

輪數

函數

Passes over the data.

簽名
輪數(Fine Tune Settings: Fine Tune Settings) -> 數字
double Epochs(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果數字
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

四位量化

函數

Whether the base model is held in 4-bit (QLoRA).

簽名
四位量化(Fine Tune Settings: Fine Tune Settings) -> 真否
bool FourBit(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果真否
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

梯度累積

函數

Batches per step.

簽名
梯度累積(Fine Tune Settings: Fine Tune Settings) -> 整數
int GradientAccumulation(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

學習率

函數

The learning rate.

簽名
學習率(Fine Tune Settings: Fine Tune Settings) -> 數字
double LearningRate(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果數字
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

最大長度

函數

The longest example, in tokens.

簽名
最大長度(Fine Tune Settings: Fine Tune Settings) -> 整數
int MaxLength(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

最大步數

函數

The step limit; 0 for none.

簽名
最大步數(Fine Tune Settings: Fine Tune Settings) -> 整數
int MaxSteps(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

秩

函數

The adapter's rank.

簽名
秩(Fine Tune Settings: Fine Tune Settings) -> 整數
int Rank(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

種子

函數

The seed.

簽名
種子(Fine Tune Settings: Fine Tune Settings) -> 整數
int Seed(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

結果整數
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
微調設定
所屬包
機器學習

轉為文字

函數

One line, as a preview shows it.

簽名
轉為文字(Fine Tune Settings: Fine Tune Settings) -> 文字
string ToString(FineTuneSettings Fine Tune Settings)

參數

名稱型別預設值說明
Fine Tune SettingsFine Tune Settings—

返回

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