# `Tinkex.Types.WeightsInfoResponse`
[🔗](https://github.com/North-Shore-AI/tinkex/blob/v0.4.0/lib/tinkex/types/weights_info_response.ex#L1)

Minimal information for loading public checkpoints.

Mirrors Python `tinker.types.WeightsInfoResponse`.

## Fields

- `base_model` - The base model name (e.g., "Qwen/Qwen2.5-7B")
- `is_lora` - Whether this checkpoint uses LoRA
- `lora_rank` - The LoRA rank, if applicable (nil for non-LoRA checkpoints)

## Wire Format

```json
{
  "base_model": "Qwen/Qwen2.5-7B",
  "is_lora": true,
  "lora_rank": 32
}
```

## Examples

    iex> json = %{"base_model" => "Qwen/Qwen2.5-7B", "is_lora" => true, "lora_rank" => 32}
    iex> Tinkex.Types.WeightsInfoResponse.from_json(json)
    %Tinkex.Types.WeightsInfoResponse{base_model: "Qwen/Qwen2.5-7B", is_lora: true, lora_rank: 32}

## See Also

- `Tinkex.API.Rest.get_weights_info_by_tinker_path/2`

# `t`

```elixir
@type t() :: %Tinkex.Types.WeightsInfoResponse{
  base_model: String.t(),
  is_lora: boolean(),
  lora_rank: non_neg_integer() | nil,
  train_attn: boolean() | nil,
  train_mlp: boolean() | nil,
  train_unembed: boolean() | nil
}
```

# `from_json`

```elixir
@spec from_json(map()) :: t()
```

Create a WeightsInfoResponse from a JSON map.

Handles both string and atom keys.

## Parameters

- `json` - Map with keys `"base_model"`/`:base_model`, `"is_lora"`/`:is_lora`,
  and optionally `"lora_rank"`/`:lora_rank`

## Examples

    iex> WeightsInfoResponse.from_json(%{"base_model" => "Qwen", "is_lora" => true, "lora_rank" => 32})
    %WeightsInfoResponse{base_model: "Qwen", is_lora: true, lora_rank: 32}

    iex> WeightsInfoResponse.from_json(%{base_model: "Qwen", is_lora: false})
    %WeightsInfoResponse{base_model: "Qwen", is_lora: false, lora_rank: nil}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
