Parameters and Types
Core data types used throughout the MinT API
AdamParams
Configuration for Adam optimizer.
Fields:
learning_rate- Step size for parameter updatesbeta1- Exponential decay rate for first moment estimatesbeta2- Exponential decay rate for second moment estimateseps- Small constant for numerical stabilityweight_decay- L2 regularization coefficientgradient_clip_norm- Maximum gradient norm (for clipping)
ModelInput
Represents tokenized input to the model.
Methods:
from_ints(tokens)- Create from list of token IDsto_ints()- Convert to list of token IDscontext_length()- Get total number of tokensappend_tokens(tokens)- Add tokens to the endappend_chunks(chunks)- Add text chunks
Supports:
- Pure text (list of token IDs)
SamplingParams
Controls text generation behavior.
Fields:
max_tokens- Maximum tokens to generatetemperature- Randomness (0.0 = deterministic, higher = more random)top_k- Consider only top-k tokenstop_p- Nucleus sampling thresholdseed- Random seed for reproducibilitystop_sequences- Strings that halt generation
LoraConfig
Configuration for LoRA adaptation.
Fields:
rank- Rank dimension for low-rank matricesseed- Initialization seedtrain_unembed- Train unembedding layertrain_mlp- Train MLP layerstrain_attn- Train attention layers
Checkpoint
Represents a saved model checkpoint.
Fields:
id- Unique identifiertype- “training” or “sampler”timestamp- Creation timesize- File size in bytespublic- Whether publicly accessible
TensorData
Wrapper for tensor data with conversion utilities.
Methods:
to_numpy()- Convert to NumPy arrayto_torch()- Convert to PyTorch tensorshape- Get tensor dimensions
TrainingRun
Metadata about a training session.
Fields:
id- Unique identifierbase_model- Foundation model usedowner- User who created the runcorrupted- Whether run encountered errorscheckpoints- List of saved checkpointscreated_at- Timestamp