

# mGPT: fine-tune on message data - 2E

- This model is a fine-tuned version of [sberbank-ai/mGPT](https://huggingface.co/sberbank-ai/mGPT) on 80k messages. This builds on the minimum-working-example checkpoint [here](https://huggingface.co/pszemraj/mGPT-Peter-mwe).
- 2E = 2 epochs

## Model description

- testing if fine-tuned personality data bleeds over to other languages without being trained in them explicitly 

**Interesting findings thus far:**

- Passing a generic word after the `<name-identifier>` that is in a non-English language helps ensure the model responds in the question language (see: any example).
- Model generations (in general) remain semantically consistent, even if the generations switch from  `<language>`to English in the middle of the generated text. This demonstrates some sort of "universal concept understanding"

### Usage in python

Install the transformers library if you don't have it:

```
pip install -U transformers
```

load the model into a pipeline object:


```
from transformers import pipeline
import torch
device = 'cuda' if torch.cuda.is_available() else 'cpu'
my_chatbot = pipeline('text-generation', 
                      'pszemraj/mGPT-Peter-2E',
                      device=0 if device == 'cuda' else -1,
                    )
```




## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 1 (in addition to all training on prior checkpoints)

### Framework versions

- Transformers 4.18.0
- Pytorch 1.11.0+cu113
- Datasets 2.1.0
- Tokenizers 0.12.1

{"license": "apache-2.0", "tags": ["multilingual", "PyTorch", "Transformers", "gpt3", "gpt2", "Deepspeed", "Megatron", "mGPT"], "datasets": ["mc4", "Wikipedia"], "pipeline_tag": "text-generation", "widget": [{"text": "Ich wei\u00df, dass du m\u00fcde bist, aber k\u00f6nnen wir heute Abend noch einen Spaziergang machen? peter szemraj: ich", "example_title": "walk - Deutsch"}, {"text": "peter szemraj: \u6211\u559c\u6b22\u7a7f\u5f88\u9177\u7684\u8863\u670d", "example_title": "fashion - Chinese"}, {"text": "Wat zei je over mijn moeder? peter szemraj: ik", "example_title": "\ud83d\ude8e - Dutch"}, {"text": "Zagadka: Cz\u0142owiekowi, kt\u00f3ry przebywa\u0142 na dworze w deszczu bez parasola czy kapelusza, nie zmoczy\u0142 si\u0119 ani jeden w\u0142os na g\u0142owie. Dlaczego? peter szemraj: czy to", "example_title": "brain teaser - Polish"}, {"text": "Minha amiga diz que conhece todas as l\u00ednguas, mas n\u00e3o fala nenhuma delas... o que h\u00e1 de errado com ela? peter szemraj: eu", "example_title": "language - Portuguese"}, {"text": "se potesse vivere ovunque, dove sarebbe? peter szemraj: io", "example_title": "dream living place - Italian"}, {"text": "Can you take me for dinner somewhere nice this time? peter szemraj:", "example_title": "dinner"}, {"text": "What really makes you angry? peter szemraj:", "example_title": "pet peeve"}, {"text": "Jak nazwa\u0107 aligatora, kt\u00f3ry w\u0142a\u015bnie przeszed\u0142 operacj\u0119 usuni\u0119cia lewego ramienia?peter szemraj: ja", "example_title": "alligator - Polish"}, {"text": "Warum sind Transformers f\u00fcr die Sprachmodellierung wichtig?  peter szemraj: es ist", "example_title": "Transformers - German"}, {"text": "\u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439? peter szemraj: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e", "example_title": "prompt tutorial - Russian"}, {"text": "Pewien m\u0119\u017cczyzna wpycha sw\u00f3j samoch\u00f3d do hotelu i m\u00f3wi w\u0142a\u015bcicielowi, \u017ce jest bankrutem. Dlaczego? peter szemraj: mo\u017ce", "example_title": "brain teaser - Polish 2"}, {"text": "Zagadka: M\u00f3wi\u0119 bez ust i s\u0142ysz\u0119 bez uszu. Nie mam cia\u0142a, ale o\u017cywiam si\u0119 wraz z wiatrem. Czym jestem? peter szemraj: czy to", "example_title": "brain teaser - Polish 3"}, {"text": "Qu\u00e8 t'agrada fer per divertir-te? peter szemraj: m'agrada", "example_title": "hobbies - Catalan"}, {"text": "\u4e3a\u4ec0\u4e48\u4f60\u603b\u662f\u90a3\u4e48\u7d2f\uff1fpeter szemraj: \u5443\uff0c\u6211\u60f3", "example_title": "tired - Chinese"}], "inference": {"parameters": {"min_length": 2, "max_length": 64, "do_sample": true, "top_k": 10, "top_p": 0.9, "temperature": 0.65, "repetition_penalty": 3.5, "no_repeat_ngram_size": 3, "length_penalty": 0.4, "pad_token": 1}}}
transformers pytorch safetensors gpt2 text-generation multilingual PyTorch Transformers gpt3 Deepspeed Megatron mGPT dataset:mc4 dataset:Wikipedia license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #safetensors #gpt2 #text-generation #multilingual #PyTorch #Transformers #gpt3 #Deepspeed #Megatron #mGPT #dataset-mc4 #dataset-Wikipedia #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 



# mGPT: fine-tune on message data - 2E

- This model is a fine-tuned version of sberbank-ai/mGPT on 80k messages. This builds on the minimum-working-example checkpoint here.
- 2E = 2 epochs

## Model description

- testing if fine-tuned personality data bleeds over to other languages without being trained in them explicitly 

Interesting findings thus far:

- Passing a generic word after the '<name-identifier>' that is in a non-English language helps ensure the model responds in the question language (see: any example).
- Model generations (in general) remain semantically consistent, even if the generations switch from  '<language>'to English in the middle of the generated text. This demonstrates some sort of "universal concept understanding"

### Usage in python

Install the transformers library if you don't have it:



load the model into a pipeline object:







## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 1 (in addition to all training on prior checkpoints)

### Framework versions

- Transformers 4.18.0
- Pytorch 1.11.0+cu113
- Datasets 2.1.0
- Tokenizers 0.12.1

# mGPT: fine-tune on message data - 2E

- This model is a fine-tuned version of sberbank-ai/mGPT on 80k messages. This builds on the minimum-working-example checkpoint here.
- 2E = 2 epochs ## Model description

- testing if fine-tuned personality data bleeds over to other languages without being trained in them explicitly 

Interesting findings thus far:

- Passing a generic word after the '<name-identifier>' that is in a non-English language helps ensure the model responds in the question language (see: any example).
- Model generations (in general) remain semantically consistent, even if the generations switch from  '<language>'to English in the middle of the generated text. This demonstrates some sort of "universal concept understanding" ### Usage in python

Install the transformers library if you don't have it:



load the model into a pipeline object: ## Training procedure ### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 1 (in addition to all training on prior checkpoints) ### Framework versions

- Transformers 4.18.0
- Pytorch 1.11.0+cu113
- Datasets 2.1.0
- Tokenizers 0.12.1
TAGS
#transformers #pytorch #safetensors #gpt2 #text-generation #multilingual #PyTorch #Transformers #gpt3 #Deepspeed #Megatron #mGPT #dataset-mc4 #dataset-Wikipedia #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # mGPT: fine-tune on message data - 2E

- This model is a fine-tuned version of sberbank-ai/mGPT on 80k messages. This builds on the minimum-working-example checkpoint here.
- 2E = 2 epochs ## Model description

- testing if fine-tuned personality data bleeds over to other languages without being trained in them explicitly 

Interesting findings thus far:

- Passing a generic word after the '<name-identifier>' that is in a non-English language helps ensure the model responds in the question language (see: any example).
- Model generations (in general) remain semantically consistent, even if the generations switch from  '<language>'to English in the middle of the generated text. This demonstrates some sort of "universal concept understanding" ### Usage in python

Install the transformers library if you don't have it:



load the model into a pipeline object: ## Training procedure ### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 1 (in addition to all training on prior checkpoints) ### Framework versions

- Transformers 4.18.0
- Pytorch 1.11.0+cu113
- Datasets 2.1.0
- Tokenizers 0.12.1
passage: TAGS
#transformers #pytorch #safetensors #gpt2 #text-generation #multilingual #PyTorch #Transformers #gpt3 #Deepspeed #Megatron #mGPT #dataset-mc4 #dataset-Wikipedia #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
# mGPT: fine-tune on message data - 2E

- This model is a fine-tuned version of sberbank-ai/mGPT on 80k messages. This builds on the minimum-working-example checkpoint here.
- 2E = 2 epochs## Model description

- testing if fine-tuned personality data bleeds over to other languages without being trained in them explicitly 

Interesting findings thus far:

- Passing a generic word after the '<name-identifier>' that is in a non-English language helps ensure the model responds in the question language (see: any example).
- Model generations (in general) remain semantically consistent, even if the generations switch from  '<language>'to English in the middle of the generated text. This demonstrates some sort of "universal concept understanding"### Usage in python

Install the transformers library if you don't have it:



load the model into a pipeline object:## Training procedure### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_ratio: 0.05
- num_epochs: 1 (in addition to all training on prior checkpoints)