jonabur
commited on
Commit
•
dc614ca
1
Parent(s):
13f9afd
add readme
Browse files
README.md
CHANGED
@@ -1,4 +1,119 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- cerebras/SlimPajama-627B
|
5 |
+
- bigcode/starcoderdata
|
6 |
+
- mc4
|
7 |
+
language:
|
8 |
+
- fi
|
9 |
+
- en
|
10 |
+
- da
|
11 |
+
- sv
|
12 |
+
- 'no'
|
13 |
+
- nn
|
14 |
+
- is
|
15 |
---
|
16 |
+
|
17 |
+
# Viking 13B
|
18 |
+
|
19 |
+
**NOTE:** We are aware of an incompatibility with HF transformers that impacts finetuning and are working to correct it.
|
20 |
+
|
21 |
+
|
22 |
+
_**NOTE:** This is a **research checkpoint** of a model for which **training has not been completed.** It is being provided in its current state for research and testing purposes. **Care should be taken when using the outputs of the model.** Once pretraining has completed we intend to release additional instruction-tuned and chat-tuned varieties._
|
23 |
+
|
24 |
+
Viking 13B is a 13B parameter decoder-only transformer pretrained on Finnish, English, Swedish, Danish, Norwegian, Icelandic and code. It is being trained on 2 trillion tokens (1 trillion as of this release). Viking 13B is a fully open source model and is made available under the Apache 2.0 License.
|
25 |
+
|
26 |
+
Viking was created in a collaboration between the [TurkuNLP group](https://turkunlp.org/) of the University of Turku, [SiloGen](https://www.silo.ai/silogen) from [Silo AI](https://www.silo.ai/),and [High Performance Language Technologies](https://hplt-project.org/) (HPLT). Training was conducted on the [LUMI supercomputer](https://www.lumi-supercomputer.eu/), using compute resources generously provided by [CSC](https://csc.fi/) - IT Center for Science, Finland.
|
27 |
+
|
28 |
+
This project is part of an ongoing effort to create open source large language models for non-English and especially low resource languages like Finnish. The mode is fluent in Finnish, English, the Scandinavian languages and capable of basic translation between them. It is also able to understand and generate code.
|
29 |
+
|
30 |
+
## Model Family
|
31 |
+
|
32 |
+
Viking is the second set of models released by LumiOpen and is available at
|
33 |
+
3 parameter counts:
|
34 |
+
|
35 |
+
[Viking 7B](https://huggingface.co/LumiOpen/Viking-7B)
|
36 |
+
|
37 |
+
[Viking 13B](https://huggingface.co/LumiOpen/Viking-13B)
|
38 |
+
|
39 |
+
[Viking 33B](https://huggingface.co/LumiOpen/Viking-33B)
|
40 |
+
|
41 |
+
## Model Overview
|
42 |
+
_**NOTE:** In addition to being an early research release, Viking is a base model which needs further fine tuning for most use cases._
|
43 |
+
|
44 |
+
Viking is a generative pretrained transformer using a LLaMA-like GPT architecture, and makes use of rotary positional embeddings and flash attention.
|
45 |
+
|
46 |
+
| Hyperparameter | Value |
|
47 |
+
| :------------- | :----: |
|
48 |
+
| n_parameters | 14B |
|
49 |
+
| n_layers | 40 |
|
50 |
+
| n_heads | 40 |
|
51 |
+
| d_model | 5120 |
|
52 |
+
| vocab_size | 131072 |
|
53 |
+
| sequence_length | 4096 |
|
54 |
+
|
55 |
+
## Training
|
56 |
+
|
57 |
+
Viking 13B was trained on the LUMI supercomputer, using 512 AMD MI250X GPUs. Each MI250X GPU has two Graphics Complex Dies (GCDs) for a world size of 1024 during training, using activation checkpointing, a micro batch size of 1, gradient accumulation of 16, and a 3D parallelism strategy of TP=2, PP=4, DP=128.
|
58 |
+
|
59 |
+
Training began in September 2023 using a [custom fork](https://github.com/LumiOpen/Megatron-DeepSpeed) of the Megatron-Deepspeed framework.
|
60 |
+
|
61 |
+
|
62 |
+
## Training Hyperparameters
|
63 |
+
|
64 |
+
| Hyperparameter | Value | Comment |
|
65 |
+
| :------------: | :---: | :------:|
|
66 |
+
| Precision | bfloat16 | |
|
67 |
+
| Optimizer | AdamW | |
|
68 |
+
| Learning rate | 3e-4 | 10B tokens warm-up, cosine decay to 3e-5 |
|
69 |
+
| Weight decay | 1e-1 | |
|
70 |
+
| Batch size | 1024 | 1024 samples x 4096 tokens = 4194304 tokens |
|
71 |
+
|
72 |
+
## Tokenizer
|
73 |
+
|
74 |
+
Viking uses a custom 128K Bloom tokenizer trained on the same English, Finnish, Swedish, Danish, Norwegian, Icelandic and code dataset used to train the model.
|
75 |
+
|
76 |
+
## Dataset
|
77 |
+
Viking is being trained on a 2 trillion token mixed dataset of English, Finnish, Swedish, Danish, Norwegian, Icelandic and code.
|
78 |
+
|
79 |
+
More details on exact dataset will be published soon.
|
80 |
+
|
81 |
+
## Evaluation Results
|
82 |
+
|
83 |
+
Full evaluation results will be published with the final model.
|
84 |
+
|
85 |
+
## Training checkpoints
|
86 |
+
|
87 |
+
Training checkpoints are available as branches in the repository. Checkpoints will be released roughly every 100B tokens. The main branch will always point to the latest checkpoint. The following checkpoints are available:
|
88 |
+
|
89 |
+
* [100B](https://huggingface.co/LumiOpen/Viking-13B/tree/100B)
|
90 |
+
* [200B](https://huggingface.co/LumiOpen/Viking-13B/tree/200B)
|
91 |
+
* [300B](https://huggingface.co/LumiOpen/Viking-13B/tree/300B)
|
92 |
+
* [400B](https://huggingface.co/LumiOpen/Viking-13B/tree/400B)
|
93 |
+
* [500B](https://huggingface.co/LumiOpen/Viking-13B/tree/500B)
|
94 |
+
* [600B](https://huggingface.co/LumiOpen/Viking-13B/tree/600B)
|
95 |
+
* [700B](https://huggingface.co/LumiOpen/Viking-13B/tree/700B)
|
96 |
+
* [800B](https://huggingface.co/LumiOpen/Viking-13B/tree/800B)
|
97 |
+
* [900B](https://huggingface.co/LumiOpen/Viking-13B/tree/900B)
|
98 |
+
* [1000B](https://huggingface.co/LumiOpen/Viking-13B/tree/1000B)
|
99 |
+
|
100 |
+
The transformers library allows you to load a checkpoint from a branch as follows:
|
101 |
+
|
102 |
+
```python
|
103 |
+
branch = "200B"
|
104 |
+
model = transformers.AutoModelForCausalLM.from_pretrained(
|
105 |
+
"LumiOpen/Viking-13B",
|
106 |
+
torch_dtype=torch.bfloat16,
|
107 |
+
revision=branch,
|
108 |
+
)
|
109 |
+
```
|
110 |
+
|
111 |
+
## Ethical Considerations and Limitations
|
112 |
+
|
113 |
+
_Viking 13B is a release of a partially trained model, and special care should be taken when using any output._
|
114 |
+
|
115 |
+
Viking is an advanced language model, primarily optimized for English, Finnish, Swedish, Norwegian, Danish, Icelandic and code, with no meaningful proficiency in any other languages. As with most AI-driven systems, Viking is a product of the vast data it has been trained on, which may reflect the imperfections, biases, and idiosyncrasies of the wider web. Viking may, at times, produce outputs that can be considered inaccurate, prejudiced, or controversial. Users and developers engaging with Viking should exercise discretion and consider additional evaluation and customization to ensure the model's responses align with their specific needs and ethical standards.
|
116 |
+
|
117 |
+
## License
|
118 |
+
|
119 |
+
Viking is released under the Apache 2.0 license.
|