Skip to content

Commit

Permalink
reduce batch size for larger context len and udpate test to check mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
winglian committed Jan 18, 2024
1 parent bee8f8c commit e6e67dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/patched/test_llama_s2_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_lora_s2_attn(self, temp_dir):
},
],
"num_epochs": 2,
"micro_batch_size": 8,
"micro_batch_size": 1,
"gradient_accumulation_steps": 1,
"output_dir": temp_dir,
"learning_rate": 0.00001,
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_fft_s2_attn(self, temp_dir):
},
],
"num_epochs": 2,
"micro_batch_size": 8,
"micro_batch_size": 1,
"gradient_accumulation_steps": 1,
"output_dir": temp_dir,
"learning_rate": 0.00001,
Expand Down
6 changes: 5 additions & 1 deletion tests/utils/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def test_cfg_throws_error_with_s2_attention_and_sample_packing(self):
"axolotl.utils.models.load_model_config"
) as mocked_load_model_config:
mocked_load_model_config.return_value = {}
with pytest.raises(ValueError):
with pytest.raises(ValueError) as exc:
# Should error before hitting tokenizer, so we pass in an empty str
load_model(cfg, tokenizer="")
assert (
"shifted-sparse attention does not currently support sample packing"
in exc.value.message
)

0 comments on commit e6e67dd

Please sign in to comment.