-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support for batched generation #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
857dbcf
tests: test beam search results
anmorgunov 111dd9f
dev: resolve lint issues
anmorgunov 6dd518a
dev: develop batched beam
anmorgunov 312743f
dev: seems to be working somewhat
anmorgunov 2dc2a4a
dev: now def seems to work
anmorgunov aab65e3
dev: harder beam script
anmorgunov d092a5d
dev: pad the noSM inputs
anmorgunov ca521bf
tests: add pharma based test
anmorgunov 48ffdae
dev: upd run script
anmorgunov cf81372
dev: patch the colection of non-batched
anmorgunov 081469a
dev: expose both copies vec and nonvec
anmorgunov 6fd7624
dev: add vec nonvec comparison test
anmorgunov 1cd492e
dev: try s4.5
anmorgunov 7744962
dev: tr2
anmorgunov b99fb42
tests: more vec non vec tests
anmorgunov cca3411
patch test
anmorgunov 9da296d
patch more tests
anmorgunov e26772a
dev: switch to vectorized
anmorgunov f243ff6
dev: parity achieved LMAO
anmorgunov 2d64307
dev: upd script
anmorgunov 34e3d5d
dev: higher beam for last test
anmorgunov f1eefea
dev: remove the slow one
anmorgunov aeee38d
dev: add b50 test
anmorgunov 4024584
dev: make sure the reusable tensors are re-initialized
anmorgunov d991eb2
dev: make sure the reusable tensors are re-initialized
anmorgunov bf47255
dev: try v2
anmorgunov bf4983b
dev: drop old batch and clean tests
anmorgunov 9b99b76
dev: don't even import it
anmorgunov 9a6eedc
dev: yet another fix and dont run CI on pushes to non-master
anmorgunov 6cd8ba4
dev: fix indentation for last test
anmorgunov 9b30992
dev: that's it folks, sonnet 4.5
anmorgunov 1fbbaeb
dev: infer dtypes for fp16
anmorgunov d1d6662
feat: well one eternity later, is it working
anmorgunov 6461c98
clean up
anmorgunov 14afc08
rename for clarity
anmorgunov 04622e7
respond to rabbit's comments
anmorgunov 4e65b74
remove unused code
anmorgunov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,57 @@ | ||
| name: Linting | ||
|
|
||
| on: [push, pull_request] | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Install uv | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cache/uv | ||
| ~/.uv | ||
| .venv | ||
| key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv- | ||
|
|
||
| - name: Create and activate virtual environment | ||
| run: | | ||
| uv venv | ||
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run ruff (linter) | ||
| run: ruff check | ||
|
|
||
| - name: Run ruff (formatter) | ||
| run: ruff format --check | ||
|
|
||
| - name: Run mypy | ||
| run: mypy . | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cache/uv | ||
| ~/.uv | ||
| .venv | ||
| key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv- | ||
|
|
||
| - name: Create and activate virtual environment | ||
| run: | | ||
| uv venv | ||
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run ruff (linter) | ||
| run: ruff check | ||
|
|
||
| - name: Run ruff (formatter) | ||
| run: ruff format --check | ||
|
|
||
| - name: Run mypy | ||
| run: mypy . | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,51 @@ | ||
| name: Tests | ||
|
|
||
| on: [pull_request] | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - master | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.13' | ||
|
|
||
| - name: Install uv | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cache/uv | ||
| ~/.uv | ||
| .venv | ||
| key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv- | ||
|
|
||
| - name: Create and activate virtual environment | ||
| run: | | ||
| uv venv | ||
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run tests | ||
| run: pytest -v | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| - name: Install uv | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cache/uv | ||
| ~/.uv | ||
| .venv | ||
| key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-uv- | ||
|
|
||
| - name: Create and activate virtual environment | ||
| run: | | ||
| uv venv | ||
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync | ||
|
|
||
| - name: Run tests | ||
| run: pytest -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,5 @@ debug* | |
| slurm*.out | ||
| submit*.sh | ||
| qual.sh | ||
|
|
||
| collectors/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update deprecated GitHub Action version.
Same as testing.yml:
actions/setup-python@v4is outdated. Update to v5 for better Python 3.11+ support.Apply this diff:
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.7)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents