VEG Transformer Transplant

Experimental structural transplant. This is not equivalent to the VEG checkpoint.

A standard Transformer cannot directly express VEG's phase-coherence routing, elementwise sigmoid route gate, causal 1/sqrt(t+1) normalization, or selective recurrent field. This artifact maps the tensors that have a Llama analogue into a normal decoder-only Transformer. It is useful as a compatibility baseline and conversion reference, not as a preserved-quality conversion.

Model

  • Architecture: LlamaForCausalLM
  • Parameters: 84,042,816
  • Vocabulary: 256 bytes
  • Context: 512
  • Hidden size: 832
  • Layers: 10
  • Attention heads: 13, head dimension 64
  • Intermediate size: 2240
  • Precision: FP32

Mapping

  • emb -> model.embed_tokens.weight
  • Wq/Wk -> duplicated 64-dimensional q/k heads
  • Wv * c -> self_attn.v_proj.weight
  • diag(gs) @ Wo -> self_attn.o_proj.weight
  • W1/W3/W2 -> SwiGLU projections
  • g1/g2/gf -> RMSNorm gains
  • Wout -> lm_head.weight

Dropped or approximated VEG behavior is listed in conversion_report.json. Expect degraded quality relative to the source model.

Use

pip install -r requirements.txt
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('.', torch_dtype=torch.float32)
tok = AutoTokenizer.from_pretrained('.')
inputs = tok('The capital of France is', return_tensors='pt')
out = model.generate(**inputs, max_new_tokens=200, do_sample=True, temperature=0.8)
print(tok.decode(out[0], skip_special_tokens=False))

The tokenizer is byte-level and has no BOS/EOS token. Generation should use an explicit max_new_tokens or a custom stopping criterion.

Downloads last month
131
Safetensors
Model size
84M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support