Skip to content
Language modelsPrototype

Verace Bytewise

A vocabulary-free byte encoder and decoder that maps text, code, audio and images to one continuous vector per input, stored as a .sheaf file.

Verace Research
  1. Raw input bytes: Text, code, audio or images, with no vocabulary
  2. Pooled vector: One vector per input, stored in a .sheaf file
  3. Mean pooling to one vector: Averages the concept solitons into one vector
Figure 1. Raw bytes pooled into one fixed-width vector in Verace Bytewise. Schematic: a byte stream is compressed by convolution and mean-pooled into one vector of fixed width. Verace Bytewise is a prototype with untrained weights, and exact decoding back to the original bytes is not demonstrated.
Open the simulator on its own pageLooking back, or keeping a fixed memory: an interactive toy model of the principle. You can also try it below

Overview

Verace Bytewise is the lab's byte-level alternative to subword tokenizers such as Tiktoken, OpenAI's tokenizer, and the BPE and SentencePiece methods developed by other parties; the lab's papers and code call this work UATS. It addresses one question: can raw bytes of text, source code, audio or images be turned into continuous vectors without any vocabulary table, compressed to a single vector per input, and decoded back to the exact original bytes? The design specification describes this single vector in category-theoretic language as a global sheaf section Γ(X,F)\Gamma(X, \mathcal{F}). In the code it is a mean-pooled feature vector.

The design specification, Sheaf Byte Protocol SBP v1.0, defines three tiers. A convolutional encoder compresses the byte stream into a shorter sequence of concept vectors, called concept solitons, at a default compression ratio of 8. A pooling step, sheafize, reduces that sequence to one vector of width dmodeld_{model}. A transposed convolutional decoder expands a vector back into 256-way byte logits. A second decoder, the Desheafizer, adds a harmonic expansion stage and a UTF-8 projection. Adapters feed images, audio and legacy token IDs into the same pooling step, and a binary .sheaf format stores the result.

The research implementation comprises the core translator, the separate decoder, the multimodal adapters, a token-ID bridge, a command-line tool, a benchmark script and two unit test suites. The test suite checks output shapes for every modality, the .sheaf save and load cycle, and that the decoded text has the same byte length as the input. It does not check that the decoded content matches the input. The system's overview document claims 32x to 1024x compression and 8.7x faster translation than Tiktoken, at over 10.5 MB/s against 1.2 MB/s. No recorded run supports these figures, and the benchmark script estimates BPE token counts from word counts instead of running a tokenizer.

Verace Bytewise is an implemented, unit-tested prototype with untrained weights. No training run and no measured reconstruction accuracy are recorded. Exact byte reconstruction, which both the design specification and the overview document claim, is not demonstrated. A .sheaf file stores only the pooled vector, the byte length, the concept length and dmodeld_{model}, so the claimed bijection between bytes and sections is a design claim. The design names a deterministic finite automaton for UTF-8 validity, but the code implements none. The reported cocycle defect involves no gluing computation. Speed and compression figures remain unmeasured claims.

Status

Prototype. The encoder, decoders, adapters, file format and command-line tool are implemented with shape-level unit tests, but no training run, no reconstruction measurement and no recorded benchmark result exist.

Simulator

A row of tokens is read two ways at once: the newest token looks back at every earlier one, and every token is also written into one memory of fixed size that fades.

  • looking back: one arc for every earlier token
  • fixed memory: how much of each token it still holds
  • newest token at the right
Looking back, this token
23 comparisons
Looking back, whole sequence
276 comparisons
State kept: looking back / fixed
24 tokens / 1 state
Fixed memory: a token is half faded after
4.3 tokens

Lengthen the sequence: the arcs multiply, the fixed memory stays one state. Lower the decay and it forgets sooner.

This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.

