/ Модель

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

Лицензия
Apache 2.0
Архитектура
crn · dense
Базовая модель
gemma-4-E2B
Библиотека
transformers
Опубликована
13 июл 2026

prajna

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

Экспериментальный адаптер CRN для Gemma 4 E2B, корректирующий генерацию текста в узком распределении обучающего корпуса.

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

Бенчмарки

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

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

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

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

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

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

Prajna CRN — экспериментальный адаптер архитектуры Cognitive Resonance Network от eulogik для Google Gemma 4 E2B. Это не самостоятельная модель: обучаемый модуль примерно из 6,7 млн параметров корректирует промежуточные скрытые состояния замороженной базовой модели и требует её загрузки вместе с состоянием эпизодической памяти. В состав CRN входят механизмы резонансного внимания, композиции навыков, коррекции в латентном пространстве и дифференцируемой памяти. Веса опубликованы в формате PyTorch; базовая модель занимает около 10 ГБ при загрузке.

Модель предназначена для генерации текста в узком распределении обучающего корпуса. Автор сообщает о снижении perplexity на отложенном фрагменте этого корпуса с 106,85 до 6,02, но на текстах вне обучающего распределения адаптер ухудшает результат. Общие способности к рассуждению не подтверждены. Карточка указывает английский язык. Лицензия — Apache-2.0; данные обучения и полный обучающий процесс не опубликованы.

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

  • генерация текста в домене обучающего корпуса
  • адаптация Gemma 4 E2B к специализированному текстовому корпусу
  • экспериментальная оценка корректировки скрытых состояний языковой модели

Ограничения

Адаптер переобучен на обучающем корпусе и ухудшает качество на текстах вне его распределения; общие способности к рассуждению не продемонстрированы. Для запуска необходимы базовая Gemma 4 E2B и файл состояния эпизодической памяти; указанный загрузчик работает на CPU и не поддерживает MPS.

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

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

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

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

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

Открыть на Hugging Face
Hugging Face License Params Base Perplexity Hardware Status GitHub

Prajna CRN by @eulogik · Repo: github.com/eulogik/prajna · Model: huggingface.co/eulogik/prajna

🧠 Prajna CRN — Cognitive Resonance Network adapter for Gemma 4 E2B

Open weights. A 6.7M-parameter trainable "cortex" injected into the hidden states of a frozen Gemma 4 E2B. On its training-distribution text it cuts perplexity from 106.85 → 6.02 (≈18× lower) versus the frozen base — using only 0.3% of the base's parameters, trained CPU-only on a Mac Mini M4.

Prajna is not a standalone model and not a general reasoning upgrade. It is a parameter-efficient hidden-state correction network: a small module that reads the base model's intermediate hidden states and adds a gated correction back into the residual stream. The base stays frozen; only the CRN trains. This repo ships the trained weights and the minimal loader.


What it does (honestly)

ResultValueScope
In-distribution perplexity106.85 → 6.02 (≈18× lower)held-out training corpus
Trainable params6,721,4320.3% of the base
Out-of-distribution text (bpb)worse (~3×)generic text
MMLU / BoolQ / HellaSwagat or below frozen basestandard benchmarks
Implicit-goal / car-wash (reworded)0/8no generalization

Read this carefully: the ≈18× is a corpus-compression result, not general intelligence. On text outside its training domain the same adapter increases loss, and it does not perform implicit-goal reasoning (a reworded car-wash probe scored 0/8; the widely-circulated "76% of models fail" test is not passed). We publish this openly because the architecture is the interesting part, and the honest limitations are part of the experiment.


Why the architecture is the innovation

The CRN is a small module injected at intermediate hidden states (here: Gemma layers 7, 15, 23, 31) that computes a correction from four cooperating sub-modules:

  • Resonance Attention — frequency-modulated attention over hidden states using a learned spectral filter bank (interpretable "cognitive bands", top-k selected).
  • Skill Composer — a library of low-rank composable skills (top-k selection).
  • Reflective Loop — a latent-space self-correction operator.
  • Episodic Memory — a small differentiable key-value memory with read/write gates and temporal decay, giving a persistent context channel without retraining the base.

