DocsReference
Glossary
Every noun of the product in a sentence or two, with the page that owns it.
People
| Term | Meaning | Page |
|---|---|---|
| Caller | Whoever opens a run: a person at the console, a developer through the SDK, or a program by CPI. The caller pays the run’s budget. | Introduction |
| Opener | The account that signed open_run, recorded in the run account: a wallet, or a program’s PDA. Only the opener cancels and closes the run. | Runs and turns |
| Cranker | Whoever lands turns. A wallet turning one run by hand is a cranker, and so is a process that turns every open run. Each turn pays its cranker the turn reward. | Run a cranker |
| Publisher | The wallet that put a model on chain. It uploads the weights, seals the model, sets the royalty and claims from the model’s vault. | Publish a model |
| Authority | The wallet recorded in Config that sets the turn reward and the protocol share rate. | Instructions |
Models and weights
| Term | Meaning | Page |
|---|---|---|
| Model | A language model on chain: a Model account with its configuration, publisher and royalty, and the weight accounts it names. The program runs any model of the llama2.c architecture family from that configuration. | Models |
| Weights | The model’s numbers: int8 matrix rows with one fixed-point scale per row, plus the tokenizer and the lookup tables the integer arithmetic reads. | Weight format |
| Weight account | An account that holds one section of a model’s weights after a 2,048-byte header. Runs read weight accounts and never write them. | Accounts |
| Section | One part of the weights, held in one weight account. Section zero holds the tokenizer and the tables, and the other sections hold matrices. A turn names section zero and up to two matrix sections. | Weight format |
| Weight file | The file curta convert writes from a llama2.c checkpoint and its tokenizer: the weights in Curta’s integer format, cut into sections. | Weight format |
| Weights hash | The 32-byte commitment to every byte of the weights, declared when the model is created and checked by the program during sealing. | Publish a model |
| Sealed | The state of a model whose weights the program has checked against the weights hash. A sealed model never changes and is the only kind a run opens on. | Publish a model |
| Registry | Every model on the program, listed at /models with configuration, royalty, runs and tokens produced. | Models |
| Genesis models | stories260K and stories15M, Karpathy’s TinyStories checkpoints in the llama2.c architecture. | Models |
| Tokenizer | The vocabulary and merge scores stored in section zero. The program uses it to turn the prompt into tokens and each generated token into text. | Weight format |
| Vocabulary | The set of tokens a model knows. The classifier scores every entry of it for each generated token. | Models |
| Context length | The most positions a model attends over. A run’s prompt tokens and max tokens fit within it. | Models |
Runs and turns
| Term | Meaning | Page |
|---|---|---|
| Run | One execution of a model on one prompt. A run is an account that holds the prompt, the parameters, the budget, the working state of the forward pass and the output. | Runs and turns |
| Turn | One transaction, signed by anyone, that advances a run’s forward pass as far as one transaction’s compute allows and pays its signer the turn reward. | Runs and turns |
| Token | A model token: one entry of the vocabulary, as an id and a piece of text. The product’s own token is always written CURTA. | How it works |
| Prompt | The text a run continues: UTF-8 of up to 1,024 bytes, stored in the run account and tokenized by the program. | Quickstart |
| Max tokens | The most tokens a run generates, from 1 to the model’s context length. | Quickstart |
| Temperature | A number from 0 to 16 that the sampler applies to the scores. Zero takes the highest-scoring token. | How it works |
| Seed | An unsigned 64-bit integer that starts the on-chain generator the sampler draws from. | How it works |
| End token | The token that ends a run before max tokens. Its id stays in the output ids and adds no text. | How it works |
| Running | Turns are landing. | Runs and turns |
| Starved | The budget cannot pay the next turn. Anyone can fund it. | Runs and turns |
| Complete | The run reached the end token or its max tokens. | Runs and turns |
| Cancelled | The caller stopped it at a turn boundary. | Runs and turns |
| Settled | The flag a run carries once settle has moved its accrued royalty and protocol share. A settled run can be closed. | Runs and turns |
| Fund | Adding SOL to the budget of a running or starved run. Anyone can fund any open run. | Runs and turns |
| Cancel | The opener stopping a running or starved run at a turn boundary. What the run accrued stays for settlement. | Runs and turns |
| Settle | Moving an ended run’s accrued royalty to the model’s vault and its accrued protocol share to the fee account, once, by anyone. | Runs and turns |
| Close | The opener closing a settled run’s account. Every lamport left in it, the rent and the unspent budget, returns to the opener. | Runs and turns |
| Replay | Recomputing a run off chain from the on-chain weights, the prompt, the parameters and the seed, and comparing it with the chain’s output token by token. | Replay |
| Event | The record the program emits with every state change, as a signed call to itself: the action, the accounts, the amounts and the ids of the tokens a turn completed. | Events |
The computation
| Term | Meaning | Page |
|---|---|---|
| Forward pass | The computation that produces a token: embedding, every layer’s attention and feed-forward block, the classifier and the sampler. Curta runs all of it in the program. | How it works |
| Position | One place in the sequence the model reads: a prompt token or a generated token. Each position passes through every layer. | How it works |
| Stage | One step of the forward pass, numbered from 0 to 20 in the run’s cursor: tokenizing, embedding, the steps of a layer, the classifier, sampling. | How it works |
| Cursor | The run’s place in the forward pass: stage, layer, row and position. Every turn starts from it and writes it back. | How it works |
| Turn planner | The part of the inference core that decides where a turn ends and which weight accounts it reads. The program, the sender and the quote all run it. | How it works |
| Chunk | The unit the planner fills a turn with: a run of rows of one matrix, of positions in an attention stage, or of vocabulary entries in the sampler. | Inference core |
| Compute unit | Solana’s measure of a transaction’s computation. One transaction may use 1,400,000, and the planner fills each turn close to that. | How it works |
| Multiply-accumulate | One weight times one activation, added to a sum: the operation the matrices are made of and the unit their compute cost is measured in. | Inference core |
| Attention cache | The key and value vectors of every layer at every position a run has passed, kept in the run account so later positions attend over them. | How it works |
| Fixed point | Integers that stand for fractions by a fixed number of fractional bits. Activations carry 16 of them, so the same inputs give the same bytes on every machine. | Inference core |
| Sampler | The stage that chooses the next token from the classifier’s scores: the highest at temperature zero, a seeded draw above it. | How it works |
Money
| Term | Meaning | Page |
|---|---|---|
| Budget | The SOL a run can spend, deposited into the run account at open and added to by fund. Every fee is paid from it. | Fees |
| Turn reward | A fixed amount per turn, paid from the run to the turn’s signer inside the turn’s own transaction. | Fees |
| Royalty | A price per generated token set by the model’s publisher, accrued in the run and moved to the model’s vault at settlement. | Fees |
| Protocol share | A share of turn rewards and royalties, at a rate in basis points, accrued in the run and moved to the fee account at settlement. | Fees |
| Quote | The cost of a run computed before it opens: turns, turn rewards, royalties, protocol share, total budget, and the run account’s size and rent. | Fees |
| Next turn cost | The amount the run account reserves for its next turn. A run whose remaining budget is below it is starved. | Runs and turns |
| Rent | The SOL an account holds for its size. A run’s rent is deposited beside the budget at open and returns whole on close. | Fees |
| Lamport | The smallest unit of SOL: one billionth. Every amount in the program and the SDK is in lamports. | Fees |
| Basis point | One hundredth of a percent. The protocol share rate is a count of them, from 0 to 10,000. | Fees |
| CURTA | The product’s token, with a supply of 1,000,000,000. The protocol share that accrues in the fee account buys CURTA on the market and burns it. | CURTA |
Accounts
| Term | Meaning | Page |
|---|---|---|
| Config | The program’s one configuration account: the authority, the fee account’s address, the turn reward and the protocol share rate. | Accounts |
| Model account | A 4,096-byte account with a model’s publisher, configuration, royalty, weights hash, sealed flag, counters and the list of its weight accounts. | Accounts |
| Model vault | The account, one per model, that receives the model’s royalties at settlement. The publisher claims from it. | Accounts |
| Run account | A 256-byte header of run and budget fields followed by the inference core’s working state. It is created at its full size before the run opens. | Accounts |
| Fee account | The FeeVault: the program’s one account that receives the protocol share at settlement. | Accounts |
| PDA | A program derived address: an account address a program signs for. Config, the fee account and each model vault are PDAs of the curta program, and a program that calls Curta opens runs from one of its own. | Call from a program |
Tools
| Term | Meaning | Page |
|---|---|---|
| Program | curta, the Solana program that holds every account above and executes every instruction, the forward pass included. | Instructions |
| Instruction | One of the program’s 13 entry points, from init_config to close_run. | Instructions |
| Inference core | curta-core, the Rust crate with the weight format, the forward pass, the tokenizer, the sampler and the turn planner. It builds into the program, the CLI and the browser. | Inference core |
| SDK | @curta/sdk, the TypeScript client for Node and the browser, with the WebAssembly build of the inference core inside it. | SDK reference |
| CPI | A cross-program invocation: one Solana program calling another inside a transaction. A program opens, cancels and closes runs by CPI. | Call from a program |
| CPI crate | curta-cpi, the Rust crate a program calls Curta with and reads a run account through. | Call from a program |
| CLI | curta, the command line tool: convert, publish, seal, set-royalty, claim, crank and run. | CLI reference |
| Console | The page at /run where a person picks a model, types a prompt, reads the quote, opens a run and watches it turn. | Quickstart |
| oracle-of-stories | The example caller program. It asks the model for a line by CPI and stores it in its own account. | Call from a program |