# tinker.types

All public types in the [`tinker.types`](https://github.com/thinking-machines-lab/tinker/tree/main/src/tinker/types) module, organized by function.

## Data & Input

Types for preparing training data and model inputs.

| Type | Description |
| --- | --- |
| [`Datum`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/datum/) | A single training example with input tokens and loss mask |
| [`ModelInput`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/modelinput/) | Token sequence input for sampling or training |
| [`TensorData`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/tensordata/) | Tensor container with dtype and shape metadata |
| [`EncodedTextChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/encodedtextchunk/) | A chunk of encoded text tokens |
| [`DmelChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/dmelchunk/) | Client-encoded DMel audio input for audio-capable models |
| [`ImageChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/imagechunk/) | Image data chunk for vision-language models |
| [`ImageAssetPointerChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/imageassetpointerchunk/) | Pointer to a pre-uploaded image asset |

## Training

Types for configuring and observing training operations.

| Type | Description |
| --- | --- |
| [`ForwardBackwardOutput`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/forwardbackwardoutput/) | Result of a forward-backward pass (loss, gradients, metrics) |
| [`OptimStepResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/optimstepresponse/) | Result of an optimizer step |
| [`AdamParams`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/adamparams/) | Adam optimizer hyperparameters (learning rate, betas, epsilon) |
| [`LoraConfig`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/loraconfig/) | LoRA adapter configuration (rank, which layers to train) |
| [`GetInfoResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/getinforesponse/) | Information about a training client's model |
| [`ModelData`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/modeldata/) | Metadata about a model's architecture and configuration |

## Sampling & Inference

Types for text generation and sampling results.

| Type | Description |
| --- | --- |
| [`SamplingParams`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/samplingparams/) | Sampling configuration (temperature, max tokens, stop sequences) |
| [`SampleResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampleresponse/) | Response from a sampling request |
| [`SampledSequence`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampledsequence/) | A single generated sequence with tokens and log-probabilities |
| [`TopkPromptLogprobs`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/topkpromptlogprobs/) | Top-k log-probabilities over the prompt tokens |

## Models & Checkpoints

Types for managing models, checkpoints, and training runs.

| Type | Description |
| --- | --- |
| [`Checkpoint`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/checkpoint/) | A saved model checkpoint |
| [`ParsedCheckpointTinkerPath`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/parsedcheckpointtinkerpath/) | Parsed components of a tinker:// checkpoint path |
| [`TrainingRun`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/trainingrun/) | Metadata about a training run |
| [`SupportedModel`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/supportedmodel/) | Information about a model supported by the server |
| [`GetServerCapabilitiesResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/getservercapabilitiesresponse/) | Server capabilities including supported models |
| [`CheckpointsListResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/checkpointslistresponse/) | Paginated list of checkpoints |
| [`CheckpointArchiveUrlResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/checkpointarchiveurlresponse/) | Download URL for a checkpoint archive |
| [`TrainingRunsResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/trainingrunsresponse/) | Paginated list of training runs |
| [`Cursor`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/cursor/) | Pagination cursor for list responses |
| [`SaveWeightsResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/saveweightsresponse/) | Response from saving model weights |
| [`SaveWeightsForSamplerResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/saveweightsforsamplerresponse/) | Response from saving weights for a sampler |
| [`WeightsInfoResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/weightsinforesponse/) | Minimal information for loading public checkpoints |

## Authentication & Client Configuration

Types for authentication and client configuration.

| Type | Description |
| --- | --- |
| [`AuthTokenResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/authtokenresponse/) | Response from an authentication token request |
| [`ClientConfigRequest`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/clientconfigrequest/) | Request for client configuration |
| [`ClientConfigResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/clientconfigresponse/) | Server-provided client configuration |
