Fine Tune Settings
14 nodes
On this page 14
Make Fine Tune Settings
FunctionSettings for a LoRA or QLoRA fine-tune.
Signature
FineTuneSettings -> Fine Tune Settings
rank: Integer
alpha: Number
dropout: Number
learningRate: Number
epochs: Number
maxSteps: Integer
batchSize: Integer
gradientAccumulation: Integer
maxLength: Integer
fourBit: Truth
device: Compute Device
seed: IntegerFineTuneSettings 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)Parameters
| name | type | default | description |
|---|---|---|---|
| rank | Integer | 16 | The adapter's rank: larger learns more and saves a bigger file; 8 to 64 is usual. |
| alpha | Number | 32 | How strongly the adapter applies; usually twice the rank. |
| dropout | Number | 0.05 | The share of the adapter's inputs dropped while training, against overfitting. |
| learningRate | Number | 0.0002 | How big each step is; 1e-4 to 3e-4 suits LoRA. |
| epochs | Number | 1 | How many times to go through the data. |
| maxSteps | Integer | 0 | Stop after this many steps whatever the epochs say; 0 for no limit. |
| batchSize | Integer | 4 | How many examples each step sees at once. |
| gradientAccumulation | Integer | 1 | How many batches add up to one step, for a larger effective batch in the same memory. |
| maxLength | Integer | 512 | Examples longer than this many tokens are cut. |
| fourBit | Truth | False | QLoRA: hold the base model in 4-bit NF4 while training, a quarter of the memory; on a GPU. |
| device | Compute Device | Auto | Where it trains. |
| seed | Integer | 42 | Makes the run repeatable: the adapter's start, the shuffling and the dropout. |
Returns
| result | Fine Tune Settings |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Alpha
FunctionHow strongly the adapter applies.
Signature
Alpha(Fine Tune Settings: Fine Tune Settings) -> Number
double Alpha(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Number |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Batch Size
FunctionExamples per batch.
Signature
BatchSize(Fine Tune Settings: Fine Tune Settings) -> Integer
int BatchSize(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Device
FunctionWhere it trains.
Signature
Device(Fine Tune Settings: Fine Tune Settings) -> Compute Device
ComputeDevice Device(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Compute Device |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Dropout
FunctionThe adapter's dropout.
Signature
Dropout(Fine Tune Settings: Fine Tune Settings) -> Number
double Dropout(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Number |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Epochs
FunctionPasses over the data.
Signature
Epochs(Fine Tune Settings: Fine Tune Settings) -> Number
double Epochs(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Number |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Four Bit
FunctionWhether the base model is held in 4-bit (QLoRA).
Signature
FourBit(Fine Tune Settings: Fine Tune Settings) -> Truth
bool FourBit(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Truth |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Gradient Accumulation
FunctionBatches per step.
Signature
GradientAccumulation(Fine Tune Settings: Fine Tune Settings) -> Integer
int GradientAccumulation(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Learning Rate
FunctionThe learning rate.
Signature
LearningRate(Fine Tune Settings: Fine Tune Settings) -> Number
double LearningRate(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Number |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Max Length
FunctionThe longest example, in tokens.
Signature
MaxLength(Fine Tune Settings: Fine Tune Settings) -> Integer
int MaxLength(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Max Steps
FunctionThe step limit; 0 for none.
Signature
MaxSteps(Fine Tune Settings: Fine Tune Settings) -> Integer
int MaxSteps(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Rank
FunctionThe adapter's rank.
Signature
Rank(Fine Tune Settings: Fine Tune Settings) -> Integer
int Rank(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
Seed
FunctionThe seed.
Signature
Seed(Fine Tune Settings: Fine Tune Settings) -> Integer
int Seed(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Integer |
- Ships with
- Divooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning
To String
FunctionOne line, as a preview shows it.
Signature
ToString(Fine Tune Settings: Fine Tune Settings) -> Text
string ToString(FineTuneSettings Fine Tune Settings)
Parameters
| name | type | default | description |
|---|---|---|---|
| Fine Tune Settings | Fine Tune Settings | — |
Returns
| result | Text |
- Ships with
- Divooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Fine Tune Settings
- Package
- Machine Learning