zhiqings commited on
Commit
769479b
1 Parent(s): 500aa25

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md CHANGED
@@ -1,3 +1,105 @@
1
  ---
2
  license: llama2
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: llama2
3
  ---
4
+
5
+ # Dromedary-2 Model Card
6
+
7
+ ## Model details
8
+
9
+ **NOTE: This "delta model" cannot be used directly.**
10
+ Users have to apply it on top of the original LLaMA weights to get actual Dromedary weights.
11
+ See https://github.com/IBM/Dromedary#model-weights for instructions.
12
+
13
+ ## Model details
14
+
15
+ <div align="center">
16
+
17
+ <img src="https://raw.githubusercontent.com/IBM/Dromedary/main/assets/images/dromedary_logo.svg" alt="Dromedary Logo"/>
18
+
19
+ </div>
20
+
21
+ **Model type:**
22
+ Dromedary-2 is an open-source self-aligned language model trained with minimal human supervision and the SALMON (Self-Alignment with Principle-Following Reward Models) technique.
23
+ The base language model is LLaMA-70b, based on the transformer architecture.
24
+
25
+ **NOTE: *Dromedary-2* is trained with QLoRA and the bfloat16 data type.** While it is [possible](https://gist.github.com/ChrisHayduk/1a53463331f52dca205e55982baf9930) to merge the QLoRA weights with the quantized model and thus enable inference with libraries such as [TGI](https://github.com/huggingface/text-generation-inference) and [vLLM](https://github.com/vllm-project/vllm), we found the merged weights can lead to degenerated performance. Therefore, we recommend directly loading the QLoRA weights with the PEFT-LoRA framework.
26
+
27
+ Please check the [inference section](https://github.com/IBM/SALMON/inference) of our repo for the complete inference code.
28
+
29
+ ```python
30
+ system_prompt = (
31
+ "# Dromedary\n\n## System Overview\n\n"
32
+ "Consider an AI assistant whose codename is Dromedary, developed by the Self-Align team. "
33
+ "Dromedary is trained on data up until Sept-2022, and it endeavors to be a helpful, ethical and reliable assistant.\n\n"
34
+ "## User Conversation\n\n"
35
+ )
36
+ user_prompt = "### User\n"
37
+ assistant_prompt = "### Dromedary\n"
38
+ seperator = "\n\n"
39
+
40
+ dtype = torch.bfloat16
41
+
42
+ model_path = "path/to/llama-2-70b-hf"
43
+ qlora_path = "path/to/dromedary-2-70b-qlora-delta-v0"
44
+
45
+ bnb_config = BitsAndBytesConfig(
46
+ load_in_4bit=True,
47
+ bnb_4bit_compute_dtype=dtype,
48
+ bnb_4bit_use_double_quant=True,
49
+ bnb_4bit_quant_type="nf4",
50
+ )
51
+
52
+ model = AutoModelForCausalLM.from_pretrained(
53
+ model_path,
54
+ load_in_4bit=True,
55
+ device_map={"": "cuda:0"},
56
+ quantization_config=bnb_config,
57
+ torch_dtype=dtype,
58
+ )
59
+
60
+ model = PeftModel.from_pretrained(
61
+ model,
62
+ qlora_path,
63
+ is_trainable=False,
64
+ )
65
+ ```
66
+
67
+ **Model date:**
68
+ Dromedary was trained between July 2023 and Aug 2023, but its knowledge only goes up until Sept-2022.
69
+
70
+ **License:**
71
+ LLaMA-2's bespoke license
72
+
73
+ ## More Information
74
+
75
+ **Paper or resources for more information:**
76
+ [placeholder]
77
+
78
+ **Where to send questions or comments about the model:**
79
+ https://github.com/IBM/SALMON/issues
80
+
81
+ **Organizations developing the model:**
82
+ The Self-Align team is a joint effort between CMU and IBM.
83
+
84
+ ## Intended use
85
+ **Primary intended uses:**
86
+ The primary use of Dromedary is research on the alignment of large language models.
87
+
88
+ **Primary intended users:**
89
+ The primary intended users of the model are researchers in artificial intelligence.
90
+
91
+ ## Training dataset
92
+ 6 In-Context Learning (ICL) exemplars
93
+
94
+ 90K unlabeled prompts from ShareGPT
95
+
96
+ 10K unlabeled prompts from databricks-dolly-15k
97
+
98
+ 10K unlabeled prompts from OpenAssistant Conversations
99
+
100
+ 40K unlabeled prompts from OpenOrca
101
+
102
+ 7.5K unlabeled prompts from MATH
103
+
104
+ ## Evaluation dataset
105
+ We evaluate Dromedary on TruthfulQA and HHH Eval, as well as Vicuna benchmark questions.