You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Copyright (c) ZenML GmbH 2024. All rights reserved.
4
+
#
5
+
# Licensed under the Apache License, Version 2.0 (the "License");
6
+
# you may not use this file except in compliance with the License.
7
+
# You may obtain a copy of the License at
8
+
#
9
+
# http://www.apache.org/licenses/LICENSE-2.0
10
+
#
11
+
# Unless required by applicable law or agreed to in writing, software
12
+
# distributed under the License is distributed on an "AS IS" BASIS,
13
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+
# See the License for the specific language governing permissions and
15
+
# limitations under the License.
16
+
#
17
+
18
+
model:
19
+
name: llm-peft-phi-3.5-mini-instruct-cpu
20
+
description: "Fine-tune Phi-3.5-mini-instruct on CPU."
21
+
tags:
22
+
- llm
23
+
- peft
24
+
- phi-3.5
25
+
- cpu
26
+
version: 100_steps
27
+
28
+
settings:
29
+
docker:
30
+
parent_image: pytorch/pytorch:2.2.2-runtime
31
+
requirements: requirements.txt
32
+
python_package_installer: uv
33
+
python_package_installer_args:
34
+
system: null
35
+
apt_packages:
36
+
- git
37
+
environment:
38
+
MKL_SERVICE_FORCE_INTEL: "1"
39
+
# Explicitly disable MPS
40
+
PYTORCH_ENABLE_MPS_FALLBACK: "0"
41
+
PYTORCH_MPS_HIGH_WATERMARK_RATIO: "0.0"
42
+
43
+
parameters:
44
+
# Uses a smaller model for CPU training
45
+
base_model_id: microsoft/Phi-3.5-mini-instruct
46
+
use_fast: False
47
+
load_in_4bit: False
48
+
load_in_8bit: False
49
+
cpu_only: True # Enable CPU-only mode
50
+
# Extra conservative dataset size for CPU
51
+
max_train_samples: 50
52
+
max_val_samples: 10
53
+
max_test_samples: 5
54
+
system_prompt: |
55
+
Given a target sentence construct the underlying meaning representation of the input sentence as a single function with attributes and attribute values.
56
+
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'].
57
+
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']
58
+
59
+
60
+
steps:
61
+
prepare_data:
62
+
parameters:
63
+
dataset_name: gem/viggo
64
+
# These settings are now defined at the pipeline level
65
+
# max_train_samples: 100
66
+
# max_val_samples: 20
67
+
# max_test_samples: 10
68
+
69
+
finetune:
70
+
parameters:
71
+
max_steps: 25# Further reduced steps for CPU training
72
+
eval_steps: 5# More frequent evaluation
73
+
bf16: False # Disable bf16 for CPU compatibility
74
+
per_device_train_batch_size: 1# Smallest batch size for CPU
75
+
gradient_accumulation_steps: 2# Reduced for CPU
76
+
optimizer: "adamw_torch"# Use standard AdamW rather than 8-bit for CPU
0 commit comments