/ Модель

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

Контекст
1 024 токена
Лицензия
Apache 2.0
Архитектура
gpjtgpt2 · dense
Библиотека
transformers
Опубликована
3 сен 2026

jax-with-mha-bias-larger-chinchilla-2

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

Компактная GPT-2-подобная языковая модель для генерации текста и экспериментов с обучением LLM с нуля.

76скачиваний за 30 дней0лайковвеса обновлены3 сен 2026

Бенчмарки

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

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

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

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

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

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

Модель Giles Thomas — компактная языковая модель, обученная с нуля на основе GPT-2-подобной архитектуры из книги Себастьяна Рашки «Build a Large Language Model (from Scratch)». Она предназначена для генерации продолжений текста и экспериментов с небольшой авторегрессионной языковой моделью. Обучение выполнялось на JAX, а веса представлены в формате safetensors и доступны для использования через PyTorch и Transformers.

Модель содержит около 226 млн параметров, 15 слоёв и 14 голов внимания; длина контекста — 1 024 токена. Обучение проводилось на токенизированном наборе FineWeb. Автор предупреждает, что модель слабо знает факты и имеет ограниченные способности к рассуждению, поэтому она подходит прежде всего для обучения и экспериментов, а не для серьёзных прикладных задач. Лицензия — Apache 2.0.

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

  • генерация продолжения короткого текста
  • эксперименты с небольшой авторегрессионной языковой моделью
  • изучение работы GPT-2-подобного трансформера
  • проверка пайплайна text-generation в Transformers

Ограничения

Автор отмечает слабые фактические знания и ограниченные способности модели; она не рекомендуется для серьёзных прикладных задач. Контекст ограничен 1 024 токенами.

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

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

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

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

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

Открыть на Hugging Face

Model Card for gpjt/jax-with-mha-bias-larger-chinchilla-2

This model is gpjt/jax-with-mha-bias-larger-chinchilla-2, a trained-from-scratch base model using the GPT-2-style architecture from Sebastian Raschka's book "Build a Large Language Model (from Scratch)".

The model was trained in JAX using a black-box reimplementation of Raschka's original PyTorch code, but the safetensors have been converted back to a PyTorch-compatible format for convenience -- if you run this model, it will be in PyTorch.

This model had its number of parameters scaled up so that if it was trained with the Chinchilla-optimal number of tokens, it would approximately the same compute cost to train as a 2x overtrained model like gpjt/jax-with-mha-bias-no-dropout-extended or gpjt/jax-with-mha-bias-no-dropout-2-epoch. So it's somewhere between GPT-2 small and GPT-2 medium in its number of parameters.

Model Details

Model Description

  • Developed by: Giles Thomas, based on code by Sebastian Raschka
  • Model type: GPT-2 style transformers-based causal LLM.
  • License: Apache 2
  • Parameters: 225,978,368
  • Context length: 1,024
  • Embedding dimensions: 896
  • MHA heads: 14
  • Layers: 15
  • QKV bias: False
  • Weight tying: False

Don't have high expectations for the model! It has only 163M parameters (the GPT-2 "small" size) and was trained on roughly the Chinchilla-optimal number of tokens (~20x the number of parameters), which means that it doesn't know many facts and is not terribly smart. If you want to do serious work, use a serious model (I like Qwen's). But if you want to build on this and see what you can do with a 2020-vintage LLM, please do feel free to play with it!

Model Sources

How to Get Started with the Model

You can download and run the model for inference directly:

from transformers import pipeline
pipe = pipeline("text-generation", model="gpjt/jax-with-mha-bias-larger-chinchilla-2", trust_remote_code=True)
out = pipe(
    "Every effort moves you",
    max_new_tokens=20,
    do_sample=True,
    temperature=1.4,
    top_k=25,
)
print(out[0]["generated_text"])

Note that because it uses custom code, you'll need to set trust_remote_code to True.

It supports AutoTokenizer, AutoModel and AutoModelForCausalLM:

>>> from transformers import AutoTokenizer, AutoModel, AutoModelForCausalLM
>>> tokenizer = AutoTokenizer.from_pretrained("gpjt/jax-with-mha-bias-larger-chinchilla-2")
>>> model = AutoModel.from_pretrained("gpjt/jax-with-mha-bias-larger-chinchilla-2", trust_remote_code=True)
>>> llm_model = AutoModelForCausalLM.from_pretrained("gpjt/jax-with-mha-bias-larger-chinchilla-2", trust_remote_code=True)

You can also fine-tune it; this notebook has an example.

Again, don't expect too much from this model! It's a 226M-parameter GPT-2 one, trained on a limited number of tokens. It's both dumb and ignorant ;-)

Training Details

  • Machine type: Local machine with an RTX 3090
  • Tokens: 4,519,567,360 (Chinchilla-optimal of 20x parameters) rounded up to the nearest batch.
  • Dataset: gpjt/fineweb-gpt2-tokens
  • Micro-batch size: 4
  • Global batch size: 96
  • Dropout: 0.0
  • Gradient clipping: 3.5
  • Learning rate: 0.0014
  • Schedule learning rate: True
  • Weight decay: 0.01

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

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

GPU в ailist

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

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

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

Класс архитектуры
GPJTGPT2ModelForCausalLM
Ревизия весов
952d55f

0 моделей