/ Модель

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

Контекст
2 048 токенов
Лицензия
Apache 2.0
Архитектура
better_gpt · dense
Библиотека
transformers
Опубликована
18 июл 2026

BetterGPT-150M

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

Компактная базовая англоязычная Transformer-модель для генерации текста и дальнейшей адаптации под прикладные задачи.

76скачиваний за 30 дней1лайквеса обновлены29 июл 2026

Бенчмарки

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

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

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

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

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

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

BetterGPT-150M — языковая модель на 150 млн параметров от Harikrish2727, построенная как декодерный Transformer и предварительно обученная с нуля на PyTorch. Архитектура включает многоголовое внимание, RoPE, RMSNorm, SwiGLU, связывание весов и SDPA; максимальная длина контекста — 2048 токенов. Модель доступна в формате safetensors и распространяется по лицензии Apache-2.0.

Это базовая, не прошедшая инструкционную настройку модель для автодополнения и генерации текста, продолжения предобучения, supervised fine-tuning и исследовательских экспериментов. Обучение примерно на 15 млрд токенов использовало FineWeb-Edu, Cosmopedia, FineMath и StarCoder-Python; автор сообщает о результатах на тестах научного и бытового рассуждения, включая ARC и SciQ.

Модель рассчитана преимущественно на английский язык. Она компактна и может служить основой для адаптации под конкретные задачи, однако напрямую не подходит в качестве разговорного ассистента: следование инструкциям не обучалось. Возможны фактические ошибки и непоследовательные ответы; рассуждения, многоязычность и программирование ограничены по сравнению с более крупными специализированными моделями.

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

  • автодополнение английского текста
  • генерация продолжения заданного текста
  • продолжение предобучения на собственных данных
  • дообучение модели на инструкциях
  • эксперименты с компактными языковыми моделями

Ограничения

Модель не прошла инструкционную настройку и не предназначена для прямого использования как разговорный ассистент; она может выдавать фактические ошибки и непоследовательный текст. Её способности к рассуждению, многоязычности и программированию ограничены по сравнению с более крупными моделями.

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

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

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

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

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

Открыть на Hugging Face

BetterGPT-150M

BetterGPT-150M is a 150 million parameter decoder-only Transformer language model pretrained from scratch using PyTorch.

It is a base language model and has not been instruction tuned. The model is intended for continued pretraining, supervised fine-tuning, research, and downstream adaptation.

BetterGPT is developed as an end-to-end engineering project that implements the complete lifecycle of building a modern small language model, including tokenizer training, dataset preparation, large-scale pretraining, and Hugging Face Transformers integration.

Despite training on just ~15B tokens, BetterGPT-150M outperforms several established ~110–160M parameter baselines (GPT-2 Small, OPT-125M, Pythia-160M) on science-reasoning benchmarks like ARC — see Evaluation for full results.

🚀 Live Demo

You can try out BetterGPT-150M directly in your browser: 👉 Try the Interactive Space Demo


Repo https://github.com/harikrish2727/BetterGPT


Model Details

PropertyValue
Model TypeDecoder-only Transformer
Parameters150M
Layers18
Hidden Size768
Attention Heads12
Context Length2048
Vocabulary Size32,768
Positional EncodingRotary Position Embeddings (RoPE)
NormalizationRMSNorm
Feed ForwardSwiGLU
AttentionPyTorch Scaled Dot Product Attention (SDPA)
Weight TyingYes
FrameworkPyTorch
LibraryHugging Face Transformers

Evaluation

BetterGPT-150M was evaluated zero-shot (0-shot) on standard academic benchmarks using lm-evaluation-harness. Notably, on ARC-Easy and ARC-Challenge, BetterGPT-150M outperforms GPT-2 Small, OPT-125M, Pythia-160M, and Cerebras-GPT-111M despite being trained on roughly 15B tokens — a fraction of the 40B–300B+ tokens used for those baselines — suggesting the FineMath/Cosmopedia-heavy data mix is particularly effective for science-reasoning-style tasks relative to raw token count. Results are grouped by capability; acc_norm is reported where answer options vary in length (this corrects for a length bias in raw log-likelihood scoring — see lm-eval-harness docs for details).

Commonsense & Physical Reasoning

BenchmarkMetricScore
PIQAacc64.58%
WinoGrandeacc52.41%
HellaSwagacc_norm36.46%

Knowledge & Science Reasoning

BenchmarkMetricScore
SciQacc80.70%
ARC-Easyacc_norm48.27%
ARC-Challengeacc_norm27.30%
OpenBookQAacc_norm31.60%

Language Modeling Quality

BenchmarkMetricScore
LAMBADA (OpenAI)acc27.79%
LAMBADA (OpenAI)perplexity70.88

Math & Logical Reasoning

In progress — MathQA and LogiQA results will be added once complete.

Baseline Comparison (~110–160M Parameter Scale)

ModelParamsARC-EARC-CHellaSwagPIQAWinoGrandeSciQ
BetterGPT-150M (ours)150M48.2727.3036.4664.5852.4180.70
GPT-2 Small124M39.722.631.462.150.7—
OPT-125M125M39.922.131.662.051.8—
Pythia-160M160M36.4–46.3*23.130.359.8–62.5*50.8–51.276.4
Cerebras-GPT-111M111M35.121.027.258.149.0—

Baseline figures are drawn from published papers/reproductions using varying lm-eval-harness versions, which can introduce small discrepancies (ranges shown reflect this). BetterGPT-150M's own figures above are from a single consistent run.

Training

BetterGPT-150M was pretrained on approximately 15 billion tokens using a two-stage curriculum together with a Warmup–Stable–Decay (WSD) learning rate schedule implemented using PyTorch's LambdaLR.

Stage 1 — Stable Phase (~13B Tokens)

The first stage focuses on broad language acquisition using a diverse mixture of educational, web, mathematical, and programming datasets.

Stage 2 — Annealing Phase (~2B Tokens)

The second stage increases the sampling probability of mathematics, reasoning, instructional text, and Python programming data while training with a reduced learning rate.

This curriculum is designed to adapt the model toward reasoning-intensive domains while preserving the language capabilities learned during the stable phase.


Training Data

BetterGPT-150M was pretrained using publicly available datasets, including:

  • FineWeb-Edu
  • Cosmopedia
  • FineMath
  • StarCoder-Python

The datasets were streamed, interleaved, and converted into binary training shards for efficient large-scale pretraining.

Please refer to the original dataset repositories for licensing information, intended uses, and any applicable restrictions.


Architecture

BetterGPT-150M implements a modern decoder-only Transformer architecture including:

  • Multi-Head Self Attention
  • Rotary Position Embeddings (RoPE)
  • RMSNorm
  • SwiGLU Feed Forward Networks
  • Weight Tying
  • PyTorch Scaled Dot Product Attention (SDPA)

The repository provides two Hugging Face compatible model classes:

  • BetterGPTModel – Base transformer model returning hidden states (AutoModel)
  • BetterGPTForCausalLM – Causal language model for autoregressive text generation (AutoModelForCausalLM)

Intended Uses

BetterGPT-150M is intended for:

  • Continued pretraining
  • Supervised fine-tuning
  • Preference optimization
  • Research
  • Education
  • Building downstream NLP applications

Out-of-Scope Uses

BetterGPT-150M is not instruction tuned and is not intended to be used directly as a conversational assistant.

Users requiring instruction-following behavior should fine-tune the model using supervised instruction tuning or other alignment techniques.


Limitations

As a relatively small pretrained language model, BetterGPT-150M has several limitations:

  • May generate factually incorrect information.
  • May produce hallucinated or inconsistent responses.
  • Limited reasoning ability compared to significantly larger language models.
  • Limited multilingual capability.
  • Limited coding performance compared to larger code-specialized models.

Evaluation benchmarks are currently in progress and will be released separately.


Usage

Load for text generation

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained(
    "Harikrish2727/BetterGPT-150M",
    trust_remote_code=True
)

model = AutoModelForCausalLM.from_pretrained(
    "Harikrish2727/BetterGPT-150M",
    trust_remote_code=True,
    device_map="auto"
)

Generate text

prompt = "The future of artificial intelligence is"

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)


outputs = model.generate(
    **inputs,
    max_new_tokens=500,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    repetition_penalty=1.15,
    eos_token_id=tokenizer.eos_token_id,
    pad_token_id=tokenizer.pad_token_id,
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Load as a base model

from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(
    "Harikrish2727/BetterGPT-150M",
    trust_remote_code=True
)

model = AutoModel.from_pretrained(
    "Harikrish2727/BetterGPT-150M",
    trust_remote_code=True
)

Citation

If you use BetterGPT-150M in your work, please cite the project.

@software{bettergpt2026,
  title={BetterGPT: Building a Small Language Model from Scratch},
  author={Harikrishnan Vijayan},
  year={2026},
  url={https://github.com/Harikrish2727/BetterGPT}
}

License

This model is released under the Apache License 2.0.

Please ensure that any downstream use also complies with the licenses of the datasets used during pretraining.


Acknowledgements

BetterGPT is an independent engineering project inspired by modern open-source language models and the Hugging Face Transformers ecosystem.

The project draws inspiration from the broader open-source LLM community, including work such as nanoGPT, llm.c, Llama, Gemma, and Qwen.

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

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

GPU в ailist

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

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
BetterGPTForCausalLM
Ревизия весов
0abbd4d

0 моделей