You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[학습 로그] EXAONE 4.0-32B QLoRA 민원답변 어댑터 학습 — 환경 구성, 문제 해결, 최적화 기록
#483
증상: ImportError: FlashAttention2 has been toggled on, but it cannot be used
시도 1: requirements.txt에 flash-attn --no-build-isolation → pip 파싱 에러 시도 2: Dockerfile에서 uv pip install flash-attn --no-build-isolation 소스 빌드 → CUDA 버전 불일치 시도 3: CUDA 12.4 → 13.2 변경 → 빌드 타임아웃 (HF Spaces 15분 제한) 시도 4: pre-built wheel 사용 → PyTorch 2.11 + CUDA 13.0 조합 wheel 미존재 최종 해결: Unsloth 전환 (flash attention 내장, 별도 설치 불필요)
문제 4: HF Spaces 30분 Health Check 타임아웃
증상: Launch timed out, workload was not healthy after 30 min
원인: 학습 스크립트가 HTTP 서버를 띄우지 않아 HF Spaces가 비정상으로 판단
해결: main() 시작 시 port 7860에 health server를 threading.Thread로 실행
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
개요
EXAONE 4.0-32B 모델에 민원답변 초안생성 LoRA 어댑터(civil-adapter)를 학습하는 과정의 전체 기록입니다.
최종 환경 구성
인프라
nvidia/cuda:12.6.3-devel-ubuntu22.04학습 설정
LGAI-EXAONE/EXAONE-4.0-32B(BF16 원본)데이터
발생한 문제와 해결 과정
문제 1:
SFTConfig파라미터 호환성 (trl 1.0.0)증상:
TypeError: SFTConfig.__init__() got an unexpected keyword argumentmax_seq_lengthmax_lengthgroup_by_lengthtokenizer=(SFTTrainer)processing_class=문제 2:
torch_dtypedeprecated (transformers 5.5.0)증상:
torch_dtype is deprecated! Use dtype instead!해결:
torch_dtype=torch.bfloat16→dtype=torch.bfloat16문제 3: Flash Attention 2 미설치
증상:
ImportError: FlashAttention2 has been toggled on, but it cannot be used시도 1:
requirements.txt에flash-attn --no-build-isolation→ pip 파싱 에러시도 2: Dockerfile에서
uv pip install flash-attn --no-build-isolation소스 빌드 → CUDA 버전 불일치시도 3: CUDA 12.4 → 13.2 변경 → 빌드 타임아웃 (HF Spaces 15분 제한)
시도 4: pre-built wheel 사용 → PyTorch 2.11 + CUDA 13.0 조합 wheel 미존재
최종 해결: Unsloth 전환 (flash attention 내장, 별도 설치 불필요)
문제 4: HF Spaces 30분 Health Check 타임아웃
증상:
Launch timed out, workload was not healthy after 30 min원인: 학습 스크립트가 HTTP 서버를 띄우지 않아 HF Spaces가 비정상으로 판단
해결:
main()시작 시 port 7860에 health server를threading.Thread로 실행문제 5: Space 자동 Sleep
증상: 학습 중
Stage: SLEEPING전환원인: HF Spaces 기본 sleep 정책
해결:
api.set_space_sleep_time(repo, sleep_time=-1)(never sleep)문제 6:
warmup_ratiovswarmup_steps혼동코드리뷰 지적:
warmup_steps는 int만 허용, float 0.03 전달 시 0으로 잘림해결:
warmup_ratio=0.03유지 (deprecation 경고만, 동작은 정상)문제 7: 학습 속도 병목
분석:
문제 8: Unsloth extras 이름 오류
증상:
The package unsloth does not have an extra named cu126-torch2110해결:
unsloth[cu126-torch2110]→unsloth(extras 없이 설치, 자동 감지)빌드 최적화 기록
코드리뷰 기록
Code Reviewer (Opus) 검토
tokenizer=→processing_class=torch_dtype=→dtype=warmup_ratio=→warmup_steps=TrainingArgumentsimportAI Engineer (Opus) 검토
warmup_steps=0.03float → int 잘림warmup_ratio복원pad_token=eos_tokenloss 마스킹dataloader_num_workers=4shm 제한load_best_model_at_endVRAM 스파이크EXAONE 4.0-32B target_modules 검증
실제 레이어 이름 (로그에서 확인):
→ 표준 Llama 이름과 동일. target_modules 설정 정상.
참고 자료
All reactions