/ Модель

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

Контекст
32 768 токенов
Параметры
281 млн
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-0.6B-Base
Опубликована
20 сен 2026

RockAndEgg-313M

ЭмбеддингиТекст → embedding6 профессий
169скачиваний за 30 дней0лайковвеса обновлены19 ноя 2026

Описание модели

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

Компактная основа Qwen3 для извлечения признаков и дообучения под классификацию, ранжирование или регрессию.

RockAndEgg-313M — компактная модель-основа для классификации и извлечения признаков, созданная разработчиком moeshawky на основе Qwen/Qwen3-0.6B-Base. В ней сохранены первые 10 из 28 слоёв Qwen3, исходные ширина скрытого состояния, структура FFN и внимания, токенизатор и словарь. Это плотная причинная трансформерная модель примерно на 281,4 млн параметров по метаданным; README приводит оценку около 312,89 млн параметров. Контекст — до 32 768 токенов.

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

Сокращение числа слоёв не является дистилляцией, и модель не заявлена как замена полной Qwen3-0.6B для генерации, рассуждений, следования инструкциям или чата. Генеративное качество и поведение на длинном контексте не были целью оптимизации.

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

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

Ограничения

Модель поставляется без обученной классификационной головы и готовых меток, поэтому для прикладной задачи её необходимо дообучить. Она не предназначена как замена полной Qwen3-0.6B для генерации, рассуждений, чата или следования инструкциям; качество на длинном контексте не оптимизировалось.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

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

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

RockAndEgg-313M

RockAndEgg-313M is a compact, classification-oriented derivative of Qwen/Qwen3-0.6B-Base.

It retains the first 10 transformer layers of the original 28-layer Qwen3-0.6B-Base architecture while preserving the donor's hidden width, FFN width, attention topology, tokenizer, vocabulary, and causal attention mechanism.

The result is an approximately 313M-parameter Qwen3 backbone intended for downstream classification and representation-learning work.

RockAndEgg is not itself a task-trained classifier. It deliberately ships without a task-specific classification head so downstream users can define their own label space, objective, and decision semantics.

28 layers → 10 layers. No distillation. No width reduction. No tokenizer surgery. No task-specific head.

Why “RockAndEgg”?

The name refers to the old Egyptian game in which children strike decorated eggs together, with the surviving egg winning. The trickster wins by painting a stone to look like an egg. A classifier, in the most literal possible sense, should be able to tell the rock from the egg.


Model lineage

Qwen/Qwen3-0.6B-Base
        │
        │ physical depth truncation
        │ retain transformer layers 0–9
        ▼
RockAndEgg-313M
        │
        │ downstream task-specific fine-tuning
        ▼
classification / scoring / regression models

Saa-313M, the LLMOSafe 8D specialization developed from this architecture, is a separate downstream model and is not included in this repository.


Upstream donor

  • Model: Qwen/Qwen3-0.6B-Base
  • Donor revision used by the surgery experiment: da87bfb608c14b7cf20ba1ce41287e8de496c0cd
  • License: Apache-2.0
  • Original depth: 28 transformer layers
  • Original parameter count: 596,058,112

RockAndEgg is an independent derivative and is not affiliated with or endorsed by Qwen or Alibaba.


Architecture

PropertyQwen3-0.6B-BaseRockAndEgg-313M
Transformer layers2810
Retained layers0–270–9
Hidden size10241024
FFN / intermediate size30723072
Query heads1616
KV heads88
Head dimension128128
Attentioncausal GQAcausal GQA
Vocabulary151,936151,936
TokenizerQwen3unchanged
Weight dtypeBF16 donorBF16-compatible
Parameters596.1M≈312.9M
Depth reduction—64.3%
Parameter reduction—≈47.5%

As a headless Qwen3Model, the backbone contains approximately 312.89M parameters.

A downstream classification head adds only task-specific parameters. For example, an 8-label linear head adds 8,192 weights.


What this model is

RockAndEgg-313M is best understood as a:

small Qwen3-derived classification and representation backbone

