hiyouga/LlamaFactory · warning · NotImplementedError

Version information is not implemented yet.

Error message

Version information is not implemented yet.

What it means

The v1 launcher has no implementation for the 'version' subcommand yet and raises NotImplementedError. Purely a v1 coverage gap; the v0 launcher prints the version fine.

Source

Thrown at src/llamafactory/v1/launcher.py:137

        )

        sys.exit(process.returncode)

    elif command == "chat":
        from .samplers.cli_sampler import run_chat

        run_chat()

    elif command == "merge":
        from llamafactory.v1.plugins.model_plugins.peft import merge_and_export_model

        merge_and_export_model()

    elif command == "env":
        raise NotImplementedError("Environment information is not implemented yet.")

    elif command == "version":
        raise NotImplementedError("Version information is not implemented yet.")

    elif command == "help":
        print(USAGE)

    elif command in _DIST_TRAIN_COMMANDS:
        # Single GPU training without torchrun
        if command in ("train", "sft"):
            from llamafactory.v1.trainers.sft_trainer import run_sft

            run_sft()
        elif command == "dpo":
            from llamafactory.v1.trainers.dpo_trainer import run_dpo

            run_dpo()
        elif command == "rm":
            from llamafactory.v1.trainers.rm_trainer import run_rm

            run_rm()

View on GitHub (pinned to f28afaf635)

Solutions

  1. Unset USE_V1 before invoking the command: `env -u USE_V1 llamafactory-cli version`.
  2. Use Python instead: `python -c "import llamafactory; print(llamafactory.__version__)"` or `pip show llamafactory`.
  3. Remove the USE_V1=1 export from shell profile if v1 is not intended.

Example fix

# before
USE_V1=1 llamafactory-cli version  # raises

# after
python -c "from llamafactory.extras.misc import get_current_repo; ..." # or simply:
env -u USE_V1 llamafactory-cli version
Defensive patterns

Strategy: validation

Validate before calling

import os, subprocess
if os.environ.get("USE_V1") == "1":
    import llamafactory
    print(llamafactory.__version__)  # avoid the CLI gap
else:
    subprocess.run(["llamafactory-cli", "version"])

Prevention

When it happens

Trigger: Running `llamafactory-cli version` (or `lmf version`) with USE_V1=1.

Common situations: Scripts or CI that call `llamafactory-cli version` to log the installed version, executed in an environment where USE_V1=1 is exported.

Related errors


AI-assisted analysis of hiyouga/LlamaFactory@f28afaf635 (2026-08-14). Data as JSON: /api/errors/6890648d00fc789d. Report an issue: GitHub.