NADAM Model 0916 - Pruned & Healable LLM
이 모델은 LLM pruning과 progressive healing 기법을 적용한 Llama-2-7b 기반 모델입니다.
모델 구조
A/ - 메인 Pruned 모델
- 설명: 주요 레이어들이 pruning된 기본 모델
- 파일: safetensors 형식의 가중치, 토크나이저, 설정 파일
- 용도: 기본 추론 및 healing의 기반 모델
bundles/ - Healing Bundles
- B/: Layers 21-24의 healing 가중치
- C/: Layers 25-28의 healing 가중치
- 용도: 필요시 모델 성능 복구를 위한 레이어별 가중치
adapters/ - LoRA Adapters
- A_lora/: A 모델에 대응하는 LoRA 어댑터 (stageA)
- B_lora/: B bundle에 대응하는 LoRA 어댑터 (stageB)
- C_lora/: C bundle에 대응하는 LoRA 어댑터 (stageC)
- 파일: adapter_model.safetensors, adapter_config.json, .pt 파일들
- 용도: 각 stage별 파인튜닝된 어댑터
사용법
기본 모델 로드
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rinarina0429/nadam_model_0916", subfolder="A")
model = AutoModelForCausalLM.from_pretrained("rinarina0429/nadam_model_0916", subfolder="A")
LoRA 어댑터와 함께 사용
from peft import PeftModel
Stage A 어댑터
base_model = AutoModelForCausalLM.from_pretrained("rinarina0429/nadam_model_0916", subfolder="A")
model = PeftModel.from_pretrained(base_model, "rinarina0429/nadam_model_0916", subfolder="adapters/A_lora/stageA")
Stage B 어댑터
model_b = PeftModel.from_pretrained(base_model, "rinarina0429/nadam_model_0916", subfolder="adapters/B_lora/stageB")
Stage C 어댑터
model_c = PeftModel.from_pretrained(base_model, "rinarina0429/nadam_model_0916", subfolder="adapters/C_lora/stageC")
Progressive Healing 사용법
1. 기본 pruned 모델로 시작
model = AutoModelForCausalLM.from_pretrained("rinarina0429/nadam_model_0916", subfolder="A")
2. 필요시 healing bundles 로드
Bundle B (layers 21-24)
Bundle C (layers 25-28)
3. 각 stage별 LoRA 어댑터 적용
A_lora -> B_lora -> C_lora 순서로 점진적 성능 향상
연구 배경
이 모델은 서버리스 환경에서의 효율적인 LLM 배포를 위한 연구의 일환으로 개발되었습니다:
- Pruning: 모델 크기 감소 및 추론 속도 향상
- Progressive Healing: 필요시 성능 복구 메커니즘
- Multi-Stage LoRA: 단계별 파인튜닝 지원
- Serverless Deployment: 점진적 모델 로딩 최적화
모델 정보
- Base Model: meta-llama/Llama-2-7b-hf
- Pruning Method: Layer-wise pruning with healing capability
- Training: NADAM optimizer 사용
- Stages: A (base) -> B (healing) -> C (full recovery)
- Date: 2025-09-16
파일 구조
nadam_model_0916/
├── A/ # 메인 pruned 모델
├── bundles/
│ ├── B/ # Healing bundle (layers 21-24)
│ └── C/ # Healing bundle (layers 25-28)
└── adapters/
├── A_lora/ # Stage A LoRA
│ ├── stageA/
│ ├── stageA.pt
│ └── stageA_recipe.json
├── B_lora/ # Stage B LoRA
│ ├── stageB/
│ ├── stageB.pt
│ └── stageB_recipe.json
└── C_lora/ # Stage C LoRA
├── stageC/
├── stageC.pt
└── stageC_recipe.json
라이선스
Apache 2.0 라이선스 하에 배포됩니다.
Model tree for rinarina0429/nadam_model_0916
Base model
meta-llama/Llama-2-7b-hf