{ "

Arithmetic Dataset

\n

This creates arithmetic addition problems and solutions with workings. We've only implemented addition so far.

\n

It's based on a character level tokenization.

\n": "

\u7b97\u672f\u6570\u636e\u96c6

\n

\u8fd9\u4f1a\u4ea7\u751f\u7b97\u672f\u52a0\u6cd5\u95ee\u9898\u548c\u8fd0\u4f5c\u89e3\u51b3\u65b9\u6848\u3002\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6211\u4eec\u53ea\u5b9e\u65bd\u4e86\u52a0\u6cd5\u3002

\n

\u5b83\u57fa\u4e8e\u89d2\u8272\u7ea7\u522b\u7684\u6807\u8bb0\u5316\u3002

\n", "

Arithmetic Task Experiment Configurations

\n": "

\u7b97\u672f\u4efb\u52a1\u5b9e\u9a8c\u914d\u7f6e

\n", "

Evaluation

\n

We use the sampling function to evaluate the model on a set of problems

\n": "

\u8bc4\u4f30

\n

\u6211\u4eec\u4f7f\u7528\u91c7\u6837\u51fd\u6570\u6765\u8bc4\u4f30\u4e00\u7ec4\u95ee\u9898\u7684\u6a21\u578b

\n", "

\n": "

\n", "

Code to test generated problems

\n": "

\u7528\u4e8e\u6d4b\u8bd5\u751f\u6210\u7684\u95ee\u9898\u7684\u4ee3\u7801

\n", "

Decode a list of token ids

\n": "

\u89e3\u7801\u4ee4\u724c ID \u5217\u8868

\n", "

Encode a given string

\n": "

\u5bf9\u7ed9\u5b9a\u5b57\u7b26\u4e32\u8fdb\u884c\u7f16\u7801

\n", "

Generate multiple problems and pack them into a sequence.

\n": "

\u751f\u6210\u591a\u4e2a\u95ee\u9898\u5e76\u5c06\u5b83\u4eec\u6253\u5305\u6210\u4e00\u4e2a\u5e8f\u5217\u3002

\n", "

Generates an integer with _^_0_^_ number of digits

\n": "

\u751f\u6210\u4e00\u4e2a\u5305\u542b\u4f4d_^_0_^_\u6570\u7684\u6574\u6570

\n", "

Generates the workings for _^_0_^_. For example for _^_1_^_ it generates _^_2_^_.

\n": "

\u751f\u6210\u7684\u5de5\u4f5c\u539f\u7406_^_0_^_\u3002\u4f8b\u5982\uff0c_^_1_^_\u5b83\u4f1a\u751f\u6210_^_2_^_\u3002

\n", "

Get a input and target pair for auto-regressive modelling

\n": "

\u83b7\u53d6\u81ea\u52a8\u56de\u5f52\u5efa\u6a21\u7684\u8f93\u5165\u548c\u76ee\u6807\u5bf9

\n", "

Get arithmetic problem and answer. This is used for evaluation.

\n": "

\u83b7\u53d6\u7b97\u672f\u95ee\u9898\u548c\u7b54\u6848\u3002\u8fd9\u7528\u4e8e\u8bc4\u4f30\u3002

\n", "

Number of sequences per epoch

\n": "

\u6bcf\u4e2a\u7eaa\u5143\u7684\u5e8f\u5217\u6570

\n", "

Training data loader

\n": "

\u8bad\u7ec3\u6570\u636e\u52a0\u8f7d\u5668

\n", "

This is based on code by Georges Harik (@gharik).

\n": "

\u8fd9\u662f\u57fa\u4e8e\u4e54\u6cbb\u00b7\u54c8\u91cc\u514b\uff08@gharik\uff09\u7684\u4ee3\u7801\u3002

\n", "

Add the next token to the input

\n": "

\u5c06\u4e0b\u4e00\u4e2a\u4ee4\u724c\u6dfb\u52a0\u5230\u8f93\u5165\u4e2d

\n", "

Character to token id

\n": "

\u5b57\u7b26\u5230\u4ee4\u724c ID

\n", "

Collect the problems only

\n": "

\u53ea\u6536\u96c6\u95ee\u9898

\n", "

Count the number of correct answers

\n": "

\u8ba1\u7b97\u6b63\u786e\u7b54\u6848\u7684\u6570\u91cf

\n", "

Create a dataset to generate problems

\n": "

\u521b\u5efa\u6570\u636e\u96c6\u4ee5\u751f\u6210\u95ee\u9898

\n", "

Create a tensor with only the initial token

\n": "

\u4ec5\u4f7f\u7528\u521d\u59cb\u4ee4\u724c\u521b\u5efa\u5f20\u91cf

\n", "

Discard everything after the answer in the results

\n": "

\u4e22\u5f03\u7ed3\u679c\u4e2d\u7b54\u6848\u540e\u7684\u6240\u6709\u5185\u5bb9

\n", "

Find which sequences have finished

\n": "

\u627e\u51fa\u54ea\u4e9b\u5e8f\u5217\u5df2\u5b8c\u6210

\n", "

Get a set of problems and answers

\n": "

\u83b7\u53d6\u4e00\u7cfb\u5217\u95ee\u9898\u548c\u7b54\u6848

\n", "

Get the answers

\n": "

\u5f97\u5230\u7b54\u6848

\n", "

Get the model output

\n": "

\u83b7\u53d6\u6a21\u578b\u8f93\u51fa

\n", "

Get the model prediction (greedy)

\n": "

\u83b7\u53d6\u6a21\u578b\u9884\u6d4b\uff08\u8d2a\u5a6a\uff09

\n", "

Get the sampled results

\n": "

\u83b7\u53d6\u62bd\u6837\u7ed3\u679c

\n", "

If all the sequences have completed we skip this

\n": "

\u5982\u679c\u6240\u6709\u7684\u5e8f\u5217\u90fd\u5b8c\u6210\u4e86\uff0c\u6211\u4eec\u5c31\u8df3\u8fc7\u8fd9\u4e2a

\n", "

Log a sample

\n": "

\u8bb0\u5f55\u6837\u672c

\n", "

Log the score

\n": "

\u8bb0\u5f55\u5206\u6570

\n", "

Make a problem with a pre_explanation or not

\n

Creates an arithmetic addition problem with workings and answer.

\n": "

\u4e0d\u7ba1\u662f\u5426\u7528 pre_explansion \u95ee\u95ee\u9898

\n

\u7528\u8fd0\u4f5c\u548c\u7b54\u6848\u521b\u5efa\u7b97\u672f\u52a0\u6cd5\u95ee\u9898\u3002

\n", "

Maximum number of digits per operand integer

\n": "

\u6bcf\u4e2a\u64cd\u4f5c\u6570\u6574\u6570\u7684\u6700\u5927\u4f4d\u6570

\n", "

Move to device

\n": "

\u79fb\u81f3\u8bbe\u5907

\n", "

No need of a validation dataset

\n": "

\u4e0d\u9700\u8981\u9a8c\u8bc1\u6570\u636e\u96c6

\n", "

Number of problems in evaluation

\n": "

\u8bc4\u4f30\u4e2d\u7684\u95ee\u9898\u6570\u91cf

\n", "

Number of sequences that have completed

\n": "

\u5df2\u5b8c\u6210\u7684\u5e8f\u5217\u6570

\n", "

Number of times to run evaluations per epoch

\n": "

\u6bcf\u4e2a\u7eaa\u5143\u8fd0\u884c\u8bc4\u4f30\u7684\u6b21\u6570

\n", "

Number of tokens in the vocabulary

\n": "

\u8bcd\u6c47\u8868\u4e2d\u7684\u4ee3\u5e01\u6570\u91cf

\n", "

Number of training sequences per epoch

\n": "

\u6bcf\u4e2a\u7eaa\u5143\u7684\u8bad\u7ec3\u5e8f\u5217\u6570

\n", "

Override with the question

\n": "

\u7528\u95ee\u9898\u8986\u76d6

\n", "

Sample upto sequence length

\n": "

\u6837\u672c\u76f4\u81f3\u5e8f\u5217\u957f\u5ea6

\n", "

Sampled results

\n": "

\u62bd\u6837\u7ed3\u679c

\n", "

Skip if all have finished

\n": "

\u5982\u679c\u5168\u90e8\u5b8c\u6210\uff0c\u5219\u8df3\u8fc7

\n", "

Skip in the first epoch

\n": "

\u8df3\u8fc7\u7b2c\u4e00\u4e2a\u7eaa\u5143

\n", "

Token id of the new line character - this marks end of the answer

\n": "

\u6362\u884c\u7b26\u7684\u6807\u8bb0 ID-\u8fd9\u6807\u5fd7\u7740\u7b54\u6848\u7684\u7ed3\u675f

\n", "

Token id to string

\n": "

\u4ee4\u724c ID \u8f6c\u6362\u4e3a\u5b57\u7b26\u4e32

\n", "

Training data loader

\n": "

\u8bad\u7ec3\u6570\u636e\u52a0\u8f7d\u5668

\n", "\n": "\n", "Arithmetic Dataset": "\u7b97\u672f\u6570\u636e\u96c6", "This creates arithmetic problems.": "\u8fd9\u4f1a\u4ea7\u751f\u7b97\u672f\u95ee\u9898\u3002" }