Spaces:
Running
Running
prueba enable cpu offload
Browse files- src/model_load.py +2 -1
src/model_load.py
CHANGED
@@ -18,7 +18,8 @@ def load_model():
|
|
18 |
"transformer.h.0": "cpu", # Por ejemplo, mover ciertas capas al CPU
|
19 |
"transformer.h.1": "cuda", # Mantener otras capas en la GPU
|
20 |
},
|
21 |
-
quantization_config=BitsAndBytesConfig(load_in_8bit=True)
|
|
|
22 |
|
23 |
# Crear pipeline de generaci贸n de texto
|
24 |
text_generation_pipeline = pipeline(
|
|
|
18 |
"transformer.h.0": "cpu", # Por ejemplo, mover ciertas capas al CPU
|
19 |
"transformer.h.1": "cuda", # Mantener otras capas en la GPU
|
20 |
},
|
21 |
+
quantization_config=BitsAndBytesConfig(load_in_8bit=True),
|
22 |
+
llm_int8_enable_fp32_cpu_offload=True)
|
23 |
|
24 |
# Crear pipeline de generaci贸n de texto
|
25 |
text_generation_pipeline = pipeline(
|