ModelConfig
from modal_dojo import ModelConfigDefines 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
Section titled “download”download() -> NoneDownload or materialize weights into the model volume.
parse_response
Section titled “parse_response”parse_response(text: str) -> ParsedResponseParse model text with response_parser.
Without a configured parser, the model text becomes ParsedResponse.content.
Returns
Parsed model output.