GitHub Actions commited on
Commit
aced7f3
Β·
1 Parent(s): 1d89d54

πŸš€ Auto-deploy from GitHub

Browse files
app/core/config.py CHANGED
@@ -16,7 +16,7 @@ class Settings(BaseSettings):
16
 
17
  MODEL_PATH: str = str(_CARDSERVER_DIR_CLS / "models" / "lora-checkpoint")
18
  DEFAULT_MODEL_ID: str = "teknium/OpenHermes-2.5-Mistral-7B"
19
- MODEL_LOAD_IN_4BIT: bool = True # Disabled for macOS compatibility
20
 
21
  GENERATED_PATH: str = str(_APP_DEFAULT_STATIC_DIR_CLS / "images" / "generated")
22
  BASE_PATH: str = str(_APP_DEFAULT_STATIC_DIR_CLS / "images" / "base")
 
16
 
17
  MODEL_PATH: str = str(_CARDSERVER_DIR_CLS / "models" / "lora-checkpoint")
18
  DEFAULT_MODEL_ID: str = "teknium/OpenHermes-2.5-Mistral-7B"
19
+ MODEL_LOAD_IN_4BIT: bool = False # Disabled for macOS compatibility
20
 
21
  GENERATED_PATH: str = str(_APP_DEFAULT_STATIC_DIR_CLS / "images" / "generated")
22
  BASE_PATH: str = str(_APP_DEFAULT_STATIC_DIR_CLS / "images" / "base")
app/core/model_loader.py CHANGED
@@ -40,6 +40,11 @@ def load_model_and_tokenizer():
40
  logger.warning(f"Failed to import bitsandbytes: {e}. Disabling 4-bit quantization.")
41
  bitsandbytes_available = False
42
  use_4bit = False
 
 
 
 
 
43
  else:
44
  bitsandbytes_available = False
45
  if is_macos:
 
40
  logger.warning(f"Failed to import bitsandbytes: {e}. Disabling 4-bit quantization.")
41
  bitsandbytes_available = False
42
  use_4bit = False
43
+ except Exception as e:
44
+ # Catch other bitsandbytes related errors (like missing .dylib files)
45
+ logger.warning(f"Bitsandbytes import failed with error: {e}. Disabling 4-bit quantization.")
46
+ bitsandbytes_available = False
47
+ use_4bit = False
48
  else:
49
  bitsandbytes_available = False
50
  if is_macos:
requirements.txt CHANGED
@@ -19,7 +19,7 @@ transformers>=4.52.0
19
  peft>=0.15.0
20
  accelerate>=1.7.0
21
  numpy>=1.26.0
22
- bitsandbytes>=0.46.0
23
 
24
  protobuf>=3.20.0
25
  tiktoken>=0.5.0
 
19
  peft>=0.15.0
20
  accelerate>=1.7.0
21
  numpy>=1.26.0
22
+ # bitsandbytes>=0.46.0 # Disabled on macOS ARM64 - not compatible
23
 
24
  protobuf>=3.20.0
25
  tiktoken>=0.5.0