CHIH-HUNG commited on
Commit
001a5f9
1 Parent(s): f37fcdf

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama2
3
+ datasets:
4
+ - garage-bAInd/Open-Platypus
5
+ ---
6
+ # Model Card for Model ID
7
+
8
+ <!-- Provide a quick summary of what the model is/does. -->
9
+
10
+ 在llama-2-13b上使用garage-bAInd/Open-Platypus資料集進行訓練,總資料筆數約2.5w + ccp
11
+
12
+ # Fine-Tuning Information
13
+ - **GPU:** RTX4090 (single core / 24564MiB)
14
+ - **model:** meta-llama/Llama-2-13b-hf
15
+ - **dataset:** garage-bAInd/Open-Platypus (共約2.5w筆訓練集) + ccp (約1200筆)
16
+ - **peft_type:** LoRA
17
+ - **lora_rank:** 8
18
+ - **lora_target:** gate_proj, up_proj, down_proj
19
+ - **per_device_train_batch_size:** 8
20
+ - **gradient_accumulation_steps:** 8
21
+ - **learning_rate :** 5e-5
22
+ - **epoch:** 3
23
+ - **precision:** bf16
24
+ - **quantization:** load_in_4bit
25
+
26
+ # Fine-Tuning Detail
27
+ - **train_loss:** 0.6
28
+ - **train_runtime:** 12:24:34 (use deepspeed)
29
+
30
+ # Evaluation
31
+ - 評估結果來自**HuggingFaceH4/open_llm_leaderboard**
32
+ - 與Llama-2-13b比較4種Benchmark,包含**ARC**、**HellaSwag**、**MMLU**、**TruthfulQA**
33
+
34
+ | Model |Average| ARC |HellaSwag| MMLU |TruthfulQA|
35
+ |-------------------------------------------------|-------|-------|---------|-------|----------|
36
+ |meta-llama/Llama-2-13b-hf | 56.9 | 58.11 | 80.97 | 54.34 | 34.17 |
37
+ |meta-llama/Llama-2-13b-chat-hf | 59.93 | 59.04 | 81.94 | 54.64 | 44.12 |
38
+ |Open-Orca/OpenOrca-Platypus2-13B | 63.19 | 61.52 | 82.27 | 58.85 | 50.11 |
39
+
40
+
41
+ # How to convert dataset to json
42
+
43
+ - 在**load_dataset**中輸入資料集名稱,並且在**take**中輸入要取前幾筆資料
44
+ - 觀察該資料集的欄位名稱,填入**example**欄位中(例如instruction、input、output)
45
+ - 最後指定json檔儲存位置 (**json_filename**)
46
+
47
+ ```py
48
+ import json
49
+ from datasets import load_dataset
50
+
51
+ # 讀取數據集,take可以取得該數據集前n筆資料
52
+ dataset = load_dataset("garage-bAInd/Open-Platypus", split="train", streaming=True)
53
+
54
+ # 提取所需欄位並建立新的字典列表
55
+ extracted_data = []
56
+ for example in dataset:
57
+ extracted_example = {
58
+ "instruction": example["instruction"],
59
+ "input": example["input"],
60
+ "output": example["output"]
61
+ }
62
+ extracted_data.append(extracted_example)
63
+
64
+ # 指定 JSON 文件名稱
65
+ json_filename = "Open-Platypus.json"
66
+
67
+ # 寫入 JSON 文件
68
+ with open(json_filename, "w") as json_file:
69
+ json.dump(extracted_data, json_file, indent=4)
70
+
71
+ print(f"數據已提取並保存為 {json_filename}")
72
+ ```