/ Модель

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

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

QraXAi-Basic-45M

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

Экспериментальная компактная GPT-подобная модель, обученная с нуля на TinyStories для генерации коротких историй и учебных демонстраций.

434скачиваний за 30 дней1лайквеса обновлены24 сен 2026

Бенчмарки

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

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

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

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

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

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

QraXAi-Basic-45M — небольшая авторская модель генерации текста, разработанная coderian. Это decoder-only Transformer с архитектурой GPT-типа, написанный на PyTorch и обученный с нуля; модель не является дообучением GPT-2, хотя использует его BPE-токенизатор с 50 257 токенами. Размер модели — около 44,75 млн параметров, число слоёв — 24; веса доступны в формате safetensors и модель рассчитана на использование через Transformers.

Модель обучена на TinyStories и предназначена для учебных демонстраций и экспериментов с генерацией коротких историй на английском языке. Карточка характеризует её как экспериментальную исследовательскую модель. Лицензия — MIT.

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

  • генерация коротких историй на английском языке
  • изучение устройства небольших языковых моделей
  • демонстрация генерации текста на PyTorch и Transformers

Ограничения

Модель обучена на узком наборе TinyStories и предназначена для учебных демонстраций, поэтому её возможности за пределами генерации коротких историй ограничены. В карточке не приведены результаты оценки качества.

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

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

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

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

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

Открыть на Hugging Face

QraXAi-Basic-45M

A small, decoder-only Transformer (~44.75M parameters) trained from scratch on TinyStories with the GPT-2 BPE tokenizer (50,257 tokens). QraXAi is a hand-written PyTorch GPT implementation (model.py / configuration_qraxai.py, shipped with this repo), not a fine-tune of GPT-2 — only the tokenizer is shared with GPT-2.

This is an experimental research model, intended for learning/demo purposes.

Model details

ArchitectureDecoder-only Transformer (GPT-style), pre-norm
Parameters44,751,872 (~44.75M), all trainable
Layers24
Hidden size256
Attention heads8 (head dim 32)
Feed-forward4× hidden, GELU
Context length256 tokens (hard limit)
Vocabulary50,257 (GPT-2 BPE)
Position encodingLearned absolute embeddings
NormalizationLayerNorm
Weight tyingNo (lm_head is separate)
KV cacheNo — generation recomputes the full context at every step
Weightsfp32, 179 MB (model.safetensors)
Special tokensbos = eos = <|endoftext|> (id 50256)
Custom codeYes — requires trust_remote_code=True

Parameter breakdown: token embeddings 12.87M + position embeddings 0.07M + 24 × 0.79M transformer blocks (18.95M) + final norm + untied lm_head 12.87M.

Quick start

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo_id = "coderian/QraXAi-Basic-45M"

tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    repo_id,
    trust_remote_code=True,
    dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
).to("cuda" if torch.cuda.is_available() else "cpu").eval()

prompt = "Once upon a time, there was a little girl named Lily"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.inference_mode():
    output = model.generate(
        **inputs,
        max_new_tokens=244,          # prompt + new tokens must stay <= 256
        do_sample=True,
        temperature=0.8,
        top_k=50,
        top_p=0.95,
        repetition_penalty=1.1,
        pad_token_id=tokenizer.eos_token_id,
        eos_token_id=tokenizer.eos_token_id,
    )

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

Notes for generation:

  • Context is a hard limit of 256 tokens. The custom forward raises ValueError if the sequence gets longer, so keep len(prompt) + max_new_tokens <= 256.
  • The model has no KV cache: each new token re-runs the full context, so generation cost grows quickly with sequence length.
  • The custom forward does not use an attention mask for padding. Generate one prompt at a time instead of batching.
  • Generation usually stops at <|endoftext|>, but because the training data is a continuous stream of stories, the model sometimes starts a new story instead.

Example output

Prompt: Once upon a time, there was a little girl named Lily (temperature=0.8, top_k=50, top_p=0.95, repetition_penalty=1.1, max_new_tokens=244):

Once upon a time, there was a little girl named Lily who loved to play in the big, green field. One day, she found a shiny stone on top of her backyard. She picked it up and showed it to her mom.

"Look mommy, I found a pretty mineral!" said Lily excitedly. "It's very pretty!"

Her mom smiled and said, "That's right, sweetie. It'll make sure you touch it. But remember, be careful with it because you might find something else inside."

Lily nodded her head and kept playing with the jewel until she noticed that the box had fallen into a hole. She felt sad for her mom, but then remembered what her mom said about when something is hurt.

The next day, Lily went back to the park and saw that the unknown stone was broken. She asked her mom if they could try and fix it. Her mom told her that it's okay to ask for help and that sometimes you can't use it without asking permission. So, Lily listened to her mom and never touched the stone again. Once upon a time, there was a boy named Timmy. He loved to play with his toy car. One day, he went to

(The last line is a new story the model began, cut off by the token limit.)

Training

Datasetroneneldan/TinyStories (train split, streaming), first 130,000 stories
Data size115.7M characters → 28.76M tokens → ~112,350 training blocks
ObjectiveNext-token prediction (causal LM), cross-entropy
Epochs1 (~7,000 optimizer steps)
Batch size16
Block size256
OptimizerAdamW, lr 3e-4
Gradient clipping1.0
Mixed precisionbf16 (on CUDA)
Seed42

Files in this repository

FileDescription
config.jsonModel config (GPTConfig + auto_map for remote code)
model.safetensorsfp32 weights (179 MB)
model.pyQraXAiForCausalLM — custom modeling code
configuration_qraxai.pyGPTConfig — custom configuration
tokenizer.json, tokenizer_config.jsonGPT-2 BPE tokenizer
generation_config.jsonDefault generation settings
LICENSEMIT License

Limitations

  • English only; trained exclusively on synthetic children's stories (TinyStories), so it knows little about the real world.
  • Trained for a single epoch: grammar is mostly coherent, but content can be repetitive, inconsistent or nonsensical.
  • Hard 256-token context; no sliding window, so long inputs must be truncated.
  • Not instruction-tuned — it does not follow instructions and is not a chat model.
  • No safety filtering or alignment of any kind. Do not use in production or for user-facing applications.
  • TinyStories is synthetic data; nothing prevents the model from producing odd or inappropriate continuations.

Acknowledgements

  • Dataset and idea: TinyStories: How Small Can Language Models Be and Still Speak Coherent English? — Ronen Eldan and Yuanzhi Li, 2023 (arXiv:2305.07759).
  • Tokenizer: GPT-2 BPE (gpt2).
  • Built with PyTorch and Hugging Face Transformers.

License

Released under the MIT License. Note that the training dataset (TinyStories) has its own terms; check them if you plan to redistribute the data or use the model commercially.

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

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

GPU в ailist

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

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

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

Класс архитектуры
QraXAiForCausalLM
Ревизия весов
6d8af17

0 моделей