Improve language tag (#1)
Browse files- Improve language tag (9f8dc333e1e8bb6e3f529d02740f9a0edbfe8aea)
Co-authored-by: Loïck BOURDOIS <lbourdois@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -1,249 +1,263 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
tags:
|
| 4 |
-
- unsloth
|
| 5 |
-
- trl
|
| 6 |
-
- grpo
|
| 7 |
-
- LLM
|
| 8 |
-
- BGB
|
| 9 |
-
- German
|
| 10 |
-
- transformers
|
| 11 |
-
- AI
|
| 12 |
-
- DeepLearning
|
| 13 |
-
- ReinforcementLearning
|
| 14 |
-
- MachineLearning
|
| 15 |
-
license: apache-2.0
|
| 16 |
-
base_model:
|
| 17 |
-
- Qwen/Qwen2.5-3B
|
| 18 |
-
- Qwen/Qwen2.5-VL-3B-Instruct
|
| 19 |
-
pipeline_tag: question-answering
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
### Model
|
| 45 |
-
|
| 46 |
-
<!-- Provide
|
| 47 |
-
|
| 48 |
-
-
|
| 49 |
-
|
| 50 |
-
- **
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
[More Information Needed]
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
[More Information Needed]
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
###
|
| 105 |
-
|
| 106 |
-
<!-- This
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
<!--
|
| 181 |
-
|
| 182 |
-
[More Information Needed]
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
[More Information Needed]
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
[More Information Needed]
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
[More Information Needed]
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
##
|
| 248 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 249 |
jaffry258@gmail.com
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- unsloth
|
| 5 |
+
- trl
|
| 6 |
+
- grpo
|
| 7 |
+
- LLM
|
| 8 |
+
- BGB
|
| 9 |
+
- German
|
| 10 |
+
- transformers
|
| 11 |
+
- AI
|
| 12 |
+
- DeepLearning
|
| 13 |
+
- ReinforcementLearning
|
| 14 |
+
- MachineLearning
|
| 15 |
+
license: apache-2.0
|
| 16 |
+
base_model:
|
| 17 |
+
- Qwen/Qwen2.5-3B
|
| 18 |
+
- Qwen/Qwen2.5-VL-3B-Instruct
|
| 19 |
+
pipeline_tag: question-answering
|
| 20 |
+
language:
|
| 21 |
+
- zho
|
| 22 |
+
- eng
|
| 23 |
+
- fra
|
| 24 |
+
- spa
|
| 25 |
+
- por
|
| 26 |
+
- deu
|
| 27 |
+
- ita
|
| 28 |
+
- rus
|
| 29 |
+
- jpn
|
| 30 |
+
- kor
|
| 31 |
+
- vie
|
| 32 |
+
- tha
|
| 33 |
+
- ara
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
# Model Card for Model ID
|
| 37 |
+
|
| 38 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
## Model Details
|
| 43 |
+
|
| 44 |
+
### Model Description
|
| 45 |
+
|
| 46 |
+
<!-- Provide a longer summary of what this model is. -->
|
| 47 |
+
|
| 48 |
+
DeutscheLexAI_BGB_2,0 is a fine-tuned Qwen2.5-3B model with more training and accurate version with output context length upto 500 tokens specializing in German legal text processing, trained on the Bürgerliches Gesetzbuch (BGB) dataset. It enhances legal text understanding, summarization, and reasoning for German legal documents.
|
| 49 |
+
|
| 50 |
+
- **Developed by:** [Ali Asghar (jaffry258@gmail.com)]
|
| 51 |
+
- **Funded by [optional]:** [still under progress ]
|
| 52 |
+
- **Shared by [optional]:** []
|
| 53 |
+
- **Model type:** [Large Language Model (LLM)]
|
| 54 |
+
- **Language(s) (NLP):** [pytorch,transformers,python]
|
| 55 |
+
- **License:** [Appache 2.0]
|
| 56 |
+
- **Finetuned from model [optional]:** [Qwen2.5-3B]
|
| 57 |
+
|
| 58 |
+
### Model Sources [optional]
|
| 59 |
+
|
| 60 |
+
<!-- Provide the basic links for the model. -->
|
| 61 |
+
|
| 62 |
+
- **Repository:** https://huggingface.co/Alijeff1214/DeutscheLexAI_BGB_2.0/tree/main
|
| 63 |
+
- **Paper [optional]:** [More Information Needed]
|
| 64 |
+
- **Demo [optional]:** [More Information Needed]
|
| 65 |
+
|
| 66 |
+
## Uses
|
| 67 |
+
|
| 68 |
+
DeutscheLexAI_BGB is a fine-tuned Qwen2.5-3B model specializing in German legal text processing, trained on the Bürgerliches Gesetzbuch (BGB) dataset. It enhances legal text understanding, summarization, and reasoning for German legal documents.
|
| 69 |
+
|
| 70 |
+
### Direct Use
|
| 71 |
+
|
| 72 |
+
Legal research: Extract, summarize, and analyze BGB texts.
|
| 73 |
+
|
| 74 |
+
AI-powered legal assistants: Provide insights into German law.
|
| 75 |
+
|
| 76 |
+
Academic purposes: Assists in legal document structuring.
|
| 77 |
+
|
| 78 |
+
[More Information Needed]
|
| 79 |
+
|
| 80 |
+
### Downstream Use [optional]
|
| 81 |
+
|
| 82 |
+
Chatbots for legal guidance.
|
| 83 |
+
|
| 84 |
+
AI-based contract analysis.
|
| 85 |
+
|
| 86 |
+
[More Information Needed]
|
| 87 |
+
|
| 88 |
+
### Out-of-Scope Use
|
| 89 |
+
|
| 90 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 91 |
+
|
| 92 |
+
[More Information Needed]
|
| 93 |
+
|
| 94 |
+
## Bias, Risks, and Limitations
|
| 95 |
+
|
| 96 |
+
The model may reflect biases in the BGB dataset.
|
| 97 |
+
|
| 98 |
+
Not suitable for real-time legal decision-making.
|
| 99 |
+
|
| 100 |
+
Might struggle with non-German legal texts.
|
| 101 |
+
|
| 102 |
+
[More Information Needed]
|
| 103 |
+
|
| 104 |
+
### Recommendations
|
| 105 |
+
|
| 106 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 107 |
+
|
| 108 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 109 |
+
|
| 110 |
+
## How to Get Started with the Model
|
| 111 |
+
|
| 112 |
+
Use the code below to get started with the model.
|
| 113 |
+
|
| 114 |
+
[More Information Needed]
|
| 115 |
+
|
| 116 |
+
## Training Details
|
| 117 |
+
|
| 118 |
+
### Training Data
|
| 119 |
+
|
| 120 |
+
<!-- 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. -->
|
| 121 |
+
|
| 122 |
+
[More Information Needed]
|
| 123 |
+
|
| 124 |
+
### Training Procedure
|
| 125 |
+
|
| 126 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 127 |
+
|
| 128 |
+
#### Preprocessing [optional]
|
| 129 |
+
|
| 130 |
+
[More Information Needed]
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
#### Training Hyperparameters
|
| 134 |
+
|
| 135 |
+
- **Training regime:** [More Information Needed]
|
| 136 |
+
- trainer = GRPOTrainer(
|
| 137 |
+
model = model,
|
| 138 |
+
processing_class = tokenizer,
|
| 139 |
+
reward_funcs = [
|
| 140 |
+
xmlcount_reward_func,
|
| 141 |
+
soft_format_reward_func,
|
| 142 |
+
strict_format_reward_func,
|
| 143 |
+
int_reward_func,
|
| 144 |
+
correctness_reward_func,
|
| 145 |
+
],
|
| 146 |
+
args = training_args,
|
| 147 |
+
train_dataset = dataset,
|
| 148 |
+
)
|
| 149 |
+
trainer.train()
|
| 150 |
+
|
| 151 |
+
### Test on HF Space
|
| 152 |
+
https://huggingface.co/spaces/Alijeff1214/DeutecheLexAI_BGB
|
| 153 |
+
|
| 154 |
+
#### Speeds, Sizes, Times [optional]
|
| 155 |
+
|
| 156 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 157 |
+
|
| 158 |
+
[More Information Needed]
|
| 159 |
+
|
| 160 |
+
## Evaluation
|
| 161 |
+
|
| 162 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 163 |
+
|
| 164 |
+
### Testing Data, Factors & Metrics
|
| 165 |
+
|
| 166 |
+
#### Testing Data
|
| 167 |
+
|
| 168 |
+
<!-- This should link to a Dataset Card if possible. -->
|
| 169 |
+
|
| 170 |
+
[More Information Needed]
|
| 171 |
+
|
| 172 |
+
#### Factors
|
| 173 |
+
|
| 174 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 175 |
+
|
| 176 |
+
[More Information Needed]
|
| 177 |
+
|
| 178 |
+
#### Metrics
|
| 179 |
+
|
| 180 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 181 |
+
|
| 182 |
+
[More Information Needed]
|
| 183 |
+
|
| 184 |
+
### Results
|
| 185 |
+
|
| 186 |
+
[More Information Needed]
|
| 187 |
+
|
| 188 |
+
#### Summary
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
## Model Examination [optional]
|
| 193 |
+
|
| 194 |
+
<!-- Relevant interpretability work for the model goes here -->
|
| 195 |
+
|
| 196 |
+
[More Information Needed]
|
| 197 |
+
|
| 198 |
+
## Environmental Impact
|
| 199 |
+
|
| 200 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 201 |
+
|
| 202 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 203 |
+
|
| 204 |
+
- **Hardware Type:** [More Information Needed]
|
| 205 |
+
- **Hours used:** [More Information Needed]
|
| 206 |
+
- **Cloud Provider:** [More Information Needed]
|
| 207 |
+
- **Compute Region:** [More Information Needed]
|
| 208 |
+
- **Carbon Emitted:** [More Information Needed]
|
| 209 |
+
|
| 210 |
+
## Technical Specifications [optional]
|
| 211 |
+
|
| 212 |
+
### Model Architecture and Objective
|
| 213 |
+
|
| 214 |
+
[More Information Needed]
|
| 215 |
+
|
| 216 |
+
### Compute Infrastructure
|
| 217 |
+
|
| 218 |
+
[More Information Needed]
|
| 219 |
+
|
| 220 |
+
#### Hardware
|
| 221 |
+
|
| 222 |
+
[More Information Needed]
|
| 223 |
+
|
| 224 |
+
#### Software
|
| 225 |
+
|
| 226 |
+
[More Information Needed]
|
| 227 |
+
|
| 228 |
+
## Citation [optional]
|
| 229 |
+
|
| 230 |
+
@article{DeutscheLexAI_BGB,
|
| 231 |
+
title={DeutscheLexAI_BGB: A Fine-Tuned Qwen2.5-3B Model for German Legal Texts},
|
| 232 |
+
author={Your Name or Organization},
|
| 233 |
+
journal={Hugging Face Model Hub},
|
| 234 |
+
year={2025},
|
| 235 |
+
url={https://huggingface.co/Alijeff1214/DeutscheLexAI_BGB_2.0}
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
**BibTeX:**
|
| 240 |
+
|
| 241 |
+
[More Information Needed]
|
| 242 |
+
|
| 243 |
+
**APA:**
|
| 244 |
+
|
| 245 |
+
[More Information Needed]
|
| 246 |
+
|
| 247 |
+
## Glossary [optional]
|
| 248 |
+
|
| 249 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 250 |
+
|
| 251 |
+
[More Information Needed]
|
| 252 |
+
|
| 253 |
+
## More Information [optional]
|
| 254 |
+
|
| 255 |
+
[More Information Needed]
|
| 256 |
+
|
| 257 |
+
## Model Card Authors [optional]
|
| 258 |
+
|
| 259 |
+
Ali Asghar
|
| 260 |
+
|
| 261 |
+
## Model Card Contact
|
| 262 |
+
|
| 263 |
jaffry258@gmail.com
|