From 1257b8849e45e0c0c9f88d635ee095fe7ce79c94 Mon Sep 17 00:00:00 2001 From: "Stuart A. Siegel" <12914116+ssiegel95@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:21:54 -0500 Subject: [PATCH] example of using kfto to do a finetuneing --- services/finetuning/examples/kfto_job.yaml | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 services/finetuning/examples/kfto_job.yaml diff --git a/services/finetuning/examples/kfto_job.yaml b/services/finetuning/examples/kfto_job.yaml new file mode 100644 index 00000000..39faed43 --- /dev/null +++ b/services/finetuning/examples/kfto_job.yaml @@ -0,0 +1,54 @@ +apiVersion: "kubeflow.org/v1" +kind: PyTorchJob +metadata: + name: tsfmfinetuning-job + namespace: default + annotations: + sidecar.istio.io/inject: "false" +spec: + pytorchReplicaSpecs: + Master: + replicas: 1 + restartPolicy: Never + template: + spec: + containers: + - name: pytorch + image: localhost:5001/tsfmfinetuning:latest + imagePullPolicy: Always + volumeMounts: + - name: volv + mountPath: /data + resources: + requests: + memory: 8Gi + cpu: 1000m + limits: + memory: 12Gi + cpu: 1500m + env: + - name: TSFM_ALLOW_LOAD_FROM_HF_HUB + value: "0" + - name: TSFM_MODEL_DIR + value: "/data" + command: + - "python" + - "tsfmfinetuning/ftmain.py" + - "--payload" + - "/data/ftpayload.json" + - "--target_dir" + - "/data/finetuned-models" + - "--model_name" + - "finetuned_from_kfto" + - "--config_file" + - "/data/default_config.yml" + - "--model_arch" + - "ttm" + - "--task_type" + - "forecasting" + volumes: + - name: volv + persistentVolumeClaim: + claimName: local-path-pvc + +