Spaces:
Paused
Paused
Robin Genolet commited on
Commit ·
664ba56
1
Parent(s): 4ac6668
fix: memoization
Browse files12 unmodified lines13141516171819202112 unmodified linesloaded_model_name = ""def get_llm_response(model_name_or_path, temperature, do_sample, top_p, top_k, max_new_tokens, repetition_penalty, formatted_prompt):if loaded_model != model_name_or_path:global loaded_modelglobal loaded_model_nameloaded_model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto",trust_remote_code=False,12 unmodified lines131415161718192021222312 unmodified linesloaded_model_name = ""def get_llm_response(model_name_or_path, temperature, do_sample, top_p, top_k, max_new_tokens, repetition_penalty, formatted_prompt):global loaded_modelglobal loaded_model_nameif loaded_model != model_name_or_path:loaded_model = AutoModelForCausalLM.from_pretrained(model_name_or_path,device_map="auto",trust_remote_code=False,
utils/epfl_meditron_utils.py+4-2