Occiglot-7B-ES-EN-Instruct is a the instruct version of
occiglot-7b-es-en, a generative language model with 7B parameters supporting the Spanish and English and trained by the
Occiglot Research Collective.
It was trained on 160M tokens of additional multilingual and code instructions.
Note that the model was not safety aligned and might generate problematic outputs.
This is the first release of an ongoing open research project for multilingual language models.
If you want to train a model for your own language or are working on evaluations, please contact us or join our
Discord server.
We are open for collaborations!
The model was trained using the chatml instruction template. You can use the transformers chat template feature for interaction.
Since the generation relies on some randomness, we
set a seed for reproducibility:
1>>> from transformers import AutoTokenizer, MistralForCausalLM, set_seed
2>>> tokenizer = AutoTokenizer.from_pretrained("occiglot/occiglot-7b-es-en-instruct")
3>>> model = MistralForCausalLM.from_pretrained('occiglot/occiglot-7b-es-en-instruct') # You may want to use bfloat16 and/or move to GPU here
4>>> set_seed(42)
5>>> messages = [
6>>> {"role": "system", 'content': 'You are a helpful assistant. Please give short and concise answers.'},
7>>> {"role": "user", "content": "¿quién es el presidente del gobierno español?"},
8>>> ]
9>>> tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_dict=False, return_tensors='pt',)
10>>> set_seed(42)
11>>> outputs = model.generate(tokenized_chat.to('cuda'), max_new_tokens=200,)
12>>> tokenizer.decode(out[0][len(tokenized_chat[0]):])
13'Actualmente el presidente del gobierno español es Pedro Sánchez Pérez-Castejón'
The training data was split evenly amongst Spanish and English based on the total number of tokens.
Tokenizer is unchanged from
Mistral-7B-v0.1.
Preliminary evaluation results can be found below.
Please note that the non-English results are based on partially machine-translated datasets and English prompts (
Belebele and
Okapi framework) and thus should be interpreted with caution, e.g., biased towards English model performance.
Currently, we are working on more suitable benchmarks for Spanish, French, German, and Italian.
Detailed results can be found
here