Gaston895 commited on
Commit
94156c7
·
verified ·
1 Parent(s): d9779e6

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -26,11 +26,10 @@ def load_model():
26
  # Load model optimized for CPU
27
  model = AutoModelForCausalLM.from_pretrained(
28
  "Gaston895/aegisconduct",
29
- torch_dtype=torch.float32, # Use float32 for CPU
30
  device_map="cpu", # Force CPU usage
31
  trust_remote_code=True,
32
- low_cpu_mem_usage=True,
33
- torch_dtype=torch.float16 # Try float16 for memory efficiency
34
  )
35
 
36
  # Force garbage collection
 
26
  # Load model optimized for CPU
27
  model = AutoModelForCausalLM.from_pretrained(
28
  "Gaston895/aegisconduct",
29
+ torch_dtype=torch.float16, # Use float16 for memory efficiency
30
  device_map="cpu", # Force CPU usage
31
  trust_remote_code=True,
32
+ low_cpu_mem_usage=True
 
33
  )
34
 
35
  # Force garbage collection