소스 검색

Update utils_llama.py

Allen 1 년 전
부모
커밋
0993102a8e
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      research/long-context-llama/H2O/utils_llama.py

+ 2 - 1
research/long-context-llama/H2O/utils_llama.py

@@ -166,7 +166,8 @@ class H2OLlamaAttention(nn.Module):
         past_key_value = getattr(self, "past_key_value", past_key_value)
         cos, sin = self.rotary_emb(value_states, position_ids)
 
-        print(position_ids)
+        if self.layer_idx == 0:
+            print(position_ids)