Phi2 multipack (#1173)
* 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
This commit is contained in:
@@ -742,11 +742,11 @@ class ValidationCheckModelConfig(BaseValidation):
|
||||
|
||||
check_model_config(cfg, model_config)
|
||||
|
||||
def test_phi2_add_tokens_adapter(self):
|
||||
def test_phi_add_tokens_adapter(self):
|
||||
cfg = DictDefault(
|
||||
{"adapter": "qlora", "load_in_4bit": True, "tokens": ["<|imstart|>"]}
|
||||
)
|
||||
model_config = DictDefault({"model_type": "phi-msft"})
|
||||
model_config = DictDefault({"model_type": "phi"})
|
||||
|
||||
with pytest.raises(
|
||||
ValueError,
|
||||
@@ -759,7 +759,7 @@ class ValidationCheckModelConfig(BaseValidation):
|
||||
"adapter": "qlora",
|
||||
"load_in_4bit": True,
|
||||
"tokens": ["<|imstart|>"],
|
||||
"lora_modules_to_save": ["embed_tokens", "lm_head"],
|
||||
"lora_modules_to_save": ["embd.wte", "lm_head.linear"],
|
||||
}
|
||||
)
|
||||
|
||||
@@ -774,7 +774,7 @@ class ValidationCheckModelConfig(BaseValidation):
|
||||
"adapter": "qlora",
|
||||
"load_in_4bit": True,
|
||||
"tokens": ["<|imstart|>"],
|
||||
"lora_modules_to_save": ["embd.wte", "lm_head.linear"],
|
||||
"lora_modules_to_save": ["embed_tokens", "lm_head"],
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user