Closed AlphaGoMK closed 1 year ago
I got ValueError when running python finetune/lora.py
python finetune/lora.py
Traceback (most recent call last): File "/data/llm/lit-llama/finetune/lora.py", line 218, in <module> CLI(main) File "/home/.local/lib/python3.9/site-packages/jsonargparse/_cli.py", line 85, in CLI return _run_component(component, cfg_init) File "/home/.local/lib/python3.9/site-packages/jsonargparse/_cli.py", line 147, in _run_component return component(**cfg) File "/data/llm/lit-llama/finetune/lora.py", line 55, in main fabric = L.Fabric(accelerator="cuda", devices=1, precision="bf16-true") # fixme bf16-true File "/home/.local/lib/python3.9/site-packages/lightning/fabric/fabric.py", line 89, in __init__ self._connector = _Connector( File "/home/.local/lib/python3.9/site-packages/lightning/fabric/connector.py", line 126, in __init__ self._check_config_and_set_final_flags( File "/home/.local/lib/python3.9/site-packages/lightning/fabric/connector.py", line 208, in _check_config_and_set_final_flags raise ValueError(f"Precision {repr(precision)} is invalid. Allowed precision values: {supported_precision}") ValueError: Precision 'bf16-true' is invalid. Allowed precision values: ('64', '32', '16', 'bf16', 64, 32, 16)
Looks like default version of lightning==2.0.6 in pypi caused such error.
lightning==2.0.6
Comparing the code in 2.0.6 with master commit, lacking of "16-true" caused the value error.
"16-true"
Problem solved after install lightning from github.
git clone git@github.com:Lightning-AI/lightning.git
cd lightning && pip install .
Sorry about the trouble and good suggestion. In practice, I recommend installing fit via the requirements.txt
requirements.txt
pip install requirements.txt --upgrade
which uses the suggested installation from GitHub
I got ValueError when running
python finetune/lora.py
Looks like default version of
lightning==2.0.6
in pypi caused such error.Comparing the code in 2.0.6 with master commit, lacking of
"16-true"
caused the value error.Problem solved after install lightning from github.
git clone git@github.com:Lightning-AI/lightning.git
cd lightning && pip install .