Skip to content

Commit 0339b93

Browse files
committed
Merge remote-tracking branch 'upstream/main' into vision-model
2 parents 07ad9b3 + bb92699 commit 0339b93

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

build/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,13 @@ RUN --mount=type=cache,target=/home/${USER}/.cache/pip,uid=${USER_UID} \
154154
# fms_acceleration_peft = PEFT-training, e.g., 4bit QLoRA
155155
# fms_acceleration_foak = Fused LoRA and triton kernels
156156
# fms_acceleration_aadp = Padding-Free Flash Attention Computation
157+
# fms_acceleration_moe = Parallelized Mixture of Experts
157158
RUN if [[ "${ENABLE_FMS_ACCELERATION}" == "true" ]]; then \
158159
python -m pip install --user "$(head bdist_name)[fms-accel]"; \
159160
python -m fms_acceleration.cli install fms_acceleration_peft; \
160161
python -m fms_acceleration.cli install fms_acceleration_foak; \
161162
python -m fms_acceleration.cli install fms_acceleration_aadp; \
163+
python -m fms_acceleration.cli install fms_acceleration_moe; \
162164
fi
163165

164166
RUN if [[ "${ENABLE_AIM}" == "true" ]]; then \

tuning/config/configs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
@dataclass
3737
class ModelArguments:
38-
model_name_or_path: Optional[str] = field(default="facebook/opt-125m")
38+
model_name_or_path: Optional[str] = field(default=None)
3939
use_flash_attn: bool = field(
4040
default=True,
4141
metadata={"help": "Use Flash attention v2 from transformers, default is True"},

tuning/sft_trainer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ def train(
134134
train_args, logger = set_log_level(train_args, "sft_trainer_train")
135135

136136
# Validate parameters
137+
if (not isinstance(model_args.model_name_or_path, str)) or (
138+
model_args.model_name_or_path == ""
139+
):
140+
raise ValueError(
141+
"model_name_or_path has to be a string containing a valid"
142+
+ " HuggingFace Hub model name or the path to a checkpoint folder"
143+
)
144+
137145
if (not isinstance(train_args.num_train_epochs, (float, int))) or (
138146
train_args.num_train_epochs <= 0
139147
):

0 commit comments

Comments
 (0)