Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk committed Feb 8, 2024
1 parent ade1497 commit 814d04d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Configure Python version
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
architecture: x64

- name: black
Expand Down
8 changes: 5 additions & 3 deletions curated_transformers/models/falcon/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ def __init__(
n_key_value_heads=attention_config.n_key_value_heads,
),
rotary_embeds=rotary_embeds,
qkv_mode=QkvMode.MERGED_SPLIT_AFTER
if attention_config.n_key_value_heads == 1
else QkvMode.MERGED_SPLIT_BEFORE,
qkv_mode=(
QkvMode.MERGED_SPLIT_AFTER
if attention_config.n_key_value_heads == 1
else QkvMode.MERGED_SPLIT_BEFORE
),
use_bias=attention_config.use_bias,
device=device,
)
Expand Down
4 changes: 1 addition & 3 deletions curated_transformers/tests/models/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ class JITMethod(Enum):
TorchCompile = 1
TorchScriptTrace = 2

def convert(
self, model: Module, with_torch_sdp: bool, *args
) -> Tuple[
def convert(self, model: Module, with_torch_sdp: bool, *args) -> Tuple[
Union[Module, torch.ScriptModule],
Callable[[Union[ModelOutput, Dict[str, torch.Tensor]]], Tensor],
]:
Expand Down
6 changes: 2 additions & 4 deletions curated_transformers/tokenizers/legacy/legacy_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@ def _convert_strings(
@abstractmethod
def _decode(
self, input: Iterable[Iterable[int]], skip_special_pieces: bool
) -> List[str]:
...
) -> List[str]: ...

@abstractmethod
def _encode(self, input: Iterable[MergedInputChunks]) -> PiecesWithIds:
...
def _encode(self, input: Iterable[MergedInputChunks]) -> PiecesWithIds: ...


class AddBosEosPreEncoder(PreEncoder):
Expand Down

0 comments on commit 814d04d

Please sign in to comment.