File size: 1,844 Bytes
bf03366
 
 
 
 
 
 
 
 
1a4d0fc
 
c293301
1a4d0fc
1c07482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
tags:
- subtraction
- mathematics
license: apache-2.0
library_name: transformers
accuracy_sub: 0.99
train_loss: 0.001197.
---
# QuantaMaths: `sub_d10_l2_h3_t75K_gf_s173289`

This repository contains a transformer model that can predict subtraction questions.

### Model-specific metadata
- **Operation type**: subtraction
- **Num digits**: 10
- **Layers**: 2
- **Attention Heads**: 3
- **Training steps**: 75,000

**Contents**:
- `model.pth`: The trained transformer model.
- `training_loss.json`: Data gathered during model training (used to plot "loss over training batches").
- `behaviors.json`: Facts gathered about the model by direct inspection (attention pattern data, PCA data, digit impact data, etc.).
- `features.json`: Facts gathered about hypothesized algorithm features via experimentation, e.g. node P12L0H1 implements the feature A3.ST.

**Provenance**:
- `model.pth` and `training_loss.json` were created by [QuantaMathsTrain.ipynb](https://github.com/PhilipQuirke/quanta_maths/blob/main/notebooks/QuantaMathsTrain.ipynb).
- `behaviors.json` and `features.json` were created by [QuantaMathsAnalyse.ipynb](https://github.com/PhilipQuirke/quanta_maths/blob/main/notebooks/QuantaMathsAnalyse.ipynb).
- The JSON files are used by [QuantaMathsAlgorithm.ipynb](https://github.com/PhilipQuirke/quanta_maths/blob/main/notebooks/QuantaMathsAlgorithm.ipynb).

**Folder name details**:
- "add", "sub", or "mix": The types of questions the model can predict.
- "d5" to "d20": How many digits the model handles (e.g. a d5 sub model can predict the answer in 123450-345670=-0123230).
- "l1", "l2", or "l3": The number of layers in the model.
- "h3" or "h4": The number of attention heads in the model.
- "t15K" to "t85K", etc.: The number of batches the model was trained on.
- "s372001", etc.: The random seed used in model training.