Description
The command llmtune inference [experiment_dir]
aims to provide a versatile interface for running inference on pre-trained language models, allowing users to:
- Load and run inference on a dataset; or
- Provide arbitrary text inputs for inference for spot checks; or
- Specify specific inputs to be injected in prompt template for inference
Proposed CLI
llmtune inference [experiment_dir] [options]
Arguments
experiment_dir
: The experiment directory from finetuning experiments
Options
--dataset [dataset_path]
: Path to a dataset (e.g., CSV, JSON, or Huggingface)
--text-input [text]
: An arbitrary text input to run inference on. This option can be used for a single text input or for quick manual inference.
--column [name=value]
: Allows specification of a column name and value for custom inputs. This option can be used multiple times to specify different column values.
Examples
Inference on a dataset:
llmtune inference ./my_experiment --dataset ./data/my_dataset.csv
Inference on arbitrary text:
llmtune inference ./my_experiment --text-input "This is an example text input for inference."
Inference with specific input values:
llmtune inference ./my_experiment --column column_1="foo" --column column_2="bar"
Related to: #160