/ Модель

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

Лицензия
CC BY 4.0
Библиотека
pytorch
Опубликована
1 ноя 2026

semsimula-ladder-live-code-d384-l2-none-norc-sr2-vtun

Генерация текстаТекст → текст3 профессии
309скачиваний за 30 дней0лайковвеса обновлены18 ноя 2026

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

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

Экспериментальная PyTorch-модель SO-CODE для генерации Python-кода с нормализацией контекстных каналов перед банком потенциалов.

SO-CODE-VTUN — экспериментальная модель генерации кода, разработанная автором карточки как вариант архитектуры SO-CODE. Это PyTorch-модель с 76,572,109 параметрами и пятью контекстными каналами; перед передачей каналов банку потенциальных функций их векторы нормализуются до единичной нормы. Архитектура описана как не использующая трансформер и механизм внимания, с постоянной памятью при инференсе.

Модель обучена с нуля на 315,392,000 токенах наборов CodeParrot и предназначена для продолжения и генерации Python-кода. В описанном сравнении её установившаяся perplexity составила 6.34, что на 5.8% хуже базовой SO-CODE; совпадающий по токенам GPT-2 показал 4.96. Эксперимент показывает, что нормализация входов сама по себе снижает качество на пяти каналах, хотя в варианте с шестым каналом этот штраф компенсируется. Лицензия — CC BY 4.0.

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

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

Ограничения

В описанном эксперименте perplexity модели составила 6.34 — на 5.8% хуже базовой SO-CODE и выше, чем у сопоставленного GPT-2 (4.96). Результаты относятся к оценке на Python-коде при контексте длиной 512 токенов.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

SO-CODE with unit-norm input to V_θ's bank (SO-CODE-VTUN): the switch costs a healthy model 5.8%, and the sixth channel pays it back (Gen 3)

The question of this collection: why did a sixth context channel cost SO-CODE 43% on Python code? Its second layer's potential wells died: they drifted away from the states, where a well exerts no force and gets no gradient, so it cannot come back. The root cause and the analysis are in Dead_Wells_in_the_Joint_V_theta_Bank.md; this card reports one model of it.

This model (SO-CODE-VTUN): SO-CODE, five context channels, trained with every context channel scaled to unit norm before V_θ's well bank reads it: the switch of screen A, the second dead-well fix, on a model whose wells never died. Verdict: unit-norm input costs a healthy model 5.8%, so it is a fix, not a default. It settles at 6.34 against SO-CODE's 6.00. Screen A, the same switch with a sixth channel, settles at 5.95: under unit-norm input the sixth channel pays the cost back, and no more. The dead-wells collection holds the baseline, two fixes and their two controls.

Result

modelcontext channelsthe switchlayer-1 wellssettled perplexityagainst SO-CODE
SO-CODE, the baseline5—alive6.00—
XI6-CODE (not on the Hub)6—dead8.55+42.6%
screen B, fix 16V_θ's learning rate × 0.25alive5.98−0.3%
SO-CODE-VTLR, fix 1's control5V_θ's learning rate × 0.25alive6.09+1.6%
screen A, fix 26unit-norm input to V_θ's bankalive5.95−0.7%
SO-CODE-VTUN (this model), fix 2's control5unit-norm input to V_θ's bankalive6.34+5.8%

