llm-checker 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,6 +17,7 @@
17
17
  <a href="https://www.npmjs.com/package/llm-checker"><img src="https://img.shields.io/npm/v/llm-checker?style=flat-square&color=0066FF" alt="npm version"></a>
18
18
  <a href="https://www.npmjs.com/package/llm-checker"><img src="https://img.shields.io/npm/dm/llm-checker?style=flat-square&color=0066FF" alt="npm downloads"></a>
19
19
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-0066FF?style=flat-square" alt="License"></a>
20
+ <a href="https://discord.gg/mnmYrA7T"><img src="https://img.shields.io/discord/1457032977849520374?style=flat-square&color=0066FF&label=Discord" alt="Discord"></a>
20
21
  <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D16-0066FF?style=flat-square" alt="Node.js"></a>
21
22
  </p>
22
23
 
@@ -26,7 +27,8 @@
26
27
  <a href="#claude-code-mcp">Claude MCP</a> &bull;
27
28
  <a href="#commands">Commands</a> &bull;
28
29
  <a href="#scoring-system">Scoring</a> &bull;
29
- <a href="#supported-hardware">Hardware</a>
30
+ <a href="#supported-hardware">Hardware</a> &bull;
31
+ <a href="https://discord.gg/mnmYrA7T"><img src="https://cdn.simpleicons.org/discord/0066FF" alt="Discord" width="14" height="14"> Discord</a>
30
32
  </p>
31
33
 
32
34
  ---
@@ -43,7 +45,7 @@ Choosing the right LLM for your hardware is complex. With thousands of model var
43
45
 
44
46
  | | Feature | Description |
45
47
  |:---:|---|---|
46
- | **35+** | Curated Models | Hand-picked catalog covering all major families and sizes (1B-32B) |
48
+ | **200+** | Dynamic Model Pool | Uses full scraped Ollama catalog/variants when available (with curated fallback) |
47
49
  | **4D** | Scoring Engine | Quality, Speed, Fit, Context &mdash; weighted by use case |
48
50
  | **Multi-GPU** | Hardware Detection | Apple Silicon, NVIDIA CUDA, AMD ROCm, Intel Arc, CPU |
49
51
  | **Calibrated** | Memory Estimation | Bytes-per-parameter formula validated against real Ollama sizes |
@@ -52,6 +54,20 @@ Choosing the right LLM for your hardware is complex. With thousands of model var
52
54
 
53
55
  ---
54
56
 
57
+ ## Comparison with Other Tooling (e.g. `llmfit`)
58
+
59
+ LLM Checker and `llmfit` solve related but different problems:
60
+
61
+ | Tool | Primary Focus | Typical Output |
62
+ |------|---------------|----------------|
63
+ | **LLM Checker** | Hardware-aware **model selection** for local inference | Ranked recommendations, compatibility scores, pull/run commands |
64
+ | **llmfit** | LLM workflow support and model-fit evaluation from another angle | Different optimization workflow and selection heuristics |
65
+
66
+ If your goal is: *"What should I run on this exact machine right now?"*, use **LLM Checker** first.
67
+ If your goal is broader experimentation across custom pipelines, using both tools can be complementary.
68
+
69
+ ---
70
+
55
71
  ## Installation
56
72
 
57
73
  ```bash
@@ -73,6 +89,32 @@ npm install sql.js
73
89
 
74
90
  ---
75
91
 
92
+ ## Distribution
93
+
94
+ LLM Checker is published in all primary channels:
95
+
96
+ - npm (latest): [`llm-checker@3.2.1`](https://www.npmjs.com/package/llm-checker)
97
+ - GitHub Release: [`v3.2.1` (2026-02-17)](https://github.com/Pavelevich/llm-checker/releases/tag/v3.2.1)
98
+ - GitHub Packages: [`@pavelevich/llm-checker`](https://github.com/users/Pavelevich/packages/npm/package/llm-checker)
99
+
100
+ ### v3.2.1 Highlights
101
+
102
+ - Added vLLM/MLX runtime support and speculative decoding estimation.
103
+ - Improved GPU detection, added DGX Spark/GB10 support, strengthened Node runtime guards, and updated tooling comparison notes.
104
+
105
+ ### Optional: Install from GitHub Packages
106
+
107
+ ```bash
108
+ # 1) Configure registry + token (PAT with read:packages)
109
+ echo "@pavelevich:registry=https://npm.pkg.github.com" >> ~/.npmrc
110
+ echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrc
111
+
112
+ # 2) Install
113
+ npm install -g @pavelevich/llm-checker@3.2.1
114
+ ```
115
+
116
+ ---
117
+
76
118
  ## Quick Start
77
119
 
78
120
  ```bash
