Skip to main content

Fine Tuning API Specifications

v1alpha1

#syntax=ghcr.io/sozercan/aikit:latest
apiVersion: # required. only v1alpha1 is supported at the moment
baseModel: # required. any base model from Huggingface. for unsloth, see for 4bit pre-quantized models: https://huggingface.co/unsloth
datasets:
- source: # required. this can be a Huggingface dataset repo or a URL pointing to a JSON file
type: # required. can be "alpaca". only alpaca is supported at the moment
config:
unsloth:
packing: # optional. defaults to false. can make training 5x faster for short sequences.
maxSeqLength: # optional. defaults to 2048
loadIn4bit: # optional. defaults to true
batchSize: # optional. default to 2
gradientAccumulationSteps: # optional. defaults to 4
warmupSteps: # optional. defaults to 10
maxSteps: # optional. defaults to 60
learningRate: # optional. defaults to 0.0002
loggingSteps: # optional. defaults to 1
optimizer: # optional. defaults to adamw_8bit
weightDecay: # optional. defaults to 0.01
lrSchedulerType: # optional. defaults to linear
seed: # optional. defaults to 42
output:
quantize: # optional. defaults to q4_k_m. for unsloth, see for allowed quantization methods: https://github.com/unslothai/unsloth/wiki#saving-to-gguf.
name: # optional. defaults to "aikit-model"

Example:

#syntax=ghcr.io/sozercan/aikit:latest
apiVersion: v1alpha1
baseModel: unsloth/mistral-7b-instruct-v0.2-bnb-4bit
datasets:
- source: yahma/alpaca-cleaned
type: alpaca
config:
unsloth:
packing: false
maxSeqLength: 2048
loadIn4bit: true
batchSize: 2
gradientAccumulationSteps: 4
warmupSteps: 10
maxSteps: 60
learningRate: 0.0002
loggingSteps: 1
optimizer: adamw_8bit
weightDecay: 0.01
lrSchedulerType: linear
seed: 42
output:
quantize: q4_k_m
name: model