Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/zeroband/models/llama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Copyright (c) Meta Platforms, Inc. All Rights Reserved.


import contextlib

Check failure on line 14 in src/zeroband/models/llama/model.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

src/zeroband/models/llama/model.py:14:8: F401 `contextlib` imported but unused
from dataclasses import dataclass
from typing import Optional, Tuple

Expand All @@ -21,7 +21,7 @@
from zeroband.config import AttnFnType

from torch.nn.attention.flex_attention import create_block_mask, flex_attention, BlockMask, _DEFAULT_SPARSE_BLOCK_SIZE
from torch.nn.attention import SDPBackend, sdpa_kernel

Check failure on line 24 in src/zeroband/models/llama/model.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

src/zeroband/models/llama/model.py:24:32: F401 `torch.nn.attention.SDPBackend` imported but unused

Check failure on line 24 in src/zeroband/models/llama/model.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F401)

src/zeroband/models/llama/model.py:24:44: F401 `torch.nn.attention.sdpa_kernel` imported but unused

from zeroband.utils.mfu_tracker import FlopCounter

Expand Down Expand Up @@ -143,8 +143,8 @@

xq_out = torch.view_as_real(xq_ * freqs_cis).flatten(3)
xk_out = torch.view_as_real(xk_ * freqs_cis).flatten(3)
flop_counter.track_binary(xq_, freqs_cis)
flop_counter.track_binary(xk_, freqs_cis)
# flop_counter.track_binary(xq_, freqs_cis)
# flop_counter.track_binary(xk_, freqs_cis)

return xq_out.type_as(xq), xk_out.type_as(xk)

Expand Down
Loading