@@ -184,6 +226,58 @@ Claude will automatically call the right tools and give you actionable results.
184
226
  | `search <query>` | Search models with filters and intelligent scoring |
185
227
  | `smart-recommend` | Advanced recommendations using the full scoring engine |
186
228
 
229
+ ### Enterprise Policy Commands
230
+
231
+ | Command | Description |
232
+ |---------|-------------|
233
+ | `policy init` | Generate a `policy.yaml` template for enterprise governance |
234
+ | `policy validate` | Validate a policy file and return non-zero on schema errors |
235
+ | `audit export` | Evaluate policy outcomes and export compliance reports (`json`, `csv`, `sarif`) |
236
+
237
+ ### Policy Enforcement in `check` and `recommend`
238
+
239
+ Both `check` and `recommend` support `--policy <file>`.
240
+
241
+ - In `audit` mode, policy violations are reported but the command exits with `0`.
242
+ - In `enforce` mode, blocking violations return non-zero (default `1`).
243
+ - You can override the non-zero code with `enforcement.exit_code` in `policy.yaml`.
244
+
245
+ Examples:
246
+
247
+ ```bash
248
+ llm-checker check --policy ./policy.yaml
249
+ llm-checker check --policy ./policy.yaml --use-case coding --runtime vllm
250
+ llm-checker recommend --policy ./policy.yaml --category coding
251
+ ```
252
+
253
+ ### Policy Audit Export
254
+
255
+ Use `audit export` when you need machine-readable compliance evidence for CI/CD gates, governance reviews, or security tooling.
256
+
257
+ ```bash
258
+ # Single report format
259
+ llm-checker audit export --policy ./policy.yaml --command check --format json --out ./reports/check-policy.json
260
+
261
+ # Export all configured formats (json, csv, sarif)
262
+ llm-checker audit export --policy ./policy.yaml --command check --format all --out-dir ./reports
263
+ ```
264
+
265
+ - `--command check|recommend` chooses the candidate source.
266
+ - `--format all` honors `reporting.formats` in your policy (falls back to `json,csv,sarif`).
267
+ - In `enforce` mode with blocking violations, reports are still written before non-zero exit.
268
+
269
+ ### Provenance Fields in Reports
270
+
271
+ Each finding includes normalized model provenance fields:
272
+
273
+ - `source`
274
+ - `registry`
275
+ - `version`
276
+ - `license`
277
+ - `digest`
278
+
279
+ If a field is unavailable from model metadata, reports use `"unknown"` instead of omitting the field. This keeps downstream parsers deterministic.
280
+
187
281
  ### AI Commands
188
282
 
189
283
  | Command | Description |
@@ -263,7 +357,9 @@ llm-checker search qwen --quant Q4_K_M --max-size 8
263
357
 
264
358
  ## Model Catalog
265
359
 
266
- The built-in catalog includes 35+ models from the most popular Ollama families:
360
+ LLM Checker prioritizes the full scraped Ollama model cache (all families/sizes/variants) and falls back to a built-in curated catalog when cache is unavailable.
361
+
362
+ The curated fallback catalog includes 35+ models from the most popular Ollama families:
267
363
 
268
364
  | Family | Models | Best For |
269
365
  |--------|--------|----------|
@@ -277,7 +373,7 @@ The built-in catalog includes 35+ models from the most popular Ollama families:
277
373
  | **LLaVA** | 7B, 13B | Vision |
278
374
  | **Embeddings** | nomic-embed-text, mxbai-embed-large, bge-m3, all-minilm | RAG, search |
279
375
 
280
- Models are automatically combined with any locally installed Ollama models for scoring.
376
+ All available models are automatically combined with locally installed Ollama models for scoring.
281
377
 
282
378
  ---
283
379
 
@@ -404,7 +500,7 @@ The selector automatically picks the best quantization that fits your available
404
500
 
