/ Модель

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

Контекст
1 024 токена
Параметры
890 880
Лицензия
Apache 2.0
Архитектура
photon_p1 · dense
Библиотека
pytorch
Опубликована
17 окт 2026

photon-p1

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

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

56скачиваний за 30 дней0лайковвеса обновлены17 окт 2026

Бенчмарки

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

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

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

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

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

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

Photon-P1 — экспериментальная языковая модель с архитектурой семейства Llama, разработанная muonai и обученная с нуля без базовой модели. По README, модель содержит около 1,003 млн параметров; в метаданных указано 890,9 тыс. параметров. Она предназначена для исследования жёсткой специализации: в каждом FFN-слое есть отдельные down-проекции для разговорных данных и для остальных групп, а группу при запуске задаёт вызывающая сторона. Модель генерирует текст, использует токенизатор byte-level BPE с размером словаря 4096 и имеет контекст 1024 токена. Основные языки — английский и в меньшей степени французский.

Photon-P1 подходит для экспериментов по специализации параметров, сравнительных абляций и учебных демонстраций обучения малых моделей. Она обучалась на разговорных данных, коде, вызовах функций, финансовых и юридических текстах, математике и других данных. Модель намеренно переобучена, оценивалась только на обучающей выборке и не предназначена для практического ассистирования, надёжных ответов на вопросы, рассуждений или генерации кода. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Photon P1 banner

Photon-P1

Photon-P1 is a 1.003M-parameter language model trained from scratch — no base model, no pretrained weights, no gated dependencies. It is a follow-up to Photon 5 (5.03M parameters, seven per-domain LoRA adapters) exploring a more aggressive form of parameter specialization at a much smaller scale.

The core idea: instead of seven fine-grained LoRA adapters, use two fully independent down-projection matrices per layer — one for chat, one for everything else. No router, no soft mixing. A caller specifies the group and only the corresponding matrix is used.

This is an intentionally extreme experiment. Photon-P1 is overfit by design, evaluated only on training data, and intended as a research probe rather than a usable assistant.


Headline result

On training data (16 epochs, overfit regime), forcing the wrong down-projection matrix produces:

Data groupCorrect down_projWrong down_projRatio
chatPPL 30.19PPL 412.09x 13.6
restPPL 2.56PPL 103.67x 40.5

Per-layer cosine similarity between the two down projections ranges from 0.19 to 0.27 — far from 1.0 (identical) and far from 0 (orthogonal). This is the signature of genuine specialization: shared initialization base, functionally disjoint roles.

Per-layer Frobenius norms of the down projections grow with depth, and the "rest" matrix consistently exceeds the "chat" matrix by 7% (layer 0) to 26% (layer 5) — consistent with the "rest" group being dominated by highly templated content (JSON, Python, GSM8K) requiring larger weight magnitudes.


Architecture

ComponentValue
Parameters1,002,720 (~1.003M)
Hidden size96
Layers6
Attention heads4 (query), 2 (key/value)
Head dim24
Grouped Query Attentionyes (GQA, ratio 2:1)
Intermediate size (FFN)192 (SwiGLU)
NormalizationRMSNorm, pre-norm
Positional encodingRoPE (theta = 10000 base)
Max sequence length1024
EmbeddingsTied (input = output)
Vocab size4096
Groups2 (chat, rest)
Precisionfp32 weights, bf16 during training

The architecture is a faithful implementation of the Llama family, written entirely in plain PyTorch.

Dual-group specialization

Every FFN layer contains:

  • A shared SwiGLU: gate projection, up projection
  • Two independent down projections of shape (192, 96), one per group
  • No router — the group is passed explicitly at each forward pass

During training, a batch from "chat" only ever updates the chat down projection. A batch from "rest" only ever updates the rest down projection. The gate, up, attention, and embeddings are shared and updated by both.

This is a hard-routed dual-expert FFN. Each group's down projection receives gradient from exactly one source, which is the cleanest possible specialization signal.

