Update README.md
Browse files
README.md
CHANGED
|
@@ -7,7 +7,6 @@ tags:
|
|
| 7 |
- transformers
|
| 8 |
language:
|
| 9 |
- bn
|
| 10 |
-
- en
|
| 11 |
metrics:
|
| 12 |
- chrf
|
| 13 |
- bleu
|
|
@@ -26,156 +25,111 @@ Translate Bangla sentences to Bangla Sign Language(BdSL) gloss with a lightweigh
|
|
| 26 |
<!-- Provide a longer summary of what this model is. -->
|
| 27 |
|
| 28 |
|
| 29 |
-
- **Developed by:**
|
| 30 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 31 |
-
- **Model type:** [More Information Needed]
|
| 32 |
-
- **Language(s) (NLP):**
|
| 33 |
-
- **License:** [More Information Needed]
|
| 34 |
-
- **Finetuned from model
|
| 35 |
|
| 36 |
### Model Sources [optional]
|
| 37 |
|
| 38 |
<!-- Provide the basic links for the model. -->
|
| 39 |
|
| 40 |
-
- **Repository:** [More Information Needed]
|
| 41 |
-
- **Paper [optional]:**
|
| 42 |
-
- **Demo [optional]:** [More Information Needed]
|
| 43 |
|
| 44 |
## Uses
|
| 45 |
|
| 46 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 47 |
-
|
| 48 |
-
### Direct Use
|
| 49 |
|
| 50 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
|
|
|
| 53 |
|
| 54 |
-
#
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
### Out-of-Scope Use
|
| 61 |
|
| 62 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
|
|
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
## Bias, Risks, and Limitations
|
| 67 |
-
|
| 68 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 69 |
|
| 70 |
-
[More Information Needed]
|
| 71 |
-
|
| 72 |
-
### Recommendations
|
| 73 |
-
|
| 74 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 75 |
|
| 76 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 77 |
|
| 78 |
-
##
|
| 79 |
-
|
| 80 |
-
Use the code below to get started with the model.
|
| 81 |
-
|
| 82 |
-
[More Information Needed]
|
| 83 |
|
| 84 |
-
## Training
|
| 85 |
-
|
| 86 |
-
### Training Data
|
| 87 |
|
| 88 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 89 |
|
| 90 |
-
[More Information Needed]
|
| 91 |
|
| 92 |
-
### Training Procedure
|
| 93 |
|
| 94 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 95 |
|
| 96 |
-
#### Preprocessing [optional]
|
| 97 |
-
|
| 98 |
-
[More Information Needed]
|
| 99 |
-
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 104 |
|
| 105 |
-
####
|
| 106 |
|
| 107 |
-
<!--
|
| 108 |
|
| 109 |
-
[More Information Needed]
|
| 110 |
|
| 111 |
-
## Evaluation
|
| 112 |
|
| 113 |
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 114 |
|
| 115 |
-
### Testing Data, Factors & Metrics
|
| 116 |
|
| 117 |
-
#### Testing Data
|
| 118 |
|
| 119 |
<!-- This should link to a Dataset Card if possible. -->
|
| 120 |
|
| 121 |
-
[More Information Needed]
|
| 122 |
-
|
| 123 |
-
#### Factors
|
| 124 |
-
|
| 125 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 126 |
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
#### Metrics
|
| 130 |
|
| 131 |
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 132 |
|
| 133 |
-
[More Information Needed]
|
| 134 |
-
|
| 135 |
-
### Results
|
| 136 |
-
|
| 137 |
-
[More Information Needed]
|
| 138 |
-
|
| 139 |
-
#### Summary
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
## Model Examination [optional]
|
| 144 |
-
|
| 145 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 146 |
-
|
| 147 |
-
[More Information Needed]
|
| 148 |
|
| 149 |
|
| 150 |
## Citation [optional]
|
| 151 |
|
| 152 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
|
|
|
| 153 |
|
| 154 |
**BibTeX:**
|
| 155 |
|
| 156 |
[More Information Needed]
|
| 157 |
|
| 158 |
-
**APA:**
|
| 159 |
-
|
| 160 |
-
[More Information Needed]
|
| 161 |
-
|
| 162 |
-
## Glossary [optional]
|
| 163 |
-
|
| 164 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 165 |
-
|
| 166 |
-
[More Information Needed]
|
| 167 |
-
|
| 168 |
-
## More Information [optional]
|
| 169 |
-
|
| 170 |
-
[More Information Needed]
|
| 171 |
-
|
| 172 |
-
## Model Card Authors [optional]
|
| 173 |
-
|
| 174 |
-
[More Information Needed]
|
| 175 |
-
|
| 176 |
-
## Model Card Contact
|
| 177 |
-
|
| 178 |
-
[More Information Needed]
|
| 179 |
### Framework versions
|
| 180 |
|
| 181 |
- PEFT 0.18.0
|
|
|
|
| 7 |
- transformers
|
| 8 |
language:
|
| 9 |
- bn
|
|
|
|
| 10 |
metrics:
|
| 11 |
- chrf
|
| 12 |
- bleu
|
|
|
|
| 25 |
<!-- Provide a longer summary of what this model is. -->
|
| 26 |
|
| 27 |
|
| 28 |
+
- **Developed by:** Sharif Mohammad Abdullah
|
| 29 |
+
<!-- - **Shared by [optional]:** [More Information Needed] -->
|
| 30 |
+
<!-- - **Model type:** [More Information Needed] -->
|
| 31 |
+
- **Language(s) (NLP):** Bangla to Bangla Gloss
|
| 32 |
+
<!-- - **License:** [More Information Needed] -->
|
| 33 |
+
- **Finetuned from model:** mbart-large-50
|
| 34 |
|
| 35 |
### Model Sources [optional]
|
| 36 |
|
| 37 |
<!-- Provide the basic links for the model. -->
|
| 38 |
|
| 39 |
+
<!-- - **Repository:** [More Information Needed] -->
|
| 40 |
+
- **Paper [optional]:** https://arxiv.org/abs/2504.02293
|
|
|
|
| 41 |
|
| 42 |
## Uses
|
| 43 |
|
| 44 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 45 |
+
You can use the following snippet to do a test run for a sample sentence:
|
|
|
|
| 46 |
|
| 47 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 48 |
+
```
|
| 49 |
+
from transformers import MBartForConditionalGeneration, AutoTokenizer
|
| 50 |
+
from peft import PeftModel
|
| 51 |
|
| 52 |
+
model_path = "ayhay/BanglaText2Gloss"
|
| 53 |
+
base_id = "facebook/mbart-large-50"
|
| 54 |
|
| 55 |
+
# 1. Load Tokenizer & Model with Adapters
|
| 56 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 57 |
+
base_model = MBartForConditionalGeneration.from_pretrained(base_id)
|
| 58 |
+
model = PeftModel.from_pretrained(base_model, model_path)
|
| 59 |
|
| 60 |
+
# 2. Run Translation
|
| 61 |
+
text = "আপনি কেমন আছেন?"
|
| 62 |
+
inputs = tokenizer(text, return_tensors="pt")
|
| 63 |
|
| 64 |
+
output_tokens = model.generate(**inputs, max_new_tokens=50)
|
| 65 |
+
gloss = tokenizer.batch_decode(output_tokens, skip_special_tokens=True)
|
| 66 |
+
|
| 67 |
+
print(f"Bangla: {text}")
|
| 68 |
+
print(f"Sign Gloss: {gloss[0]}")
|
| 69 |
+
```
|
| 70 |
|
| 71 |
### Out-of-Scope Use
|
| 72 |
|
| 73 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 74 |
+
The model will not work for any languages other than Bangla.
|
| 75 |
|
| 76 |
+
<!-- ## Bias, Risks, and Limitations
|
| 77 |
+
-->
|
|
|
|
|
|
|
| 78 |
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 79 |
|
| 80 |
+
<!-- [More Information Needed] -->
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
|
|
|
| 82 |
|
| 83 |
+
<!-- ## Training Details -->
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
<!-- ### Training Data -->
|
|
|
|
|
|
|
| 86 |
|
| 87 |
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 88 |
|
| 89 |
+
<!-- [More Information Needed] -->
|
| 90 |
|
| 91 |
+
<!-- ### Training Procedure -->
|
| 92 |
|
| 93 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 94 |
|
| 95 |
+
<!-- #### Preprocessing [optional] -->
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
+
<!-- [More Information Needed] -->
|
| 98 |
|
|
|
|
| 99 |
|
| 100 |
+
<!-- #### Training Hyperparameters -->
|
| 101 |
|
| 102 |
+
<!-- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision --> -->
|
| 103 |
|
|
|
|
| 104 |
|
| 105 |
+
<!-- ## Evaluation -->
|
| 106 |
|
| 107 |
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 108 |
|
| 109 |
+
<!-- ### Testing Data, Factors & Metrics -->
|
| 110 |
|
| 111 |
+
<!-- #### Testing Data -->
|
| 112 |
|
| 113 |
<!-- This should link to a Dataset Card if possible. -->
|
| 114 |
|
| 115 |
+
<!-- [More Information Needed] -->
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
+
<!-- #### Metrics -->
|
|
|
|
|
|
|
| 118 |
|
| 119 |
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 120 |
|
| 121 |
+
<!-- [More Information Needed] -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
|
| 124 |
## Citation [optional]
|
| 125 |
|
| 126 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 127 |
+
If you use this model in your works, pleasae cite using the following bibtex format:
|
| 128 |
|
| 129 |
**BibTeX:**
|
| 130 |
|
| 131 |
[More Information Needed]
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
### Framework versions
|
| 134 |
|
| 135 |
- PEFT 0.18.0
|