jdesiree commited on
Commit
22e6f1d
·
verified ·
1 Parent(s): 9be5c1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -315,7 +315,7 @@ class Phi3MiniEducationalLLM(Runnable):
315
  model_path,
316
  quantization_config=quant_config,
317
  device_map="auto",
318
- torch_dtype=torch.float16,
319
  trust_remote_code=True,
320
  low_cpu_mem_usage=True,
321
  token=hf_token
@@ -343,7 +343,7 @@ class Phi3MiniEducationalLLM(Runnable):
343
  """Optimized model loading for Phi-3-mini."""
344
  self.model = AutoModelForCausalLM.from_pretrained(
345
  model_path,
346
- torch_dtype=torch.float16, # Use float16 to save memory
347
  device_map="auto", # Let transformers decide placement
348
  trust_remote_code=True,
349
  low_cpu_mem_usage=True,
 
315
  model_path,
316
  quantization_config=quant_config,
317
  device_map="auto",
318
+ dtype=torch.float16,
319
  trust_remote_code=True,
320
  low_cpu_mem_usage=True,
321
  token=hf_token
 
343
  """Optimized model loading for Phi-3-mini."""
344
  self.model = AutoModelForCausalLM.from_pretrained(
345
  model_path,
346
+ dtype=torch.float16, # Use float16 to save memory
347
  device_map="auto", # Let transformers decide placement
348
  trust_remote_code=True,
349
  low_cpu_mem_usage=True,