miscovery commited on
Commit
75046e5
·
verified ·
1 Parent(s): ceb2313

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,59 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: multilingual
3
+ license: mit
4
+ tags:
5
+ - transformer
6
+ - summarization
7
+ - translation
8
+ - question-answering
9
+ - english
10
+ - arabic
11
+ ---
12
+
13
+ # Miscovery Transformer Model
14
+
15
+ This model is a transformer-based encoder-decoder model for multiple NLP tasks:
16
+ - Text summarization
17
+ - Translation (English-Arabic)
18
+ - Question-answering
19
+
20
+ ## Model Architecture
21
+
22
+ - Model type: miscovery
23
+ - Number of parameters: 485674144
24
+ - Encoder layers: 12
25
+ - Decoder layers: 12
26
+ - Attention heads: 12
27
+ - Hidden size: 768
28
+ - Feed-forward size: 3072
29
+
30
+ ## Training
31
+
32
+ The model was trained in two stages:
33
+ 1. Pre-training on sentence rearrangement tasks
34
+ 2. Fine-tuning on downstream tasks
35
+
36
+ ## Usage
37
+
38
+ 1. Install the package:
39
+
40
+ ```bash
41
+ pip install miscovery_model
42
+ ```
43
+
44
+ 2. Run the model using a script:
45
+
46
+ ```python
47
+ from miscovery_model import standard_pipeline
48
+
49
+ # Create a pipeline
50
+ model = standard_pipeline("miscovery/model")
51
+
52
+ # Use it
53
+ result = model("Translate this to Arabic: What year did World War I begin?")
54
+ print(result)
55
+ ```
56
+
57
+ ## Limitations
58
+
59
+ This model was trained on specific datasets and may not generalize well to all domains.
__init__.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ """Miscovery model package."""
2
+
3
+ from .configuration_miscovery import CustomTransformerConfig
4
+ from .modeling_miscovery import CustomTransformerModel
5
+
6
+ __all__ = [
7
+ "CustomTransformerConfig",
8
+ "CustomTransformerModel",
9
+ ]
config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CustomTransformerModel"
4
+ ],
5
+ "bos_token_id": 2,
6
+ "d_ff": 3072,
7
+ "d_model": 768,
8
+ "dropout": 0.1,
9
+ "eos_token_id": 3,
10
+ "max_position_embeddings": 512,
11
+ "model_type": "miscovery",
12
+ "num_decoder_layers": 12,
13
+ "num_encoder_layers": 12,
14
+ "num_heads": 12,
15
+ "pad_token_id": 0,
16
+ "torch_dtype": "float32",
17
+ "transformers_version": "4.51.3",
18
+ "use_flash_attn": true,
19
+ "vocab_size": 100000
20
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 2,
4
+ "eos_token_id": 3,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.51.3"
7
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb1bfda864e7d2b7f8bcd799f7e9f8e2bb90284b9b939d0e2247188856432f56
3
+ size 1942969746
special_tokens_map.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "[LANG_EN]",
4
+ "[LANG_AR]",
5
+ "[LANG_AR_EG]"
6
+ ],
7
+ "cls_token": {
8
+ "content": "[CLS]",
9
+ "lstrip": false,
10
+ "normalized": false,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "mask_token": {
15
+ "content": "[MASK]",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "pad_token": {
22
+ "content": "[PAD]",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "sep_token": {
29
+ "content": "[SEP]",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ },
35
+ "unk_token": {
36
+ "content": "[UNK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false
41
+ }
42
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "5": {
44
+ "content": "[LANG_EN]",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "6": {
52
+ "content": "[LANG_AR]",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "7": {
60
+ "content": "[LANG_AR_EG]",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ }
67
+ },
68
+ "additional_special_tokens": [
69
+ "[LANG_EN]",
70
+ "[LANG_AR]",
71
+ "[LANG_AR_EG]"
72
+ ],
73
+ "clean_up_tokenization_spaces": true,
74
+ "cls_token": "[CLS]",
75
+ "extra_special_tokens": {},
76
+ "mask_token": "[MASK]",
77
+ "model_max_length": 1000000000000000019884624838656,
78
+ "pad_token": "[PAD]",
79
+ "sep_token": "[SEP]",
80
+ "tokenizer_class": "PreTrainedTokenizer",
81
+ "unk_token": "[UNK]"
82
+ }