Training
Description
Use the teklia-layout-reader train to train your own model.
| Parameter | Description | Type | Default |
|---|---|---|---|
|
Path to the training configuration (YAML format). |
|
Expected configuration
Many parameters can be adjusted through the configuration file.
Basic parameters
| Parameter | Description | Type | Recommended value |
|---|---|---|---|
|
|
Path to the local or Hugging Face model to fine-tune |
hantian/layoutreader or any other specialized model. |
|
|
Path to the local dataset |
The dataset extracted following this recipe. |
|
|
Sorting method for zone order initialization. |
Use |
|
|
Fraction of training documents whose zones will be shuffled. The remaining documents will follow |
Use |
|
|
Whether to include zone class labels |
Should be enabled ( |
|
|
Whether to include horizontal and vertical separators as additional inputs |
Should be enabled ( |
|
|
Training batch size per GPU |
Use 4 by default and adjust depending on your GPU spec. |
|
|
Evaluation batch size per GPU |
Use 4 by default and adjust depending on your GPU spec. |
SFTTrainer parameters
| Parameter | Description | Type | Recommended value |
|---|---|---|---|
|
|
Output folder where checkpoints will be saved |
|
|
|
Training batch size per GPU |
Use 4 by default and adjust depending on your GPU capabilities |
|
|
Evaluation batch size per GPU |
Use 4 by default and adjust depending on your GPU capabilities |
For a more advanced usage, please have a look at the full configuration file and check out the SFTTrainer class page.