{"record":{"id":"b810a768fe54535c","repo":"hiyouga/LlamaFactory","slug":"hyper-parallel-is-not-installed-please-install-it","errorCode":null,"errorMessage":"hyper_parallel is not installed. Please install it with `pip install hyper_parallel`.","messagePattern":"hyper_parallel is not installed\\. Please install it with `pip install hyper_parallel`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"src/llamafactory/train/hyper_parallel/workflow.py","lineNumber":48,"sourceCode":"\n\nif TYPE_CHECKING:\n    from transformers import Seq2SeqTrainingArguments, TrainerCallback\n\n    from ...hparams import DataArguments, FinetuningArguments, GeneratingArguments, ModelArguments\n\n\nlogger = get_logger(__name__)\n\n\ndef _prepare_hp_args(finetuning_args: \"FinetuningArguments\", model_args: \"ModelArguments\"):\n    r\"\"\"Load HyperParallel arguments and apply LlamaFactory-side overrides.\n\n    When activation optimization is enabled, skip native gradient checkpointing\n    so HP can install its own via ``setup_activation_optimization``.\n    \"\"\"\n    if not is_hyper_parallel_available():\n        raise ImportError(\"hyper_parallel is not installed. Please install it with `pip install hyper_parallel`.\")\n\n    from hyper_parallel.integration.llamafactory import HyperParallelArguments  # pylint: disable=C0415\n\n    hp_args = HyperParallelArguments.from_finetuning_args(finetuning_args)\n\n    if getattr(hp_args, \"cp_size\", None) != finetuning_args.hyper_parallel_cp_size:\n        setattr(hp_args, \"cp_size\", finetuning_args.hyper_parallel_cp_size)\n\n    if hp_args.activation_mode != \"none\":\n        model_args.disable_gradient_checkpointing = True\n    return hp_args\n\n\ndef run_pt(\n    model_args: \"ModelArguments\",\n    data_args: \"DataArguments\",\n    training_args: \"Seq2SeqTrainingArguments\",\n    finetuning_args: \"FinetuningArguments\",","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/train/hyper_parallel/workflow.py#L30-L66","documentation":"Error \"hyper_parallel is not installed. Please install it with `pip install hyper_parallel`.\" thrown in hiyouga/LlamaFactory.","triggerScenarios":"Thrown at src/llamafactory/train/hyper_parallel/workflow.py:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the hyper_parallel package: pip install hyper_parallel."],"exampleFix":"pip install hyper_parallel","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f28afaf6355af515454dfb16c97d728307c93897","analyzedAt":"2026-08-14T21:57:28.298Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}