Skip to main content

cli

CLI Reference

llem provides four commands and a version flag.

llem run [CONFIG] [OPTIONS] # run an experiment or study
llem doctor [OPTIONS] # check environment health (GPU, engines, energy, Docker, config)
llem report-gaps [OPTIONS] # propose engine rule set entries from runtime feedback
llem study [SUBCOMMAND] # write and prepare study files (init, plan)
llem --version # print version and exit

llem run

Run an LLM efficiency experiment

Arguments:

ArgumentTypeRequiredDescription
configpathnoPath to the experiment or study YAML config

Options:

FlagShortTypeDefaultDescription
--output-ostrResults directory for a fresh run; with --resume, the base directory searched for the study to resume
--dry-runflagfalseValidate config and estimate VRAM without running
--quiet-qflagfalseSuppress progress bars
--verbose-vint0Increase verbosity (-v=INFO, -vv=DEBUG)
--skip-preflightflagfalseSkip Docker pre-flight checks (GPU visibility, CUDA/driver compatibility)
--resumeflagfalseResume most recent interrupted study
--resume-dirpathResume a specific study directory
--no-lockflagfalseDisable GPU lock files (advanced)

llem doctor

Check environment health (GPU, engines, energy, Docker, config, image schema)

Options:

FlagShortTypeDefaultDescription
--checkflagfalseExit 0=ok, 1=warnings, 2=errors (for CI/scripting). Output is unchanged.
--jsonflagfalseEmit the full report as machine-readable JSON.

llem report-gaps

Propose engine rule set entries from runtime observations

Options:

FlagShortTypeDefaultDescription
--sourcestrruntime-warningsFeedback source to scan. Only 'runtime-warnings' is wired in this release.
--study-dirpathStudy directory to scan. Repeat the flag to pass multiple.
--enginestrFilter: only propose rules for this engine (transformers/vllm/tensorrt).
--outpathOutput path for proposed YAML fragments (one YAML document per gap, separated by '---').
--include-exceptionsflagfalseAlso propose rules from runtime exceptions. Disabled by default; when off, exception records are skipped and only warning and log emissions are proposed.
--verbose-vint0Increase verbosity (-v=INFO, -vv=DEBUG)

llem study

Write and prepare study files (llem run stays the executor).

llem study init

Write a study file for a model, ready to edit and run with llem run.

Without --defaults the tuning fields are present but commented out, each annotated with its type, range, and default - uncomment the ones you want. With --defaults those fields are filled in at their defaults, giving a reproducible baseline you can run as-is. With --bounds every field with a derivable value range becomes an explicit value list under sweep:, forming a maximal grid you prune down to the study you want.

Options:

FlagShortTypeDefaultDescription
--model-mstrModel id or HuggingFace path for the study.
--engine-estrEngine to write (transformers, vllm, tensorrt). Omit to write all engines.
--output-opathWhere to write the study file (default: study.yaml). Will not overwrite.
--defaultsflagfalseSet every field to its default (a runnable baseline) instead of leaving them commented out.
--boundsflagfalseEmit every field with a derivable value range as an explicit value list under sweep: - a maximal grid to prune before running.

llem study plan

Preview what llem run <study_file> would execute, without running it.

Prints a read-only funnel - declared grid points, then known-invalid points pruned by engine rules, then duplicate configs merged away, then experiments times cycles equals total runs - plus a wall-clock lower bound from the thermal gaps alone. No experiments run, nothing is written, the GPU is never touched. Exit 0 on a valid plan (even with skips); nonzero when the file is missing, unparseable, or produces no experiments.

Arguments:

ArgumentTypeRequiredDescription
study_filepathyesStudy YAML file to preview (as llem run would expand it).