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

Add phi-3 FT config option for local finetune #116

Merged
merged 2 commits into from
Jul 19, 2024
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
65 changes: 65 additions & 0 deletions llm-lora-finetuning/configs/phi3_finetune.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Apache Software License 2.0
#
# Copyright (c) ZenML GmbH 2024. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

model:
name: llm-peft-microsoft-phi-3
description: "Fine-tune `microsoft/Phi-3-mini-4k-instruct`."
tags:
- llm
- peft
- microsoft/Phi-3-mini-4k-instruct
version: 300_steps

settings:
docker:
parent_image: pytorch/pytorch:2.2.2-cuda11.8-cudnn8-runtime
requirements: requirements.txt
python_package_installer: uv
python_package_installer_args:
system: null
apt_packages:
- git
environment:
PJRT_DEVICE: CUDA
USE_TORCH_XLA: "false"
MKL_SERVICE_FORCE_INTEL: "1"

parameters:
base_model_id: microsoft/Phi-3-mini-4k-instruct
use_fast: False
load_in_4bit: True
system_prompt: |
Given a target sentence construct the underlying meaning representation of the input sentence as a single function with attributes and attribute values.
This function should describe the target string accurately and the function must be one of the following ['inform', 'request', 'give_opinion', 'confirm', 'verify_attribute', 'suggest', 'request_explanation', 'recommend', 'request_attribute'].
The attributes must be one of the following: ['name', 'exp_release_date', 'release_year', 'developer', 'esrb', 'rating', 'genres', 'player_perspective', 'has_multiplayer', 'platforms', 'available_on_steam', 'has_linux_release', 'has_mac_release', 'specifier']


steps:
prepare_data:
parameters:
dataset_name: gem/viggo

finetune:
parameters:
max_steps: 300
eval_steps: 30
bf16: True

promote:
parameters:
metric: rouge2
target_stage: staging
1 change: 1 addition & 0 deletions llm-lora-finetuning/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ accelerate>=0.30.0
urllib3<2
zenml
torch>=2.2.0
sentencepiece
Loading