This commit is contained in:
oobabooga 2024-04-24 09:53:41 -07:00
parent 64e2a9a0a7
commit 4094813f8d
6 changed files with 31 additions and 43 deletions

View File

@ -112,8 +112,8 @@ Requirements file to use:
| NVIDIA | `requirements.txt` | | NVIDIA | `requirements.txt` |
| AMD | `requirements_amd.txt` | | AMD | `requirements_amd.txt` |
| CPU only | `requirements_cpu_only.txt` | | CPU only | `requirements_cpu_only.txt` |
| Apple | Intel | `requirements_apple_intel.txt` | | Apple Intel | `requirements_apple_intel.txt` |
| Apple | Apple Silicon | `requirements_apple_silicon.txt` | | Apple Silicon | `requirements_apple_silicon.txt` |
### Start the web UI ### Start the web UI

View File

@ -5,16 +5,13 @@ services:
context: . context: .
args: args:
# Requirements file to use: # Requirements file to use:
# | GPU | CPU | requirements file to use | # | GPU | requirements file to use |
# |--------|---------|---------| # |--------|---------|---------|
# | NVIDIA | has AVX2 | `requirements.txt` | # | NVIDIA | `requirements.txt` |
# | NVIDIA | no AVX2 | `requirements_noavx2.txt` | # | AMD | `requirements_amd.txt` |
# | AMD | has AVX2 | `requirements_amd.txt` | # | CPU only | `requirements_cpu_only.txt` |
# | AMD | no AVX2 | `requirements_amd_noavx2.txt` | # | Apple Intel | `requirements_apple_intel.txt` |
# | CPU only | has AVX2 | `requirements_cpu_only.txt` | # | Apple Silicon | `requirements_apple_silicon.txt` |
# | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` |
# | Apple | Intel | `requirements_apple_intel.txt` |
# | Apple | Apple Silicon | `requirements_apple_silicon.txt` |
# Default: requirements.txt` # Default: requirements.txt`
# BUILD_REQUIREMENTS: requirements.txt # BUILD_REQUIREMENTS: requirements.txt

View File

@ -5,16 +5,13 @@ services:
context: . context: .
args: args:
# Requirements file to use: # Requirements file to use:
# | GPU | CPU | requirements file to use | # | GPU | requirements file to use |
# |--------|---------|---------| # |--------|---------|---------|
# | NVIDIA | has AVX2 | `requirements.txt` | # | NVIDIA | `requirements.txt` |
# | NVIDIA | no AVX2 | `requirements_noavx2.txt` | # | AMD | `requirements_amd.txt` |
# | AMD | has AVX2 | `requirements_amd.txt` | # | CPU only | `requirements_cpu_only.txt` |
# | AMD | no AVX2 | `requirements_amd_noavx2.txt` | # | Apple Intel | `requirements_apple_intel.txt` |
# | CPU only | has AVX2 | `requirements_cpu_only.txt` | # | Apple Silicon | `requirements_apple_silicon.txt` |
# | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` |
# | Apple | Intel | `requirements_apple_intel.txt` |
# | Apple | Apple Silicon | `requirements_apple_silicon.txt` |
# Default: requirements.txt` # Default: requirements.txt`
# BUILD_REQUIREMENTS: requirements.txt # BUILD_REQUIREMENTS: requirements.txt

View File

@ -5,16 +5,13 @@ services:
context: . context: .
args: args:
# Requirements file to use: # Requirements file to use:
# | GPU | CPU | requirements file to use | # | GPU | requirements file to use |
# |--------|---------|---------| # |--------|---------|---------|
# | NVIDIA | has AVX2 | `requirements.txt` | # | NVIDIA | `requirements.txt` |
# | NVIDIA | no AVX2 | `requirements_noavx2.txt` | # | AMD | `requirements_amd.txt` |
# | AMD | has AVX2 | `requirements_amd.txt` | # | CPU only | `requirements_cpu_only.txt` |
# | AMD | no AVX2 | `requirements_amd_noavx2.txt` | # | Apple Intel | `requirements_apple_intel.txt` |
# | CPU only | has AVX2 | `requirements_cpu_only.txt` | # | Apple Silicon | `requirements_apple_silicon.txt` |
# | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` |
# | Apple | Intel | `requirements_apple_intel.txt` |
# | Apple | Apple Silicon | `requirements_apple_silicon.txt` |
# Default: requirements.txt` # Default: requirements.txt`
# BUILD_REQUIREMENTS: requirements.txt # BUILD_REQUIREMENTS: requirements.txt

View File

@ -5,16 +5,13 @@ services:
context: . context: .
args: args:
# Requirements file to use: # Requirements file to use:
# | GPU | CPU | requirements file to use | # | GPU | requirements file to use |
# |--------|---------|---------| # |--------|---------|---------|
# | NVIDIA | has AVX2 | `requirements.txt` | # | NVIDIA | `requirements.txt` |
# | NVIDIA | no AVX2 | `requirements_noavx2.txt` | # | AMD | `requirements_amd.txt` |
# | AMD | has AVX2 | `requirements_amd.txt` | # | CPU only | `requirements_cpu_only.txt` |
# | AMD | no AVX2 | `requirements_amd_noavx2.txt` | # | Apple Intel | `requirements_apple_intel.txt` |
# | CPU only | has AVX2 | `requirements_cpu_only.txt` | # | Apple Silicon | `requirements_apple_silicon.txt` |
# | CPU only | no AVX2 | `requirements_cpu_only_noavx2.txt` |
# | Apple | Intel | `requirements_apple_intel.txt` |
# | Apple | Apple Silicon | `requirements_apple_silicon.txt` |
# Default: requirements.txt` # Default: requirements.txt`
# BUILD_REQUIREMENTS: requirements.txt # BUILD_REQUIREMENTS: requirements.txt

View File

@ -194,7 +194,7 @@ def huggingface_loader(model_name):
params['torch_dtype'] = torch.float32 params['torch_dtype'] = torch.float32
else: else:
params['device_map'] = 'auto' params['device_map'] = 'auto'
if x:= get_max_memory_dict(): if x := get_max_memory_dict():
params['max_memory'] = x params['max_memory'] = x
if shared.args.load_in_4bit: if shared.args.load_in_4bit: