/ Модель

Характеристики

Контекст
2 048 токенов
Параметры
47,2 млн
Лицензия
CC BY-SA 4.0
Архитектура
qwen3 · dense
Опубликована
27 ноя 2025

NextTerm-47M

Генерация текстаТекст → текст3 профессии

Компактный трансформер Qwen3 для предсказания следующих членов целочисленных последовательностей, обученный на данных OEIS.

218скачиваний за 30 дней1лайквеса обновлены27 ноя 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

NextTerm-47M — компактная языковая модель от N8Programs для продолжения целочисленных последовательностей. Это плотный трансформер архитектуры Qwen3 с 47,2 млн параметров, обученный на 1,9 млрд токенов расширенных данных из On-Line Encyclopedia of Integer Sequences (OEIS). Модель принимает последовательность целых чисел, записанных через запятую, и генерирует следующие члены в том же формате. Максимальная длина контекста — 2048 токенов; обучение проводилось на последовательностях длиной до 1024.

Модель предназначена для предсказания следующих элементов арифметических, полиномиальных и OEIS-подобных последовательностей. В карточке приведены результаты сравнительных оценок, в которых она превосходит более крупные универсальные модели на ряде задач продолжения последовательностей; это специализированная модель, а не универсальный чат-бот. Токенизатор разбивает цифры по отдельности, поэтому длинные числа расходуют больше контекста. Числа с ведущими нулями не входили в обучение, а обобщение на последовательности длиннее обучающих не проверено тщательно. Модель распространяется под лицензией CC BY-SA 4.0.

Сценарии применения

  • предсказание следующих чисел в арифметической последовательности
  • продолжение полиномиальных последовательностей
  • поиск продолжения OEIS-подобной целочисленной последовательности

Ограничения

Модель не обучалась на числах с ведущими нулями, а обобщение на последовательности длиннее обучающих не проверено тщательно. Длинные числа расходуют больше контекста, поскольку цифры токенизируются по отдельности.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Radar Chart

Model Summary

NextTerm-47M is a pretrained transformer w/ 47.2M parameters, trained on 1.9 billion tokens of augmented data from the On-Line Encyclopedia of Integer Sequences (OEIS). It is designed to predict the next term in integer sequences. It displays exceptional in-context learning capabilities, and outperforms far larger generic LLMs on OEIS sequence completion tasks. It supports MLX and HuggingFace transformers.

The model is pretrained on sequences of up to length 1024, but can potentially generalize to longer sequences (this has not been extensively tested). All pretraining was done on a single RunPod H100 using MLX's CUDA backend. It is pretrained in float32. The model was trained for 335,000 steps with a batch size of 32 sequences, using Muon w/ a learning rate of 1e-2 and a fallback optimizer of AdamW with a learning rate of 1e-4. It uses the Qwen3 architecture with 12 layers, a model dimension of 512, 8 attention heads, and a feedforward dimension of 2048. It was trained using an estimated 540 exaFLOPs.

The model's tokenizer accepts integer sequences formatted as comma-separated values, e.g. "1,-2,3,-4,". The model outputs the next terms in the sequence in the same format. All non-digit, comma, or negative sign characters are ignored by the tokenizer. Note the model has not been trained on numbers with leading zeros, so inputs like "01,02,03," may yield unpredictable results as they are out-of-distribution. The model tokenizes digits individually, so larger integers will be represented by multiple tokens (e.g. "123" is tokenized as "1", "2", "3"). This means there is no magnitude limit on the integers the model can handle, but longer integers will consume more of the model's context window.

Inference Examples

Successful predictions by NextTerm-47M on various integer sequences:

1,2,3,4,5, -> 6,7,8,9,10,11,12,...
3,2,5,3,2,7,5,3,2,11,7,5,3, -> 2,13,11,7,5,3,2,17,...
10001,10010,10100, -> 11000,100001,100010,100100,101000,110000,1000001,...
123,456,789,101112, -> 131415,161718,192021,222324,252627,282930,...
3,9,4,16,5, -> 25,6,36,7,49,8,64,...

