/ Модель

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

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

semsimula-ladder-live-code-d384-l8-none-norc-sr2-k2-r6

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

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

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

Экспериментальная модель генерации Python-кода с безвнимательной архитектурой на основе обучаемого потенциала, обученная на CodeParrot.

K2-L8-R6-CODE — экспериментальная языковая модель для генерации Python-кода, опубликованная dimitarpg13. Она реализует немеханизмную архитектуру без внимания: восемь слоёв последовательно обновляют состояния токенов как шаги затухающей динамики второго порядка в обучаемом потенциале. Вариант использует два потенциальных «колодца» и ранг 6 для обновлений точности; число параметров — около 53,1 млн, из них около 14,5 млн вне эмбеддингов. Модель обучена на 315 млн токенов CodeParrot.

В описанном эксперименте она достигает установившейся perplexity 5,54 на валидационной части CodeParrot при блоке длиной 512. Увеличение ранга улучшило результат относительно варианта с рангом 4, однако модель уступает сопоставленной GPT-2 на 11,8% по указанной метрике. Это исследовательский чекпойнт для генерации кода и изучения влияния глубины и параметров архитектуры, а не подтверждённая универсальная модель для программирования. Лицензия — CC BY 4.0.

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

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

Ограничения

Модель уступает сопоставленной GPT-2 по валидационной perplexity; результат измерен на CodeParrot при блоке длиной 512. Эксперименты показывают, что модель чувствительна к шагу интегрирования и не ведёт себя как непрерывный поток при изменении числа шагов.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

K2-L8-CODE at rank 6 (K2-L8-R6-CODE): matched to GPT-2 outside the embeddings, two more directions per well gain 2.2% (Gen 3)

The question of this collection: on Python code, the conservative model trails the matched GPT-2 by 21% at two layers. Does depth help? Each layer advances the token states by one step Δt of a damped second-order flow in a learned potential; the collection holds the total integration time T = L · Δt = 8 fixed and splits it into more, shorter steps.

This model (K2-L8-R6-CODE): K2-L8-CODE, eight layers with two wells in the V_θ bank, with each well's precision update at rank 6 instead of 4; nothing else changes. With it the model has 14.5M parameters outside the embeddings, 2.3% more than the matched GPT-2. Verdict: rank 6 helps. It settles at 5.54, −2.2% against rank 4 (5.67), and recovers 41% of what eight wells are worth at eight layers with a ninth of their parameters. It trails the matched GPT-2 by 11.8%. The depth-on-code collection holds the same model at two, four and eight layers, and three variants: two wells, two wells at rank 6 (this one), and one trained at several step counts.

Result

