winglian commited on
Commit
4131183
1 Parent(s): 77fca25

fix install to work with latest alpaca lora 4bit

Browse files
Files changed (3) hide show
  1. README.md +2 -1
  2. requirements.txt +1 -0
  3. setup.py +4 -7
README.md CHANGED
@@ -29,7 +29,8 @@ shuf -n2000 data/vicuna_cleaned.jsonl > data/vicuna_cleaned.subset0.jsonl
29
  ```
30
 
31
  - Create a new or update the existing YAML config (config/pythia_1_2B_alpaca.yml)[config/pythia_1_2B_alpaca.yml]
32
- - Install python dependencies `pip3 install -e .[triton]` or `pip3 install -e .[cuda]`
 
33
  - Configure accelerate `accelerate config` or update `~/.cache/huggingface/accelerate/default_config.yaml`
34
 
35
  ```yaml
 
29
  ```
30
 
31
  - Create a new or update the existing YAML config (config/pythia_1_2B_alpaca.yml)[config/pythia_1_2B_alpaca.yml]
32
+ - Install python dependencies `pip3 install -e .[int4_triton]` or `pip3 install -e .[int4]`
33
+ - If not using `int4` or `int4_triton`, run `pip install "peft @ git+https://github.com/huggingface/peft.git"`
34
  - Configure accelerate `accelerate config` or update `~/.cache/huggingface/accelerate/default_config.yaml`
35
 
36
  ```yaml
requirements.txt CHANGED
@@ -1,3 +1,4 @@
 
1
  transformers @ git+https://github.com/huggingface/transformers.git
2
  attrdict
3
  fire
 
1
+ peft @ git+https://github.com/huggingface/peft.git
2
  transformers @ git+https://github.com/huggingface/transformers.git
3
  attrdict
4
  fire
setup.py CHANGED
@@ -1,9 +1,9 @@
1
- import sys
2
  from setuptools import setup, find_packages
3
 
4
  install_requires = []
5
  with open("./requirements.txt", "r") as requirements_file:
6
  # don't include peft yet until we check the int4
 
7
  reqs = [r.strip() for r in requirements_file.readlines() if "peft" not in r]
8
  reqs = [r for r in reqs if r[0] != "#"]
9
  for r in reqs:
@@ -17,14 +17,11 @@ setup(
17
  packages=find_packages(),
18
  install_requires=install_requires,
19
  extras_require={
20
- None: [
21
- "peft @ git+https://github.com/huggingface/peft.git",
22
- ],
23
- 'int4_cuda': [
24
- "alpaca_lora_4bit[cuda] @ git+https://github.com/winglian/alpaca_lora_4bit.git@setup_pip#egg=alpaca_lora_4bit[cuda]",
25
  ],
26
  'int4_triton': [
27
- "alpaca_lora_4bit[triton] @ git+https://github.com/winglian/alpaca_lora_4bit.git@setup_pip#egg=alpaca_lora_4bit[triton]",
28
  ],
29
  },
30
  )
 
 
1
  from setuptools import setup, find_packages
2
 
3
  install_requires = []
4
  with open("./requirements.txt", "r") as requirements_file:
5
  # don't include peft yet until we check the int4
6
+ # need to manually install peft for now...
7
  reqs = [r.strip() for r in requirements_file.readlines() if "peft" not in r]
8
  reqs = [r for r in reqs if r[0] != "#"]
9
  for r in reqs:
 
17
  packages=find_packages(),
18
  install_requires=install_requires,
19
  extras_require={
20
+ 'int4': [
21
+ "alpaca_lora_4bit @ git+https://github.com/winglian/alpaca_lora_4bit.git@setup_pip",
 
 
 
22
  ],
23
  'int4_triton': [
24
+ "alpaca_lora_4bit[triton] @ git+https://github.com/winglian/alpaca_lora_4bit.git@setup_pip",
25
  ],
26
  },
27
  )