Skip to content

Commit

Permalink
Debug Mbart
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoImhof committed Dec 18, 2024
1 parent b2979ce commit dc8af55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 68 deletions.
69 changes: 1 addition & 68 deletions .github/workflows/tests_torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,6 @@ on:
workflow_dispatch:

jobs:
check_code_quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
- name: Install
run: |
pip install torch==2.3
pip install .[quality]
- name: Check Quality and Repo Consistency
run: |
make quality
test_adapter_methods:
timeout-minutes: 60
runs-on: ubuntu-latest
Expand All @@ -66,51 +46,4 @@ jobs:
pip install .[sklearn,testing,sentencepiece]
- name: Test
run: |
make test-adapter-methods
test_adapter_models:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install
run: |
pip install torch==2.3
pip install .[sklearn,testing,sentencepiece]
- name: Test
run: |
make test-adapter-models
test_adapter_examples:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install
run: |
pip install torch==2.3
pip install .[sklearn,testing,sentencepiece]
pip install conllu seqeval
- name: Test Examples
run: |
make test-examples
python -m pytest tests/test_methods/test_mbart.py::Composition::test_parallel_training_lora -v -s --tb=long
2 changes: 2 additions & 0 deletions src/adapters/models/mbart/modeling_mbart.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def forward(
key_states, value_states, attention_mask = self.prefix_tuning(
key_states, value_states, hidden_states, attention_mask
)
print(f"query_states before: {query_states.shape}")
(query_states,) = adjust_tensors_for_parallel(key_states, query_states)
print(f"query_states after: {query_states.shape}")
bsz = query_states.size(0)

proj_shape = (bsz * self.num_heads, -1, self.head_dim)
Expand Down

0 comments on commit dc8af55

Please sign in to comment.