tau-4b / configuration_tau.py
ckproduces's picture
tau-4b
daa4640
Raw History Blame Contribute Delete
1.05 kB
"""tau-4b configuration: a Qwen3.5 text trunk plus the System One readout (special tokens, readout block, heads)."""
from transformers import PretrainedConfig
class TauConfig(PretrainedConfig):
model_type = "tau"
def __init__(
self,
trunk: dict | None = None,
special_base: int = 248_320,
special_tokens: list[str] | None = None,
readout_layers: int = 2,
readout_heads: int = 8,
pointer_dim: int = 256,
max_tokens: int = 32_768,
**kwargs,
):
self.trunk = trunk or {} # Qwen3_5TextConfig as a dict
self.special_base = special_base # id of the first control token (= trunk vocabulary size)
self.special_tokens = special_tokens or []
self.readout_layers = readout_layers
self.readout_heads = readout_heads
self.pointer_dim = pointer_dim
self.max_tokens = max_tokens # state + question; longer states are cut at the end
super().__init__(**kwargs)