s3nh commited on
Commit
3f5ef47
1 Parent(s): 62a60ae

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - text-generation-inference
7
+ pipeline_tag: text-generation
8
+ ---
9
+
10
+
11
+ ## Original model card
12
+
13
+ Buy me a coffee if you like this project ;)
14
+ <a href="https://www.buymeacoffee.com/s3nh"><img src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-1.svg" alt=""></a>
15
+
16
+ #### Description
17
+
18
+ GGML Format model files for [This project](https://huggingface.co/stabilityai/StableBeluga-13B).
19
+
20
+
21
+ ### inference
22
+
23
+
24
+ ```python
25
+
26
+ import ctransformers
27
+
28
+ from ctransformers import AutoModelForCausalLM
29
+
30
+ model = AutoModelForCausalLM.from_pretrained(output_dir, ggml_file,
31
+ gpu_layers=32, model_type="llama")
32
+
33
+ manual_input: str = "Tell me about your last dream, please."
34
+
35
+
36
+ llm(manual_input,
37
+ max_new_tokens=256,
38
+ temperature=0.9,
39
+ top_p= 0.7)
40
+
41
+ ```
42
+
43
+
44
+
45
+ # Original model card]
46
+
47
+
48
+
49
+ `Stable Beluga 13B` is a Llama2 13B model finetuned on an Orca style Dataset
50
+
51
+ ## Usage
52
+
53
+ Start chatting with `Stable Beluga 13B` using the following code snippet:
54
+
55
+ ```python
56
+ import torch
57
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
58
+
59
+ tokenizer = AutoTokenizer.from_pretrained("stabilityai/StableBeluga-13B", use_fast=False)
60
+ model = AutoModelForCausalLM.from_pretrained("stabilityai/StableBeluga-13B", torch_dtype=torch.float16, low_cpu_mem_usage=True, device_map="auto")
61
+ system_prompt = "### System:\nYou are Stable Beluga 13B, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal.\n\n"
62
+
63
+ message = "Write me a poem please"
64
+ prompt = f"{system_prompt}### User: {message}\n\n### Assistant:\n"
65
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
66
+ output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=256)
67
+
68
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
69
+ ```
70
+
71
+ Stable Beluga 13B should be used with this prompt format:
72
+ ```
73
+ ### System:
74
+ This is a system prompt, please behave and help the user.
75
+
76
+ ### User:
77
+ Your prompt here
78
+
79
+ ### Assistant
80
+ The output of Stable Beluga 13B
81
+ ```
82
+
83
+ ## Model Details
84
+
85
+ * **Developed by**: [Stability AI](https://stability.ai/)
86
+ * **Model type**: Stable Beluga 13B is an auto-regressive language model fine-tuned on Llama2 13B.
87
+ * **Language(s)**: English
88
+ * **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers)
89
+ * **License**: Fine-tuned checkpoints (`Stable Beluga 13B`) is licensed under the [STABLE BELUGA NON-COMMERCIAL COMMUNITY LICENSE AGREEMENT](https://huggingface.co/stabilityai/StableBeluga-13B/blob/main/LICENSE.txt)
90
+ * **Contact**: For questions and comments about the model, please email `[email protected]`
91
+
92
+ ### Training Dataset
93
+
94
+ ` Stable Beluga 13B` is trained on our internal Orca-style dataset
95
+
96
+ ### Training Procedure
97
+
98
+ 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:
99
+
100
+ | Dataset | Batch Size | Learning Rate |Learning Rate Decay| Warm-up | Weight Decay | Betas |
101
+ |-------------------|------------|---------------|-------------------|---------|--------------|-------------|
102
+ | Orca pt1 packed | 256 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
103
+ | Orca pt2 unpacked | 512 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
104
+
105
+ ## Ethical Considerations and Limitations
106
+
107
+ Beluga is 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, Beluga'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 Beluga, developers should perform safety testing and tuning tailored to their specific applications of the model.
108
+
109
+ ## Citations
110
+
111
+ ```bibtext
112
+ @misc{touvron2023llama,
113
+ title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
114
+ author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
115
+ year={2023},
116
+ eprint={2307.09288},
117
+ archivePrefix={arXiv},
118
+ primaryClass={cs.CL}
119
+ }
120
+ ```
121
+
122
+ ```bibtext
123
+ @misc{mukherjee2023orca,
124
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
125
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
126
+ year={2023},
127
+ eprint={2306.02707},
128
+ archivePrefix={arXiv},
129
+ primaryClass={cs.CL}
130
+ }
131
+ ```
132
+