Spaces:
Sleeping
Sleeping
File size: 10,237 Bytes
910dadd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Oumi TrainingConfig (curated subset)",
"description": "Subset of oumi.core.configs.TrainingConfig supported by the config copilot. Generated by scripts/dump_oumi_schema.py from oumi 0.1.4.",
"type": "object",
"additionalProperties": false,
"required": [
"model",
"data",
"training"
],
"properties": {
"model": {
"type": "object",
"additionalProperties": false,
"properties": {
"model_name": {
"type": "string",
"description": "HF Hub id or local path of the base model (required)"
},
"model_max_length": {
"type": [
"integer",
"null"
],
"description": "Max sequence length; null lets the model default apply"
},
"torch_dtype_str": {
"type": "string",
"default": "float32",
"description": "Model dtype, e.g. \"auto\", \"bfloat16\", \"float16\", \"float32\""
},
"trust_remote_code": {
"type": "boolean",
"default": false,
"description": "Allow models with custom code from the Hub"
},
"chat_template": {
"type": [
"string",
"null"
],
"description": "Name of the chat template to apply; null uses the tokenizer default"
}
},
"required": [
"model_name"
]
},
"data": {
"type": "object",
"additionalProperties": false,
"required": [
"train"
],
"properties": {
"train": {
"type": "object",
"additionalProperties": false,
"properties": {
"pack": {
"type": "boolean",
"default": false,
"description": "Pack multiple short examples into each sequence"
},
"datasets": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"dataset_name": {
"type": "string",
"description": "Registered dataset name, HF Hub id, or format name for local files (required)"
},
"dataset_path": {
"type": [
"string",
"null"
],
"description": "Path to a local dataset file (e.g. a .jsonl), if not loading from the Hub"
},
"split": {
"type": "string",
"default": "train",
"description": "Dataset split to load, e.g. \"train\""
},
"sample_count": {
"type": [
"integer",
"null"
],
"description": "Cap the number of examples drawn from this dataset"
}
},
"required": [
"dataset_name"
]
},
"description": "Datasets to mix for this split"
}
},
"required": [
"datasets"
]
},
"validation": {
"type": "object",
"additionalProperties": false,
"properties": {
"pack": {
"type": "boolean",
"default": false,
"description": "Pack multiple short examples into each sequence"
},
"datasets": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"dataset_name": {
"type": "string",
"description": "Registered dataset name, HF Hub id, or format name for local files (required)"
},
"dataset_path": {
"type": [
"string",
"null"
],
"description": "Path to a local dataset file (e.g. a .jsonl), if not loading from the Hub"
},
"split": {
"type": "string",
"default": "train",
"description": "Dataset split to load, e.g. \"train\""
},
"sample_count": {
"type": [
"integer",
"null"
],
"description": "Cap the number of examples drawn from this dataset"
}
},
"required": [
"dataset_name"
]
},
"description": "Datasets to mix for this split"
}
},
"required": []
}
}
},
"training": {
"type": "object",
"additionalProperties": false,
"properties": {
"trainer_type": {
"enum": [
"HF",
"OUMI",
"TRL_DPO",
"TRL_SFT",
"hf",
"oumi",
"trl_dpo",
"trl_sft"
],
"default": "HF",
"description": "Which trainer implementation to use"
},
"use_peft": {
"type": "boolean",
"default": false,
"description": "Train with parameter-efficient fine-tuning (LoRA/QLoRA); pair with the peft section"
},
"output_dir": {
"type": "string",
"default": "output",
"description": "Directory where checkpoints and the final model are written"
},
"num_train_epochs": {
"type": "integer",
"default": 3,
"description": "Number of passes over the training data (ignored if max_steps > 0)"
},
"max_steps": {
"type": "integer",
"default": -1,
"description": "Hard cap on optimizer steps; -1 disables"
},
"learning_rate": {
"type": "number",
"default": 5e-05,
"description": "Peak learning rate"
},
"per_device_train_batch_size": {
"type": "integer",
"default": 8,
"description": "Micro-batch size per device"
},
"gradient_accumulation_steps": {
"type": "integer",
"default": 1,
"description": "Steps to accumulate before each optimizer update"
},
"lr_scheduler_type": {
"type": "string",
"default": "linear",
"description": "LR schedule, e.g. \"linear\", \"cosine\", \"constant\""
},
"warmup_steps": {
"type": [
"integer",
"null"
],
"description": "LR warmup steps (alternative to warmup_ratio)"
},
"warmup_ratio": {
"type": [
"number",
"null"
],
"description": "LR warmup as a fraction of total steps"
},
"optimizer": {
"type": "string",
"default": "adamw_torch",
"description": "Optimizer name, e.g. \"adamw_torch\", \"adamw_torch_fused\", \"sgd\""
},
"weight_decay": {
"type": "number",
"default": 0.0,
"description": "Weight decay coefficient"
},
"mixed_precision_dtype": {
"enum": [
"BF16",
"FP16",
"NONE",
"bf16",
"fp16",
"none"
],
"default": "NONE",
"description": "Mixed-precision mode"
},
"enable_gradient_checkpointing": {
"type": "boolean",
"default": false,
"description": "Trade compute for memory during backprop"
},
"eval_strategy": {
"type": "string",
"default": "no",
"description": "\"no\", \"steps\", or \"epoch\""
},
"eval_steps": {
"type": "integer",
"default": 500,
"description": "Evaluate every N steps (when eval_strategy=steps)"
},
"save_steps": {
"type": "integer",
"default": 500,
"description": "Checkpoint every N steps"
},
"save_final_model": {
"type": "boolean",
"default": true,
"description": "Save the model at the end of training"
},
"logging_steps": {
"type": "integer",
"default": 50,
"description": "Log metrics every N steps"
},
"seed": {
"type": "integer",
"default": 42,
"description": "Random seed"
},
"run_name": {
"type": [
"string",
"null"
],
"description": "Human-readable name for the run"
}
}
},
"peft": {
"type": "object",
"additionalProperties": false,
"properties": {
"lora_r": {
"type": "integer",
"default": 8,
"description": "LoRA rank"
},
"lora_alpha": {
"type": "integer",
"default": 8,
"description": "LoRA scaling alpha"
},
"lora_dropout": {
"type": "number",
"default": 0.0,
"description": "Dropout on LoRA layers"
},
"lora_target_modules": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"description": "Module names to adapt, e.g. [\"q_proj\", \"v_proj\"]; null lets oumi pick"
},
"q_lora": {
"type": "boolean",
"default": false,
"description": "Quantize the base model (QLoRA)"
},
"q_lora_bits": {
"type": "integer",
"default": 4,
"description": "Quantization bits for QLoRA (typically 4)"
}
}
}
}
}
|