Developer WollyMonjac has released Tiny 2.1 on GitHub, a small question-answering AI that runs on DOS. It is a Transformer that reads a question one character at a time and generates its answer one character at a time. It has about 367,000 parameters, and the trained model file is only about 380KB, so it fits on a floppy disk together with the DOS executable. According to the developer, response time varies greatly depending on whether the machine has a floating-point unit (FPU).

AD

Weights stored in 8 bits, computation done in floating point

Tiny 2.1 stores the model's weights as signed 8-bit integers and uses floating point for operations such as matrix-vector multiplication. According to the DOS README, the version 2 format of TINY.BIN, which holds the trained model, records each weight in one byte. Each row of weights also has a 32-bit floating-point scale factor, which is used to restore values close to the original weights from the integers. The coefficients used for normalization are also stored as 32-bit floating-point numbers.

In the published C code, load_table loads the integer weights and per-row scale factors, and matvec uses them for computation. Processing proceeds row by row: each weight is multiplied by the corresponding element of the input vector, and the results are summed in floating point. Finally, the sum is multiplied by the row's scale factor to produce one element of the output vector. The approach keeps weight storage small while performing the calculations themselves in floating point.

The handling of scale factors has also changed from the previous version. The training Python code shows that the old version used a single scale factor for an entire weight table, while the current format records a separate factor for each row. This allows an appropriate scale to be set even when the range of weight values differs from row to row.

The model's structure has been expanded as well. According to the training kit documentation, the Transformer grew from three layers in the previous version to four, and the hidden width of each layer's feed-forward network increased from 192 to 256. The model's main width is 96, which differs from the hidden width. The roughly 367,000 parameters trained this way fit in the roughly 380KB TINY.BIN and are used each time a character of the answer is generated.

Even on a 486, an FPU makes a big difference in response time

According to the developer, on FPU-equipped Pentium, 486DX, and 486DX2 machines, a single answer takes a few seconds. On the other hand, the FPU-less 386SX, 386DX, and 486SX handle floating-point operations in software, so an answer can take several minutes. The DOS README explains that setting Turbo C 2.0's floating-point option to "Emulation" makes the program automatically use hardware arithmetic on machines that have an FPU. Even among CPUs of the same 486 generation, response speed differs greatly depending on whether an FPU is available.

To launch it, place the executable TINY.EXE and the trained model TINY.BIN in the same directory. About 540KB of free conventional memory, DOS's base memory area, is required. Even though the files are small enough to fit on a floppy disk, additional memory must be reserved at run time for loading the model and performing calculations.

According to Tom's Hardware's coverage, the DOS version includes a conversation history, a neural monitor, and an "Ask Tiny" field for entering questions, and it also supports function-key operation. The monitor shows each layer's activity and the generation speed, and "CONFIDENCE" lets you check how confident the model was in the character it just chose. The PC speaker also plays a short sound effect assigned to each character; played in succession, these create a sound resembling robot speech. It is not actual speech synthesis but a method of combining sounds that correspond to characters.

AD

What does roughly 61% accuracy on 780 questions tell us?

Tiny 2.1 was trained on about 3,500 facts compiled by the developer. From these facts, the training kit automatically generates paraphrases, questions with the question and answer reversed, yes/no questions, questions containing typos, and more. The mechanism lets the model learn the same fact through many different ways of asking. The published kit includes the fact data, gen2.py for generating questions, train2.py for training, evaluation, and model export, and the trained tiny2.pt. Training can be done with Python 3, NumPy, and PyTorch, and the exported TINY.BIN can be used as is by the DOS executable.

The developer reports that Tiny 2.1 achieved about 61% accuracy on 780 questions containing phrasings and combinations not used in training. Version 1's accuracy on the same questions was 6%. The developer also says it achieved about 90% accuracy on questions worded the same way as in training. These are evaluation results from differently constructed questions, and the 61% figure measures the ability to respond to unfamiliar phrasings and combinations.

However, interpreting this accuracy requires checking how characters are generated and how answers are scored. In the published Python evaluation code, the highest-scoring character is chosen at each step to generate the answer. For scoring, the answer is treated as a set of words, and the code checks whether the required words extracted from example correct answers are included. Common words and words that appear in the question are in principle excluded from the check, so an answer is normally judged correct even if the word order differs. For yes/no questions, the first word of the answer is matched, and questions asking for unknown names have their own judging rules.

Meanwhile, the DOS version's default setting is Creativity 5, which selects the next character probabilistically. The same question can therefore yield different answers, but if you specify TINY 0, the DOS version's character selection code chooses the highest-scoring character every time, as the Python evaluation code does. The developer explains that when asked about a fictional name, the model may invent a nonexistent answer, and that high confidence does not necessarily mean the answer is correct.

The published materials do not specify detailed per-machine speed measurement conditions, nor the command or checkpoint used to calculate the roughly 61% accuracy. Nor can we confirm the accuracy when the same 780 questions are run with the DOS version's default settings. To compare response speed on real DOS machines, the CPU and FPU configurations and the lengths of questions and answers would need to be matched. Likewise, accuracy could be compared with the developer's report by using the same questions and scoring criteria and unifying the character selection method.