mathformer 1.0.0__py3-none-any.whl → 1.0.2__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.
- mathformer/__init__.py +1 -1
- mathformer/__pycache__/__init__.cpython-311.pyc +0 -0
- mathformer/__pycache__/api.cpython-311.pyc +0 -0
- mathformer/__pycache__/tokenizer.cpython-311.pyc +0 -0
- mathformer/addformer/config.json +33 -0
- mathformer/addformer/generation_config.json +10 -0
- mathformer/addformer/model.safetensors +0 -0
- mathformer/addformer/special_tokens_map.json +6 -0
- mathformer/addformer/tokenizer_config.json +9 -0
- mathformer/addformer/training_args.bin +0 -0
- mathformer/addformer/vocab.json +29 -0
- mathformer/divformer/config.json +33 -0
- mathformer/divformer/generation_config.json +10 -0
- mathformer/divformer/model.safetensors +0 -0
- mathformer/divformer/special_tokens_map.json +6 -0
- mathformer/divformer/tokenizer_config.json +9 -0
- mathformer/divformer/training_args.bin +0 -0
- mathformer/divformer/vocab.json +29 -0
- mathformer/mulformer/config.json +33 -0
- mathformer/mulformer/generation_config.json +10 -0
- mathformer/mulformer/model.safetensors +0 -0
- mathformer/mulformer/special_tokens_map.json +6 -0
- mathformer/mulformer/tokenizer_config.json +9 -0
- mathformer/mulformer/training_args.bin +0 -0
- mathformer/mulformer/vocab.json +29 -0
- mathformer/subformer/config.json +33 -0
- mathformer/subformer/generation_config.json +10 -0
- mathformer/subformer/model.safetensors +0 -0
- mathformer/subformer/special_tokens_map.json +6 -0
- mathformer/subformer/tokenizer_config.json +9 -0
- mathformer/subformer/training_args.bin +0 -0
- mathformer/subformer/vocab.json +29 -0
- mathformer-1.0.2.dist-info/METADATA +124 -0
- mathformer-1.0.2.dist-info/RECORD +39 -0
- mathformer-1.0.0.dist-info/METADATA +0 -40
- mathformer-1.0.0.dist-info/RECORD +0 -8
- {mathformer-1.0.0.dist-info → mathformer-1.0.2.dist-info}/WHEEL +0 -0
- {mathformer-1.0.0.dist-info → mathformer-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {mathformer-1.0.0.dist-info → mathformer-1.0.2.dist-info}/top_level.txt +0 -0
mathformer/__init__.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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
|
+
}
|
|
Binary file
|
|
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
|
+
}
|
|
Binary file
|
|
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
|
+
}
|
|
Binary file
|
|
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
|
+
}
|
|
Binary file
|
|
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.2
|
|
4
|
+
Summary: A transformer-based math library
|
|
5
|
+
Author-email: JeremySu0818 <xinghong.su0818@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/JeremySu0818/MathFormer
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/JeremySu0818/MathFormer/issues
|
|
8
|
+
Project-URL: Repository, https://github.com/JeremySu0818/MathFormer
|
|
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=aIXt3bfCAHML-rvwxzrR_c9XU0h9dcVafE78ClHH8Js,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.2.dist-info/licenses/LICENSE,sha256=N_5cBkj6s6QSLk_vH0y-6S8v8ZhCChTNF__oqCnUuwA,1096
|
|
36
|
+
mathformer-1.0.2.dist-info/METADATA,sha256=i-kZXqkjr-WsI88QDIoi5UpYwQhIjkWGtcUtGrP_akc,4286
|
|
37
|
+
mathformer-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
38
|
+
mathformer-1.0.2.dist-info/top_level.txt,sha256=-LV76jb_wXd0X7WXrsC3kyuEBtqvKXlih32gVGZelOE,11
|
|
39
|
+
mathformer-1.0.2.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,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|