rather than a classifier with predefined labels.

It can be used as the starting point for:

  • single-label text classification;
  • multi-label text classification;
  • regression;
  • ranking or scoring;
  • semantic feature extraction;
  • compact Qwen-derived representation research;
  • comparisons between causal decoder-derived representations and BERT/DeBERTa-family classifiers.

It retains causal attention. This release does not convert Qwen3 into a bidirectional encoder.


Why there is no classification head

A generic pretrained classification head would have no meaningful semantics until a downstream task defines:

  • the number of labels;
  • what those labels mean;
  • whether outputs are mutually exclusive or independent;
  • whether the task is classification or regression;
  • the training objective and operating threshold.

RockAndEgg therefore preserves the reusable part:

pretrained backbone → downstream task defines the head

rather than shipping an arbitrary randomly initialized head and presenting it as functionality.

The headlessness is intentional.


Quickstart

Load as a backbone

from transformers import AutoModel, AutoTokenizer

model_id = "moeshawky/RockAndEgg-313M"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModel.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

The output is the Qwen3 hidden-state backbone.


Multi-label classification

from transformers import AutoModelForSequenceClassification, AutoTokenizer

model_id = "moeshawky/RockAndEgg-313M"

tokenizer = AutoTokenizer.from_pretrained(model_id)

model = AutoModelForSequenceClassification.from_pretrained(
    model_id,
    num_labels=8,
    problem_type="multi_label_classification",
)

Transformers will initialize a new classification head.

A warning about newly initialized classification-head weights is expected.

Those weights have no task semantics until they are fine-tuned.

For multi-label classification, train against independent targets using an appropriate binary-cross-entropy-style objective.


Single-label classification

model = AutoModelForSequenceClassification.from_pretrained(
    model_id,
    num_labels=4,
    problem_type="single_label_classification",
)

The newly initialized head must be trained for the downstream task.


Regression

model = AutoModelForSequenceClassification.from_pretrained(
    model_id,
    num_labels=1,
    problem_type="regression",
)

Pooling / classification behavior

When used through Transformers' Qwen3 sequence-classification implementation, classification follows the causal-model convention of using the representation associated with the final non-padding token.

Downstream training and inference should therefore preserve consistent:

  • padding;
  • attention masking;
  • truncation;
  • final-token semantics.

Hands-on Kaggle classification tutorial

The Kaggle notebook RockAndEgg-v1-v2 demonstrates downstream classifier-head adaptation of the headless RockAndEgg backbones and compares v1 with v2 under the same frozen-backbone workflow on AG News and BANKING77. It is a downstream adaptation demonstration — a trained classification head is required — not a revision of the v1 results reported above. GitHub copy: https://github.com/moeshawky/RockAndEgg-313M-v2.


What this model is not

RockAndEgg-313M is not:

  • an instruction-tuned chat model;
  • a zero-shot classifier;
  • an LLMOSafe classifier;
  • a model with predefined class semantics;
  • a distilled model;
  • a bidirectional BERT-style encoder;
  • a claim that ten layers are optimal for every downstream task;
  • a drop-in replacement for full Qwen3-0.6B generation quality.

Not a compressed general-purpose language model

Although RockAndEgg derives from a causal language model, it was selected for classification behavior.

This release does not claim preservation of the full donor's:

  • generative quality;
  • reasoning capability;
  • instruction following;
  • chat ability;
  • long-context behavior.

Generation was not the optimization target.

If you need a small generative Qwen model, RockAndEgg should not automatically be treated as a replacement for the full Qwen3-0.6B donor.


Why 10 layers?

The depth was not chosen arbitrarily.

The parent experiment physically constructed and evaluated multiple Qwen3 candidates, including shallow, intermediate, near-full-depth, and full-depth controls.

The central question was:

how much of Qwen3-0.6B's depth is actually necessary for a demanding semantic-classification task?

The strongest downstream evidence came from the LLMOSafe specialization.

Development validation

ArchitectureParamsLLMOSafe V2-val Macro AUPRC
Full 28-layer control596.1M0.9957
10-layer architecture312.9M0.9941

