(modelPath: string)
| 169 | * einen anderen machen, und der Name ist das, was der Leser gegen das ADR haelt. |
| 170 | */ |
| 171 | export function modelDisplayName(modelPath: string): string { |
| 172 | const base = modelPath.split('/').pop() ?? modelPath; |
| 173 | const withoutExtension = base.replace(/\.gguf$/i, ''); |
| 174 | const withoutQuant = withoutExtension.replace(/[-_.](?:Q\d+_[A-Z0-9_]+|F16|F32|BF16)$/i, ''); |
| 175 | return withoutQuant.length > 0 ? withoutQuant : base; |
| 176 | } |
| 177 | |
| 178 | /** Byte in eine Zeile, die ein Mensch liest. Basis 1024, wie jeder Modell-Downloader. */ |
| 179 | export function humanBytes(bytes: number): string { |
no outgoing calls
no test coverage detected