From 2d8e9d5e00f746f39148a5d0cb760dff3f2eed43 Mon Sep 17 00:00:00 2001 From: Daniel Xu Date: Mon, 15 Dec 2025 01:07:10 +0000 Subject: [PATCH] Sync contents --- .sync_state | 4 +- docs/api/samplingclient.md | 6 +-- docs/api/types.md | 96 +++++++++++++++++++++++++++++++++++++- 3 files changed, 99 insertions(+), 7 deletions(-) diff --git a/.sync_state b/.sync_state index 0a7336c..224c82f 100644 --- a/.sync_state +++ b/.sync_state @@ -1,4 +1,4 @@ { - "last_synced_sha": "6752e178932fa060b6a916ff0e2aefd1d0410970", - "last_sync_time": "2025-12-15T01:00:20.438218" + "last_synced_sha": "e91a52a27e4676c1c349cdc2da15dc89685770cd", + "last_sync_time": "2025-12-15T01:07:10.226751" } \ No newline at end of file diff --git a/docs/api/samplingclient.md b/docs/api/samplingclient.md index e16a0f7..5cf9d71 100644 --- a/docs/api/samplingclient.md +++ b/docs/api/samplingclient.md @@ -11,14 +11,14 @@ Client for text generation and inference from trained or base models. The SamplingClient lets you generate text tokens from either a base model or from weights you've saved using a TrainingClient. You typically get one by calling `service_client.create_sampling_client()` or `training_client.save_weights_and_get_sampling_client()`. + Key methods: - sample() - generate text completions with customizable parameters - compute_logprobs() - get log probabilities for prompt tokens -Args: -- `holder`: Internal client managing HTTP connections and async operations +Create method parameters: - `model_path`: Path to saved model weights (starts with 'tinker://') -- `base_model`: Name of base model to use for inference +- `base_model`: Name of base model to use for inference (e.g., 'Qwen/Qwen3-8B') - `retry_config`: Configuration for retrying failed requests Example: diff --git a/docs/api/types.md b/docs/api/types.md index 3d92d75..61b631d 100644 --- a/docs/api/types.md +++ b/docs/api/types.md @@ -20,6 +20,38 @@ Coefficient used for computing running averages of gradient square Term added to the denominator to improve numerical stability +#### `weight_decay` + +Weight decay for the optimizer. Uses decoupled weight decay. + +#### `grad_clip_norm` + +Gradient clip norm for the optimizer. 0.0 means no clipping. + +## `SupportedModel` Objects + +```python +class SupportedModel(BaseModel) +``` + +Information about a model supported by the server. + +#### `model_name` + +The name of the supported model. + +## `GetServerCapabilitiesResponse` Objects + +```python +class GetServerCapabilitiesResponse(BaseModel) +``` + +Response containing the server's supported models and capabilities. + +#### `supported_models` + +List of models available on the server. + ## `OptimStepResponse` Objects ```python @@ -405,7 +437,7 @@ class ForwardBackwardOutput(BaseModel) #### `loss_fn_output_type` -The type of the ForwardBackward output. Can be one of [...] TODO +The class name of the loss function output records (e.g., 'TorchLossReturn', 'ArrayRecord'). #### `loss_fn_outputs` @@ -444,6 +476,58 @@ class CreateSamplingSessionResponse(BaseModel) The generated sampling session ID +## `ModelData` Objects + +```python +class ModelData(BaseModel) +``` + +Metadata about a model's architecture and configuration. + +#### `arch` + +The model architecture identifier. + +#### `model_name` + +The human-readable model name. + +#### `tokenizer_id` + +The identifier of the tokenizer used by this model. + +## `GetInfoResponse` Objects + +```python +class GetInfoResponse(BaseModel) +``` + +Response containing information about a training client's model. + +#### `type` + +Response type identifier. + +#### `model_data` + +Detailed metadata about the model. + +#### `model_id` + +Unique identifier for the model. + +#### `is_lora` + +Whether this is a LoRA fine-tuned model. + +#### `lora_rank` + +The rank of the LoRA adaptation, if applicable. + +#### `model_name` + +The name of the model. + ## `Cursor` Objects ```python @@ -470,7 +554,15 @@ class CreateModelRequest(StrictBase) #### `base_model` -Optional metadata about this model/training run, set by the end-user +The name of the base model to fine-tune (e.g., 'Qwen/Qwen3-8B'). + +#### `user_metadata` + +Optional metadata about this model/training run, set by the end-user. + +#### `lora_config` + +LoRA configuration ## `Datum` Objects