MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / parse_model_string

Function parse_model_string

optillm/inference.py:2144–2157  ·  view source on GitHub ↗

Parse the model string to extract base model and adapter IDs

(model: str)

Source from the content-addressed store, hash-verified

2142 return InferenceClient()
2143
2144def parse_model_string(model: str) -> ModelConfig:
2145 """Parse the model string to extract base model and adapter IDs"""
2146 parts = model.split('+')
2147 base_model_id = parts[0]
2148 adapter_ids = parts[1:] if len(parts) > 1 else None
2149
2150 return ModelConfig(
2151 base_model_id=base_model_id,
2152 adapter_ids=adapter_ids,
2153 use_memory_efficient_attention=False,
2154 quantization_bits=0,
2155 enable_prompt_caching=False,
2156 dynamic_temperature=False,
2157 )
2158
2159def get_effort_profile(reasoning_effort: str, max_tokens: int = 4096) -> dict:
2160 """Get reasoning effort profile based on specified level and max tokens.

Callers 1

get_pipelineMethod · 0.85

Calls 1

ModelConfigClass · 0.85

Tested by

no test coverage detected