Views
No views yet
<|assistant_end|> logits weighted 0.3x) with label smoothing 0.02 to prevent the loss from being dominated by the "stop" decision.repetition_penalty >= 1.1), and preserves most facts.save_every=100 + eval_every=25 was used specifically to capture the best-val region.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "cognica/Cognica-PoE-v1.0-1.3B-stage-summary"
5tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(
7 model_id,
8 trust_remote_code=True,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12model.eval()
13
14# Chat-format prompt (the SFT data was formatted with SmolTalk special tokens):
15BOS, USR_S, USR_E, ASS_S = 32759, 32760, 32761, 32762
16doc = (
17 "The Federal Reserve announced a 0.25 percentage point increase in interest rates on "
18 "Wednesday, marking the fifth rate hike this year. Fed Chair Jerome Powell cited "
19 "persistent inflation concerns and strong employment data as key factors. Markets "
20 "reacted with mixed signals, as the Dow Jones fell 200 points while the tech-heavy "
21 "Nasdaq remained steady."
22)
23prompt = f"{doc}\n\nMulti-sentence summary:"
24ids = [BOS, USR_S] + tokenizer.encode(prompt) + [USR_E, ASS_S]
25input_ids = torch.tensor([ids], device=model.device)
26
27with torch.no_grad():
28 out = model.generate(
29 input_ids,
30 max_new_tokens=200,
31 do_sample=True,
32 temperature=0.3,
33 top_k=50,
34 repetition_penalty=1.15,
35 no_repeat_ngram_size=3,
36 pad_token_id=BOS,
37 )
38print(tokenizer.decode(out[0, len(ids):]))repetition_penalty=1.15 plus no_repeat_ngram_size=3 is strongly recommended — without both, the model loops on trailing phrases. The included generation_config defaults follow this.| Component | Detail |
|---|---|
| Parent | cognica/Cognica-PoE-v1.0-1.3B-base (PoE alpha=0.0, d24, step 26430, val bpb 0.7209) |
| New transformer layers | 4 appended at positions 24-27 (d24 -> d28) |
| Frozen layers | 24 (all base layers) |
| Dual-head | Yes — additive specialist lm_head_stage (shape 32768 x 1536, zero-init at training start) |
| Final projection | logits = lm_head_base(x) + lm_head_stage(x) |
| Total params | 1,547,699,986 (~1.55 B) |
| Trainable params at training | 163,577,912 (~164 M, 10.6 %) |
| Shipped delta | 28 tensors, 213,909,560 params, 408 MB (bf16 safetensors) |
| VE pattern | Preserved from base — 12 value-embeds at layers [1, 3, ..., 23]; new layers carry no VE |
| Objective | Cross-entropy over assistant turns only; end-token weighted 0.3x; label smoothing 0.02 |
| Data | EdinburghNLP/xsum x 2 epochs + abisee/cnn_dailymail 3.0.0 x 2 epochs -> 981,804 train convs (+ 512 val) |
| Case augmentation | First-user greetings duplicated with case variants -> 981,804 -> 983,715 conversations |
| Sequence length | 2,048 |
| Per-GPU batch | 8 x 2,048 |
| World size | 4 (1 node x 4 x A100 80 GB) |
| Total batch size | 65,536 tokens/step |
| Steps | 10,981 (~2 xsum + 2 cnndm full passes) |
| Optimizer | MuonAdamW with per-group LR scaling |
| Matrix LR | 3.0 x 10^-4 |
lm_head_stage LR | 1.0 x 10^-4, weight decay 0.15 |
| Init LR fraction | 0.15 |
| Warmup / warmdown | 5 % / 60 % |
| Eval / save cadence | every 25 / 100 steps |
| Best checkpoint shipped | step 3,600, val bpb 3.1073 |
| Step | val bpb | Phase |
|---|---|---|
| 100 | 4.2339 | early, predicting-end |
| 500 | 4.1235 | " |
| 1000 | 4.0131 | " |
| 1500 | 3.9574 | " |
| 2000 | 3.9062 | " |
| 2500 | 3.7850 | pre-transition |
| 3000 | 3.1467 | phase transition |
| 3100 | 3.1252 | best region |
| 3200 | 3.1543 | " |
| 3300 | 3.1333 | " |
| 3400 | 3.1667 | " |
| 3500 | 3.1251 | " |
| 3600 | 3.1073 | best saved (shipped) |
| 3700 | 3.1490 | " |
| 3800 | 3.1320 | " |
| 3900 | 3.1342 | " |
| 4000 | 3.1709 | drift begins |
| 5000 | 3.1954 | " |
| 6000 | 3.3791 | " |
| 7000 | 4.3915 | warmdown degradation |
| 10000 | 4.2688 | " |
| 10981 | final | DO NOT SHIP |
<|assistant_end|> (exploiting the sparse-assistant reward); after it, extractive summary tokens become favored. The end-token down-weighting is the mechanism that lets the model escape the early trap.base_model_name_or_path supports chaining. Point a new stage repo's config at this repo and the cascade loader will resolve base -> stage-summary -> new stage transparently. The loader folds each ancestor's lm_head_stage into the effective lm_head_base at load time, so all specialist heads compose additively into the final projection (logits = lm_head_base + Sigma_k lm_head_stage_k). See the paper for the formal account of this construction.| File | Purpose |
|---|---|
config.json | Model + stage config (base_model_name_or_path, new_layers=4, frozen_layers=24, full stage_training block) |
delta.safetensors | 28-tensor stage delta (bf16, 408 MB) |
modeling_cognica_poe.py | Cascade loader + _GPT with dual-head forward (same code as the base repo) |
configuration_cognica_poe.py | CognicaPoEConfig with stage fields |
tokenization_cognica_poe.py | Byte-level tokenizer (unchanged from base; includes the numeric-token decode fix) |
tokenizer.pkl, tokenizer_config.json, special_tokens_map.json, token_bytes.pt | Tokenizer assets (unchanged from base) |
convert_stage_delta.py | Converts a nanochat save_stage_delta .pt file into delta.safetensors |
save_every=100 + eval_every=25 was needed specifically to capture this window.repetition_penalty >= 1.1 and no_repeat_ngram_size=3 or sampling.train_val_bpb = 0.7209.1@article{jeong2026poe,
2 title = {Product of Experts as Scalable Local Learning: Modular Construction at 1.3B Parameters},
3 author = {Jeong, Jaepil},
4 year = {2026},
5 institution = {Cognica, Inc.},
6 doi = {10.5281/zenodo.19547653},
7 url = {https://doi.org/10.5281/zenodo.19547653}
8}
9
10@misc{cognica-poe-stage-summary-2026,
11 title = {Cognica-PoE-v1.0-1.3B-stage-summary: Summarization-domain dual-head specialist (4-layer) over a PoE base (research preview)},
12 author = {{Cognica, Inc.}},
13 year = {2026},
14 howpublished = {\url{https://huggingface.co/cognica/Cognica-PoE-v1.0-1.3B-stage-summary}}
15}LICENSE and NOTICE. Same terms as the base model. Training datasets (XSum, CNN/DailyMail) each carry their own licenses and are acknowledged in NOTICE.