Groups:

IDGroupContent
0chatConversational data (UltraChat)
1restCode, function calling, terminal, finance, law, math

Tokenizer

Byte-level BPE tokenizer trained from scratch on the training corpus.

  • Vocab size: 4096
  • Training time: 27.1 s
  • Round-trip decode verified

The compact vocabulary (4096) is deliberate: at 1M parameters, a larger vocab would consume a disproportionate share of the budget. 4096 tokens keeps the (tied) embedding at ~393k parameters and leaves ~610k for the transformer stack.


Training

SettingValue
Training tokens~7.5M unique, ~120M seen (16 epochs)
Batch size32 sequences x 512 tokens = 16,384 tok/step
Steps4000
OptimizerAdamW (fused), beta = (0.9, 0.95)
Learning rate8e-4, cosine schedule, 100 warmup steps
Weight decay0.005
Precisionbf16 autocast
Hardware1 x NVIDIA T4 (Kaggle)
Wall-clock time9.46 minutes

Final training loss: 2.94 (cross-entropy, causal, bf16).

Loss trajectory:

StepLoss
508.01
5003.74
10003.45
20003.17
30003.07
40002.94

The loss curve flattens and begins oscillating between steps 3000 and 4000 — the model has memorized its training corpus and is no longer generalizing. This is the intended behavior for this experiment.

Training data

GroupSourcesSamples
chatHuggingFaceH4/ultrachat_200k8,000
restCodeAlpaca, python_instructions, tool-calling-english-100k, glaiveai, legalfinance, gsm8k, ARC-Challenge~8,000

Datasets reused across slices are shuffled with different seeds.


Evaluation

Warning: all reported perplexities are computed on training data. No held-out split was used. The training regime is intentionally overfit (16 epochs on ~8k examples per group). The numbers below measure how well the model fits data it has already seen — they are not a measure of generalization.

Perplexity is computed with max length 256, causal shift, padding masked out.

Cross-group perplexity (headline result)

Data groupdown_proj usedPPLNLLGap vs correct
chatchat (correct)30.193.407—
chatrest (wrong)412.096.021+1265.2%
restrest (correct)2.560.940—
restchat (wrong)103.674.641+3951.4%

The wrong projection matrix produces perplexities that are 13.6x (chat) and 40.5x (rest) worse than the correct one. The specialization is not marginal — the two matrices encode fundamentally different functions.

Per-layer divergence

Layerchat normrest normcos(chat, rest)
04.9405.285+0.2719
15.0875.601+0.2565
25.1455.933+0.2104
35.6406.147+0.1890
45.8676.835+0.1879
56.0757.636+0.2166

Cosine similarity between the two matrices stays in the 0.19-0.27 range at every layer. They share about 20% of their direction (from shared initialization and shared upstream gradients) but diverge sharply beyond that. The divergence increases slightly with depth (0.27 at layer 0, down to 0.19 at layer 3-4, mild recovery at layer 5) — consistent with the deeper layers performing more group-specific transformation.

The norm of the "rest" matrix grows faster with depth, ending at 26% larger than the "chat" matrix at layer 5. This is coherent with the "rest" group containing highly templated content (JSON, Python syntax, GSM8K reasoning markers) that requires larger weight magnitudes to represent.


Interpretation

The result is striking given the parameter count. Each down projection holds 18,432 parameters (192 x 96), or 11% of the model's total parameter budget per group per layer. With only 11% dedicated to a group, the model still produces a 13-40x perplexity degradation when forced to use the wrong projection.

Three conclusions:

  1. Hard-routed specialization works exceptionally well at 1M parameters. The theoretical concern — that 1M is too small for meaningful specialization — is empirically false.

  2. The bottleneck is not the shared trunk. Attention, embeddings, gate, and up projections are shared and perform well on both groups. The specialization lives entirely in the down projections, which are the "final projection to vocabulary space."

  3. Cosine similarity in the 0.2 range is the sweet spot. The two matrices need to share enough of the base to remain compatible with the shared trunk, but diverge enough to encode group-specific output distributions. Photon-P1 sits exactly in that regime.


