Skip to content

Commit

Permalink
resolve python 3.8 package
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyouga committed May 9, 2024
1 parent d9cdddd commit 75aec4c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,19 @@ huggingface-cli login

### Installation

> [!IMPORTANT]
> Installation is mandatory.
```bash
git clone https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e .[metrics]
pip install -e .[torch,metrics]
```

Extra dependencies available: metrics, deepspeed, bitsandbytes, vllm, galore, badam, gptq, awq, aqlm, qwen, modelscope, quality
Extra dependencies available: torch, metrics, deepspeed, bitsandbytes, vllm, galore, badam, gptq, awq, aqlm, qwen, modelscope, quality

> [!TIP]
> Use `pip install --no-deps -e .` to resolve package conflicts.
<details><summary>For Windows users</summary>

Expand Down
10 changes: 8 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,19 @@ huggingface-cli login

### 安装 LLaMA Factory

> [!IMPORTANT]
> 此步骤为必需。
```bash
git clone https://github.com/hiyouga/LLaMA-Factory.git
cd LLaMA-Factory
pip install -e .[metrics]
pip install -e .[torch,metrics]
```

可选的额外依赖项:metrics、deepspeed、bitsandbytes、vllm、galore、badam、gptq、awq、aqlm、qwen、modelscope、quality
可选的额外依赖项:torch、metrics、deepspeed、bitsandbytes、vllm、galore、badam、gptq、awq、aqlm、qwen、modelscope、quality

> [!TIP]
> 遇到包冲突时,可使用 `pip install --no-deps -e .` 解决。
<details><summary>Windows 用户指南</summary>

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
torch>=1.13.1
transformers>=4.37.2
datasets>=2.14.3
accelerate>=0.27.2
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def get_requires():


extra_require = {
"torch": ["torch>=1.13.1"],
"metrics": ["nltk", "jieba", "rouge-chinese"],
"deepspeed": ["deepspeed>=0.10.0,<=0.14.0"],
"bitsandbytes": ["bitsandbytes>=0.39.0"],
Expand Down
4 changes: 3 additions & 1 deletion src/llmtuner/api/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
from contextlib import asynccontextmanager
from typing import Annotated, Optional
from typing import Optional

from typing_extensions import Annotated

from ..chat import ChatModel
from ..extras.misc import torch_gc
Expand Down

0 comments on commit 75aec4c

Please sign in to comment.