# 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/index.md) | A single training example with input tokens and loss mask | | [`ModelInput`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/modelinput/index.md) | Token sequence input for sampling or training | | [`TensorData`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/tensordata/index.md) | Tensor container with dtype and shape metadata | | [`EncodedTextChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/encodedtextchunk/index.md) | A chunk of encoded text tokens | | [`DmelChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/dmelchunk/index.md) | Client-encoded DMel audio input for audio-capable models | | [`ImageChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/imagechunk/index.md) | Image data chunk for vision-language models | | [`ImageAssetPointerChunk`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/imageassetpointerchunk/index.md) | 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/index.md) | Result of a forward-backward pass (loss, gradients, metrics) | | [`OptimStepResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/optimstepresponse/index.md) | Result of an optimizer step | | [`AdamParams`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/adamparams/index.md) | Adam optimizer hyperparameters (learning rate, betas, epsilon) | | [`LoraConfig`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/loraconfig/index.md) | LoRA adapter configuration (rank, which layers to train) | | [`GetInfoResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/getinforesponse/index.md) | Information about a training client's model | | [`ModelData`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/modeldata/index.md) | 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/index.md) | Sampling configuration (temperature, max tokens, stop sequences) | | [`SampleResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampleresponse/index.md) | Response from a sampling request | | [`SampledSequence`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampledsequence/index.md) | A single generated sequence with tokens and log-probabilities | | [`TopkPromptLogprobs`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/topkpromptlogprobs/index.md) | 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/index.md) | A saved model checkpoint | | [`ParsedCheckpointTinkerPath`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/parsedcheckpointtinkerpath/index.md) | Parsed components of a tinker:// checkpoint path | | [`TrainingRun`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/trainingrun/index.md) | Metadata about a training run | | [`SupportedModel`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/supportedmodel/index.md) | Information about a model supported by the server | | [`GetServerCapabilitiesResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/getservercapabilitiesresponse/index.md) | Server capabilities including supported models | | [`CheckpointsListResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/checkpointslistresponse/index.md) | Paginated list of checkpoints | | [`CheckpointArchiveUrlResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/checkpointarchiveurlresponse/index.md) | Download URL for a checkpoint archive | | [`TrainingRunsResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/trainingrunsresponse/index.md) | Paginated list of training runs | | [`Cursor`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/cursor/index.md) | Pagination cursor for list responses | | [`SaveWeightsResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/saveweightsresponse/index.md) | Response from saving model weights | | [`SaveWeightsForSamplerResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/saveweightsforsamplerresponse/index.md) | Response from saving weights for a sampler | | [`WeightsInfoResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/weightsinforesponse/index.md) | 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/index.md) | Response from an authentication token request | | [`ClientConfigRequest`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/clientconfigrequest/index.md) | Request for client configuration | | [`ClientConfigResponse`](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/clientconfigresponse/index.md) | Server-provided client configuration |