Comparison with Photon 5

PropertyPhoton 5Photon-P1
Parameters5.03M1.003M
Domains7 (chat, code, agent, ...)2 (chat, rest)
SpecializationLoRA rank-8 on down_projFull down_proj per group
RoutingHard (domain_ids)Hard (group_ids)
Training epochs~2.4~16
Training loss3.332.94
Cross-group testNot measured13.6x / 40.5x gap

Photon 5 asked whether fine-grained specialization is possible. Photon-P1 answers a sharper question: what happens when the specialization is coarse but total?


Limitations

Read this before using the model.

Photon-P1 is a research artifact, not a usable assistant. At 1M parameters, the model is four orders of magnitude smaller than production LLMs.

  1. Extreme overfitting. 16 epochs on 8k examples per group. The model has memorized its corpus. Any novel input will produce unpredictable output.

  2. No held-out evaluation. All perplexities reported are on training data. They measure fitting, not generalization.

  3. Hallucination is the default behavior. Every generated token is a statistical guess.

  4. No reasoning. The model does not perform arithmetic, does not follow multi-step logic, and does not understand instructions.

  5. Group routing is manual. The caller must specify whether the input is "chat" or "rest". The model has no built-in classifier.

  6. Language coverage. Predominantly English, some French.

  7. No safety alignment. No RLHF, no DPO, no red-teaming.


Intended use

Photon-P1 is intended for:

  • Research on hard-routed per-group specialization at very small scale.
  • Ablation baseline against Photon 5 (7 LoRA soft-routed) and other specialization strategies.
  • Educational demonstrations of how specialization emerges in tiny models.
  • Study of cosine similarity as a specialization metric — the 0.19-0.27 range observed here is a useful empirical data point.

Photon-P1 is not intended for any production use, factual question answering, or code generation.


Files

FileSizeDescription
model.safetensors3.8 MBModel weights (fp32, 1.003M params)
config.json0.6 KBArchitecture and training metadata
tokenizer.json280 KBByte-level BPE vocabulary (4096)
tokenizer_config.json0.2 KBTokenizer wrapper configuration
README.mdthis fileModel card

Design notes

Why 1M parameters?

Photon 5 (5M) was too large to truly test the specialization-vs-capacity tradeoff — the model had enough room to encode multiple domains in the shared trunk even without specialization. At 1M, the capacity constraint is severe enough that specialization becomes structurally necessary, not just beneficial.

Why a full down_proj per group, not LoRA?

LoRA gives low-rank specialization (rank 8 out of 96 in Photon 5, so ~8% of the matrix capacity). Photon-P1 gives full-rank specialization by duplicating the down projection entirely. This is the maximal specialization the architecture can support without doubling the parameter count.

Why only two groups?

Seven groups at 1M parameters would give each group only 3% of the parameter budget. Two groups give each 11%, which is enough to encode a full output distribution. The choice of "chat" vs "rest" is arbitrary but convenient: chat is open-ended, rest is templated, so the specialization is easy to measure.

Why so many epochs?

16 epochs forces memorization. Without overfitting, the cross-group perplexity gap would be diluted by generalization error on both sides. By overfitting, we isolate the specialization signal: the model has memorized each group's distribution separately, and we can measure how much the wrong matrix breaks that memorization.


Citation

If you use Photon-P1 in academic work, please cite it as:

muon AI. Photon-P1: Hard-Routed Dual-Expert Specialization at 1M Parameters. 2025. Available at https://huggingface.co/muonai/photon-p1


Acknowledgments

Dataset sources remain under their respective licenses. Architecture draws on the Llama family (Touvron et al., 2023) and the MoE literature (Shazeer et al., 2017; Fedus et al., 2021).

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

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

GPU в ailist

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

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

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

Класс архитектуры
PhotonP1
Ревизия весов
dc51519

0 моделей