Ster/Docs

ster model

Create a native local Llama checkpoint or WordLevel tokenizer from an explicit declaration, and verify it by loading what was written.

Invocation and purpose#

text
ster model fixture create --from <SPEC> --output <DIR>
ster model tokenizer create --from <SPEC> --output <FILE>

fixture create writes an untrained Llama checkpoint — native config.json, tokenizer and safetensors weights — then loads it on the CPU in full precision and forwards the declaration's verification prompt at the declared layers before it answers. tokenizer create compiles a WordLevel declaration into a native tokenizer JSON, reads the saved file back through the tokenizer library, and encodes and decodes the declaration's verification text. Random weights exercise model mechanics; they say nothing about language quality. The architecture, initialization and vocabulary are inputs of the declaration, never defaults of the command.

An offline checkpoint for every other command#

The Ster repository carries a reference declaration, docs/examples/model/fixture.json, with its config and vocabulary beside it: four layers, hidden width 64 and a WordLevel vocabulary, seed 7. From a checkout of wisent-ai/ster:

bash
ster model fixture create --from docs/examples/model/fixture.json --output toy-llama

The directory it writes is a --model for every other command, with no download, GPU or account. Paths inside a declaration resolve against the declaration file, not the current directory.

Fixture declaration#

FieldContract
configpath to the native Llama config; its bytes, extra metadata included, are kept
tokenizerpath to a native tokenizer JSON, or an object whose from names a tokenizer declaration to compile
initialization.seedrequired unsigned seed of the native random generator
initialization.embedding, initialization.projectionrequired finite mean and scale
initialization.normalizationrequired finite scalar
initialization.biasfinite mean and scale, required when the config enables attention biases
verification.prompt, verification.layersrequired nonblank prompt and nonempty list of layer indices within the model

The config states model_type=llama and every dimension Ster's decoder reads. mlp_bias=true is refused, because Ster's Llama consumer applies no feed-forward biases.

Tokenizer declaration#

unknownToken, a nonempty ordered modelTokens list whose positions are the token IDs, an explicit addedTokens array, the four pipeline stages (normalizer, preTokenizer, postProcessor, decoder), each a native object or an explicit null, and verification with text, addSpecialTokens and skipSpecialTokens. The repository's reference is docs/examples/model/vocabulary.json.

Output and state#

The output must be new: an existing file, directory or symlink is refused and left as it was, and missing parents are created. When writing or verification fails, Ster removes the files and directory this invocation created, and a cleanup that fails is reported beside the original cause. The answer returns the accepted declaration and the verification it ran; a tokenizer answer names the measured vocabulary size and the actual encode and decode preview.

Refusals#

  • A missing --from or --output is a usage error.
  • Unknown declaration fields, a missing seed, an omitted pipeline stage, duplicate model tokens and an out-of-range verification layer are refused by field name; nothing is guessed.
  • An absent input file, malformed native data, an unsupported layout and non-finite weights or activations fail naming the operation, its paths or observed values, and the cause.