Skip to content
Repo

ModelConfig

from modal_dojo import ModelConfig

Defines model identity, weight download, and response parsing.

Attributes

model_name str

Hugging Face repo id or other weight identifier. Default: ""

model_path str | None

Local directory of already-downloaded weights, if any.

architecture ModelArchitecture | None

Megatron transformer sizes used for conversion and training.

response_parser Callable[[str], ParsedResponse] | None

Turns raw model text into a ParsedResponse.

requires_bshd bool

Use padded (bshd) batches so training skips the THD packing path. Default: False

audio_placeholder str

Token sequence the processor expands at <|audio_pad|>. Raw audio in the prompt OOMs. Default: ""

download() -> None

Download or materialize weights into the model volume.

parse_response(text: str) -> ParsedResponse

Parse model text with response_parser.

Without a configured parser, the model text becomes ParsedResponse.content.

Returns

Parsed model output.