Skip to content

Commit

Permalink
feat: Add default configmaps - Part 5 (#346)
Browse files Browse the repository at this point in the history
**Reason for Change**:
Provide a default configmaps in the helm chart.

**Notes for Reviewers**:
An env variable release namespace is passed in for future use so that
the controller will be able to find where the configmap is deployed.

---------

Signed-off-by: Ishaan Sehgal <ishaanforthewin@gmail.com>
  • Loading branch information
ishaansehgal99 authored Apr 10, 2024
1 parent 64152d4 commit f88b529
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/kaito/workspace/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ rules:
- apiGroups: [ "" ]
resources: [ "pods"]
verbs: ["get","list","watch","create", "update", "patch" ]
- apiGroups: [ "" ]
resources: [ "configmaps" ]
verbs: [ "get","list","watch" ]
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["get","list","watch","update", "patch"]
Expand Down
40 changes: 40 additions & 0 deletions charts/kaito/workspace/templates/lora-params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: lora-params
namespace: {{ .Release.Namespace }}
data:
training_config.yaml: |
training_config:
ModelConfig:
torch_dtype: "bfloat16"
local_files_only: true
device_map: "auto"
TokenizerParams:
padding: true
truncation: true
QuantizationConfig:
load_in_4bit: false
LoraConfig:
r: 16
lora_alpha: 32
target_modules: "query_key_value"
lora_dropout: 0.05
bias: "none"
TrainingArguments:
output_dir: "."
num_train_epochs: 4
auto_find_batch_size: true
ddp_find_unused_parameters: false
save_strategy: "epoch"
DatasetConfig:
shuffle_dataset: true
train_test_split: 1
DataCollator:
mlm: true
43 changes: 43 additions & 0 deletions charts/kaito/workspace/templates/qlora-params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: qlora-params
namespace: {{ .Release.Namespace }}
data:
training_config.yaml: |
training_config:
ModelConfig:
torch_dtype: "bfloat16"
local_files_only: true
device_map: "auto"
TokenizerParams:
padding: true
truncation: true
QuantizationConfig:
load_in_4bit: true
bnb_4bit_quant_type: "nf4"
bnb_4bit_compute_dtype: "bfloat16"
bnb_4bit_use_double_quant: true
LoraConfig:
r: 16
lora_alpha: 32
target_modules: "query_key_value"
lora_dropout: 0.05
bias: "none"
TrainingArguments:
output_dir: "."
num_train_epochs: 4
auto_find_batch_size: true
ddp_find_unused_parameters: false
save_strategy: "epoch"
DatasetConfig:
shuffle_dataset: true
train_test_split: 1
DataCollator:
mlm: true

0 comments on commit f88b529

Please sign in to comment.