File size: 1,476 Bytes
d8bc908
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""ARBitor — Any Relational Bit System.

Core package for the ARB ternary-weighted neural network.
Quick import: from arbitor import ARBModel, VOCAB
"""
from .config import VOCAB, AUDIO_VOCAB, AUDIO_SR, AUDIO_FRAME_RATE, \
    EMBEDDING_DIM, HIDDEN_DIM, CTX, SPECIAL_VOCAB, \
    CODEBOOK_DIM, SHARED_VQ_SIZE, \
    MG_N_EXPERTS, MG_CORE_RANK, MG_SHARED_INTER, MG_ACT_ITERS, \
    MEMGRAM_STRUCT_PRIMES, MEMGRAM_CONV_PRIMES, MEMGRAM_EMBED_DIM, MEMGRAM_KEY_DIM

from .kernel.ternary_scale import (
    TernaryScaleTensor, TernaryRMSNorm, TScaleType, GROUP_SIZES,
    _HAS_TRITON, _HAS_TILELANG,
)
from .kernel.flash_vq import FlashVQCodebook
from .kernel.ternary_audit import audit_model, format_audit, freeze_float_parameters, trainable_parameters
from .converters.convert_to_ternary8 import pack_ternary, unpack_ternary

from .sequencers import ByteEmbedding, Sequencer, TextSequencer, VAE2DSequencer, VAEAudioSequencer, MultimodalSequencer
from .vq import SharedVQ
from .components import (
    TernaryEmbeddingTable, TernaryVQCodebook,
    GNNLoRAAdapter, HaltingUnit,
    MemGram, MoEGraph,
    ByteHead, OutputRouter,
    LossComponents, LossWeights, StickyZoneSTE,
    KGVQCodebook, CompositeProposalHead,
    _BOUNDARY_TOKEN_MAP,
)
from .decoders import VideoHead, TalkerHead, MRFBlock, TinyNeuralCodec
from .main import ARBModel, _extract_boundary_from_input

# Re-export encoders
from .encoders import TinyNeuralCodec as Codec, AudioVQEncoder, load_vae, VAEWrapper