Skip to content

Commit

Permalink
fix: remove flash attention
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jun 18, 2024
1 parent 16cc58d commit 61e4a5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ WORKDIR /

COPY pyproject.toml poetry.lock ./

RUN apt update
RUN apt install -y curl
RUN curl -sSL https://install.python-poetry.org | python -
RUN python -m venv $POETRY_HOME
RUN $POETRY_HOME/bin/pip install poetry
RUN poetry install --without dev --no-root


Expand Down
6 changes: 1 addition & 5 deletions capgen/transcriber/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,7 @@ def __init__(
'num_workers': number_of_workers,
}

try:
self.model = WhisperModel(**model_parameters, flash_attention=True)

except Exception: # pylint: disable=broad-except
self.model = WhisperModel(**model_parameters)
self.model = WhisperModel(**model_parameters)

async def transcribe(self, file: str | BinaryIO, caption_format: str) -> str | None:
"""
Expand Down

0 comments on commit 61e4a5d

Please sign in to comment.