The matched GPT-2 on the same code tokens settles at 4.96.

  • This model: settled 6.34 (mean of the evals at steps 18,000, 18,500 and 19,000: 6.23, 6.37, 6.43); best 6.23 at step 18,000. Validation perplexity at block 512, on the first 2M tokens of CodeParrot's validation files (a file-level split, so no file is in both).
  • Trained on exactly 315,392,000 tokens (19,250 steps × 32 × 512): the ladder's WSD schedule over 16,250 steps, then 3,000 steps at its floor learning rate. All six models in the table start from step 0 at seed 0 on the same batches, so their evaluations are paired step by step.
  • 76,572,109 parameters, exactly SO-CODE's: the switch rescales an input and adds no parameters.
  • Pre-registered (Code_Dead_Wells_and_Screens.md, entry p-so-code-vtun, before the run): VU1 (SO-CODE-VTUN settles within ±2% of SO-CODE), called 65%: MISS, +5.8%. VU2 (its paired gap to SO-CODE over steps 16,000–19,000 is below +0.015 nats, the slower V_θ's cost), called 55%: MISS, +0.056. VU3 (its layer-1 wells stay alive: occupancy of the strongest well above 0.05 and removal cost above +100%), called 85%: MISS on the removal cost, 0.25 and +83%. VU4 (Cell 6b-7 Gate 3 at N = 3 above 0.45 nats), called 75%: HIT, 0.473. Proposed before the run, not confirmed by the author, and scored on the letter.
  • Run health: 19,250 steps in 6.1 h in one session from step 0; 0 watchdog triggers; largest rise between logged training losses 0.075 (step 13,050, where SO-CODE's largest is 0.073); gradient norm median 0.39 after step 2,000, maximum 1.09 (step 200, warmup); SCAF leak monitor CLEAN at all 4 audits.

The sixth channel pays for the switch

Read by pairs, the table above gives the sixth channel's effect under each setting of V_θ's bank: the six-channel model against the five-channel model trained the same way.

V_θ's bankfive channelssix channelssix against five
as trained (SO-CODE, XI6-CODE)6.008.55+42.6%: layer 1's wells die
V_θ's learning rate × 0.25 (SO-CODE-VTLR, screen B)6.095.98−1.8%, within the paired noise
unit-norm input (this model, screen A)6.345.95−6.1%
  • Neither fix is free on five channels. The slower V_θ costs SO-CODE 1.6%, unit-norm input 5.8%. Both are fixes for a model whose wells die, not defaults.
  • The sixth channel wins back what each fix costs, and no more. With either fix the six-channel model is level with SO-CODE (5.98 and 5.95 against 6.00); no setting beats SO-CODE.
  • Of the two fixes, the slower V_θ is the cheaper on a healthy model.

Two conjectures

Neither is tested; both are stated with their evidence and their tests in Dead_Wells_in_the_Joint_V_theta_Bank.md, §8.

  • Why the sixth channel does not help: the readout, not the retrieval, limits the model on code. SO-CODE's longest layer-1 channel already finds earlier occurrences 65 or more tokens back at 26 times an even spread, and the first-order twin finds them as well yet trails by 9.2%. With live wells, screen B's two long channels both retrieve (19 and 27 times), and the perplexity does not move. The bank turns all channels into a few well centres, and layer 1 acts through one or two wells (67–89% of its force), so a second retrieved state lands in the same centre. Capacity added after retrieval (depth, more or per-layer wells) should help where capacity before it did not; L = 4 on code is the next test.
  • Why unit-norm input costs five channels: it discards how sharply a channel found something. A channel is a weighted average of earlier states, so its norm is at most a state's, reached only when its weight sits on one state (or on states pointing the same way). Its size therefore measures how concentrated its weight is, and dividing by it leaves the bank only the direction. Without the switch the channels' sizes vary systematically (SO-CODE's layer 0: 1.54 for the shortest channel to 0.33 for the longest). With it, both unit-norm models turned one far-back channel into a lookup of a single position, and a second long channel (screen A) removes the cost, perhaps because two channels' agreement stands in for the lost size. A test: normalise the channels but also give the bank each channel's log-norm.

Paired by step

The mean difference in log perplexity (nats) between two models over a span of evaluations, with the standard deviation of the per-evaluation differences.

stepsSO-CODE-VTUN − SO-CODEscreen A − SO-CODE-VTUNSO-CODE-VTUN − SO-CODE-VTLR
2,000–4,000 (5 evals)+0.058 (SD 0.120)−0.048 (0.067)+0.179 (0.118)
8,000–13,000 (11 evals)+0.103 (SD 0.048)−0.109 (0.073)+0.103 (0.053)
16,000–19,000 (7 evals)+0.056 (SD 0.002)−0.058 (0.034)+0.041 (0.003)
  • Ahead early, then a stall, then a fixed deficit. This model leads SO-CODE before step 2,500 (−20% at step 500), within 1.8% of screen A over those steps. From step 3,000 it falls behind and stalls (12.8 at step 3,500, 12.1 at 5,000, while SO-CODE goes from 11.0 to 9.3), up to 30% behind at steps 5,000–6,000. The gap closes through the decay phase, and from step 13,500 every evaluation is 5.5–6.0% above SO-CODE's.
  • The late cost is consistent: +0.056 nats with an SD of 0.002 per evaluation. The two runs differ only in the switch, so their evaluations move together. One seed each.
  • Training loss over steps 16,000–19,250: 1.726 for this model, 1.687 for SO-CODE, 1.669 for screen A, 1.704 for SO-CODE-VTLR. The model fits the training data worse; it does not overfit.

Through training

stepphaseSO-CODESO-CODE-VTLRscreen Bscreen ASO-CODE-VTUN
500warmup44.0251.1350.2235.7535.23
1,000stable25.1329.1928.3022.0321.71
1,500stable20.3321.4520.5718.1217.80
2,000stable17.6716.2715.8716.2116.03
2,500stable15.8013.0813.2515.3015.36
3,000stable12.9611.3211.2713.5413.94
4,000stable10.629.709.1010.9312.78
5,000stable9.278.819.009.8912.05
8,000stable7.967.867.837.779.66
10,000stable7.457.437.046.968.30
13,000decay6.386.456.706.676.79
16,000decay, end6.126.215.865.856.47
18,000floor5.875.965.995.966.23
19,000floor, last eval6.106.206.046.036.43

The layer-1 wells

In layer 1 the states lie on a sphere of radius ‖h‖ = √384 = 19.6. The nearest-well ratio is the distance from a token's state to the nearest well centre, divided by ‖h‖; the occupancy of a well is exp(−½ (h − μ)ᵀ P (h − μ)), the factor its force and its gradient both carry; n_eff is the effective number of wells in the layer's weights (the exponential of the entropy of the softmax weights, which depend on the context only, not on the state); the removal cost is the perplexity change when every layer-1 well is switched off on the trained model. Readings by debug/vtheta_well_probe.py on 16 validation windows.

This model along the run (screen A, the same switch with six channels, after the slash where it was probed):

stepnearest-well ratio‖μ‖mu_projoccupancy, strongest welln_efflargest well's share of the forceremoval cost
5000.99 / 0.991.7 / 1.726.4 / 25.40.39 / 0.407.97 / 7.9527% / 28%+0.2% / +0.4%
1,0000.99 / 0.993.4 / 3.738.9 / 38.50.52 / 0.567.33 / 7.1633% / 32%
1,5000.994.349.10.537.1332%
2,0000.994.757.30.557.2433%
2,5000.995.164.30.527.3031%
3,0000.99 / 0.975.4 / 5.370.6 / 70.80.53 / 0.497.19 / 4.9833% / 41%+4.6% / +9.5%
end (18,000 / 16,000)0.79 / 0.687.6 / 7.7135.1 / 136.70.25 / 0.292.33 / 2.3067% / 72%+83% / +136%

SO-CODE at the end: ratio 1.03, ‖μ‖ 59.9, mu_proj 101.5, occupancy 0.18, removal cost +202%.

  • Layer 1 is alive throughout, and its bank is screen A's. Through step 2,500 the two unit-norm models agree on every column. At step 3,000 they part: screen A's layer 1 begins to concentrate on fewer wells (n_eff 4.98), this model's does not (7.19), and screen A pulls ahead from there. The coincidence is in time only.
  • At the end layer 1 carries less of this model: removing its wells costs +83%, against +136% for screen A and +202% for SO-CODE.
  • Layer 0's wells sit further out than in any other live model probed (median nearest-well ratio 2.06; 0.90–1.80 in the others, SO-CODE 1.35, screen A 1.63), still in use because they are wide (occupancy 0.61, all eight in use).
  • One lookup channel. Layer 1's channel 4 puts a median 0.996 of its weight on one earlier position, a median 71 tokens back, as screen A's channel 5 does. The models with live wells and without the switch have none, so the lookup comes with the switch, not with the sixth channel. The longest channel finds earlier occurrences 65 or more tokens back at 31 times an even spread (SO-CODE 26).

Diagnostics

reading (best checkpoint)SO-CODESO-CODE-VTLRscreen Bscreen ASO-CODE-VTUN
Cell 7, full model5.515.575.525.465.81
Cell 6b-7 Gate 1: perplexity cost of resetting the velocity+4.0%+3.1%+2.5%+11.5%+25.3%
Gate 2: one extra layer at the trained step+42%+28%+37%+48%+21%
Gate 3: three steps over the trained time, nats0.6390.3120.2900.5870.473
Cell 6b-13: median ω·Δt (layer 0 / layer 1)7.55 (9.58 / 4.94)6.16 (7.16 / 3.58)5.83 (6.37 / 4.34)4.72 (5.12 / 4.16)3.17 (2.94 / 3.91)
  • All five are maps, not flows: refinement grows away from the trained step. At four steps over the trained time this model's penalty is 0.803 nats, the lowest of the five (SO-CODE 1.418).
  • Resetting the velocity costs a quarter of the perplexity, the most of any code model without the Fock register path (FOCK-CODE, with it, +35%). Both unit-norm models have large costs; these readings do not show why.
  • The stiffness reading (3.17) is the lowest of the code models, mostly from layer 0 (2.94). It does not track the loss.

Reproduction

colab_fock_cfc_baoab_lowrank_depth_ladder_openwebtext_d384.ipynb, Cell 0 changed from the defaults:

REVERSE_CHANNEL=False, VPHI_GRAD_PATH='live', XI_GRAD_PATH='live',
LOWRANK_DAMPED_FLOW=True,                 # SR2
VPHI_ANALYTIC_FORCE=True, LAYER_CHECKPOINT=False,   # speed switches, same arithmetic
CORPUS='code', LADDER_STEPS=16_250, EXTRA_FLOOR_STEPS=3_000   # Python code, then 3,000 steps at the floor
VTHETA_INPUT_UNIT_NORM=True             # every context channel scaled to unit norm before V_θ's bank reads it (screen A's switch)
SNAPSHOT_STEPS=[1_000, 1_500, 2_000, 2_500, 3_000]   # weights-only snapshots for the well probe

Run Cells 0, 1, 1b, 1c, 1d, 2, 3, 4, 5, 5b and 6, then 8, 7, 6b-7 and 6b-13. The first code run builds the token cache (about 25 minutes). The well probe is debug/vtheta_well_probe.py, the channels' reach debug/xi_reach.py (CPU, on the downloaded run folders).

Training artefacts were written to semsimula_fock_cfc_baoab_code_xi5long_topk16_dt32da16_mh4_aniso_dcvt5x8_vtjoint_cgqk_norc_vplive_xilive_sr2_st16250_vtun_L2probe_ob_untied_wsd_e5c_plgate_rep0.05_fockreg0.005_g0.1_baoab_cfc_lowrank_idt4_lr0p0012_noattn/.

Glossary

termmeaning
settled PPLvalidation perplexity at block 512, the mean of the last three evals (on this corpus, steps 18,000–19,000). Best is the lowest single eval
Gen 1 / Gen 2 / Gen 3the model generations. Gen 1: explicit integrators. Gen 2: the CfC/BAOAB ladder with the sources of Vφ and ξ (and of an exchange field) detached, which keeps every force causal, but no loss gradient ever reaches an earlier token through them. Gen 3: the same forward pass with those gradients live
live / detached gradientswhether the loss gradient flows into the earlier tokens that act as sources of a force. Detaching changes no forward value; it only cuts that backward path
Vθthe learned scalar potential on a token's state h, given its context ξ: a bank of anisotropic Gaussian wells. Its negative gradient is the conservative force on the token
Vφa pair potential between a token and a few selected earlier tokens (sparse top-k)
ξthe causal context channels: exponential moving averages of earlier states at several horizons, which condition Vθ
Fock mechanism, registers, reverse channela pool of register particles, created and destroyed from the token context. The reverse channel is the register-to-token force; it is not the gradient of any potential on the tokens, so it is the model's non-conservative part
exchange fieldan attention-like token-to-token interaction added to the conservative core. Each token is pushed by earlier tokens through learned query, key and value projections, as in attention. The ladder tests it in two forms, attention and attention_potential
attention (non-conservative exchange field)the exchange term enters as a force directly. It is not the gradient of anything, so the step stops being a geodesic step
attention_potential (attention as a potential)the same interaction written as a scalar potential whose gradient is the force. The routing weights are computed from the hidden states and held fixed with respect to the state being moved, so the force stays an exact gradient and the model stays conservative
no-exchange (LADDER_MECHANISM = 'none')the arm with no exchange field at all: Vθ, Vφ and ξ, plus the Fock register mechanism unless the arm is conservative-only
live exchange field (RELAX_GRAD_PATH = 'live')attention_potential with the identical forward force written out over live tensors, so the loss gradient reaches the field's sources and routing. In Gen 2 these were detached, and the field sent no gradient into any hidden state
Gen 2 probea Gen 2 arm retrained with one gradient path changed, to test a hypothesis before the full Gen 3 ladder. The live-exchange-field probe (attention_potential with RELAX_GRAD_PATH = 'live', the full 32,500 steps) is the one that found the gradient starvation
gpt2-matchedthe reference transformer: GPT-2 architecture, d = 384, L = 8, tied embeddings (33.7M parameters), trained on the same tokenizer, corpus, batches and token budget. Shared by Gen 2 and Gen 3
tag components (vplive, xilive, rglive, norc, L4probe, idt…)pieces of the run's variant tag, so that every configuration gets its own Drive folder: live Vφ sources, live ξ, live exchange field, no reverse channel, the depth L, and the integrator step Δt
conservative-onlya model in which every force is a gradient: no reverse channel and no non-conservative exchange field
CfC/BAOAB low-rank propagatorthe integrator. Each layer step is split into position (A), force kick (B) and friction (O) substeps, and the stiff harmonic modes of Vθ are integrated exactly in closed form
ω·Δt, θa stiff mode's frequency times the step size. Past 2, an explicit integrator would be unstable (the wall); the closed-form propagator is not. θ/sin θ is the factor by which a split step's dissipation depends on the mode's phase, largest near θ = π
geodesic step, R(geo), sharethe step a damped particle would take under Vθ alone; R(geo) is the distance of the real step from it, relative to the step's length. A component's share is how much it moves that distance (6b-9 attribution)
Gates 1–3, FLOW / MAPSsee Terms in the geometry section
CG1–CG7, 6b-Nthe CfC-geometry experiments, and the ladder-notebook cells that run them
SCAF, Tier A, Tier Bthe in-flight causal-leak monitor. Its core test changes future tokens and requires the logits at earlier positions to stay bit-identical. Tier A asks the same of the hidden states, as 1 − cos between the clean and perturbed state at each earlier position and layer. Tier B asks whether the perturbation moves any earlier state into a different dominant Vθ well (the basin-crossing rate). All three read 0 for a causal model
leak tax, prefix-onlythe loss difference between scoring a position with only its prefix and with the full sequence; about 0 for a causal model
clip-hitthe share of logged steps whose gradient norm exceeded the clipping threshold (1.0)
pre-registereda prediction recorded, with its threshold, before the run

Files

pathwhat
README.mdthis card
config.jsonarchitecture, training, the switch, result and diagnostics
checkpoints/fock_cfc_*noattn_step18000_best.ptweights at the best eval (step 18,000), optimizer state stripped
results/the training log, the diagnostic cells' outputs, the well probe at the step-500 checkpoint, the five snapshots and the best checkpoint (well_probe_*; _L1_none = layer 1's wells removed) and the channels' reach (xi_reach_*)
code/the notebook and the model code the switches belong to (it also carries later, default-off switches)

Companion notes

notewhat it covers
Dead_Wells_in_the_Joint_V_theta_Bank.mdthe dead wells: the symptom, the debugging, the root cause, the failed and the working mitigations, and these results (§7.2–§7.6)
Code_Dead_Wells_and_Screens.mdthe run records: entries p-xi6-code, p-dead-wells, p-dw-screen-a-full-result, p-so-code-vtun and its result

Caveats

  • One seed per model. The pairing removes the evaluation noise, not the training-seed spread, which has not been measured. The 5.8% is a consistent difference between these two runs, not a measured seed effect.
  • Both conjectures are untested. The evidence for each is consistent with it; none of it isolates the mechanism.
  • Not settled by the letter of the settling rule, like every code model: the evals still fall by about 0.02 nats over the last 3,000 steps, against a scatter of 0.014. The paired gap to SO-CODE is flat.
  • L = 2, code only. Unit-norm input has not been tried on OpenWebText or TinyStories. Perplexities on code are not comparable with those corpora's.

Citation

@misc{Gueorguiev2026SemSim,
  author    = {Gueorguiev, Dimitar P.},
  title     = {Semantic Simulation: A Prescriptive Lagrangian Framework
               for Semantic Inference --- Conservative Potentials,
               Conservative and Non-Conservative Memory, and Competing Mechanisms},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.19712427},
  url       = {https://doi.org/10.5281/zenodo.19712427},
  note      = {Version v25 (Nov 9, 2026).
               Companion code repository (DOI 10.5281/zenodo.24066016):
               \url{https://github.com/dimitarpg13/semsimula-paper}}
}

Card generated from _ladder/ladder.json on 2026-11-17.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
59afcd9

0 моделей