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

Class ModelConfig

optillm/inference.py:93–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92@dataclass
93class ModelConfig:
94 base_model_id: str
95 adapter_ids: Optional[List[str]] = None
96 batch_size: int = 32
97 max_cache_size: int = 5
98 quantization_bits: int = 4
99 device_preference: Optional[str] = None
100 # Default generation parameters
101 max_new_tokens: int = 4096
102 do_sample: bool = True
103 top_p: float = 0.9
104 top_k: int = 50
105 temperature: float = 0.7
106 num_return_sequences: int = 1
107 repetition_penalty: float = 1.0
108 pad_token_id: Optional[int] = None
109 logprobs: bool = False
110 # Advanced parameters
111 use_memory_efficient_attention: bool = True
112 enable_prompt_caching: bool = True
113 dynamic_temperature: bool = False
114
115
116@dataclass

Callers 1

parse_model_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected