update model_worker.py
Browse files227 unmodified lines22822923023123123223323490 unmodified lines325326327328328329331330331332120 unmodified lines453454455456457458459227 unmodified lines ) self.heart_beat_thread.start()
@spaces.GPU @spaces.GPU(duration=120) def import_flash_attn(self): try: import flash_attn90 unmodified lines "queue_length": self.get_queue_length(), }
@spaces.GPU @torch.inference_mode() def generate_stream(self, params):
system_message = params["prompt"][0]["content"] send_messages = params["prompt"][1:] max_input_tiles = params["max_input_tiles"]120 unmodified lines ) self.model.system_message = old_system_message
@spaces.GPU(duration=120) def generate_stream_gate(self, params): try: for x in self.generate_stream(params):model_worker.py+2-3