-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
144 lines (128 loc) · 4.67 KB
/
Copy pathconfig.example.yaml
File metadata and controls
144 lines (128 loc) · 4.67 KB
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
# MultiAgentTrainer configuration
# Copy to multiagenttrainer.yaml in your working directory.
# Named execution targets — referenced by training and finetuner.targets.
# Each machine can carry its own agent_command to right-size the model to
# the instance (e.g. run a large model on a big GPU host, a small model on
# a cheaper one). Omit this section to run everything on the local machine.
machines:
- name: gpu-large
execution:
type: ssh
ssh_host: trainer1.example.com
ssh_key: ~/.ssh/id_ed25519
remote_dir: /tmp/mat-runs
# Override the global agent_command to use a larger model on this host.
agent_command: >-
claude -p {prompt}
--allowedTools "Bash,Read,Edit"
--permission-mode acceptEdits
--model claude-opus-4-7
- name: gpu-small
execution:
type: ssh
ssh_host: trainer2.example.com
remote_dir: /tmp/mat-runs
agent_command: >-
claude -p {prompt}
--allowedTools "Bash,Read,Edit"
--permission-mode acceptEdits
--model claude-haiku-4-5
autoresearch:
repo: "https://github.com/karpathy/autoresearch" # or a local path
branch: "master"
train_time: 300 # seconds per experiment (default 5 min)
# program_md: ./my-program.md # optional override for agent instructions
sources:
# Local git repository
- type: local_repo
path: /home/user/my-project
include: ["**/*.py", "**/*.md"]
exclude: ["**/node_modules/**"]
# Any git-cloneable URL
- type: remote_repo
url: "https://github.com/user/repo.git"
branch: main
# GitHub repository (web URL)
- type: github_repo
url: "https://github.com/user/repo"
# All repos in a GitHub organisation
- type: github_org
url: "https://github.com/my-org"
max_repos: 50
visibility: all # all | public | private
# AWS Bedrock knowledge base
- type: bedrock_knowledge_base
knowledge_base_id: "ABCDEF1234"
region: "us-east-1"
query: "training data for code generation"
max_results: 100
training:
agent_command: 'claude -p {prompt} --allowedTools "Bash,Read,Edit" --permission-mode acceptEdits'
max_experiments: 50
output_dir: ./training-runs
# Failure notifications (optional)
# Requires: boto3 and an SES-verified sender address in your AWS account.
notifications:
ses:
from_email: alerts@example.com
to_emails:
- oncall@example.com
region: us-east-1
subject_prefix: "[MultiAgentTrainer]"
# Fine-tuning configuration (optional)
# Run: mat finetune start
finetuner:
backend: opensource # opensource | bedrock
jobs_dir: ./finetune-jobs
# Open-source: HuggingFace + PEFT/LoRA
# Requires: pip install 'multiagenttrainer[opensource]'
opensource:
model_id: meta-llama/Llama-3.2-1B
output_dir: ./finetuned-models
lora_r: 16
lora_alpha: 32
lora_dropout: 0.05
max_seq_length: 2048
num_epochs: 3
batch_size: 4
learning_rate: 2e-4
gradient_accumulation_steps: 4
use_4bit: true # QLoRA (requires bitsandbytes + CUDA)
target_modules: [q_proj, v_proj] # or omit to use "all-linear"
packing: true # bin chunks together to eliminate padding waste
use_bf16: false # bf16 precision — recommended on Ampere+ (A100, RTX 30xx+)
use_flash_attention: false # Flash Attention 2 — requires: pip install flash-attn
# AWS Bedrock model customization
bedrock:
base_model_id: amazon.titan-text-lite-v1
region: us-east-1
role_arn: arn:aws:iam::123456789012:role/BedrockFineTuningRole
output_s3_uri: s3://my-bucket/finetuned-models/
training_data_s3_uri: s3://my-bucket/training-data/
customization_type: CONTINUED_PRE_TRAINING # CONTINUED_PRE_TRAINING | FINE_TUNING
epochs: 1
batch_size: 8
learning_rate: 1e-5
job_name_prefix: mat-finetune
# Multi-target fine-tuning: one job per (model, machine) pairing.
# All targets start concurrently. Each target inherits the backend defaults
# above and overrides only the fields listed here.
# The machine field is metadata that documents which host this target is
# sized for; assign each OpenSource target to a distinct GPU to avoid OOM.
targets:
- name: llama-3b-large
model_id: meta-llama/Llama-3.2-3B
machine: gpu-large # big GPU for the bigger model
backend: opensource
num_epochs: 3
batch_size: 2
- name: llama-1b-small
model_id: meta-llama/Llama-3.2-1B
machine: gpu-small # smaller GPU for the smaller model
backend: opensource
num_epochs: 5
batch_size: 4
- name: titan-bedrock
model_id: amazon.titan-text-lite-v1
backend: bedrock
customization_type: FINE_TUNING