| 10 | |
| 11 | @dataclass |
| 12 | class GptParams: |
| 13 | seed: int = -1 |
| 14 | n_threads: int = min(4, os.cpu_count() or 1) |
| 15 | n_predict: int = 128 |
| 16 | n_parts: int = -1 |
| 17 | n_ctx: int = 512 |
| 18 | n_batch: int = 8 |
| 19 | n_keep: int = 0 |
| 20 | |
| 21 | ignore_eos: bool = False |
| 22 | logit_bias: dict[int, float] = field(default_factory=dict) |
| 23 | top_k: int = 40 |
| 24 | top_p: float = 0.95 |
| 25 | tfs_z: float = 1.00 |
| 26 | typical_p: float = 1.00 |
| 27 | temp: float = 0.80 |
| 28 | repeat_penalty: float = 1.10 |
| 29 | repeat_last_n: int = 64 |
| 30 | frequency_penalty: float = 0.0 |
| 31 | presence_penalty: float = 0.0 |
| 32 | mirostat: int = 0 |
| 33 | mirostat_tau: float = 5.0 |
| 34 | mirostat_eta: float = 0.1 |
| 35 | |
| 36 | model: str = "./models/llama-7B/ggml-model.bin" |
| 37 | prompt: str = "" |
| 38 | path_session: str = "" |
| 39 | input_prefix: str = " " |
| 40 | input_suffix: str = "" |
| 41 | antiprompt: List[str] = field(default_factory=list) |
| 42 | |
| 43 | lora_adapter: str = "" |
| 44 | lora_base: str = "" |
| 45 | |
| 46 | memory_f16: bool = True |
| 47 | random_prompt: bool = False |
| 48 | use_color: bool = False |
| 49 | interactive: bool = False |
| 50 | |
| 51 | embedding: bool = False |
| 52 | interactive_start: bool = False |
| 53 | |
| 54 | instruct: bool = False |
| 55 | penalize_nl: bool = True |
| 56 | perplexity: bool = False |
| 57 | use_mmap: bool = True |
| 58 | use_mlock: bool = False |
| 59 | mem_test: bool = False |
| 60 | verbose_prompt: bool = False |
| 61 | |
| 62 | file: str = None |
| 63 | |
| 64 | # If chat ended prematurely, append this to the conversation to fix it. |
| 65 | # Set to "\nUser:" etc. |
| 66 | # This is an alternative to input_prefix which always adds it, so it potentially duplicates "User:"" |
| 67 | fix_prefix: str = "" |
| 68 | input_echo: bool = (True,) |
| 69 |
no outgoing calls
no test coverage detected
searching dependent graphs…