* phi2 multipack * update validation and examples for phi * more updates to phi examples * make sure to use the correct collator for phi multipack * phi needs attention mask now for multipack * if the special token already exists in the tokenizer, don't require in lora modules to save * fix qlora yml for phi, fix phi test validation * test qlora too * make sure flash attention is enabled for the test * don't use remote code for phi anymore * reduce sequence len for sample packing phi
13 lines
298 B
Python
13 lines
298 B
Python
"""
|
|
Patches to support multipack for phi2
|
|
"""
|
|
import transformers
|
|
|
|
from axolotl.monkeypatch.utils import get_unpad_data
|
|
|
|
|
|
def replace_phi_attn_with_multipack_flash_attn():
|
|
transformers.models.phi.modeling_phi._get_unpad_data = ( # pylint: disable=protected-access
|
|
get_unpad_data
|
|
)
|