dmayhem93 commited on
Commit
deca23b
1 Parent(s): 649b644

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +129 -0
README.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ datasets:
4
+ - conceptofmind/cot_submix_original
5
+ - conceptofmind/flan2021_submix_original
6
+ - conceptofmind/t0_submix_original
7
+ - conceptofmind/niv2_submix_original
8
+ language:
9
+ - en
10
+ pipeline_tag: text-generation
11
+ ---
12
+ # FreeWilly
13
+
14
+ ## Model Description
15
+
16
+ `FreeWilly` is a Llama65B model finetuned on an Orca style Dataset
17
+
18
+ ## Usage
19
+
20
+ ### Apply Delta Weights
21
+
22
+ FreeWilly1 cannot be used from the `stabilityai/FreeWilly1-Delta-SafeTensor` weights alone. To obtain the correct model, one must add back the difference between LLaMA 65B and `stabilityai/FreeWilly1-Delta-SafeTensor` weights. We provide the [`apply_delta.py`](https://huggingface.co/stabilityai/FreeWilly1-Delta-SafeTensor/raw/main/apply_delta.py) script to automate the conversion, which you can run as:
23
+
24
+
25
+ ```sh
26
+ python3 apply_delta.py --base /path/to/model_weights/llama-65b --target FreeWilly1 --delta stabilityai/FreeWilly1-Delta-SafeTensor
27
+ ```
28
+
29
+
30
+
31
+ Start chatting with `FreeWilly` using the following code snippet:
32
+
33
+ ```python
34
+ import torch
35
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
36
+
37
+ tokenizer = AutoTokenizer.from_pretrained("your_path_to_freewilly", use_fast=False)
38
+ model = AutoModelForCausalLM.from_pretrained("your_path_to_freewilly", torch_dtype=torch.float16, low_cpu_mem_usage=True, use_accelerate=True)
39
+ generator = pipeline(model=model, tokenizer=tokenizer)
40
+ system_prompt = "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n"
41
+ system_prompt += "### Instruction:\nYou are Free Willy, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal.\n\n"
42
+
43
+ message = "Write me a poem please"
44
+ prompt = f"{system_prompt}### Input: {message}\n\n### Response:\n"
45
+
46
+ output = generator(prompt, num_return_sequences=1, do_sample=True, top_p=0.95, top_k=0)
47
+ print(output)
48
+ ```
49
+
50
+ FreeWilly should be used with prompts formatted similarly to Alpaca as below:
51
+ ```
52
+ Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
53
+
54
+ ## Instruction:
55
+ This is a system prompt, please behave and help the user.
56
+
57
+ ### Input:
58
+ Your prompt here
59
+
60
+ ### Response
61
+ The output of FreeWilly
62
+ ```
63
+
64
+ ## Model Details
65
+
66
+ * **Developed by**: [Stability AI](https://stability.ai/)
67
+ * **Model type**: FreeWilly is an auto-regressive language model fine-tuned on LLaMA65B.
68
+ * **Language(s)**: English
69
+ * **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers)
70
+ * **License**: Fine-tuned checkpoints (`FreeWilly`) is licensed under the Non-Commercial Creative Commons license ([CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/))
71
+ * **Contact**: For questions and comments about the model, please email `[email protected]`
72
+
73
+ ### Training Dataset
74
+
75
+ `FreeWilly` is trained on our internal Orca-style dataset
76
+
77
+ ### Training Procedure
78
+
79
+ Models are learned via supervised fine-tuning on the aforementioned datasets, trained in mixed-precision (BF16), and optimized with AdamW. We outline the following hyperparameters:
80
+
81
+ | Dataset | Batch Size | Learning Rate |Learning Rate Decay| Warm-up | Weight Decay | Betas |
82
+ |-------------------|------------|---------------|-------------------|---------|--------------|-------------|
83
+ | Orca pt1 packed | 512 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
84
+ | Orca pt2 unpacked | 512 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
85
+
86
+ ## Use and Limitations
87
+
88
+ ### Intended Use
89
+
90
+ These models are intended for research only, in adherence with the [CC BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/) license.
91
+
92
+ ### Limitations and bias
93
+
94
+ Although the aforementioned dataset helps to steer the base language models into "safer" distributions of text, not all biases and toxicity can be mitigated through fine-tuning. We ask that users be mindful of such potential issues that can arise in generated responses. Do not treat model outputs as substitutes for human judgment or as sources of truth. Please use it responsibly.
95
+
96
+ ## Citations
97
+
98
+ ```bibtext
99
+ @misc{touvron2023llama,
100
+ title={LLaMA: Open and Efficient Foundation Language Models},
101
+ author={Hugo Touvron and Thibaut Lavril and Gautier Izacard and Xavier Martinet and Marie-Anne Lachaux and Timothée Lacroix and Baptiste Rozière and Naman Goyal and Eric Hambro and Faisal Azhar and Aurelien Rodriguez and Armand Joulin and Edouard Grave and Guillaume Lample},
102
+ year={2023},
103
+ eprint={2302.13971},
104
+ archivePrefix={arXiv},
105
+ primaryClass={cs.CL}
106
+ }
107
+ ```
108
+
109
+ ```bibtext
110
+ @misc{mukherjee2023orca,
111
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
112
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
113
+ year={2023},
114
+ eprint={2306.02707},
115
+ archivePrefix={arXiv},
116
+ primaryClass={cs.CL}
117
+ }
118
+ ```
119
+
120
+ ```bibtex
121
+ @misc{alpaca,
122
+ author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
123
+ title = {Stanford Alpaca: An Instruction-following LLaMA model},
124
+ year = {2023},
125
+ publisher = {GitHub},
126
+ journal = {GitHub repository},
127
+ howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
128
+ }
129
+ ```