A per-injection sigmoid gate (crn_mix, learned) controls correction strength. Because corrections are additive and gated, each injection is ablatable — we measured that disabling injection @layer 7 alone raises in-distribution ppl from 6.02 to 13.93, while @layer 31 barely matters. This makes the method interpretable in a way LoRA/adapters are not.

Key properties

  • Base model is fully frozen (no_grad); zero gradient flow into it.
  • Backbone-agnostic: operates on extracted hidden states.
  • 0.3% trainable params; trains on CPU in ~22 h.

Files

FilePurpose
dpo_final.pt★ Trained CRN adapter (SFT + DPO), 6,721,432 params
memory_dpo_final.jsonTrained episodic-memory state (required at inference)
crn_components.pyMinimal loader: PrajnaStudentMultiLayer + CRN modules

Training pipeline and data generation are private; this is an open-weights release. The loader above is sufficient to run inference.


Quick start

import torch
from crn_components import PrajnaStudentMultiLayer

student = PrajnaStudentMultiLayer(
    device="cpu", inject_every=8, max_length=96,
    num_frequencies=8, top_k=2, num_skills=32, skill_rank=4,
    num_corrections=8, mem_size=256, mem_dim=64,
)
ckpt = torch.load("dpo_final.pt", map_location="cpu", weights_only=False)
student.load_state_dict(ckpt["crn"], strict=False)
student.load_memory("memory_dpo_final.json")   # required
student.eval()
tok = student.tok

ids = tok("Explain why the sky is blue.\n", return_tensors="pt").input_ids
with torch.no_grad():
    out = student._collect_hidden(ids)
    logits, _ = student._apply_crn(out, training=False)
print(tok.decode(logits.argmax(-1).flatten()))

The base google/gemma-4-E2B is downloaded automatically from HuggingFace on first load (~10 GB). Set HF_HOME to an external disk if space is tight. Note: the wrapped model runs on CPU; MPS is not supported for this loader (a Gemma-4 embedding allocation issue).


Training (summary)

StageStepsLoss
SFT20000.2262
DPO5001.9788 (chosen > rejected)

Hardware: Mac Mini M4, 16 GB, CPU only.


Limitations & future work

  • The released checkpoint is a domain specialist, not a general model. It overfits its training corpus and degrades out-of-distribution.
  • No implicit-goal / common-sense reasoning is demonstrated (reworded car-wash probe: 0/8). The earlier "reasoning" framing was a keyword-match artifact in evaluation and has been retracted.
  • Active research directions (not yet demonstrated):
    • Make the correction generalize beyond the training domain.
    • Validate reasoning transfer on reworded/held-out prompts.
    • Scale injections and memory; explore larger bases.

We are publishing this as a credible, reproducible experiment — a genuinely novel parameter-efficient architecture with an honest account of where it works and where it doesn't. Contributions and critiques welcome.


🔗 Reference & author

Author: @eulogik · GitHub · Model hub

Cite / reference:

@misc{prajna-crn-2026,
  title        = {Prajna: Cognitive Resonance Network — a parameter-efficient hidden-state
                  correction adapter for frozen LLMs},
  author       = {eulogik},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/eulogik/prajna}},
  note         = {Open-weights release (training code private)}
}

Follow-up research (different system): a follow-up study explores retrieval-free error correction on a frozen base (CRN v2). Paper: arXiv:2609.16145. Note this paper studies a different system from the model on this page.

If you build on Prajna or reproduce the in-distribution perplexity result, a link back to huggingface.co/eulogik/prajna is appreciated. Feedback and collaborations welcome via the repo.


License

Weights: Apache 2.0. Loader (crn_components.py): Apache 2.0. Training code: private.

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

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

GPU в ailist

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

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

Архитектура crn неизвестна transformers в образе рантайма.

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

0 моделей