Skip to content

Commit

Permalink
More lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fduwjj committed Sep 27, 2024
1 parent 35157cd commit a99aaef
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 22 deletions.
4 changes: 0 additions & 4 deletions torchtitan/models/llama/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
# Copyright (c) Meta Platforms, Inc. All Rights Reserved.


from dataclasses import dataclass
from typing import Optional, Tuple

import torch
import torch.nn.functional as F
from torch import nn
from torchtitan.models.types import ModelArgs
from torchtitan.modules.attention import Attention
Expand Down
4 changes: 1 addition & 3 deletions torchtitan/models/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@


from dataclasses import dataclass
from typing import Callable, List, Optional, Tuple
from typing import Callable, List, Optional

import torch
import torch.nn.functional as F
from torch import nn


Expand Down
9 changes: 1 addition & 8 deletions torchtitan/modules/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@
# Copyright (c) Meta Platforms, Inc. All Rights Reserved.


from dataclasses import dataclass
from typing import Optional, Tuple

import torch
import torch.nn.functional as F
from torch import nn
from torchtitan.models.types import ModelArgs
from torchtitan.modules.attention_utils import (
apply_rotary_emb,
repeat_kv,
reshape_for_broadcast,
)
from torchtitan.modules.attention_utils import apply_rotary_emb, repeat_kv


class Attention(nn.Module):
Expand Down
5 changes: 1 addition & 4 deletions torchtitan/modules/attention_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
# Copyright (c) Meta Platforms, Inc. All Rights Reserved.


from dataclasses import dataclass
from typing import Optional, Tuple
from typing import Tuple

import torch
import torch.nn.functional as F
from torch import nn


def reshape_for_broadcast(freqs_cis: torch.Tensor, x: torch.Tensor) -> torch.Tensor:
Expand Down
4 changes: 1 addition & 3 deletions torchtitan/modules/feed_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
# Copyright (c) Meta Platforms, Inc. All Rights Reserved.


from dataclasses import dataclass
from typing import Callable, Optional, Tuple
from typing import Callable, Optional

import torch
import torch.nn.functional as F
from torch import nn

Expand Down

0 comments on commit a99aaef

Please sign in to comment.