Architecture

  1. Wavelet byte encoder

    A convolutional network, WaveletEncoder, that embeds each byte and downsamples the byte sequence into a shorter sequence of concept vectors. The code calls its output concept solitons.

  2. Sheafization pooling step

    The sheafize method of ToposTranslator mean-pools the concept sequence into one vector of shape (1, 1, dmodeld_{model}). The design specification calls this vector the global sheaf section.

  3. Deconvolution byte decoder

    DeconvDecoder upsamples a sequence of vectors with transposed convolutions and maps each position to logits over the 256 byte values.

  4. Universal Topos Sheaf Decoder

    A separate three-stage decoder, UniversalToposDecoder, also called the Desheafizer. It expands one vector into a sequence, deconvolves it into byte logits and projects the result to valid UTF-8.

  5. Multimodal adapters

    MultiModalSheafTranslator projects image patches and audio frames into the encoder's feature width so that the same pooling step produces one vector for every modality.

  6. Legacy tokenizer bridge

    LegacyTokenizerBridge embeds integer token IDs from an existing tokenizer and pools them into one vector, for comparison and interoperability.

  7. Sheaf file format and CLI

    A binary .sheaf format with the magic header SHF1, written and read by save_sheaf and load_sheaf. A command-line tool, cli.py, has encode, decode and info subcommands.

Implementation

Mechanisms as they are implemented in the source code, with the constants the code uses.

