llama-factory ||启智平台
1.在启智平台上找到没有安装tensorflow的镜像作为基础镜像
把llama-factory的github仓库进行下载,得到zip压缩包,上传到启智平台中,如下:
2. 执行命令如下
进入文件夹
cd LLaMA-Factory-main
更新pip
python -m pip install --upgrade pip
安装依赖:
pip install -e '.[torch,metrics]' -i https://pypi.tuna.tsinghua.edu.cn/simple/
解决依赖包冲突:
pip install --no-deps -e
进行环境验证:
lamafactory-cli train -h
输出:
oot@i0435935b1bb4582a32b2a2767606073-task0-0:/tmp/code/cats2/LLaMA-Factory-main# lamafactory-cli train -h
bash: lamafactory-cli: command not found
root@i0435935b1bb4582a32b2a2767606073-task0-0:/tmp/code/cats2/LLaMA-Factory-main# llamafactory-cli train -h
usage: llamafactory-cli [-h] [--ray_run_name RAY_RUN_NAME] [--ray_storage_path RAY_STORAGE_PATH] [--ray_num_workers RAY_NUM_WORKERS] [--resources_per_worker RESOURCES_PER_WORKER]
[--placement_strategy {SPREAD,PACK,STRICT_SPREAD,STRICT_PACK}]
options:
-h, --help show this help message and exit
--ray_run_name RAY_RUN_NAME, --ray-run-name RAY_RUN_NAME
The training results will be saved at `<ray_storage_path>/ray_run_name`. (default: None)
--ray_storage_path RAY_STORAGE_PATH, --ray-storage-path RAY_STORAGE_PATH
The storage path to save training results to (default: ./saves)
--ray_num_workers RAY_NUM_WORKERS, --ray-num-workers RAY_NUM_WORKERS
The number of workers for Ray training. Default is 1 worker. (default: 1)
--resources_per_worker RESOURCES_PER_WORKER, --resources-per-worker RESOURCES_PER_WORKER
The resources per worker for Ray training. Default is to use 1 GPU per worker. (default: {'GPU': 1})
--placement_strategy {SPREAD,PACK,STRICT_SPREAD,STRICT_PACK}, --placement-strategy {SPREAD,PACK,STRICT_SPREAD,STRICT_PACK}
The placement strategy for Ray training. Default is PACK. (default: PACK)