modellayerswellsrankparameterssettled perplexityagainst K2-L8-CODE
SO-CODE28476,572,1096.00+5.8%
L4-CODE48476,625,3615.48−3.2%
L8-CODE88476,731,8655.35−5.5%
K2-L8-CODE82450,164,4355.67—
K2-L8-R6-CODE (this model)82653,115,0915.54−2.2%
matched GPT-2 (not on the Hub)8——4.96−12.5%
  • This model: settled 5.54 (the mean of the log perplexities of the evals at steps 18,000, 18,500 and 19,000: 5.44, 5.55, 5.64); best 5.44 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, from step 0 at seed 0 on the same batches as SO-CODE, L4-CODE, L8-CODE and K2-L8-CODE, so the evaluations are paired step by step.
  • 53,115,091 parameters, 2,950,656 more than K2-L8-CODE (two more directions in each of the two wells' precision updates) and 23,616,774 fewer than L8-CODE. Outside the embeddings 14.5M, against the matched GPT-2's 14.2M.
  • Run health: 19,250 steps in 19.5 h in one session from step 0 (3.65 s per step with the V_φ-force checkpoint and no layer checkpointing); peak memory 37.1 GB in training, 55.4 GB in evaluation; no non-finite gradient norm at any of the 385 logged steps; gradient norm median 0.38 after step 2,000, maximum 1.40 (step 100, warmup); largest rise between logged training losses 0.070 (step 13,050, as in K2-L8-CODE, L8-CODE and SO-CODE); 0 watchdog triggers; SCAF leak monitor CLEAN at all 4 audits.

Pre-registered calls

Proposed 2026-11-04 before the launch and not confirmed by the author; scored as proposed. Paired against K2-L8-CODE over steps 16,000–19,000.

callpredictioncalledresultoutcome
R6-1rank 6 helps: paired difference ≤ −0.010 nats40%−0.023 (SD 0.0016)hit
R6-2no effect: paired difference within ±0.010 nats45%−0.023miss
R6-3settled perplexity ≤ 5.45 (within 10% of the matched GPT-2)10%5.54 (the single eval at step 18,000 reads 5.44)miss
R6-4all six directions in use: Cell 6b-4 participation ratio median ≥ 4.5 of 650%4.87hit
R6-5stable: no non-finite gradient norm at any logged step85%none in 385 logged stepshit

The calls favoured "no effect": rank 4's spectrum showed the Frobenius cap on each well's precision binding, so rank 6 could only spread the same budget over more directions. It did spread it, and that helped.

Paired by step

The mean difference in log perplexity (nats, K2-L8-R6-CODE minus the other model) over a span of evaluations, with the standard deviation of the per-evaluation differences.

stepsagainst K2-L8-CODEagainst L8-CODEagainst L4-CODEagainst SO-CODE
2,000–4,000 (5 evals)−0.016 (SD 0.006)−0.356 (SD 0.071)+0.006 (SD 0.010)−0.287 (SD 0.063)
8,000–13,000 (11 evals)−0.020 (SD 0.004)+0.008 (SD 0.015)+0.009 (SD 0.005)−0.090 (SD 0.009)
16,000–19,000 (7 evals)−0.023 (SD 0.002)+0.033 (SD 0.002)+0.009 (SD 0.002)−0.079 (SD 0.003)
  • Rank 6 leads rank 4 from the first evaluation: −0.014 nats at step 500, between −0.005 and −0.026 at every evaluation after, and −0.023 with an SD of 0.0016 over the last 3,000 steps.
  • It recovers 41% of what six more wells are worth at eight layers (K2-L8-CODE trails L8-CODE by 0.056 nats), with 2.95M parameters against the six wells' 26.6M.
  • Against four layers with eight wells it is level over steps 3,500–9,000 (−0.005 to +0.003 nats) and 0.005–0.017 behind after, with 23.5M fewer parameters.

Through training

stepSO-CODEL8-CODEK2-L8-CODEK2-L8-R6-CODEagainst K2-L8-CODE
50044.0250.9352.3851.67−1.4%
1,00025.1328.1028.2927.77−1.8%
1,50020.3319.9418.3517.89−2.5%
2,00017.6718.0513.4113.15−1.9%
2,50015.8016.2910.9810.79−1.7%
3,00012.9614.729.679.63−0.4%
4,00010.6211.028.698.56−1.5%
5,0009.278.868.087.91−2.1%
8,0007.967.277.287.15−1.8%
10,0007.456.736.916.80−1.6%
13,0006.385.756.025.90−2.0%
16,0006.125.485.795.66−2.2%
18,0005.875.265.565.44−2.2%
19,0006.105.455.765.64−2.1%

Diagnostics

Refinement (Cell 6b-7). The trained layers are applied N times with the step changed, the loss read on 12 fixed validation batches. Gate 2 keeps Δt = 1 and lets T grow; Gate 3 keeps T = 8 and refines Δt = 8/N, the test of whether the layers approximate a continuous flow (the loss levels off as Δt shrinks) or are maps tied to the trained step.

NGate 2, perplexityGate 3, perplexityGate 3 penalty, natsK2-L8-CODE's penaltyL8-CODE's penalty
167.92650.044.9214.418
260.64258.233.9983.748
345.43117.633.2113.423
429.98188.533.6832.960
68.609.450.6900.5490.206
8 (trained)4.744.740.0000.000
126.090.2510.4660.416
167.800.4991.0740.783
2417.031.2792.169
3226.651.7262.7052.604
  • Still a map, not a flow: the loss is lowest at the trained step and rises on both sides. But finer steps cost about half of what they cost at rank 4 (N = 16: 0.50 nats against 1.07), and less than in L8-CODE at every N above 8; coarser steps cost more (N = 4: 3.68 against 2.96). One model of each kind.
  • Resetting the velocity multiplies perplexity by 2.28 (Gate 1: 4.74 carried, 10.81 reset; K2-L8-CODE × 3.71, L8-CODE × 2.72).
  • Stiffness (Cell 6b-13): ω·Δt median 1.33 at Δt = 1 (K2-L8-CODE 1.50, L8-CODE 1.75); by layer 3.07, 1.29, 0.88, 1.69, 1.66, 1.46, 0.98, 0.59; 16.1% of readings past 2 (K2-L8-CODE 25.5%). Layer 0 is as stiff as at rank 4; layers 1–7 are softer. The integrator treats the stiff modes exactly, so this is a reading of stiffness, not of instability.
  • The wells' rank (Cell 6b-4): participation ratio median 4.87 of 6 (p05 3.30, p95 5.38); singular-value ratios 1.000, 0.824, 0.716, 0.626, 0.562, 0.482. The Frobenius cap still binds, and the largest direction's σ² falls from 0.463 at rank 4 to 0.309: directions 5 and 6 take 17.5% of the budget, and the spectrum decays more slowly than at rank 4 (about 0.86 per direction against 0.78). The same curvature spread over more directions puts less on each, which fits the softer layers. (The cell's printed verdict is written for rank 4 and does not apply.)
  • Registers (Cell 7): removing all registers changes nothing (5.03 → 5.03); the reverse channel is off by design (norc).

The per-layer flow (FLOW-R). Each trained layer's share of T is integrated with k = N/8 substeps, the layer's context and wells' quadratic frozen at its first substep and one LayerNorm projection at its end; the force, including the pair potential's top-k source selection, is recomputed at every substep (debug/refinement_flow_confirmation.py, 12 × 4 × 512 tokens). Penalty ln(PPL_N / PPL_8) in nats:

k = N / L1.523468whole stack at k = 4
K2-L8-R6-CODE (L = 8, two wells, rank 6; trained ppl 5.33 on these batches)0.4420.0610.0570.0580.0580.0591.772
K2-L8-CODE (L = 8, two wells; trained ppl 5.47 on these batches)0.5570.0890.0960.0970.0970.0982.798
L8-CODE (L = 8, eight wells)0.1860.0290.0340.0350.0350.0352.695
L4-CODE (L = 4)0.4290.5200.2820.3200.3090.3062.960
SO-CODE (L = 2)0.9700.5260.3000.3840.3760.3692.858
  • The per-layer flow settles 0.059 nats from the trained step (within 0.004 from k = 2 to k = 8), between L8-CODE's 0.035 and rank 4's 0.098: rank 6 closes 62% of the gap in the limit between two wells and eight. The whole stack still fails refinement, but at k = 4 by 1.77 nats, about one nat less than the other eight-layer models (2.70–2.80).
  • Kick share (the part of a layer's position update owed to the explicit kick, median by layer): 0.11, 0.18, 0.12, 0.18, 0.17, 0.23, 0.29, 0.50 (K2-L8-CODE 0.14, 0.14, 0.12, 0.19, 0.19, 0.26, 0.32, 0.44).

A reading

At eight layers with two wells, two more directions per well buy 0.023 nats for 2.95M parameters, where six more wells bought 0.056 for 26.6M. The cap on each well's precision did not change, so the gain comes from spreading the same curvature over more directions, not from more of it; the layers come out softer and lose less at steps finer than the trained one. Whether rank 8 would carry on, and how much of the gain survives a second seed, is open. One seed per model.

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
LADDER_L=8                                # eight layers; dt = T / L = 1, T = 8
V_THETA_WELLS_PER_HEAD=2                  # two wells in the joint V_theta bank instead of eight
VPHI_FORCE_CHECKPOINT=True                # memory switch, same arithmetic
SNAPSHOT_STEPS=[1_000, 1_500, 2_000, 2_500, 3_000]   # weights-only snapshots for the well probe
ANISO_RANK=6                              # rank of each well's precision update (default 4); tag part ar6

Run Cells 0, 1, 1b, 1c, 1d, 2, 3, 4, 5, 5b and 6, then 7, 6b-7, 6b-4 and 6b-13 (one A100 80 GB; 37.1 GB peak in training, 3.65 s per step, about 19.5 h). The per-layer flow is debug/refinement_flow_confirmation.py … code seed=20261009 on the downloaded run folder (CPU).

Training artefacts were written to semsimula_fock_cfc_baoab_code_xi5long_topk16_dt32da16_mh4_aniso_dcvt5x2_ar6_vtjoint_cgqk_norc_vplive_xilive_sr2_st16250_L8probe_ob_untied_wsd_e5c_plgate_rep0.05_fockreg0.005_g0.1_baoab_cfc_lowrank_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, 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 (Cells 6b-4, 6b-7, 6b-13 and 7), the resonance and leak records and the per-layer flow (refinement_flow_confirmation_k2-l8-r6-code_*)
code/the notebook and the model code (it also carries later, default-off switches)

Companion notes

notewhat it covers
Code_Depth_Runs.mdthe run records: entries p-k2-l8-r6-setup and p-k2-l8-r6-result
Minimum_Well_Count_for_Conservative_Models.mdhow many wells each layer needs, from the trained models and from fits

Caveats

  • One seed per model. The pairing removes the evaluation noise, not the training-seed spread, which has not been measured; a 0.023-nat gain is small against what a seed could move.
  • The calls were never confirmed before the run; they are scored as proposed.
  • Not settled by the letter of the settling rule, like every code model; the paired gap to K2-L8-CODE is flat over the last 3,000 steps.
  • Code only, without the register path. Perplexities on code are not comparable with other 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…

Ревизия весов
f782054

0 моделей