Padded convolutional byte encoding
Input bytes are zero-padded to a multiple of compression_ratio (default 8). An empty input returns torch.zeros((1, 1, d_model)). The encoder applies nn.Embedding(256, d_model // 4), then a Conv1d with kernel_size=3, stride=2, padding=1 to dmodel/2d_{model}/2 channels with SiLU, then a Conv1d with kernel size and stride compression_ratio // 2 to dmodeld_{model} channels.
Mean pooling to one vector
The concept sequence c1,…,cLc_1, \dots, c_L is reduced to a single vector s=1L∑i=1Lcis = \frac{1}{L}\sum_{i=1}^{L} c_i. Every modality, including token IDs from the legacy bridge, passes through this same averaging step.
Transposed convolution decoder with argmax
DeconvDecoder applies ConvTranspose1d(dmodeld_{model}, dmodel/2d_{model}/2) with kernel size and stride compression_ratio // 2 and SiLU, then ConvTranspose1d(dmodel/2d_{model}/2, dmodel/4d_{model}/4) with kernel_size=3, stride=2, padding=1, output_padding=1 and SiLU, then Linear(d_model // 4, 256, bias=False). Each output byte is the argmax over the 256 logits, and decode_from_solitons truncates the result to the original length.
Cocycle defect as a shift norm
The reported cech_cocycle_defect is δ=∥s−roll(s,1)∥2\delta = \lVert s - \mathrm{roll}(s, 1) \rVert_2, the L2 norm of the pooled vector minus a copy of itself shifted cyclically by one feature position. It compares no overlapping parts of the input and performs no gluing.
Harmonic stalk expansion
StalkLocalizationFunctor repeats the input vector target_concept_length times and samples tjt_j evenly on [0,2π][0, 2\pi]. For k=1k = 1 to max_harmonics (default 8) it adds 0.05 (cos⁡(ktj)wkcos⁡+sin⁡(ktj)wksin⁡)0.05\,(\cos(k t_j) w^{\cos}_k + \sin(k t_j) w^{\sin}_k), where the weights are random parameters scaled by 1/dmodel1/\sqrt{d_{model}}. LayerNorm follows.
UTF-8 projection by discarding
project_valid_utf8 takes the argmax over 256 byte logits, skips byte value 0, decodes the bytes with errors='ignore' and re-encodes them as UTF-8. Validity comes from dropping invalid sequences. The class name UTF8TopologicalAutomaton suggests a state machine, but none is implemented. UniversalToposDecoder defaults to dmodel=512d_{model} = 512.
Sheaf binary layout
save_sheaf packs a 16-byte header with struct format "4sIII": magic b"SHF1", original byte length, concept length and d_model. The pooled vector follows as raw float32 bytes. load_sheaf asserts the magic and reshapes the payload to (1, 1, dmodeld_{model}). Nothing else about the input is stored.
Image and audio patch projection
Images of shape [1, 3, H, W] pass through nn.Conv2d(3, d_model, kernel_size=16, stride=16) and are flattened to patches. Audio of shape [1, 1, T] passes through nn.Conv1d(1, d_model, kernel_size=160, stride=160). Both share a LayerNorm and are then mean-pooled by sheafize.
Heuristic benchmark counts
benchmark_translator.py estimates BPE token counts as twice the whitespace word count for Hindi, Arabic and Chinese, and as the word count otherwise. Latency is averaged over 100 calls of translate_to_sheaf on a sentence repeated 50 times. Throughput is characters divided by average time, divided by 10610^6.

Results

From the lab's own experiments and records. They have not been independently replicated.

  1. Performance claims are not backed by recorded runs

    The system's overview document states zero vocabulary, compression of 32x to 1024x and 8.7x faster translation, at over 10.5 MB/s against 1.2 MB/s for Tiktoken. No recorded run supports these figures, and the benchmark script estimates BPE counts from word counts instead of running a tokenizer.

  2. Exact reconstruction is not tested

    The text roundtrip test in the test suite asserts only that the decoded byte length equals the input byte length. It does not compare decoded content with the input, and the decoder weights are untrained.

  3. The file format stores only one pooled vector

    The lab's reading of the code shows that a .sheaf file holds a 16-byte header and one float32 vector of width dmodeld_{model}. The bijection between byte streams and sections that the design specification claims is therefore not realised.

  4. UTF-8 automaton exists only in the design

    The design specification describes a deterministic finite automaton that guarantees valid UTF-8 output. The code instead decodes with errors ignored and drops invalid bytes and zero bytes.

  5. Tests check shapes and serialisation only

    The test suites check output shapes for text, image, audio and token-ID inputs, the .sheaf save and load cycle, and a deconvolver output of shape (1, 128, 256) for 16 input vectors. No test run is recorded.

Concepts

Subword tokenization
Methods such as BPE, SentencePiece and Tiktoken split text into units drawn from a fixed vocabulary of IDs. The design specification argues that this causes spelling blindness, fragmented numbers and unequal token costs across languages.
Vocabulary-free byte modelling
Operating directly on the 256 possible byte values, so that no out-of-vocabulary input can occur and no lookup table is needed. Verace Bytewise embeds bytes with a 256-row embedding.
Concept solitons
The system's name for the downsampled sequence of continuous vectors produced by the byte encoder. Each vector covers a fixed number of input bytes set by the compression ratio.
Global sheaf section
In sheaf theory, a global section is a consistent assignment glued together from local data. The design specification uses the term for the single vector that represents a whole input. In the code this vector is a mean of the concept vectors.
Cech cocycle defect
In the design, a measure of how badly local pieces fail to agree when glued. The code reports a different quantity: the norm of the pooled vector minus its own one-position cyclic shift.
Stalk localization
The first stage of the Desheafizer. It turns one vector back into a sequence by repetition plus small sinusoidal offsets, as an inverse of pooling.
UTF-8 byte closure
The requirement that decoded output is a valid UTF-8 byte sequence. The design specification assigns this to a deterministic finite automaton. The code achieves it by discarding invalid bytes.
One vector per task
The design target that any input, of any length or modality, is represented by a sequence of length 1. On this basis the system's overview document claims compression of 32x to 1024x.
Claimed comparison with Tiktoken
The system's overview document claims zero vocabulary against 100,277 IDs, exact spelling and arithmetic, and 8.7x faster translation than Tiktoken. These are the lab's stated claims, not recorded measurements.

About this page

Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.

Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.