Fine-Tuning
2 nodes
On this page 2
Fine-Tune Language Model
FunctionFine-tunes a LoRA adapter for a language model on a dataset file and saves it to a folder.
Signature
FineTuneLanguageModel -> (Adapter: Text, losses: Number Array)
model: Text
dataset: Text
outputFolder: Text
settings: Fine Tune Settingsstring FineTuneLanguageModel(
string model,
string dataset,
string outputFolder,
FineTuneSettings settings,
out double[] losses)Parameters
| name | type | default | description |
|---|---|---|---|
| model | Text | — | The base model: a repository id or a folder. |
| dataset | Text | — | A JSON Lines, JSON or CSV file of examples. |
| outputFolder | Text | — | Where the adapter is saved (adapter_config.json and adapter_model.safetensors). |
| settings | Fine Tune Settings | — | How it trains; empty for the defaults. |
Returns
| Adapter | Text |
| losses | Number Array |
- Ships with
- Divooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Fine-Tuning
- Package
- Machine Learning
Write Training Examples
FunctionWrites examples to a JSON Lines file in the prompt-and-response shape Fine-Tune Language Model reads: one line per pair.
Signature
WriteTrainingExamples -> Text
path: Text
prompts: Text Array
responses: Text Arraystring WriteTrainingExamples(
string path,
string[] prompts,
string[] responses)Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The file to write. |
| prompts | Text Array | — | What the user says in each example. |
| responses | Text Array | — | What the model should answer, in the same order. |
Returns
| Path | Text |
- Ships with
- Divooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- Fine-Tuning
- Package
- Machine Learning