Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Hard-coded configs cause training and evaluation pipelines to fail #19

Open
bgereke opened this issue Nov 18, 2024 · 0 comments
Open

Comments

@bgereke
Copy link

bgereke commented Nov 18, 2024

Training Pipeline

~/LLM-Engineers-Handbook/llm_engineering/model/finetuning/finetune.py has hard-coded config on line 153:

dataset = load_dataset(f"{dataset_huggingface_workspace}/llmtwin-dpo", split="train")
if is_dummy:
    dataset = dataset.select(range(400)) # this is the hard-coded line

This causes the training pipeline to fail w/ fine-tuning_type = dpo because the preference train dataset only has 113 samples w/ the current default configs.

Evaluation Pipeline

~/LLM-Engineers-Handbook/llm_engineering/model/evaluation/evaluate.py has hard-coded config on line 202:

model_ids = [
    check_if_huggingface_model_exists(
        f"{MODEL_HUGGINGFACE_WORKSPACE}/TwinLlama-3.1-8B", default_value="mlabonne/TwinLlama-3.1-8B"
    ),
    check_if_huggingface_model_exists(
        f"{MODEL_HUGGINGFACE_WORKSPACE}/TwinLlama-3.1-8B-DPO", default_value="mlabonne/TwinLlama-3.1-8B-DPO"
    ),
    "meta-llama/Meta-Llama-3.1-8B-Instruct", # this is the hard-coded line
]

It appears Meta may have changed the name of "meta-llama/Meta-Llama-3.1-8B-Instruct". Also, this model name is inconsistent with the base model used in SFT fine-tuning on line 271 of ~/LLM-Engineers-Handbook/llm_engineering/model/finetuning/finetune.py:

if args.finetuning_type == "sft":
      print("Starting SFT training...")  # noqa
      base_model_name = "meta-llama/Meta-Llama-3.1-8B" # this is the hard-coded line

Currently, the training pipeline succeeds w/ fine-tuning_type = sft`, but the evaluation pipeline fails when attempting to access "meta-llama/Meta-Llama-3.1-8B-Instruct". Probably some of these configs should be exposed in the YAML or .env files to ensure consistency and make it easier to update naming conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant