PyTorch
English
bert
jdrechsel commited on
Commit
f8eafa7
·
verified ·
1 Parent(s): d6957c8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -0
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - ddrg/math_text
5
+ - ddrg/math_formulas
6
+ - ddrg/named_math_formulas
7
+ - ddrg/math_formula_retrieval
8
+ language:
9
+ - en
10
+ base_model:
11
+ - tbs17/MathBERT
12
+ ---
13
+
14
+
15
+ # MAMUT-MathBert (Math Mutator MathBERT)
16
+
17
+ <!-- Provide a quick summary of what the model is/does. -->
18
+
19
+ MAMUT-MathBERT is a pretrained language model based on [tbs17/MathBERT](https://huggingface.co/https://huggingface.co/tbs17/MathBERT), further pretrained on mathematical texts and formulas.
20
+ It was introduced in [MAMUT: A Novel Framework for Modifying Mathematical Formulas for the Generation of Specialized Datasets for Language Model Training](https://arxiv.org/abs/2502.20855).
21
+
22
+ Despite its base model is already a mathematical model, our training aims to improve the mathematical understanding even further, as shown in our paper.
23
+
24
+
25
+ ## Model Details
26
+
27
+ ### Overview
28
+
29
+ MAMUT-MPBERT was pretrained on four math-specific tasks across four datasets.
30
+
31
+ - **[Mathematical Formulas (MF)](https://huggingface.co/datasets/ddrg/math_formulas):** A Masked Language Modeling (MLM) task on math formulas written in LaTeX.
32
+ - **[Mathematical Texts (MT)](https://huggingface.co/datasets/ddrg/math_text):** An MLM task on natural language text containing inline LaTeX math (*mathematical texts*). The masking probability was biased toward mathematical tokens (inside math environment $...$) and domain-specific terms (e.g., *sum*, *one*, ...)
33
+ - **[Named Math Formulas (NMF)](https://huggingface.co/datasets/ddrg/named_math_formulas):** A Next-Sentence-Prediction (NSP)-style task: given a formula and the name of a mathematical identity (e.g., Pythagorean Theorem), classify whether they match.
34
+ - **[Math Formula Retrieval (MFR)](https://huggingface.co/datasets/ddrg/math_formula_retrieval):** Another NSP-style task to decide if two formulas describe the same mathematical identity or concept.
35
+
36
+ ![Training Overview](mamutmathbert-training.png)
37
+
38
+
39
+ ### Model Sources
40
+
41
+ <!-- Provide the basic links for the model. -->
42
+
43
+ - **Base Model:** [tbs17/MathBERT](https://huggingface.co/tbs17/MathBERT) (whose base model is [bert-base-cased](https://huggingface.co/google-bert/bert-base-cased))
44
+ - **Pretraining Code:** [aieng-lab/transformer-math-pretraining](https://github.com/aieng-lab/transformer-math-pretraining)
45
+ - **MAMUT Repository:** [aieng-lab/math-mutator](https://github.com/aieng-lab/math-mutator)
46
+ - **Paper:** [MAMUT: A Novel Framework for Modifying Mathematical Formulas for the Generation of Specialized Datasets for Language Model Training](https://arxiv.org/abs/2502.20855)
47
+
48
+ ## Uses
49
+
50
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
51
+
52
+ MAMUT-MathBERT is intended for downstream tasks that require improved mathematical understanding, such as:
53
+
54
+ - Formula classification
55
+ - Retrieval of *semantically* similar formulas
56
+ - Math-related question answering
57
+
58
+ **Note: This model was saved without the MLM or NSP heads and requires fine-tuning before use in downstream tasks.**
59
+
60
+ ## Training Details
61
+
62
+ Training configurations are described in [Appendix C of the MAMUT paper](https://arxiv.org/abs/2502.20855).
63
+
64
+
65
+ ## Evaluation
66
+
67
+ <!-- This section describes the evaluation protocols and provides the results. -->
68
+
69
+ The model is evaluated in [Section 7 and Appendix C.4 of the MAMUT paper](https://arxiv.org/abs/2502.20855) (MAMUT-MPBERT).
70
+
71
+
72
+ ## Environmental Impact
73
+
74
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
75
+
76
+ - **Hardware Type:** 8xA100
77
+ - **Hours used:** 48
78
+ - **Compute Region:** Germany
79
+
80
+
81
+ ## Citation
82
+
83
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
84
+
85
+ **BibTeX:**
86
+
87
+ ```bibtex
88
+ @misc{drechsel2025mamutnovelframeworkmodifying,
89
+ title={{MAMUT}: A Novel Framework for Modifying Mathematical Formulas for the Generation of Specialized Datasets for Language Model Training},
90
+ author={Jonathan Drechsel and Anja Reusch and Steffen Herbold},
91
+ year={2025},
92
+ eprint={2502.20855},
93
+ archivePrefix={arXiv},
94
+ primaryClass={cs.CL},
95
+ url={https://arxiv.org/abs/2502.20855},
96
+ }
97
+ ```