pmelnechuk commited on
Commit
e852058
verified
1 Parent(s): 97dea46

prueba solucion carlos

Browse files
Files changed (1) hide show
  1. src/model_load.py +2 -3
src/model_load.py CHANGED
@@ -9,14 +9,13 @@ from langchain.chains import LLMChain
9
  def load_model():
10
 
11
  model_name="tiiuae/Falcon3-10B-Instruct"
12
-
13
  # Cargar tokenizer y modelo de Hugging Face
14
  tokenizer = AutoTokenizer.from_pretrained(model_name)
15
  model = AutoModelForCausalLM.from_pretrained(model_name,
16
- torch_dtype=torch.float16,
17
  device_map="auto",
18
  quantization_config=BitsAndBytesConfig(load_in_8bit=True),
19
- llm_int8_enable_fp32_cpu_offload=True)
20
 
21
  # Crear pipeline de generaci贸n de texto
22
  text_generation_pipeline = pipeline(
 
9
  def load_model():
10
 
11
  model_name="tiiuae/Falcon3-10B-Instruct"
12
+ max_memory = {0: "23GB", "cpu": "30GB"}
13
  # Cargar tokenizer y modelo de Hugging Face
14
  tokenizer = AutoTokenizer.from_pretrained(model_name)
15
  model = AutoModelForCausalLM.from_pretrained(model_name,
 
16
  device_map="auto",
17
  quantization_config=BitsAndBytesConfig(load_in_8bit=True),
18
+ max_memory=max_memory)
19
 
20
  # Crear pipeline de generaci贸n de texto
21
  text_generation_pipeline = pipeline(