(modelId: string)
| 566 | } |
| 567 | |
| 568 | function approxModelSizeB(modelId: string): number { |
| 569 | const colon = modelId.match(/:(\d+(?:\.\d+)?)b/i); |
| 570 | if (colon) return parseFloat(colon[1]!); |
| 571 | const x = modelId.match(/(\d+)x(\d+)b/i); |
| 572 | if (x) return parseInt(x[1]!, 10) * parseInt(x[2]!, 10) * 0.3; |
| 573 | if (/72b/.test(modelId)) return 72; |
| 574 | if (/v3$/i.test(modelId)) return 50; |
| 575 | return 0; // unknown |
| 576 | } |
| 577 | |
| 578 | /** Write the assembled config to disk, merging with existing values. */ |
| 579 | async function writeConfig(picks: { |
no outgoing calls
no test coverage detected