Skip to content

CLI

olaverse-foundry ships a foundry CLI for environment checks, recipe previews, and runs. If the foundry script isn't on your PATH (e.g. inside some notebook kernels), use python -m foundry โ€” it's equivalent.

pip install olaverse-foundry
foundry --help          # or: python -m foundry --help

Commands: doctor, plan, run, embed, strategies.


foundry doctor

Check your environment and print a summary of available backends โ€” foundry version, Python, torch/CUDA/MPS, and which optional packages are installed (accelerate, safetensors, peft, rapidfuzz, wandb). It also tells you whether real (GPU) training is enabled.

foundry doctor

Use it first on any new machine to confirm torch + CUDA are present.


foundry plan

Preview a recipe without executing it โ€” no GPU or model downloads. Prints the staged plan (seed, data, grow, teachers, heal, output) and any shape warnings.

foundry plan recipe.yaml

See Recipes for the YAML schema.


foundry run

Execute a causal-LM recipe end-to-end (seed โ†’ optional grow โ†’ distil/heal โ†’ save). Requires [torch] and a GPU; with no torch it raises rather than silently degrading.

foundry run recipe.yaml

The recipe must provide training data (a data: block) โ€” see Recipes.


foundry embed

Execute an embedding-distillation recipe (student encoder โ† teacher embeddings). The recipe needs a data: block so the CLI can build the training pipeline.

foundry embed embed_recipe.yaml

foundry strategies

List the available fusion strategies with descriptions.

foundry strategies
min_ce    MinCE  โ€” per token, pick the teacher with highest p(gold).
mean_ce   MeanCE โ€” weighted average over all teacher distributions.

Help

Every command supports --help:

foundry --help
foundry run --help
python -m foundry doctor