Skip to content

Commit d0d466f

Browse files
author
EC2 Default User
committed
add QLoRA fine-tuen guide
1 parent d467cb0 commit d0d466f

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "5f0e1b48-09ad-463f-82f4-35d7e40d546a",
6+
"metadata": {},
7+
"source": [
8+
"# 1. 실습 가이드 A\n",
9+
"\n",
10+
"Updated: June 5, 2024\n",
11+
"\n",
12+
"이 실습 과정은 제한된 GPU 리소스로 인해서, <u>모델의 품질 보다는 \"코드가 동작\" 되는 관점에서 준비 했습니다. </u><br>\n",
13+
"충분한 GPU 리소스가 있으신 환경에서는, 데이터 셋 사이즈 수정, Epoch 조정 등의 코드를 수정하여 전체를 실행할 수 있습니다.\n",
14+
"\n",
15+
"---\n",
16+
"\n",
17+
"## 1.1.선수 준비 내용\n",
18+
"현재 사용 계정에 아래의 Resource Quota 가 미리 준비 되어 있어야 합니다.\n",
19+
"- One ml.g5.xlarge for notebook instance usage\n",
20+
"- One ml.g5.2xlarge for endpoint usage\n",
21+
"- One ml.g5.2xlarge for training job usage (안되면 데모로 대체)\n",
22+
"\n",
23+
"## 1.2. 환경 구성\n",
24+
"- SageMaker Notebook Instance 의 생성시에 EBS 볼륨을 200 GB 설정 하셔야 합니다.\n",
25+
"\n",
26+
"## 1.3.실습 환경 \n",
27+
"- 이 방법은 SageMaker Notebook Instance 의 ml.g5.xlarge\n",
28+
"- 사용 커널은 \"conda_pytorch_p310\" 에서 테스트 완료 되었습니다.\n",
29+
"\n"
30+
]
31+
},
32+
{
33+
"cell_type": "markdown",
34+
"id": "4b10fe93-501c-4427-a85e-46b0223df50a",
35+
"metadata": {},
36+
"source": [
37+
"## 1.4.실행 순서\n",
38+
"- 0.setup.ipynb \n",
39+
"- 1_prepare-dataset-alpaca-method.ipynb\n",
40+
"- 2_local-train-debug-lora.ipynb\n",
41+
"- 2_local-infer-debug-lora.ipynb \n",
42+
"- option-sm-features/10_prepare-dataset-alpaca-method.ipynb\n",
43+
"- option-sm-features/20_option-experiment-sm-train-lora.ipynb\n",
44+
"- 아래 추론은 ml.g5.xlarge 에서 에러 발생 함. ( SageMaker Notebook Instance ml.g5.12xlarge 권장)\n",
45+
" - 4_sm-serving-djl.ipynb\n",
46+
"- 다른 추론 노트북: Maum-AI-Llama-3-8B 가능\n",
47+
" - [02-Maum-AI-Llama-3-8B-SageMaker-Endpoint.ipynb](../../40_inference/30-Llama-3-Inference/02-Maum-AI-Llama-3-8B-SageMaker-Endpoint.ipynb)\n",
48+
" - 이 노트북의 전체 경로는 아래와 같습니다. \n",
49+
" - aws-ai-ml-workshop-kr/genai/aws-gen-ai-kr/40_inference/30-Llama-3-Inference/02-Maum-AI-Llama-3-8B-SageMaker-Endpoint.ipynb"
50+
]
51+
},
52+
{
53+
"cell_type": "markdown",
54+
"id": "c84501e3-2cdc-47d8-bdc4-6e7ecbc49130",
55+
"metadata": {},
56+
"source": [
57+
"## 1.5.[중요] 리소스 정리\n",
58+
"- SageMaker Notebook Instance 의 생성을 꼭 삭제 하여야 합니다.\n",
59+
"- 추론시에 사용한 SageMaker Notebook 도 꼭 꼭 삭제 하여야 합니다."
60+
]
61+
},
62+
{
63+
"cell_type": "code",
64+
"execution_count": null,
65+
"id": "55c8d978-f67e-433c-b8f3-35a479a587d4",
66+
"metadata": {},
67+
"outputs": [],
68+
"source": []
69+
}
70+
],
71+
"metadata": {
72+
"kernelspec": {
73+
"display_name": "conda_pytorch_p310",
74+
"language": "python",
75+
"name": "conda_pytorch_p310"
76+
},
77+
"language_info": {
78+
"codemirror_mode": {
79+
"name": "ipython",
80+
"version": 3
81+
},
82+
"file_extension": ".py",
83+
"mimetype": "text/x-python",
84+
"name": "python",
85+
"nbconvert_exporter": "python",
86+
"pygments_lexer": "ipython3",
87+
"version": "3.10.14"
88+
}
89+
},
90+
"nbformat": 4,
91+
"nbformat_minor": 5
92+
}

0 commit comments

Comments
 (0)