Paired comparison:

  • absolute macro-AUPRC delta: 0.001581
  • 95% paired-bootstrap CI: [0.000426, 0.002804]
  • bootstrap samples: 2,000
  • evaluation rows: 4,273

The quality difference was statistically detectable but small relative to the depth and parameter reduction.


Final held-out architecture replication

After architecture selection was complete, the same 10-layer and 28-layer architectures were evaluated on a previously untouched 4,122-row held-out set.

ArchitectureValidation Macro AUPRCHeld-out Macro AUPRC
Full 28-layer control0.99570.9864
10-layer architecture0.99410.9850
L28 − L10 gap0.001580.00144

The held-out distribution was harder for both architectures, producing an approximately 0.009 absolute macro-AUPRC shift.

Crucially, the relative L28−L10 architecture gap remained nearly unchanged:

  • development validation: 0.00158
  • final held-out set: 0.00144

This independently supports the depth-surgery conclusion:

for the evaluated semantic-classification regime, the 10-layer architecture retained nearly all of the full 28-layer model's discriminative performance.

The held-out evaluation also revealed a larger shared degradation on the authority dimension in both architectures, indicating a distribution/data-regime issue rather than a truncation-specific collapse.

Important qualification

These metrics evaluate task-fine-tuned descendants of the corresponding architectures.

They are evidence supporting the choice of RockAndEgg's 10-layer architecture.

They are not zero-shot benchmark scores for this headless RockAndEgg checkpoint.


Surgery methodology

The experiment did substantially more than simply edit num_hidden_layers.

The architecture-selection process included:

  • frozen-layer representation tomography;
  • physical checkpoint truncation and reload validation;
  • full-data candidate fine-tuning;
  • benign-behavior vetoes;
  • structural/headroom diagnostics;
  • paired statistical comparison against a full-depth control;
  • FFN-width ablation;
  • teacher-student distillation ablation;
  • final held-out architecture confirmation;
  • latency and throughput measurement.

A major methodological result was that:

the simple depth cut survived, while the tested additional complexity did not improve the selected operating point.


Rejected alternatives

Additional FFN narrowing

A 10-layer model narrowed from FFN width:

3072 → 2048

reduced the parameter count further to approximately 281M parameters.

However, it degraded behavioral discrimination on important benign examples.

The selected RockAndEgg architecture therefore retains the donor's original 3072-wide FFN.

Distillation

A teacher-distilled 10-layer candidate also underperformed the ordinary supervised 10-layer baseline under the tested loss weighting.

This does not establish that distillation is universally ineffective.

It establishes that additional teacher-student complexity did not outperform the simple 10-layer baseline in the tested regime.


Practical efficiency evidence

On the experiment's A100 inference harness:

ArchitectureBatch-1 latencyBatch-32 examples/sThroughput
Full 28-layer47.48 ms593.657,803 tok/s
10-layer19.30 ms1,582.0154,050 tok/s

Under that specific hardware and harness:

  • batch-1 latency was approximately 2.5× lower;
  • batched example throughput was approximately 2.7× higher.

These figures are hardware- and implementation-specific and should not be treated as universal throughput guarantees.


Expected strengths

RockAndEgg may be useful when:

  • a BERT/DeBERTa-style model is not desired;
  • Qwen3-derived representations are desirable;
  • the full 0.6B donor appears unnecessarily deep for the task;
  • accelerator memory or inference latency matters;
  • the downstream task permits supervised fine-tuning;
  • researchers want a compact causal-decoder-derived classification backbone.

Limitations

Architecture selection is task-informed

The 10-layer cut was selected primarily through an 8-dimensional semantic-classification task.

It has not been established that layers 0–9 are universally optimal for:

  • sentiment analysis;
  • NLI;
  • topic classification;
  • retrieval;
  • multilingual classification;
  • token classification;
  • generation.

Downstream users should evaluate it on their own task.


Causal attention remains intact

RockAndEgg is not a bidirectional encoder.

