mathformer 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. mathformer/__pycache__/__init__.cpython-311.pyc +0 -0
  2. mathformer/__pycache__/api.cpython-311.pyc +0 -0
  3. mathformer/__pycache__/tokenizer.cpython-311.pyc +0 -0
  4. mathformer/addformer/config.json +33 -0
  5. mathformer/addformer/generation_config.json +10 -0
  6. mathformer/addformer/model.safetensors +0 -0
  7. mathformer/addformer/special_tokens_map.json +6 -0
  8. mathformer/addformer/tokenizer_config.json +9 -0
  9. mathformer/addformer/training_args.bin +0 -0
  10. mathformer/addformer/vocab.json +29 -0
  11. mathformer/divformer/config.json +33 -0
  12. mathformer/divformer/generation_config.json +10 -0
  13. mathformer/divformer/model.safetensors +0 -0
  14. mathformer/divformer/special_tokens_map.json +6 -0
  15. mathformer/divformer/tokenizer_config.json +9 -0
  16. mathformer/divformer/training_args.bin +0 -0
  17. mathformer/divformer/vocab.json +29 -0
  18. mathformer/mulformer/config.json +33 -0
  19. mathformer/mulformer/generation_config.json +10 -0
  20. mathformer/mulformer/model.safetensors +0 -0
  21. mathformer/mulformer/special_tokens_map.json +6 -0
  22. mathformer/mulformer/tokenizer_config.json +9 -0
  23. mathformer/mulformer/training_args.bin +0 -0
  24. mathformer/mulformer/vocab.json +29 -0
  25. mathformer/subformer/config.json +33 -0
  26. mathformer/subformer/generation_config.json +10 -0
  27. mathformer/subformer/model.safetensors +0 -0
  28. mathformer/subformer/special_tokens_map.json +6 -0
  29. mathformer/subformer/tokenizer_config.json +9 -0
  30. mathformer/subformer/training_args.bin +0 -0
  31. mathformer/subformer/vocab.json +29 -0
  32. mathformer-1.0.1.dist-info/METADATA +124 -0
  33. mathformer-1.0.1.dist-info/RECORD +39 -0
  34. mathformer-1.0.0.dist-info/METADATA +0 -40
  35. mathformer-1.0.0.dist-info/RECORD +0 -8
  36. {mathformer-1.0.0.dist-info → mathformer-1.0.1.dist-info}/WHEEL +0 -0
  37. {mathformer-1.0.0.dist-info → mathformer-1.0.1.dist-info}/licenses/LICENSE +0 -0
  38. {mathformer-1.0.0.dist-info → mathformer-1.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,33 @@
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "head_dim": 8,
11
+ "hidden_act": "silu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 64,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 256,
16
+ "max_position_embeddings": 64,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 8,
20
+ "num_hidden_layers": 8,
21
+ "num_key_value_heads": 8,
22
+ "pad_token_id": 0,
23
+ "pretraining_tp": 1,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "rope_theta": 10000.0,
27
+ "rope_type": "default"
28
+ },
29
+ "tie_word_embeddings": false,
30
+ "transformers_version": "5.0.0",
31
+ "use_cache": false,
32
+ "vocab_size": 27
33
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0",
9
+ "use_cache": true
10
+ }
Binary file
@@ -0,0 +1,6 @@
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>"
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "tokenizer_class": "MathTokenizer",
3
+ "model_max_length": 64,
4
+ "padding_side": "right",
5
+ "bos_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "unk_token": "<unk>",
8
+ "pad_token": "<pad>"
9
+ }
Binary file
@@ -0,0 +1,29 @@
1
+ {
2
+ "<pad>": 0,
3
+ "<s>": 1,
4
+ "</s>": 2,
5
+ "<unk>": 3,
6
+ "0": 4,
7
+ "1": 5,
8
+ "2": 6,
9
+ "3": 7,
10
+ "4": 8,
11
+ "5": 9,
12
+ "6": 10,
13
+ "7": 11,
14
+ "8": 12,
15
+ "9": 13,
16
+ "+": 14,
17
+ "-": 15,
18
+ "*": 16,
19
+ "/": 17,
20
+ "=": 18,
21
+ ".": 19,
22
+ "(": 20,
23
+ ")": 21,
24
+ "^": 22,
25
+ "%": 23,
26
+ " ": 24,
27
+ "Q": 25,
28
+ "R": 26
29
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "head_dim": 8,
11
+ "hidden_act": "silu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 64,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 256,
16
+ "max_position_embeddings": 64,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 8,
20
+ "num_hidden_layers": 8,
21
+ "num_key_value_heads": 8,
22
+ "pad_token_id": 0,
23
+ "pretraining_tp": 1,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "rope_theta": 10000.0,
27
+ "rope_type": "default"
28
+ },
29
+ "tie_word_embeddings": false,
30
+ "transformers_version": "5.0.0",
31
+ "use_cache": false,
32
+ "vocab_size": 27
33
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0",
9
+ "use_cache": true
10
+ }
Binary file
@@ -0,0 +1,6 @@
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>"
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "tokenizer_class": "MathTokenizer",
3
+ "model_max_length": 64,
4
+ "padding_side": "right",
5
+ "bos_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "unk_token": "<unk>",
8
+ "pad_token": "<pad>"
9
+ }
Binary file
@@ -0,0 +1,29 @@
1
+ {
2
+ "<pad>": 0,
3
+ "<s>": 1,
4
+ "</s>": 2,
5
+ "<unk>": 3,
6
+ "0": 4,
7
+ "1": 5,
8
+ "2": 6,
9
+ "3": 7,
10
+ "4": 8,
11
+ "5": 9,
12
+ "6": 10,
13
+ "7": 11,
14
+ "8": 12,
15
+ "9": 13,
16
+ "+": 14,
17
+ "-": 15,
18
+ "*": 16,
19
+ "/": 17,
20
+ "=": 18,
21
+ ".": 19,
22
+ "(": 20,
23
+ ")": 21,
24
+ "^": 22,
25
+ "%": 23,
26
+ " ": 24,
27
+ "Q": 25,
28
+ "R": 26
29
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "head_dim": 8,
11
+ "hidden_act": "silu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 64,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 256,
16
+ "max_position_embeddings": 64,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 8,
20
+ "num_hidden_layers": 8,
21
+ "num_key_value_heads": 8,
22
+ "pad_token_id": 0,
23
+ "pretraining_tp": 1,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "rope_theta": 10000.0,
27
+ "rope_type": "default"
28
+ },
29
+ "tie_word_embeddings": false,
30
+ "transformers_version": "5.0.0",
31
+ "use_cache": false,
32
+ "vocab_size": 27
33
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0",
9
+ "use_cache": true
10
+ }
Binary file
@@ -0,0 +1,6 @@
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>"
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "tokenizer_class": "MathTokenizer",
3
+ "model_max_length": 64,
4
+ "padding_side": "right",
5
+ "bos_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "unk_token": "<unk>",
8
+ "pad_token": "<pad>"
9
+ }
Binary file
@@ -0,0 +1,29 @@
1
+ {
2
+ "<pad>": 0,
3
+ "<s>": 1,
4
+ "</s>": 2,
5
+ "<unk>": 3,
6
+ "0": 4,
7
+ "1": 5,
8
+ "2": 6,
9
+ "3": 7,
10
+ "4": 8,
11
+ "5": 9,
12
+ "6": 10,
13
+ "7": 11,
14
+ "8": 12,
15
+ "9": 13,
16
+ "+": 14,
17
+ "-": 15,
18
+ "*": 16,
19
+ "/": 17,
20
+ "=": 18,
21
+ ".": 19,
22
+ "(": 20,
23
+ ")": 21,
24
+ "^": 22,
25
+ "%": 23,
26
+ " ": 24,
27
+ "Q": 25,
28
+ "R": 26
29
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "architectures": [
3
+ "LlamaForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "dtype": "float32",
9
+ "eos_token_id": 2,
10
+ "head_dim": 8,
11
+ "hidden_act": "silu",
12
+ "hidden_dropout": 0.0,
13
+ "hidden_size": 64,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 256,
16
+ "max_position_embeddings": 64,
17
+ "mlp_bias": false,
18
+ "model_type": "llama",
19
+ "num_attention_heads": 8,
20
+ "num_hidden_layers": 8,
21
+ "num_key_value_heads": 8,
22
+ "pad_token_id": 0,
23
+ "pretraining_tp": 1,
24
+ "rms_norm_eps": 1e-06,
25
+ "rope_parameters": {
26
+ "rope_theta": 10000.0,
27
+ "rope_type": "default"
28
+ },
29
+ "tie_word_embeddings": false,
30
+ "transformers_version": "5.0.0",
31
+ "use_cache": false,
32
+ "vocab_size": 27
33
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "output_attentions": false,
6
+ "output_hidden_states": false,
7
+ "pad_token_id": 0,
8
+ "transformers_version": "5.0.0",
9
+ "use_cache": true
10
+ }
Binary file
@@ -0,0 +1,6 @@
1
+ {
2
+ "bos_token": "<s>",
3
+ "eos_token": "</s>",
4
+ "unk_token": "<unk>",
5
+ "pad_token": "<pad>"
6
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "tokenizer_class": "MathTokenizer",
3
+ "model_max_length": 64,
4
+ "padding_side": "right",
5
+ "bos_token": "<s>",
6
+ "eos_token": "</s>",
7
+ "unk_token": "<unk>",
8
+ "pad_token": "<pad>"
9
+ }
Binary file
@@ -0,0 +1,29 @@
1
+ {
2
+ "<pad>": 0,
3
+ "<s>": 1,
4
+ "</s>": 2,
5
+ "<unk>": 3,
6
+ "0": 4,
7
+ "1": 5,
8
+ "2": 6,
9
+ "3": 7,
10
+ "4": 8,
11
+ "5": 9,
12
+ "6": 10,
13
+ "7": 11,
14
+ "8": 12,
15
+ "9": 13,
16
+ "+": 14,
17
+ "-": 15,
18
+ "*": 16,
19
+ "/": 17,
20
+ "=": 18,
21
+ ".": 19,
22
+ "(": 20,
23
+ ")": 21,
24
+ "^": 22,
25
+ "%": 23,
26
+ " ": 24,
27
+ "Q": 25,
28
+ "R": 26
29
+ }
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: mathformer
3
+ Version: 1.0.1
4
+ Summary: A transformer-based math library
5
+ Author-email: JeremySu0818 <xinghong.su0818@gmail.com>
6
+ Project-URL: Homepage, https://github.com/JeremySu0818/MathFormer-API
7
+ Project-URL: Bug Tracker, https://github.com/JeremySu0818/MathFormer-API/issues
8
+ Project-URL: Repository, https://github.com/JeremySu0818/MathFormer-API
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: torch>=2.0.0
16
+ Requires-Dist: transformers>=4.30.0
17
+ Requires-Dist: safetensors>=0.3.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
20
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
21
+ Dynamic: license-file
22
+
23
+ # MathFormer
24
+
25
+ MathFormer is a Python library that leverages Transformer-based language models to perform mathematical operations. Unlike standard arithmetic libraries, MathFormer uses Llama-architecture models to "predict" the results of arithmetic operations, token by token, demonstrating the capability of small language models to learn arithmetic rules.
26
+
27
+ It supports basic arithmetic operations: **Addition**, **Subtraction**, **Multiplication**, and **Division**.
28
+
29
+ ## Features
30
+
31
+ - **Transformer-Powered Arithmetic**: Uses specialized Llama-based models for each arithmetic operation.
32
+ - **Large Number Support**: Implements recursive logic to handle multi-digit arithmetic using digit-by-digit prediction (similar to manual calculation).
33
+ - **Unified API**: Easy-to-use functions for `add`, `sub`, `mul`, and `div`.
34
+ - **Resource Management**: Supports lazy loading of models to save memory, and manual unloading.
35
+ - **Custom Tokenizer**: Built-in minimalist tokenizer optimized for mathematical expressions.
36
+
37
+ ## Installation
38
+
39
+ You can install MathFormer via pip:
40
+
41
+ ```bash
42
+ pip install mathformer
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ The simplest way to use MathFormer is through the top-level convenience functions. These functions automatically handle model loading when needed.
48
+
49
+ ```python
50
+ import mathformer
51
+
52
+ # Addition
53
+ result = mathformer.add(123, 456)
54
+ print(f"123 + 456 = {result}") # Output: 579
55
+
56
+ # Subtraction
57
+ result = mathformer.sub(1000, 250)
58
+ print(f"1000 - 250 = {result}") # Output: 750
59
+
60
+ # Multiplication
61
+ result = mathformer.mul(12, 12)
62
+ print(f"12 * 12 = {result}") # Output: 144
63
+
64
+ # Division (returns Quotient and Remainder if applicable)
65
+ result = mathformer.div(100, 3)
66
+ print(f"100 / 3 = {result}") # Output: Q33R1
67
+ ```
68
+
69
+ You can also pass string expressions:
70
+
71
+ ```python
72
+ print(mathformer.add("100 + 200"))
73
+ print(mathformer.calculate("mul", 50, 4))
74
+ ```
75
+
76
+ ## Advanced Usage
77
+
78
+ For more control over resource usage, you can use the `MathFormerAPI` class directly.
79
+
80
+ ### Managing Resources (Load/Unload)
81
+
82
+ By default, models are lazy-loaded (loaded only when first requested). You can manually load all models at startup or unload them to free GPU/CPU memory.
83
+
84
+ ```python
85
+ from mathformer import MathFormerAPI
86
+
87
+ # Initialize API (lazy_load=False to load everything immediately)
88
+ api = MathFormerAPI(lazy_load=True)
89
+
90
+ # Perform operations
91
+ print(api.add(50, 50))
92
+
93
+ # Unload all models to free memory
94
+ api.unload_all()
95
+ ```
96
+
97
+ ### Context Manager
98
+
99
+ You can use `MathFormerAPI` as a context manager to ensure models are cleaned up after use:
100
+
101
+ ```python
102
+ from mathformer import MathFormerAPI
103
+
104
+ with MathFormerAPI() as api:
105
+ print(api.mul(99, 9))
106
+ # Models are automatically unloaded here
107
+ ```
108
+
109
+ ## How It Works
110
+
111
+ MathFormer isn't just calling Python's `+` or `-` operators. It actually uses a neural network to predict the result!
112
+
113
+ 1. **Single-Step Prediction**: For small single-digit operations (e.g., `5+7`), it queries a Transformer model customized for that operation.
114
+ 2. **Multi-Digit Logic**: For larger numbers (e.g., `123+456`), the library implements the standard grade-school algorithms (carrying, borrowing, partial products) but delegates the fundamental single-digit arithmetic steps to the Transformer model.
115
+
116
+ ## Requirements
117
+
118
+ - Python >= 3.8
119
+ - PyTorch >= 2.0.0
120
+ - Transformers >= 4.30.0
121
+
122
+ ## License
123
+
124
+ This project is licensed under the MIT License.
@@ -0,0 +1,39 @@
1
+ mathformer/__init__.py,sha256=P9l5cHBjQvrlNgnpYJ1abRj4g5nEkEn1Yxs_oU2zmnw,834
2
+ mathformer/api.py,sha256=sqKsrbYvuUukG8Xq5UsV_ii4r1lmddNgHwsNyK59PMI,18400
3
+ mathformer/tokenizer.py,sha256=vzlkrDcRWptV2IfJydSC6LG61S_imuARcPtH9MqyZVE,3834
4
+ mathformer/__pycache__/__init__.cpython-311.pyc,sha256=9WNH7l9Nwqlpcr1DgpnYB3PTCfQW_e855F8Lh_6m6C4,1817
5
+ mathformer/__pycache__/api.cpython-311.pyc,sha256=hZ81LDFLdixu5c0AQZXs8Fa2JOSAZTL3tDhKulcxtwc,33618
6
+ mathformer/__pycache__/tokenizer.cpython-311.pyc,sha256=BrXotEULoKXO5950FlMcNCSENzqzTIEcaA32d0F_NEs,7401
7
+ mathformer/addformer/config.json,sha256=CLz-iqqPgoPxEGLAPT5Zf5Miq5M4ROHhvnRbYvj3Qxs,769
8
+ mathformer/addformer/generation_config.json,sha256=Pa-1OIOzCmm3GhII8o5uFrLIS3feS8F9q3fLNy43Xdw,225
9
+ mathformer/addformer/model.safetensors,sha256=6SimwjZ4vnJZWDSC7ttALjgXFWF-46MJlbiQfqlLgVw,2123120
10
+ mathformer/addformer/special_tokens_map.json,sha256=VEFXNRg0fy7HPb26-B_xDowgn93k0DX2U5iPoarg2Cc,100
11
+ mathformer/addformer/tokenizer_config.json,sha256=wgsvgJM8T9s6XLBOnq30jSiM7aPM8NfEUeo6hkeVSCw,196
12
+ mathformer/addformer/training_args.bin,sha256=LGscJat4kKcwc0PnboofVKMS4Ih6bjSjAAnytCzBevU,5201
13
+ mathformer/addformer/vocab.json,sha256=gksFuDjOQKkNjpXNoOzATackdbURhK-gNeoJZ5pxO_w,330
14
+ mathformer/divformer/config.json,sha256=CLz-iqqPgoPxEGLAPT5Zf5Miq5M4ROHhvnRbYvj3Qxs,769
15
+ mathformer/divformer/generation_config.json,sha256=Pa-1OIOzCmm3GhII8o5uFrLIS3feS8F9q3fLNy43Xdw,225
16
+ mathformer/divformer/model.safetensors,sha256=uCODKT4Wj7k5aX_GTucnW_L4PUxkAl4zBcLj8FuWQ_8,2123120
17
+ mathformer/divformer/special_tokens_map.json,sha256=VEFXNRg0fy7HPb26-B_xDowgn93k0DX2U5iPoarg2Cc,100
18
+ mathformer/divformer/tokenizer_config.json,sha256=wgsvgJM8T9s6XLBOnq30jSiM7aPM8NfEUeo6hkeVSCw,196
19
+ mathformer/divformer/training_args.bin,sha256=pM4yZkb0BgAidr4-kOKJQ49hpC6qxXlAyZ9qSJKzVbk,5201
20
+ mathformer/divformer/vocab.json,sha256=gksFuDjOQKkNjpXNoOzATackdbURhK-gNeoJZ5pxO_w,330
21
+ mathformer/mulformer/config.json,sha256=CLz-iqqPgoPxEGLAPT5Zf5Miq5M4ROHhvnRbYvj3Qxs,769
22
+ mathformer/mulformer/generation_config.json,sha256=Pa-1OIOzCmm3GhII8o5uFrLIS3feS8F9q3fLNy43Xdw,225
23
+ mathformer/mulformer/model.safetensors,sha256=_bb42KaGWs6PpXe-JnzrbI9J5sMnfGuwAefYGUZpTRo,2123120
24
+ mathformer/mulformer/special_tokens_map.json,sha256=VEFXNRg0fy7HPb26-B_xDowgn93k0DX2U5iPoarg2Cc,100
25
+ mathformer/mulformer/tokenizer_config.json,sha256=wgsvgJM8T9s6XLBOnq30jSiM7aPM8NfEUeo6hkeVSCw,196
26
+ mathformer/mulformer/training_args.bin,sha256=sNNQgrNmG_7UZo_S490Lyq4TcHed7iyM3KI_Xx5aX-8,5201
27
+ mathformer/mulformer/vocab.json,sha256=gksFuDjOQKkNjpXNoOzATackdbURhK-gNeoJZ5pxO_w,330
28
+ mathformer/subformer/config.json,sha256=CLz-iqqPgoPxEGLAPT5Zf5Miq5M4ROHhvnRbYvj3Qxs,769
29
+ mathformer/subformer/generation_config.json,sha256=Pa-1OIOzCmm3GhII8o5uFrLIS3feS8F9q3fLNy43Xdw,225
30
+ mathformer/subformer/model.safetensors,sha256=FK0KP0_rTndUBTsm-iLcL6Y4eXB4jSWBuwl2t2VfYec,2123120
31
+ mathformer/subformer/special_tokens_map.json,sha256=VEFXNRg0fy7HPb26-B_xDowgn93k0DX2U5iPoarg2Cc,100
32
+ mathformer/subformer/tokenizer_config.json,sha256=wgsvgJM8T9s6XLBOnq30jSiM7aPM8NfEUeo6hkeVSCw,196
33
+ mathformer/subformer/training_args.bin,sha256=-BIGrD-3hnO2KmB4C_6qmbdpVj6yjvxCEm3rKUevGIk,5201
34
+ mathformer/subformer/vocab.json,sha256=gksFuDjOQKkNjpXNoOzATackdbURhK-gNeoJZ5pxO_w,330
35
+ mathformer-1.0.1.dist-info/licenses/LICENSE,sha256=N_5cBkj6s6QSLk_vH0y-6S8v8ZhCChTNF__oqCnUuwA,1096
36
+ mathformer-1.0.1.dist-info/METADATA,sha256=QcAUaR6XgQlV8dnTrDyK6haTCUptme32dUNvIKW21Sg,4298
37
+ mathformer-1.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
38
+ mathformer-1.0.1.dist-info/top_level.txt,sha256=-LV76jb_wXd0X7WXrsC3kyuEBtqvKXlih32gVGZelOE,11
39
+ mathformer-1.0.1.dist-info/RECORD,,
@@ -1,40 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: mathformer
3
- Version: 1.0.0
4
- Summary: A transformer-based math library
5
- Author-email: JeremySu0818 <xinghong.su0818@gmail.com>
6
- Project-URL: Homepage, https://github.com/JeremySu0818/MathFormer-API
7
- Project-URL: Bug Tracker, https://github.com/JeremySu0818/MathFormer-API/issues
8
- Project-URL: Repository, https://github.com/JeremySu0818/MathFormer-API
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
- Requires-Dist: torch>=2.0.0
16
- Requires-Dist: transformers>=4.30.0
17
- Requires-Dist: safetensors>=0.3.0
18
- Provides-Extra: dev
19
- Requires-Dist: pytest>=7.0.0; extra == "dev"
20
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
21
- Dynamic: license-file
22
-
23
- # MathFormer
24
-
25
- MathFormer is a Python library for mathematical operations using transformer architectures.
26
-
27
- ## Installation
28
-
29
- ```bash
30
- pip install mathformer
31
- ```
32
-
33
- ## Usage
34
-
35
- ```python
36
- import mathformer
37
-
38
- # Example usage
39
- # mathformer.do_something()
40
- ```
@@ -1,8 +0,0 @@
1
- mathformer/__init__.py,sha256=P9l5cHBjQvrlNgnpYJ1abRj4g5nEkEn1Yxs_oU2zmnw,834
2
- mathformer/api.py,sha256=sqKsrbYvuUukG8Xq5UsV_ii4r1lmddNgHwsNyK59PMI,18400
3
- mathformer/tokenizer.py,sha256=vzlkrDcRWptV2IfJydSC6LG61S_imuARcPtH9MqyZVE,3834
4
- mathformer-1.0.0.dist-info/licenses/LICENSE,sha256=N_5cBkj6s6QSLk_vH0y-6S8v8ZhCChTNF__oqCnUuwA,1096
5
- mathformer-1.0.0.dist-info/METADATA,sha256=SOc8i_0nZUeLdOJk8JfQvqdWo8RttRVHcs4Ha2whUmM,1126
6
- mathformer-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
7
- mathformer-1.0.0.dist-info/top_level.txt,sha256=-LV76jb_wXd0X7WXrsC3kyuEBtqvKXlih32gVGZelOE,11
8
- mathformer-1.0.0.dist-info/RECORD,,