s3nh commited on
Commit
0610bbe
1 Parent(s): bd20ae1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -29
README.md CHANGED
@@ -14,56 +14,87 @@ Buy me a coffee if you like this project ;)
14
 
15
  #### Description
16
 
17
- GPTQ Format model files for [This project](https://huggingface.co/bigcode/starcoderbase-7b).
18
 
19
 
20
- ### inference
21
 
 
22
 
 
23
 
 
24
 
 
 
 
25
 
26
- # Original model card
 
 
27
 
 
 
 
 
28
 
29
- ### Attribution & Other Requirements
 
30
 
31
- The pretraining dataset of the model was filtered for permissive licenses only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a [search index](https://huggingface.co/spaces/bigcode/starcoder-search) that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.
 
 
 
32
 
33
- # Limitations
 
34
 
35
- The model has been trained on source code from 80+ programming languages. The predominant natural language in source code is English although other languages are also present. As such the model is capable of generating code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See [the paper](https://drive.google.com/file/d/1cN-b9GnWtHzQRoE7M7gAEyivY0kl4BYs/view) for an in-depth discussion of the model limitations.
 
 
36
 
37
- # Training
38
 
39
- ## Model
 
 
 
 
 
40
 
41
- - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
42
- - **Pretraining steps:** 500k
43
- - **Pretraining tokens:** 1 trillion
44
- - **Precision:** bfloat16
45
 
46
- ## Hardware
47
 
48
- - **GPUs:** 128 Tesla A100
49
- - **Training time:** 11 days
50
 
51
- ## Software
52
 
53
- - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
54
- - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
55
- - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
 
56
 
57
- # License
58
- The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement [here](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement).
59
- # Citation
60
- ```
61
- @article{li2023starcoder,
62
- title={StarCoder: may the source be with you!},
63
- author={Raymond Li and Loubna Ben Allal and Yangtian Zi and Niklas Muennighoff and Denis Kocetkov and Chenghao Mou and Marc Marone and Christopher Akiki and Jia Li and Jenny Chim and Qian Liu and Evgenii Zheltonozhskii and Terry Yue Zhuo and Thomas Wang and Olivier Dehaene and Mishig Davaadorj and Joel Lamy-Poirier and João Monteiro and Oleh Shliazhko and Nicolas Gontier and Nicholas Meade and Armel Zebaze and Ming-Ho Yee and Logesh Kumar Umapathi and Jian Zhu and Benjamin Lipkin and Muhtasham Oblokulov and Zhiruo Wang and Rudra Murthy and Jason Stillerman and Siva Sankalp Patel and Dmitry Abulkhanov and Marco Zocca and Manan Dey and Zhihan Zhang and Nour Fahmy and Urvashi Bhattacharyya and Wenhao Yu and Swayam Singh and Sasha Luccioni and Paulo Villegas and Maxim Kunakov and Fedor Zhdanov and Manuel Romero and Tony Lee and Nadav Timor and Jennifer Ding and Claire Schlesinger and Hailey Schoelkopf and Jan Ebert and Tri Dao and Mayank Mishra and Alex Gu and Jennifer Robinson and Carolyn Jane Anderson and Brendan Dolan-Gavitt and Danish Contractor and Siva Reddy and Daniel Fried and Dzmitry Bahdanau and Yacine Jernite and Carlos Muñoz Ferrandis and Sean Hughes and Thomas Wolf and Arjun Guha and Leandro von Werra and Harm de Vries},
 
 
 
64
  year={2023},
65
- eprint={2305.06161},
66
  archivePrefix={arXiv},
67
  primaryClass={cs.CL}
68
  }
69
- ```
 
 
 
 
 
 
 
 
14
 
15
  #### Description
16
 
17
+ GPTQ Format model files for [This project](https://huggingface.co/stabilityai/StableBeluga-7B/).
18
 
19
 
20
+ ## Model Description
21
 
22
+ `Stable Beluga 7B` is a Llama2 7B model finetuned on an Orca style Dataset
23
 
24
+ ## Usage
25
 
26
+ Start chatting with `Stable Beluga 7B` using the following code snippet:
27
 
28
+ ```python
29
+ import torch
30
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
31
 
32
+ tokenizer = AutoTokenizer.from_pretrained("stabilityai/StableBeluga-7B", use_fast=False)
33
+ model = AutoModelForCausalLM.from_pretrained("stabilityai/StableBeluga-7B", torch_dtype=torch.float16, low_cpu_mem_usage=True, device_map="auto")
34
+ system_prompt = "### System:\nYou are StableBeluga, an AI that follows instructions extremely well. Help as much as you can. Remember, be safe, and don't do anything illegal.\n\n"
35
 
36
+ message = "Write me a poem please"
37
+ prompt = f"{system_prompt}### User: {message}\n\n### Assistant:\n"
38
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
39
+ output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=256)
40
 
41
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
42
+ ```
43
 
44
+ Stable Beluga 7B should be used with this prompt format:
45
+ ```
46
+ ### System:
47
+ This is a system prompt, please behave and help the user.
48
 
49
+ ### User:
50
+ Your prompt here
51
 
52
+ ### Assistant:
53
+ The output of Stable Beluga 7B
54
+ ```
55
 
56
+ ## Model Details
57
 
58
+ * **Developed by**: [Stability AI](https://stability.ai/)
59
+ * **Model type**: Stable Beluga 7B is an auto-regressive language model fine-tuned on Llama2 7B.
60
+ * **Language(s)**: English
61
+ * **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers)
62
+ * **License**: Fine-tuned checkpoints (`Stable Beluga 7B`) is licensed under the [STABLE BELUGA NON-COMMERCIAL COMMUNITY LICENSE AGREEMENT](https://huggingface.co/stabilityai/StableBeluga-7B/blob/main/LICENSE.txt)
63
+ * **Contact**: For questions and comments about the model, please email `[email protected]`
64
 
65
+ ### Training Dataset
 
 
 
66
 
67
+ ` Stable Beluga 7B` is trained on our internal Orca-style dataset
68
 
69
+ ### Training Procedure
 
70
 
71
+ 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:
72
 
73
+ | Dataset | Batch Size | Learning Rate |Learning Rate Decay| Warm-up | Weight Decay | Betas |
74
+ |-------------------|------------|---------------|-------------------|---------|--------------|-------------|
75
+ | Orca pt1 packed | 256 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
76
+ | Orca pt2 unpacked | 512 | 3e-5 | Cosine to 3e-6 | 100 | 1e-6 | (0.9, 0.95) |
77
 
78
+ ## Ethical Considerations and Limitations
79
+
80
+ 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.
81
+
82
+ ## Citations
83
+
84
+ ```bibtext
85
+ @misc{touvron2023llama,
86
+ title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
87
+ 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},
88
  year={2023},
89
+ eprint={2307.09288},
90
  archivePrefix={arXiv},
91
  primaryClass={cs.CL}
92
  }
93
+ ```
94
+
95
+ ```bibtext
96
+ @misc{mukherjee2023orca,
97
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
98
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
99
+ year={2023},
100
+ eprint={2306.02707},