| 91 | |
| 92 | @dataclass |
| 93 | class 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 |
no outgoing calls
no test coverage detected