API ReferenceParameters

Parameters and Types

Core data types used throughout the MinT API

AdamParams

Configuration for Adam optimizer.

Fields:

FieldTypeDefaultDescription
learning_ratefloat0.0001Step size for parameter updates
beta1float0.9Exponential decay rate for first moment estimates
beta2float0.95Exponential decay rate for second moment estimates
epsfloat1e-12Small constant for numerical stability

Example:

from mint import types
 
training_client.optim_step(
    types.AdamParams(learning_rate=1e-4, beta1=0.9, beta2=0.95)
).result()

ModelInput

Represents tokenized input to the model.

Methods:

  • from_ints(tokens) - Create from list of token IDs
  • to_ints() - Convert to list of token IDs
  • context_length() - Get total number of tokens
  • append_tokens(tokens) - Add tokens to the end
  • append_chunks(chunks) - Add text chunks

Supports:

  • Pure text (list of token IDs)

SamplingParams

Controls text generation behavior.

Fields:

FieldTypeDefaultDescription
max_tokensintrequiredMaximum tokens to generate
temperaturefloat1.0Randomness (0.0 = deterministic, higher = more random)
top_kint-1Consider only top-k tokens (-1 = disabled)
top_pfloat1.0Nucleus sampling threshold
seedintNoneRandom seed for reproducibility
stoplistNoneStop sequences (strings or token IDs)
stop_token_idslistNoneToken IDs that halt generation

Example:

from mint import types
 
result = sampling_client.sample(
    prompt=types.ModelInput.from_ints(tokens),
    num_samples=4,
    sampling_params=types.SamplingParams(
        max_tokens=100,
        temperature=0.8,
        top_p=0.95,
        stop_token_ids=[tokenizer.eos_token_id]
    )
).result()

LoraConfig

Configuration for LoRA adaptation.

Fields:

FieldTypeDefaultDescription
rankint32Rank dimension for low-rank matrices (max: 64)
seedintNoneInitialization seed
train_unembedbooltrueTrain unembedding layer
train_mlpbooltrueTrain MLP layers
train_attnbooltrueTrain attention layers

Example:

training_client = service_client.create_lora_training_client(
    base_model="Qwen/Qwen3-4B-Instruct-2507",
    rank=16,
    train_mlp=True,
    train_attn=True,
    train_unembed=True
)

Checkpoint

Represents a saved model checkpoint.

Fields:

  • id - Unique identifier
  • type - “training” or “sampler”
  • timestamp - Creation time
  • size - File size in bytes
  • public - Whether publicly accessible

TensorData

Wrapper for tensor data with conversion utilities.

Methods:

  • to_numpy() - Convert to NumPy array
  • to_torch() - Convert to PyTorch tensor
  • shape - Get tensor dimensions

TrainingRun

Metadata about a training session.

Fields:

  • id - Unique identifier
  • base_model - Foundation model used
  • owner - User who created the run
  • corrupted - Whether run encountered errors
  • checkpoints - List of saved checkpoints
  • created_at - Timestamp