Transformers
English
llama
trl
rlhf
Inference Endpoints
Barnaby Gray commited on
Commit
b5468de
·
1 Parent(s): dda71d5

Initial commit

Browse files
Files changed (3) hide show
  1. README.md +65 -0
  2. config.json +3 -0
  3. stack-llama-2-7b.ggmlv3.q4_0.bin +3 -0
README.md CHANGED
@@ -1,3 +1,68 @@
1
  ---
2
  license: bigscience-openrail-m
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: bigscience-openrail-m
3
+ datasets:
4
+ - lvwerra/stack-exchange-paired
5
+ language:
6
+ - en
7
+ tags:
8
+ - trl
9
+ - transformers
10
+ - rlhf
11
  ---
12
+ # Quantized GGML version of Stack-Llama-2
13
+
14
+ This model can be used directly in all llama.cpp based tools on more modest hardware (eg M1/M2).
15
+
16
+ From: https://huggingface.co/kashif/stack-llama-2
17
+
18
+ # Stack-Llama-2
19
+
20
+ [DPO](https://github.com/eric-mitchell/direct-preference-optimization) fine-tuned [Llama-2 7B model](https://huggingface.co/meta-llama/Llama-2-7b). The model is designed to generate human-like responses to questions in Stack Exchange domains of programming, mathematics, physics, and more. For more info check out the [blog post](https://huggingface.co/blog/dpo-trl) and github [example](https://github.com/lvwerra/trl/tree/main/examples/research_projects/stack_llama_2/scripts).
21
+
22
+
23
+ ## Uses
24
+
25
+ ### Direct Use
26
+ - Long-form question-answering on topics of programming, mathematics, and physics
27
+ - Demonstrating a Large Language Model's ability to follow target behavior of generating answers to a question that would be highly rated on [Stack Exchange](https://stackexchange.com).
28
+
29
+ ### Out of Scope Use
30
+ - Replacing human expertise
31
+
32
+
33
+ ## Bias, Risks, and Limitations
34
+ - Inherits bias, risks, and limitations from the LLaMA model, as described in the [LLaMA Model Card Bias Evaluation](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md#quantitative-analysis) and [Ethical Considerations](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md#ethical-considerations).
35
+ - Retains biases present in the Stack Exchange dataset. Per the [latest developer survey for Stack Overflow](https://survey.stackoverflow.co/2022/),
36
+ which constitutes a significant part of the StackExchange data,
37
+ most users who answered the survey identified themselves as [White or European, men, between 25 and 34 years old, and based in the US (with a significant part of responders from India).](https://survey.stackoverflow.co/2022/#developer-profile-demographics)
38
+ - May generate answers that are incorrect or misleading.
39
+ - May copy answers from the training data verbatim.
40
+ - May generate language that is hateful or promotes discrimination ([example](https://huggingface.co/trl-lib/llama-7b-se-rl-peft/discussions/7#64376083369f6f907f5bfe4c)).
41
+ - May generate language that is offensive to direct or indirect users or to people or groups mentioned.
42
+
43
+
44
+ ### Recommendations
45
+ - Answers should be validated through the use of external sources.
46
+ - Disparities between the data contributors and the direct and indirect users of the technology should inform developers in assessing what constitutes an appropriate use case.
47
+ - Further research is needed to attribute model generations to sources in the training data, especially in cases where the model copies answers from the training data.
48
+
49
+
50
+ ## Training Details
51
+
52
+ ### Training Data
53
+
54
+ Original datasets are described in [the LLaMA Model Card](https://github.com/facebookresearch/llama/blob/main/MODEL_CARD.md#training-dataset).
55
+ Fine-tuning datasets for this model are based on [Stack Exchange Paired](https://huggingface.co/datasets/lvwerra/stack-exchange-paired), which consists of questions and answers from various domains in Stack Exchange, such as programming, mathematics, physics, and more. Specifically:
56
+
57
+ **Traditional Fine-tuning:** [https://huggingface.co/datasets/lvwerra/stack-exchange-paired/tree/main/data/finetune](https://huggingface.co/datasets/lvwerra/stack-exchange-paired/tree/main/data/finetune)
58
+
59
+ **DPO Training:** [https://huggingface.co/datasets/lvwerra/stack-exchange-paired/tree/main/data/rl](https://huggingface.co/datasets/lvwerra/stack-exchange-paired/tree/main/data/rl)
60
+
61
+ ### Training Procedure
62
+ The model was first fine-tuned on the Stack Exchange question and answer pairs and then fine-tuned via the DPO training procedure using the SFT model as the reference model. It is trained to respond to prompts with the following prompt template:
63
+
64
+ ```
65
+ Question: <Query>
66
+
67
+ Answer: <Response>
68
+ ```
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "model_type": "llama"
3
+ }
stack-llama-2-7b.ggmlv3.q4_0.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ea64febecdd21fc63e7b31c481ca0fb41d16c5be00c8ffc8831a926c81342da
3
+ size 3825517184