Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ fms-accel = ["fms-acceleration>=0.6.2"]
gptq-dev = ["auto_gptq>0.4.2", "optimum>=1.15.0"]
mamba = ["mamba_ssm[causal-conv1d]>=2.0.0,<3.0.0"]
scanner-dev = ["HFResourceScanner>=0.1.0"]
fms-accel-all = [
"fms-acceleration>=0.6.2",
"fms-acceleration-peft",
"fms-acceleration-foak",
"fms-acceleration-aadp",
"fms-acceleration-moe",
"fms-acceleration-odm"
]

[tool.setuptools.packages.find]
exclude = ["tests", "tests.*"]
Expand Down
33 changes: 16 additions & 17 deletions tests/acceleration/test_acceleration_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ def test_framework_raises_if_used_with_missing_package():
ValueError, match="No acceleration framework package found."
):
sft_trainer.train(
MODEL_ARGS,
DATA_ARGS,
TRAIN_ARGS,
PEFT_LORA_ARGS,
copy.deepcopy(MODEL_ARGS),
copy.deepcopy(DATA_ARGS),
copy.deepcopy(TRAIN_ARGS),
copy.deepcopy(PEFT_LORA_ARGS),
quantized_lora_config=quantized_lora_config,
)

Expand Down Expand Up @@ -320,9 +320,9 @@ def test_framework_raises_due_to_invalid_arguments(
with pytest.raises(exception, match=exception_msg):
sft_trainer.train(
model_args,
DATA_ARGS,
copy.deepcopy(DATA_ARGS),
train_args,
peft_config,
copy.deepcopy(peft_config),
quantized_lora_config=quantized_lora_config,
)

Expand Down Expand Up @@ -379,7 +379,7 @@ def test_framework_initialized_properly_peft(
train_args = copy.deepcopy(TRAIN_ARGS)
train_args.output_dir = tempdir
train_args.save_strategy = "no"
train_args.fp16 = True
train_args.bf16 = True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp16 upcasting is not allowed

peft_args = copy.deepcopy(PEFT_LORA_ARGS)
peft_args.target_modules = ["q_proj", "k_proj"]

Expand All @@ -395,7 +395,7 @@ def test_framework_initialized_properly_peft(
with instantiate_model_patcher():
sft_trainer.train(
model_args,
DATA_ARGS,
copy.deepcopy(DATA_ARGS),
train_args,
peft_args,
quantized_lora_config=quantized_lora_config,
Expand Down Expand Up @@ -430,7 +430,7 @@ def test_framework_initialized_properly_foak():
train_args = copy.deepcopy(TRAIN_ARGS)
train_args.output_dir = tempdir
train_args.save_strategy = "no"
train_args.fp16 = True
train_args.bf16 = True
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same reason as above

peft_args = copy.deepcopy(PEFT_LORA_ARGS)
peft_args.target_modules = ["q_proj", "k_proj"]

Expand Down Expand Up @@ -465,7 +465,7 @@ def test_framework_initialized_properly_foak():
with instantiate_model_patcher():
sft_trainer.train(
model_args,
DATA_ARGS,
copy.deepcopy(DATA_ARGS),
train_args,
peft_args,
quantized_lora_config=quantized_lora_config,
Expand Down Expand Up @@ -613,8 +613,8 @@ def test_error_raised_with_paddingfree_and_flash_attn_disabled():
model_args.use_flash_attn = False
sft_trainer.train(
model_args,
DATA_ARGS,
TRAIN_ARGS,
copy.deepcopy(DATA_ARGS),
copy.deepcopy(TRAIN_ARGS),
attention_and_distributed_packing_config=attention_and_distributed_packing_config,
)

Expand All @@ -637,8 +637,8 @@ def test_error_raised_with_multipack_and_paddingfree_disabled():
model_args = copy.deepcopy(MODEL_ARGS)
sft_trainer.train(
model_args,
DATA_ARGS,
TRAIN_ARGS,
copy.deepcopy(DATA_ARGS),
copy.deepcopy(TRAIN_ARGS),
attention_and_distributed_packing_config=attention_and_distributed_packing_config,
)

Expand All @@ -664,7 +664,7 @@ def test_error_raised_with_packing_and_paddingfree_enabled():
train_args.packing = True
sft_trainer.train(
model_args,
DATA_ARGS,
copy.deepcopy(DATA_ARGS),
train_args,
attention_and_distributed_packing_config=attention_and_distributed_packing_config,
)
Expand Down Expand Up @@ -693,7 +693,6 @@ def test_error_raised_with_fused_lora_enabled_without_quantized_argument():
train_args = copy.deepcopy(TRAIN_ARGS)
train_args.output_dir = tempdir
train_args.save_strategy = "no"
train_args.fp16 = True
peft_args = copy.deepcopy(PEFT_LORA_ARGS)
peft_args.target_modules = ["q_proj", "k_proj"]

Expand All @@ -713,7 +712,7 @@ def test_error_raised_with_fused_lora_enabled_without_quantized_argument():
with instantiate_model_patcher():
sft_trainer.train(
model_args,
DATA_ARGS,
copy.deepcopy(DATA_ARGS),
train_args,
peft_args,
quantized_lora_config=None,
Expand Down
1 change: 1 addition & 0 deletions tests/artifacts/language_models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
### Constants used for model path
PREDEFINED_MODEL_PATH = os.path.join(os.path.dirname(__file__))
MAYKEYE_TINY_LLAMA_CACHED = os.path.join(PREDEFINED_MODEL_PATH, "maykeye-tinyllama-v0")
TINYMIXTRAL_MOE = "Isotonic/TinyMixtral-4x248M-MoE"
Loading