Command-line tool for adapting base models like IBM Granite to custom tasks.
m alora train
command on this small dataset:
<|start_of_role|>check_requirement<|end_of_role|>
; this prompt should be appended to the context just before activated our newly trained aLoRA. If needed, you can customize this prompt using the --promptfile
argument.
Flag | Type | Default | Description |
---|---|---|---|
--basemodel | str | required | Hugging Face model ID or local path |
--outfile | str | required | Directory to save the adapter weights |
--adapter | str | "alora" | Choose between alora or standard lora |
--epochs | int | 6 | Number of training epochs |
--learning-rate | float | 6e-6 | Learning rate |
--batch-size | int | 2 | Per-device batch size |
--max-length | int | 1024 | Max tokenized input length |
--grad-accum | int | 4 | Gradient accumulation steps |
--promptfile | str | None | Directory to load the prompt format |
m alora upload
command to publish your trained adapter:
outfile
directoryHF_TOKEN
via huggingface-cli login
path_or_model_id
refers to the model checkpoint from last step, i.e., the m alora train
process.
generation_prompt
passed to your backend.add_alora
call should exactly match the prompt used for training.