Axolotl 설정 레퍼런스 — 주요 옵션

Axolotl 설정 레퍼런스 — 주요 옵션

Axolotl은 하나의 YAML 설정 파일로 훈련의 거의 모든 것을 제어해요. 여기서는 RL·양자화·어텐션 관련 핵심 옵션을 중심으로 살펴볼게요.

출처: Axolotl — Config Reference

재개·가중치 관련

  • resume_from_checkpoint: 특정 체크포인트 디렉토리에서 이어서 훈련
  • auto_resume_from_checkpoints: 이전에 멈춘 지점에서 자동 이어하기 (모델이 바뀌면 주의)
  • reinit_weights: 사전 훈련 가중치 대신 무작위로 초기화

RL(강화학습) 설정

# 선호/RL 훈련 방식: 'dpo','ipo','kto','simpo','orpo','grpo','ebft'
rl: grpo

trl:
  beta: 0.1
  # 완성의 최대 길이
  max_completion_length: 2048
  # GRPO 온라인 RL에 vLLM 사용 여부
  use_vllm: true
  vllm_mode: server   # 'server' 또는 'colocate'
  vllm_server_port: 8000
  reward_funcs:
    - my_reward
  reward_weights:
    - 1.0
  num_generations: 4

GRPO 관련 파라미터

  • num_iterations: 배치당 반복 수(μ)
  • epsilon: GRPO 클리핑 epsilon
  • scale_rewards: 보상의 표준편차로 스케일링 (기본 True)
  • top_p / top_k / min_p / repetition_penalty: 생성 정책 샘플링 파라미터
  • multi_objective_aggregation: 'sum_then_normalize'(GRPO 기본) 또는 'normalize_then_sum'(GDPO)

양자화(QAT)

qat:
  activation_dtype: ...          # 활성화 양자화 레이아웃
  weight_dtype: int8             # 가중치 양자화 (TorchAOQuantDType)

어텐션·성능

  • flash_attn/xformers/sliding_window_attention: 어텐션 구현 선택
  • sequence_parallel_len: 시퀀스 병렬 처리(SP) 길이
  • sdp_attention: PyTorch SDPA 어텐션 사용
  • quantize_moe_experts (기본 False): MoE 모델 로드 시 전문가 가중치 양자화로 VRAM 절감 (adapter LoRA/QLoRA 필요, CUDA 전용)

더 알아보기