Skip to main content

Configuration files

hachi machi supports executing commands through configuration files instead of passing them directly in the terminal, as either YAML or TOML files, via the exec command. This is particularly useful for model training, which has numerous parameters that can quickly get out of hand and hard to tinker with directly from the terminal.

All configuration files require specifying the command to execute via the cmd key along with any required arguments for that command. Below is an example of a basic configuration file for the gen command:

config.toml
cmd = "gen"
input = "./mymodel.pt"
output = "seq.txt"
tokens = 300

Then, we can run:

hxmx exec config.toml
info

Note that relative paths are relative to the location of the configuration file itself, not to the current working directory from which exec is run.

Parameter syntax

When providing parameter names that consist of more than one word, spaces, underscores, and hyphens are interchangeable. For instance, the following parameter names are equivalent and equally valid: batch-size, batch size, batch_size,