PyTorch
English
lilloukas commited on
Commit
d68fca9
1 Parent(s): 963f1ea

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +121 -0
README.md ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ language:
4
+ - en
5
+ datasets:
6
+ - garage-bAInd/Open-Platypus
7
+ ---
8
+
9
+ # Platypus2-7B LoRA adapters
10
+
11
+ **NOTE**: There is some issue with LLaMa-2 7B and fine-tuning only works if you use `fp16=False` and `bf16=True` in the HF trainer. Gathering more intel on this but if you have any thoughts about this issue or performance, please let us know!
12
+
13
+ Platypus-7B is an instruction fine-tuned model based on the LLaMA2-7B transformer architecture.
14
+
15
+ ![Platty](./Best_Platty_small.jpeg)
16
+
17
+ ### Benchmark Metrics
18
+
19
+ | Metric | Value |
20
+ |-----------------------|-------|
21
+ | MMLU (5-shot) | - |
22
+ | ARC (25-shot) | - |
23
+ | HellaSwag (10-shot) | - |
24
+ | TruthfulQA (0-shot) | - |
25
+ | Avg. | - |
26
+
27
+ We use state-of-the-art [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) to run the benchmark tests above, using the same version as the HuggingFace LLM Leaderboard. Please see below for detailed instructions on reproducing benchmark results.
28
+
29
+ ### Model Details
30
+
31
+ * **Trained by**: Cole Hunter & Ariel Lee
32
+ * **Model type:** **Platypus2-7B** is an auto-regressive language model based on the LLaMA2 transformer architecture.
33
+ * **Language(s)**: English
34
+ * **License for base weights**: Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/))
35
+
36
+ ### Prompt Template
37
+ ```
38
+ ### Instruction:
39
+
40
+ <prompt> (without the <>)
41
+
42
+ ### Response:
43
+ ```
44
+
45
+ ### Training Dataset
46
+
47
+ `garage-bAInd/Platypus2-7B` trained using STEM and logic based dataset [`garage-bAInd/Open-Platypus`](https://huggingface.co/datasets/garage-bAInd/Open-Platypus).
48
+
49
+ Please see our [paper](https://arxiv.org/abs/2308.07317) and [project webpage](https://platypus-llm.github.io) for additional information.
50
+
51
+ ### Training Procedure
52
+
53
+ `garage-bAInd/Platypus2-7B` was instruction fine-tuned using LoRA on 1 A100 80GB. For training details and inference instructions please see the [Platypus2](https://github.com/arielnlee/Platypus) GitHub repo.
54
+
55
+ ### Reproducing Evaluation Results
56
+
57
+ Install LM Evaluation Harness:
58
+ ```
59
+ # clone repository
60
+ git clone https://github.com/EleutherAI/lm-evaluation-harness.git
61
+ # check out the correct commit
62
+ git checkout b281b0921b636bc36ad05c0b0b0763bd6dd43463
63
+ # change to repo directory
64
+ cd lm-evaluation-harness
65
+ # install
66
+ pip install -e .
67
+ ```
68
+ Each task was evaluated on 1 A100 80GB GPU.
69
+
70
+ ARC:
71
+ ```
72
+ python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-7B,use_accelerate=True,dtype="bfloat16" --tasks arc_challenge --batch_size 2 --no_cache --write_out --output_path results/Platypus2-7B/arc_challenge_25shot.json --device cuda --num_fewshot 25
73
+ ```
74
+
75
+ HellaSwag:
76
+ ```
77
+ python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-7B,use_accelerate=True,dtype="bfloat16" --tasks hellaswag --batch_size 2 --no_cache --write_out --output_path results/Platypus2-7B/hellaswag_10shot.json --device cuda --num_fewshot 10
78
+ ```
79
+
80
+ MMLU:
81
+ ```
82
+ python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-7B,use_accelerate=True,dtype="bfloat16" --tasks hendrycksTest-* --batch_size 2 --no_cache --write_out --output_path results/Platypus2-7B/mmlu_5shot.json --device cuda --num_fewshot 5
83
+ ```
84
+
85
+ TruthfulQA:
86
+ ```
87
+ python main.py --model hf-causal-experimental --model_args pretrained=garage-bAInd/Platypus2-7B,use_accelerate=True,dtype="bfloat16" --tasks truthfulqa_mc --batch_size 2 --no_cache --write_out --output_path results/Platypus2-7B/truthfulqa_0shot.json --device cuda
88
+ ```
89
+ ### Limitations and bias
90
+
91
+ Llama 2 and fine-tuned variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2 and any fine-tuned varient's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model.
92
+
93
+ Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/
94
+
95
+ ### Citations
96
+ ```bibtex
97
+ @article{platypus2023,
98
+ title={Platypus: Quick, Cheap, and Powerful Refinement of LLMs},
99
+ author={Ariel N. Lee and Cole J. Hunter and Nataniel Ruiz},
100
+ booktitle={arXiv preprint arxiv:2308.07317},
101
+ year={2023}
102
+ }
103
+ ```
104
+ ```bibtex
105
+ @misc{touvron2023llama,
106
+ title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
107
+ author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov year={2023},
108
+ eprint={2307.09288},
109
+ archivePrefix={arXiv},
110
+ }
111
+ ```
112
+ ```bibtex
113
+ @inproceedings{
114
+ hu2022lora,
115
+ title={Lo{RA}: Low-Rank Adaptation of Large Language Models},
116
+ author={Edward J Hu and Yelong Shen and Phillip Wallis and Zeyuan Allen-Zhu and Yuanzhi Li and Shean Wang and Lu Wang and Weizhu Chen},
117
+ booktitle={International Conference on Learning Representations},
118
+ year={2022},
119
+ url={https://openreview.net/forum?id=nZeVKeeFYf9}
120
+ }
121
+ ```