transformers-v9
V9 Palace Transformer — an independent from-scratch LLM architecture with block-diagonal palace-collated attention, per-palace LoRA K/V adapters, and cross-palace semantic gating. Not a base-model adapter — its own embedding/position/lm_head stack.
Part of the V∞ (SiliconLifeOS) paradigm: cognitive structure is architecture, not prompt engineering.
Architecture
| Component | Detail |
|---|---|
| Palace Attention | Block-diagonal mask: tokens attend only within same palace |
| LoRA K/V | Per-palace low-rank adapters (r=16, 48 palaces) |
| Cross-palace gate | Softmax MLP mix of palace embeddings |
| QKV low-rank | D→64→D bottleneck projections |
| Residuals | 6 layers, no FFN (sufficient for structured reasoning) |
| Default scale | ~1.5B params (hidden=2048, 6 layers, 48 palaces) |
Input → Embed/Pos → 6×PalaceAttentionLayer (residual) → LM Head → Output
Quick Start
import transformers_v9 # registers v9_palace with HF Auto Classes
from transformers import AutoConfig, AutoModelForCausalLM
config = AutoConfig.from_pretrained("v9_palace", vocab_size=32768, hidden_size=2048)
model = AutoModelForCausalLM.from_config(config)
Training
from transformers_v9 import V9PalaceTrainer
trainer = V9PalaceTrainer(model, train_dataset, eval_dataset)
trainer.train()
From-scratch training pipeline included (from transformers_v9.train import get_curriculum_dataset):
- SPC L1-L6 curriculum data
- CP fusion tasks
- Multi-domain reasoning
Router (Semantic Palace Routing)
from transformers_v9 import V9RouterConfig, V9Router
router = V9Router(V9RouterConfig())
palace = router.route("Discuss the attention mechanism in Transformers")
# → Palace ID for attention-related reasoning
4-level cascade: L0 domain hash → L1 keyword voting → L2 group Jaccard → L3 embedding (optional).
Install
pip install transformers-v9
Requirements
- Python 3.8+
- PyTorch 2.0+
- transformers 4.30+
- accelerate 0.20+
Status
Alpha prototype — structured reasoning validation complete. CPU training verified (500 samples, 20 epochs: ont_self 0.55→1.11, accuracy 96.5%). GPU training for full-scale (1.5B+) recommended.
Links
Metadata
Release files for transformers-v9 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| transformers_v9-0.2.0.tar.gz | 17.3 kB | Without provenance | Details for transformers_v9-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| transformers_v9-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for transformers_v9-0.2.0-py3-none-any.whl |
Total release size: 39.2 kB
Release files / transformers_v9-0.2.0.tar.gz
| Download URL | transformers_v9-0.2.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b214b1fd92582b8d53347c67c2f2988433a32ed161a765aaac287d914a87b9fd
|
|
BLAKE2b-256 checksum How to use checksums |
bb89ea29f4fd94460ddd52116094661a8e8165089969942384faefa65c6f5bee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / transformers_v9-0.2.0-py3-none-any.whl
| Download URL | transformers_v9-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ab4cb051f282146b106ffcc9a50c1a157001f02d2a639186fb0ba5b3aab6ca9
|
|
BLAKE2b-256 checksum How to use checksums |
ba057c9c045bc2c53afc86dd5d568774ef782a235fd3335ec24f210bf9bc36ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for transformers-v9 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.