405
501
  **Selector Pipeline:**
406
502
  1. **Hardware profiling** &mdash; CPU, GPU, RAM, acceleration backend
407
- 2. **Model pool** &mdash; Merge catalog + installed Ollama models (deduped)
503
+ 2. **Model pool** &mdash; Merge full Ollama scraped pool (or curated fallback) + installed models (deduped)
408
504
  3. **Category filter** &mdash; Keep models relevant to the use case
409
505
  4. **Quantization selection** &mdash; Best quant that fits in memory budget
410
506
  5. **4D scoring** &mdash; Q, S, F, C with category-specific weights
@@ -463,7 +559,7 @@ src/
463
559
  deterministic-selector.js # Primary selection algorithm
464
560
  scoring-config.js # Centralized scoring weights
465
561
  scoring-engine.js # Advanced scoring (smart-recommend)
466
- catalog.json # Curated model catalog (35+ models)
562
+ catalog.json # Curated fallback catalog (35+ models)
467
563
  ai/
468
564
  multi-objective-selector.js # Multi-objective optimization
469
565
  ai-check-selector.js # LLM-based evaluation
@@ -487,6 +583,9 @@ MIT License &mdash; see [LICENSE](LICENSE) for details.
487
583
 
488
584
  <p align="center">
489
585
  <a href="https://github.com/Pavelevich/llm-checker">GitHub</a> &bull;
586
+ <a href="https://github.com/Pavelevich/llm-checker/releases">Releases</a> &bull;
490
587
  <a href="https://www.npmjs.com/package/llm-checker">npm</a> &bull;
491
- <a href="https://github.com/Pavelevich/llm-checker/issues">Issues</a>
588
+ <a href="https://github.com/users/Pavelevich/packages/npm/package/llm-checker">GitHub Packages</a> &bull;
589
+ <a href="https://github.com/Pavelevich/llm-checker/issues">Issues</a> &bull;
590
+ <a href="https://discord.gg/mnmYrA7T">Discord</a>
492
591
  </p>
@@ -1,4 +1,10 @@
1
1
  const { getLogger } = require('../src/utils/logger');
2
+ const {
3
+ normalizeRuntime,
4
+ getRuntimeDisplayName,
5
+ runtimeSupportedOnHardware,
6
+ runtimeSupportsSpeculativeDecoding
7
+ } = require('../src/runtime/runtime-support');
2
8
 
3
9
  class CompatibilityAnalyzer {
4
10
  constructor() {
@@ -451,6 +457,7 @@ class CompatibilityAnalyzer {
451
457
 
452
458
  generateRecommendations(hardware, results, options = {}) {
453
459
  const recommendations = [];
460
+ const runtime = normalizeRuntime(options.runtime || 'ollama');
454
461
  const tier = this.getHardwareTier(hardware);
455
462
 
456
463
  if (hardware.memory.total < 16) {
@@ -511,6 +518,19 @@ class CompatibilityAnalyzer {
511
518
  }
512
519
  }
513
520
 
521
+ if (runtime !== 'ollama') {
522
+ const runtimeLabel = getRuntimeDisplayName(runtime);
523
+ if (runtimeSupportedOnHardware(runtime, hardware)) {
524
+ recommendations.push(`Runtime selected: ${runtimeLabel}`);
525
+ } else {
526
+ recommendations.push(`${runtimeLabel} is not recommended on this hardware (fallback to Ollama).`);
527
+ }
528
+
529
+ if (runtimeSupportsSpeculativeDecoding(runtime)) {
530
+ recommendations.push(`Enable speculative decoding in ${runtimeLabel} for higher throughput.`);
531
+ }
532
+ }
533
+
514
534
  return recommendations;
515
535
  }
516
536
 
package/bin/cli.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const majorNodeVersion = Number.parseInt(process.versions.node.split('.')[0], 10);
5
+
6
+ if (!Number.isFinite(majorNodeVersion) || majorNodeVersion < 16) {
7
+ console.error(
8
+ `[llm-checker] Unsupported Node.js version: ${process.versions.node}. ` +
9
+ 'Please use Node.js 16 or newer.'
10
+ );
11
+ process.exit(1);
12
+ }
13
+
14
+ require('./enhanced_cli');