File size: 808 Bytes
dbe34a1
 
 
 
 
 
 
 
7af337e
 
 
 
 
 
dbe34a1
 
 
 
7af337e
dbe34a1
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env node
import { estimateFit } from './core.mjs';

const args = Object.fromEntries(process.argv.slice(2).map((arg) => {
  const [k, v] = arg.replace(/^--/, '').split('=');
  return [k, v ?? true];
}));

const profile = {
  ramGB: Number(args.ram ?? 16),
  vramGB: Number(args.vram ?? 8),
  cpuTier: String(args.cpu ?? 'mid'),
  platform: String(args.platform ?? 'apple-silicon'),
};

const rows = estimateFit(profile);

console.log('\nllm-fit — Can my laptop run this model?\n');
console.log(`Profile: RAM ${profile.ramGB}GB | VRAM ${profile.vramGB}GB | CPU ${profile.cpuTier} | ${profile.platform}\n`);

for (const r of rows) {
  console.log(`${r.status}  ${r.name}`);
  console.log(`   ~${r.estTokSec} tok/s | min VRAM ${r.minVramGB}GB | cmd: ${r.cmd}`);
  console.log(`   ${r.reason}\n`);
}