瀏覽代碼

Update generation.py

Allen 1 年之前
父節點
當前提交
1245dcae81
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      research/long-context-llama/H2O/generation.py

+ 2 - 2
research/long-context-llama/H2O/generation.py

@@ -102,8 +102,8 @@ if __name__ == '__main__':
                 return_dict_in_generate=True, output_scores=True,
             )
 
-            if enable_h2o_generation:
-                self._clean_cache()
+            # if args.enable_h2o_generation:
+            #     self._clean_cache()
 
             tokens = tokenizer.convert_ids_to_tokens(output_sequences['sequences'].squeeze(0))[len(input_ids[0]):]
             logprobs = [logits.log_softmax(dim=-1).max().item() for logits in output_sequences['scores']]