Not all predictions are successful; example failure case below:

3,9,7,49,8,64,10,100,15, -> 121,14,144,16,169,21,196,...  (fails to identify square in-context)

Evaluation Results

Arithmetic Evaluation

The arithmetic evaluation consists of predicting the next term in sequences generated by polynomial functions of varying degrees (arithmetic, quadratic, cubic, quartic), across varying shot counts. The models are evaluated based on the accuracy of their predictions, w/ exact-match. NextTerm-47M outperforms all Qwen models <4B, though larger Qwen models do better on lower-degree polynomials.

ModelArithmeticQuadraticCubicQuartic
NextTerm-47M94.15%81.07%37.43%15.17%
Qwen3-0.6B90.31%8.72%0.30%0.02%
Qwen3-1.7B93.10%41.57%5.36%0.71%
Qwen3-4B93.90%77.26%28.18%5.98%
Qwen3-8B96.10%80.59%32.93%7.95%
Qwen3-14B95.60%84.61%49.16%14.98%

OEIS Evaluation

This consists of predicting the next term in real OEIS sequences from a held-out, decontaminated validation set. Note that the NextTerm model is the only one guaranteed to not have seen any of these sequences during training. NextTerm-47M outperforms all Qwen models, including the largest 14B parameter model.

ModelAccuracy
NextTerm-47M29.06%
Qwen3-0.6B20.53%
Qwen3-1.7B22.65%
Qwen3-4B24.95%
Qwen3-8B25.78%
Qwen3-14B26.78%

Ryskina & Knight (2021) Sequence Completion

This evaluation consists of predicting the next term in 57 sequences from Ryskina & Knight (2021). These sequences were compiled to evaluate OEIS-style sequence completion. NextTerm-47M outperforms all other models. Note that this evaluation has not been decontaminated for Qwen or NextTerm-47M, so some sequences may have been seen during training by some models.

ModelAccuracy
NextTerm-47M70.18%
OEIS-LSTM5%
GPT-27%
OEIS Lookup53%
Qwen3-0.6B33.33%
Qwen3-1.7B49.12%
Qwen3-4B63.16%
Qwen3-8B57.89%
Qwen3-14B59.65%

Reproducibility

The code used to evaluate the model on these benchmarks can be found here. This repository includes the evaluation scripts, as well as the script enhance_data.py used to generate the augmented training data from OEIS. Augmentations include affine transformations, partial summation, subsampling, permuting, etc. The enhanced dataset itself can be found at N8Programs/oeis-enhanced, in the oeis_train_uber_shuffled.jsonl file.

Note that of all checkpoints produced during training, the one with the lowest validation loss was used for this model card and the evaluation results above. This may slightly inflate the reported performance, but the difference is expected to be minimal. For transparency and testing, all checkpoints produced during training are available at N8Programs/NextTerm-47M-Checkpts.

Usage

MLX:

mlx_lm.generate --model N8Programs/N8Programs/NextTerm-47M-Checkpts --prompt "1,2,3"

HuggingFace Transformers:

from transformers import AutoModelForCausalLM, AutoTokenizer

# Load the model and tokenizer
model_name = "N8Programs/NextTerm-47M"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Prompt the model
prompt = "1,2,3,4,5,"
inputs = tokenizer(prompt, return_tensors="pt")
# Generate output
outputs = model.generate(inputs["input_ids"], max_new_tokens=5000)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(f"Prompt: {prompt}")
print(f"Output: {result}")

Citation

If you use this model in your research, please cite it as follows:

@misc{nextterm47m2025,
  author       = {Nathan Breslow},
  title        = {NextTerm-47M: A Pretrained Transformer for Integer Sequence Prediction},
  year         = {2025},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/N8Programs/NextTerm-47M}},
  note         = {47.2M parameter model trained on augmented OEIS data}
}

Attribution

This model and dataset were trained and created using data from the On-Line Encyclopedia of Integer Sequences (OEIS).

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Ревизия весов
ead794b

0 моделей