mbrack commited on
Commit
a67a700
1 Parent(s): 6fa091a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +133 -0
README.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - es
6
+ - de
7
+ - fr
8
+ - it
9
+ pipeline_tag: text-generation
10
+ ---
11
+
12
+ ![image/png](https://huggingface.co/datasets/malteos/images/resolve/main/occiglot.medium.png)
13
+
14
+ # Occiglot-7B-EU5
15
+
16
+ > A [polyglot](https://en.wikipedia.org/wiki/Multilingualism#In_individuals) language model for the [Occident](https://en.wikipedia.org/wiki/Occident).
17
+ >
18
+
19
+ **Occiglot-7B-EU5-Instruct** is a the instruct version of [occiglot-7b-eu5](https://huggingface.co/occiglot/occiglot-7b-eu5/edit/main/README.md), a generative language model with 7B parameters supporting the top-5 EU languages (English, Spanish, French, German, and Italian) and trained by the [Occiglot Research Collective](https://occiglot.github.io/occiglot/).
20
+ It is based on [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) and trained on 400M tokens of additional multilingual and code instructions with a block size of 8,192 tokens per sample.
21
+ Note that the model was not safety aligned and might generate problematic outputs.
22
+
23
+ This is the first release of an ongoing open research project for multilingual language models.
24
+ If you want to train a model for your own language or are working on evaluations, please contact us or join our [Discord server](https://discord.gg/wUpvYs4XvM). **We are open for collaborations!**
25
+
26
+
27
+ ### Model details
28
+
29
+ - **Continued-pretraining from:** [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1)
30
+ - **Model type:** Causal decoder-only transformer language model
31
+ - **Languages:** English, Spanish, French, German, Italian, and code.
32
+ - **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
33
+ - **Compute resources:** [DFKI cluster](https://www.dfki.de/en/web)
34
+ - **Contributors:** Manuel Brack, Patrick Schramowski, Pedro Ortiz, Malte Ostendorff, Fabio Barth, Georg Rehm, Kristian Kersting
35
+ - **Research labs:** [Occiglot](https://occiglot.github.io/occiglot/) with support from [SAINT](https://www.dfki.de/en/web/research/research-departments/foundations-of-systems-ai) and [SLT](https://www.dfki.de/en/web/research/research-departments/speech-and-language-technology)
36
+ - **Contact:** [Discord](https://discord.gg/wUpvYs4XvM) [hello@occiglot.org](mailto:hello@occiglot.org)
37
+
38
+ ### How to use
39
+
40
+ The model was trained using the chatml instruction template. You can use the transformers chat template feature for interaction.
41
+ Since the generation relies on some randomness, we
42
+ set a seed for reproducibility:
43
+
44
+ ```python
45
+ >>> from transformers import AutoTokenizer, MistralForCausalLM, set_seed
46
+ >>> tokenizer = AutoTokenizer.from_pretrained("occiglot/occiglot-7b-de-en-instruct")
47
+ >>> model = MistralForCausalLM.from_pretrained('occiglot/occiglot-7b-de-en-instruct') # You may want to use bfloat16 and/or move to GPU here
48
+ >>> set_seed(42)
49
+ >>> messages = [
50
+ >>> {"role": "system", 'content': 'You are a helpful assistant. Please give short and concise answers.'},
51
+ >>> {"role": "user", "content": "Wer ist der deutsche Bundeskanzler?"},
52
+ >>> ]
53
+ >>> tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_dict=False, return_tensors='pt',)
54
+ >>> set_seed(42)
55
+ >>> outputs = model.generate(tokenized_chat.to('cuda'), max_new_tokens=200,)
56
+ >>> tokenizer.decode(out[0][len(tokenized_chat[0]):])
57
+ 'Der deutsche Bundeskanzler ist Olaf Scholz.'
58
+ ```
59
+
60
+ ## Dataset
61
+
62
+ The training data was split evenly amongst the 5 languages based on the total number of tokens. We would like to thank Disco Research and Björn Plüster for making their dataset available to us.
63
+
64
+ **English and Code**
65
+ - [Open-Hermes-2B](https://huggingface.co/datasets/teknium/OpenHermes-2.5)
66
+
67
+ **German**
68
+ - [DiscoLM German Dataset](https://huggingface.co/DiscoResearch)
69
+ - [OASST-2](https://huggingface.co/datasets/OpenAssistant/oasst2) (German subset)
70
+ - [Aya-Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset) (German subset)
71
+
72
+ **Spanish**
73
+ - [Mentor-ES](https://huggingface.co/datasets/projecte-aina/MentorES)
74
+ - [Squad-es](https://huggingface.co/datasets/squad_es)
75
+ - [OASST-2](https://huggingface.co/datasets/OpenAssistant/oasst2) (Spanish subset)
76
+ - [Aya-Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset) (Spanish subset)
77
+
78
+ **French**
79
+ - [Bactrian-X](https://huggingface.co/datasets/MBZUAI/Bactrian-X) (French subset)
80
+ - [AI-Society Translated](https://huggingface.co/datasets/camel-ai/ai_society_translated) (French subset)
81
+ - [GT-Dorimiti](https://huggingface.co/datasets/Gt-Doremiti/gt-doremiti-instructions)
82
+ - [OASST-2](https://huggingface.co/datasets/OpenAssistant/oasst2) (French subset)
83
+ - [Aya-Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset) (French subset)
84
+
85
+ **Italian**
86
+ - [Quora-IT-Baize](https://huggingface.co/datasets/andreabac3/Quora-Italian-Fauno-Baize)
87
+ - [Stackoverflow-IT-Vaize](https://huggingface.co/datasets/andreabac3/StackOverflow-Italian-Fauno-Baize)
88
+ - [Camoscio](https://huggingface.co/datasets/teelinsan/camoscio_cleaned)
89
+ - [OASST-2](https://huggingface.co/datasets/OpenAssistant/oasst2) (Italian subset)
90
+ - [Aya-Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset) (Italian subset)
91
+
92
+ ## Training settings
93
+
94
+ - Full instruction fine-tuning on 8xH100.
95
+ - 0.6 - 4 training epochs (depending on dataset sampling).
96
+ - Framework: [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl)
97
+ - Precision: bf16
98
+ - Optimizer: AdamW
99
+ - Global batch size: 128 (with 8192 context length)
100
+ - Cosine Annealing with Warmup
101
+
102
+
103
+ ## Tokenizer
104
+
105
+ Tokenizer is unchanged from [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1).
106
+
107
+ ## Evaluation
108
+
109
+ Preliminary evaluation results can be found below.
110
+ Please note that the non-English results are based on partially machine-translated datasets and English prompts ([Belebele](https://huggingface.co/datasets/facebook/belebele) and [Okapi framework](https://github.com/nlp-uoregon/Okapi)) and thus should be interpreted with caution, e.g., biased towards English model performance.
111
+ Currently, we are working on more suitable benchmarks for Spanish, French, German, and Italian.
112
+
113
+ <details>
114
+ <summary>Evaluation results</summary>
115
+
116
+
117
+ </details>
118
+
119
+ ## Acknowledgements
120
+
121
+ The pre-trained model training was supported by a compute grant at the [42 supercomputer](https://hessian.ai/) which is a central component in the development of [hessian AI](https://hessian.ai/), the [AI Innovation Lab](https://hessian.ai/infrastructure/ai-innovationlab/) (funded by the [Hessian Ministry of Higher Education, Research and the Art (HMWK)](https://wissenschaft.hessen.de) & the [Hessian Ministry of the Interior, for Security and Homeland Security (HMinD)](https://innen.hessen.de)) and the [AI Service Centers](https://hessian.ai/infrastructure/ai-service-centre/) (funded by the [German Federal Ministry for Economic Affairs and Climate Action (BMWK)](https://www.bmwk.de/Navigation/EN/Home/home.html)).
122
+ The curation of the training data is partially funded by the [German Federal Ministry for Economic Affairs and Climate Action (BMWK)](https://www.bmwk.de/Navigation/EN/Home/home.html)
123
+ through the project [OpenGPT-X](https://opengpt-x.de/en/) (project no. 68GX21007D).
124
+
125
+
126
+ ## License
127
+
128
+ [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
129
+
130
+ ## See also
131
+
132
+ - https://huggingface.co/collections/occiglot/occiglot-eu5-7b-v01-65dbed502a6348b052695e01
133
+