dkalpakchi
commited on
Commit
·
69db0b3
1
Parent(s):
700ff91
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,147 @@
|
|
1 |
---
|
2 |
license: bigscience-openrail-m
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: bigscience-openrail-m
|
3 |
+
datasets:
|
4 |
+
- mc4
|
5 |
+
language:
|
6 |
+
- sv
|
7 |
+
library_name: transformers
|
8 |
---
|
9 |
+
|
10 |
+
# SweCTRL-Mini
|
11 |
+
|
12 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
13 |
+
|
14 |
+
SweCTRL-Mini is a large Swedish language model that can be used for inference and fine-tuning on a single consumer-grade GPU. The model is based on the CTRL architecture by Keskar, McCann, Varshney, Xiong, and Socher
|
15 |
+
(2019), which means that users of the SweCTRL-Mini model can control the genre of the generated text by inserting special tokens in the generation prompts. Crucially, note that this model is:
|
16 |
+
|
17 |
+
- **NOT** trained on following GPT-like instructions
|
18 |
+
- **NOT** trained for conversations, like ChatGPT
|
19 |
+
- **NOT** trained on any multi-modal data during training. Only one modality -- text, more than 99% of it in Swedish.
|
20 |
+
|
21 |
+
## Model Details
|
22 |
+
|
23 |
+
### Model Description
|
24 |
+
|
25 |
+
<!-- Provide a longer summary of what this model is. -->
|
26 |
+
|
27 |
+
- **Developed by:** Dmytro Kalpakchi (with supervision from Johan Boye)
|
28 |
+
- **Shared by:** Dmytro Kalpakchi
|
29 |
+
- **Model type:** Transformer-based language model trained by predicting the next token
|
30 |
+
- **Language(s) (NLP):** Swedish
|
31 |
+
- **License:** BigScience Open RAIL-M
|
32 |
+
- **Finetuned from model:** None, trained from scratch
|
33 |
+
|
34 |
+
### Model Sources [optional]
|
35 |
+
|
36 |
+
<!-- Provide the basic links for the model. -->
|
37 |
+
|
38 |
+
- **Website:** https://swectrl.dev/
|
39 |
+
- **Repository:** https://github.com/dkalpakchi/SweCTRL-Mini
|
40 |
+
- **Paper:** https://arxiv.org/pdf/2304.13994.pdf
|
41 |
+
- **Technical note:** https://zenodo.org/record/7868205
|
42 |
+
|
43 |
+
## Uses
|
44 |
+
|
45 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
46 |
+
|
47 |
+
### Direct Use
|
48 |
+
|
49 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
50 |
+
The model should be used for generating texts of various genres in Swedish.
|
51 |
+
|
52 |
+
|
53 |
+
### Out-of-Scope Use
|
54 |
+
|
55 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
56 |
+
Please refer to Appendix A of the License file for information of use restrictions. The model has a limited context window of 256 tokens, so it will most probably not work well
|
57 |
+
for text summarization. Additionally, vast majority of its training data was in Swedish, although it contains tokens in other languages as well, so tasks like
|
58 |
+
Machine Translation would require further fine-tuning.
|
59 |
+
|
60 |
+
## Bias, Risks, and Limitations
|
61 |
+
|
62 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
63 |
+
To mitigate the inclusion of personally-identifiable data we attempted to remove sources that could contain such data to the best of our ability (see Technical note for
|
64 |
+
more details on the data filtering process). However, we have still noted that the model can generate text that includes various forms of biases, which is why we strongly
|
65 |
+
recommend human curation of the generated texts. Currently we have conducted no systematic investigation on either the kinds of biases are included in the generated texts or how
|
66 |
+
frequently they occur. The contribution of the community on this matter would be very welcome.
|
67 |
+
|
68 |
+
### Recommendations
|
69 |
+
|
70 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
71 |
+
|
72 |
+
For further recommendations on the use of the model, please see the associated paper.
|
73 |
+
|
74 |
+
## How to Get Started with the Model
|
75 |
+
|
76 |
+
Use the code below to get started with the model.
|
77 |
+
|
78 |
+
TODO
|
79 |
+
|
80 |
+
## Training Details
|
81 |
+
|
82 |
+
### Training Data
|
83 |
+
|
84 |
+
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
85 |
+
|
86 |
+
The training data includes the *subset* of cleaned Swedish mC4, as well as some documents from Project Runeberg.
|
87 |
+
The extensive information on the training data is provided in the Section 1 of the Technical note.
|
88 |
+
The interface to partially mine training data is available at: https://swectrl.dev/data
|
89 |
+
|
90 |
+
### Training Procedure
|
91 |
+
|
92 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
93 |
+
|
94 |
+
#### Preprocessing [optional]
|
95 |
+
|
96 |
+
See Section 1 of the Technical note.
|
97 |
+
|
98 |
+
|
99 |
+
#### Training Hyperparameters
|
100 |
+
|
101 |
+
- **Training regime:** fp32
|
102 |
+
|
103 |
+
|
104 |
+
## Evaluation
|
105 |
+
|
106 |
+
See Sections 5.3, 6, and 7 in the associated paper, and Section 3 of the Technical note.
|
107 |
+
|
108 |
+
## Environmental Impact
|
109 |
+
|
110 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
111 |
+
|
112 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
113 |
+
|
114 |
+
- **Hardware Type:** 8 A100 GPUs
|
115 |
+
- **Hours used:** 11907.6 GPU-hours for training and experimentation
|
116 |
+
- **Provider:** BerzeLiUs supercomputer
|
117 |
+
- **Carbon Emitted:** No public data on carbon efficiency, so hard to estimate
|
118 |
+
|
119 |
+
## Technical Specifications
|
120 |
+
See Section 3 of the associated paper
|
121 |
+
|
122 |
+
## Citation [optional]
|
123 |
+
|
124 |
+
**BibTeX:**
|
125 |
+
```bibtex
|
126 |
+
@article{kalpakchi2023swectrl,
|
127 |
+
title={SweCTRL-Mini: a data-transparent Transformer-based large language model for controllable text generation in Swedish},
|
128 |
+
author={Kalpakchi, Dmytro and Boye, Johan},
|
129 |
+
journal={arXiv preprint arXiv:2304.13994},
|
130 |
+
year={2023}
|
131 |
+
}
|
132 |
+
```
|
133 |
+
|
134 |
+
**APA:**
|
135 |
+
|
136 |
+
Kalpakchi, D., & Boye, J. (2023). SweCTRL-Mini: a data-transparent Transformer-based large language model for controllable text generation in Swedish. arXiv preprint arXiv:2304.13994.
|
137 |
+
|
138 |
+
## Model Card Authors
|
139 |
+
|
140 |
+
Dmytro Kalpakchi (dmytroka@kth.se)
|
141 |
+
|
142 |
+
## Model Card Contact
|
143 |
+
|
144 |
+
Dmytro Kalpakchi (dmytroka@kth.se)
|
145 |
+
|
146 |
+
# References
|
147 |
+
Keskar, N. S., McCann, B., Varshney, L. R., Xiong, C., & Socher, R. (2019). Ctrl: A conditional transformer language model for controllable generation. arXiv preprint arXiv:1909.05858.
|