For some representation-learning problems, explicitly bidirectional architectures may remain preferable.


No universal decision head

RockAndEgg deliberately contains no fixed label ontology.

A downstream classification head must be trained for the intended task.


Aggregate metrics are not enough

The original surgery experiment found that very strong aggregate classification metrics can coexist with poor behavior on specific benign subsets.

For downstream applications, checkpoint selection should not rely exclusively on one aggregate score.

Evaluate behavior relevant to the deployment population.


Recommended downstream evaluation

At minimum, evaluate:

  • aggregate task metric;
  • per-class or per-label performance;
  • false positives on difficult negatives;
  • short inputs;
  • quoted/negated examples where relevant;
  • distribution shift;
  • calibration if probabilities will be interpreted operationally.

For safety-sensitive or high-cost decisions, treat model outputs as evidence rather than automatic policy decisions.


Reproducibility

Key surgery facts:

Donor:
  Qwen/Qwen3-0.6B-Base
  revision da87bfb608c14b7cf20ba1ce41287e8de496c0cd

Transformation:
  retain physical transformer layers 0 through 9
  drop physical transformer layers 10 through 27

Preserved:
  hidden_size = 1024
  intermediate_size = 3072
  num_attention_heads = 16
  num_key_value_heads = 8
  head_dim = 128
  vocabulary/tokenizer unchanged
  causal attention unchanged

Depth:
  28 -> 10

Approximate backbone parameters:
  312.89M

The published weight artifact and repository revision should be treated as the canonical identity of the public release.


Relationship to Saa-313M

Saa-313M (to be released) is the LLMOSafe-specific 8-output semantic-classification specialization developed from the RockAndEgg architecture.

Conceptually:

RockAndEgg-313M
       │
       │ task-specific LLMOSafe training
       ▼
    Saa-313M

RockAndEgg is the reusable architecture/backbone.

Saa is a separate task-specific classifier.

Saa-313M is not included in this repository and should not be inferred from RockAndEgg's outputs.

At the time of this RockAndEgg release, Saa remains under separate qualification and release criteria.


License and attribution

RockAndEgg-313M is a derivative of Qwen/Qwen3-0.6B-Base, released by the Qwen team under the Apache License 2.0.

This derivative is distributed under Apache-2.0 and should preserve the upstream license and applicable notices.

The name RockAndEgg identifies this derivative work only.

It does not imply affiliation with, sponsorship by, or endorsement from Qwen or Alibaba.


About the name

During development, the question arose:

what would an ancient Egyptian classifier be?

"Rock and egg" won the naming argument.

As mentioned above, the name refers to the old Egyptian game in which children strike decorated eggs together, with the surviving egg winning. The trickster wins by painting a stone to look like an egg. A classifier, in the most literal possible sense, should be able to tell the rock from the egg.

RockAndEgg is the backbone; the trained classification head is what catches the cheat.

The downstream LLMOSafe specialization received the ancient Egyptian divine nameSaa who is the deified representation to the concept of perception .


Citation

If you use RockAndEgg-313M, please cite both this release and the original Qwen3 work.

Suggested project citation:

@misc{rockandegg313m_2026,
  author       = {moeshawky},
  title        = {RockAndEgg-313M: A 10-Layer Classification-Oriented Derivative of Qwen3-0.6B-Base},
  year         = {2026},
  publisher    = {Hugging Face}
}

Please also cite the upstream Qwen3 model/paper as appropriate.


Acknowledgements

RockAndEgg-313M is built from Qwen/Qwen3-0.6B-Base.

The architecture was produced during the LLMOSafe model-surgery experiment, whose broader purpose was to determine whether a substantially smaller Qwen-derived model could preserve strong semantic-classification behavior without replacing LLMOSafe's lightweight core runtime.

The final result was simpler than many of the hypotheses tested:

for this classification regime, removing 18 of Qwen3-0.6B's 28 transformer layers preserved almost all measured discriminative performance, while more aggressive or elaborate surgery failed to provide a better operating point.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей