chenjoya commited on
Commit
4e3ae76
·
1 Parent(s): 89fef2f

use flashattn2

Browse files
Files changed (1) hide show
  1. demo/infer.py +1 -1
demo/infer.py CHANGED
@@ -35,7 +35,7 @@ class LiveCCDemoInfer:
35
  self.model = Qwen2VLForConditionalGeneration.from_pretrained(
36
  model_path, torch_dtype="auto",
37
  device_map=f'cuda:{device_id}',
38
- # attn_implementation='flash_attention_2'
39
  )
40
  self.processor = AutoProcessor.from_pretrained(model_path, use_fast=False)
41
  self.streaming_eos_token_id = self.processor.tokenizer(' ...').input_ids[-1]
 
35
  self.model = Qwen2VLForConditionalGeneration.from_pretrained(
36
  model_path, torch_dtype="auto",
37
  device_map=f'cuda:{device_id}',
38
+ attn_implementation='flash_attention_2'
39
  )
40
  self.processor = AutoProcessor.from_pretrained(model_path, use_fast=False)
41
  self.streaming_eos_token_id = self.processor.tokenizer(' ...').input_ids[-1]