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:
- yaml
- toml
cmd: gen
input: ./mymodel.pt
output: seq.txt
tokens: 300
cmd = "gen"
input = "./mymodel.pt"
output = "seq.txt"
tokens = 300
Then, we can run:
- bash (yaml)
- bash (toml)
hxmx exec config.yaml
hxmx exec config.toml
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,