oluwatosin adewumi commited on
Commit
1f69796
1 Parent(s): a40df3e

Wolof model created.

Browse files
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ thumbnail: https://huggingface.co/front/thumbnails/dialogpt.png
3
+ language:
4
+ - en
5
+ license: cc-by-4.0
6
+ tags:
7
+ - conversational
8
+ - transformers
9
+ datasets:
10
+ - multi_woz_v22 and AfriWOZ
11
+ metrics:
12
+ - perplexity
13
+ widget:
14
+ - text: "dedet li rek la soxla. jerejef. ba benen yoon."
15
+ ---
16
+
17
+ ## DialoGPT_AfriWOZ
18
+
19
+ This is a fine-tuned model of DialoGPT (medium)-MutiWOZ on the AfriWOZ dataset. It is intended to be used as a conversational system in Wolof language.
20
+ The dataset it's trained on is limited in scope, as it covers only certain domains such as restaurants, hotel, taxi, and booking.
21
+
22
+ The perplexity achieved on the test and validation sets are 20.74 and 11.66, respectively. More information about the original pre-trained model can be found [here](https://huggingface.co/tosin/dialogpt_mwoz)
23
+
24
+ * Generation example from an interactive environment:
25
+
26
+ |Role | Response |
27
+ |---------|------------|
28
+ |User | sowwu bi la bëg |
29
+ |Bot | waw, ndax mën ngan ma jox ay leeral si bërëb buñu feetee ak lekkukaay bi |
30
+ |User | soxla na dem gawu. ngir leeral rek bëg na joggee peterborough di dem cambridge |
31
+ |Bot | soxlu na dem ginaw jurrom ñenti waxtu ak ñaar fukki simili ak jurrom ben. |
32
+ |User | waw jiss sal ma ben bu seer si njëg si toluway |
33
+ |Bot | jënd bi baaxna. jerejef. ba benen yoon. |
34
+
35
+ Please find the information about preprocessing, training and full details of the DialoGPT in the [original DialoGPT repository](https://github.com/microsoft/DialoGPT)
36
+
37
+ The paper for this work can be found on arXiv: [https://arxiv.org/pdf/2204.08083.pdf](https://arxiv.org/pdf/2204.08083.pdf)
38
+
39
+ ### How to use
40
+
41
+ Now we are ready to try out how the model works as a chatting partner!
42
+
43
+ ```python
44
+ from transformers import AutoModelForCausalLM, AutoTokenizer
45
+ import torch
46
+ tokenizer = AutoTokenizer.from_pretrained("tosin/dialogpt_mwoz")
47
+ model = AutoModelForCausalLM.from_pretrained("tosin/dialogpt_mwoz")
48
+ # Let's chat for 5 lines
49
+ for step in range(5):
50
+ # encode the new user input, add the eos_token and return a tensor in Pytorch
51
+ new_user_input_ids = tokenizer.encode(input(">> User:") + tokenizer.eos_token, return_tensors='pt')
52
+ # append the new user input tokens to the chat history
53
+ bot_input_ids = torch.cat([chat_history_ids, new_user_input_ids], dim=-1) if step > 0 else new_user_input_ids
54
+ # generated a response while limiting the total chat history to 1000 tokens,
55
+ chat_history_ids = model.generate(bot_input_ids, max_length=1000, pad_token_id=tokenizer.eos_token_id)
56
+ # pretty print last ouput tokens from bot
57
+ print("DialoGPT_wolof_Bot: {}".format(tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens=True)))
58
+
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/DialoGPT-small",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.1,
8
+ "bos_token_id": 50256,
9
+ "embd_pdrop": 0.1,
10
+ "eos_token_id": 50256,
11
+ "gradient_checkpointing": false,
12
+ "initializer_range": 0.02,
13
+ "layer_norm_epsilon": 1e-05,
14
+ "model_type": "gpt2",
15
+ "n_ctx": 1024,
16
+ "n_embd": 768,
17
+ "n_head": 12,
18
+ "n_inner": null,
19
+ "n_layer": 12,
20
+ "n_positions": 1024,
21
+ "resid_pdrop": 0.1,
22
+ "summary_activation": null,
23
+ "summary_first_dropout": 0.1,
24
+ "summary_proj_to_labels": true,
25
+ "summary_type": "cls_index",
26
+ "summary_use_proj": true,
27
+ "task_specific_params": {
28
+ "conversational": {
29
+ "max_length": 1000
30
+ }
31
+ },
32
+ "transformers_version": "4.2.2",
33
+ "use_cache": true,
34
+ "vocab_size": 50257
35
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b112a67fa5744c69b3ccc87d69183a7bd68985c3e4af89270ebaefeb5555bb48
3
+ size 510406560
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "microsoft/DialoGPT-small", "errors": "replace"}
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8260a7a2753f134046297f84e2a12f7064aa150ec129137d3046d0aabfce700c
3
+ size 1327
vocab.json ADDED
The diff for this file is too large to render. See raw diff