[misc] update readme (#6917)

Former-commit-id: 499ea45d1f1ea7704ee82f58c35af123a6c2632b
This commit is contained in:
hoshi-hiyouga 2025-02-13 00:58:10 +08:00 committed by GitHub
parent 1679930e00
commit 07aa7b71a3
4 changed files with 37 additions and 1 deletions

3
.gitignore vendored
View File

@ -162,6 +162,9 @@ cython_debug/
# vscode
.vscode/
# uv
uv.lock
# custom .gitignore
ms_cache/
hf_cache/

View File

@ -436,6 +436,22 @@ Extra dependencies available: torch, torch-npu, metrics, deepspeed, liger-kernel
> [!TIP]
> Use `pip install --no-deps -e .` to resolve package conflicts.
<details><summary>Setting up a virtual environment with <b>uv</b></summary>
Create an isolated Python environment with uv:
```bash
uv sync --extra torch --extra metrics --prerelease=allow
```
Run LLaMA-Factory in the isolated environment:
```bash
uv run --prerelease=allow llamafactory-cli train examples/train_lora/llama3_lora_pretrain.yaml
```
</details>
<details><summary>For Windows users</summary>
#### Install BitsAndBytes

View File

@ -438,6 +438,23 @@ pip install -e ".[torch,metrics]"
> [!TIP]
> 遇到包冲突时,可使用 `pip install --no-deps -e .` 解决。
<details><summary>使用 <b>uv</b> 构建虚拟环境</summary>
创建隔离的 Python 环境:
```bash
uv sync --extra torch --extra metrics --prerelease=allow
```
在环境中运行 LLaMA-Factory
```bash
uv run --prerelease=allow llamafactory-cli train examples/train_lora/llama3_lora_pretrain.yaml
```
</details>
<details><summary>Windows 用户指南</summary>
#### 安装 BitsAndBytes

View File

@ -98,7 +98,7 @@ FORCE_TORCHRUN=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ds3.
#### 使用 Ray 在 4 张 GPU 上微调
```bash
USE_RAY=1 llamafactory-cli train examples/train_full/llama3_lora_sft_ray.yaml
USE_RAY=1 llamafactory-cli train examples/train_lora/llama3_lora_sft_ray.yaml
```
### QLoRA 微调