cn0303 commited on
Commit
0348ce3
·
verified ·
1 Parent(s): de063cc

Buy advice: verified, dated prices with live price links per build

Browse files
Files changed (3) hide show
  1. engine/real_advisor.py +56 -32
  2. static/app.js +1 -0
  3. static/style.css +8 -0
engine/real_advisor.py CHANGED
@@ -690,65 +690,86 @@ def advise_real(payload: dict, spec: HardwareSpec, extra_entries: list | None =
690
  # card. Prices are rough mid-2026 street figures (the DRAM shortage moved them),
691
  # shown as guidance, not gospel. Sources: TechPowerUp/Tom's (bandwidth), vendor
692
  # pages; software-support notes from ROCm/MLX/CUDA reporting.
 
 
 
 
 
 
 
 
 
693
  _PLATFORMS = [
694
  {
695
  "key": "nvidia", "name": "NVIDIA PC", "icon": "brand-nvidia",
696
  "blurb": "The path of least resistance: CUDA, so every tool just works. Best if you might fine-tune.",
697
  "tiers": [
698
- ("RTX 5060 Ti 16GB build", "~$1,000", dict(ram_gb=32, vram_gb=16, vendor="nvidia"),
699
  "8-core CPU, 32 GB DDR5, RTX 5060 Ti 16GB, 1 TB NVMe",
700
- "16 GB of VRAM is the real sweet spot: it runs 13-14B models comfortably and starts to fine-tune 7B with QLoRA. The 5060 Ti's narrow memory bus makes it slower than a 5070 Ti, but it is the cheapest 16 GB CUDA card. Desktop over laptop here: you get more VRAM per dollar and can swap the GPU later."),
701
- ("RTX 5070 Ti build", "~$1,500", dict(ram_gb=32, vram_gb=16, vendor="nvidia"),
 
702
  "8-core CPU, 32-64 GB DDR5, RTX 5070 Ti 16GB, 2 TB NVMe",
703
- "Same 16 GB ceiling but much faster generation (896 GB/s). The mainstream pick for someone who wants snappy local AI without overspending. A desktop card runs cooler and faster under sustained load than the same chip in a laptop, which throttles."),
704
- ("RTX 4090 / 24 GB build", "~$2,400", dict(ram_gb=64, vram_gb=24, vendor="nvidia"),
 
705
  "12-core CPU, 64 GB DDR5, 24 GB GPU (RTX 4090, used), 2 TB NVMe",
706
- "24 GB runs ~30B models comfortably and QLoRA-fine-tunes up to ~30B. The 4090 is end-of-life and scarcity-priced, so buy used carefully or wait for a 24 GB 50-series. 64 GB of system RAM lets big models spill over when needed."),
707
- ("RTX 5090 build", "~$3,800", dict(ram_gb=64, vram_gb=32, vendor="nvidia"),
 
708
  "12-16 core CPU, 64-128 GB DDR5, RTX 5090 32GB, 2 TB NVMe",
709
- "The fastest consumer card and the only one with 32 GB, so it runs ~30B at full speed and big diffusion models. Workstation territory in price. If you mainly fine-tune, two 24 GB cards can beat one 5090 for multi-GPU training."),
 
710
  ],
711
  },
712
  {
713
  "key": "amd", "name": "AMD PC", "icon": "brand-amd",
714
  "blurb": "Cheaper VRAM for inference. On Windows use the Vulkan path (LM Studio); rougher for training.",
715
  "tiers": [
716
- ("RX 9070 XT build", "~$1,200", dict(ram_gb=32, vram_gb=16, vendor="amd"),
717
  "8-core CPU, 32 GB DDR5, Radeon RX 9070 XT 16GB, 2 TB NVMe",
718
- "16 GB at a good price; runs up to ~14B models well. For 'open a model and chat' the AMD-vs-NVIDIA gap is now mostly price. Caveat: on Windows use llama.cpp / LM Studio via Vulkan (near plug-and-play); ROCm is Linux-first and fine-tuning support lags CUDA."),
719
- ("RX 7900 XTX build", "~$1,500", dict(ram_gb=64, vram_gb=24, vendor="amd"),
 
720
  "12-core CPU, 64 GB DDR5, Radeon RX 7900 XTX 24GB, 2 TB NVMe",
721
- "The AMD standout for local AI: 24 GB and 960 GB/s for under $1k on the card, runs 70B at 4-bit. Best VRAM-per-dollar at this tier. Still AMD-software caveats for training, but excellent for inference."),
 
722
  ],
723
  },
724
  {
725
  "key": "apple", "name": "Mac (Apple Silicon)", "icon": "brand-apple",
726
  "blurb": "Unified memory runs models no consumer GPU can hold, quietly and efficiently. Inference-focused.",
727
  "tiers": [
728
- ("Mac mini / Air M4, 16 GB", "~$1,000", dict(ram_gb=16, apple=True),
729
  "Apple M4, 16 GB unified memory",
730
- "The shared memory pool means the GPU can use almost all 16 GB. Runs small and mid models quietly. Buy the RAM you need up front: Apple memory is soldered and cannot be upgraded later, ever."),
731
- ("Mac M4 Pro, 36 GB", "~$1,700", dict(ram_gb=36, apple=True),
732
- "Apple M4 Pro, 36 GB unified memory, 273 GB/s",
733
- "A strong quiet inference machine: 36 GB holds ~30B-class models, and the Pro's higher bandwidth keeps them usable. Great everyday computer too. Weaker than NVIDIA for fine-tuning (MLX does small LoRA; real training wants CUDA)."),
734
- ("Mac M4 Max, 64 GB", "~$2,800", dict(ram_gb=64, apple=True),
 
 
735
  "Apple M4 Max, 64 GB unified memory, 410-546 GB/s",
736
- "64 GB of unified memory runs models a 24 GB GPU simply cannot load, at higher bandwidth than the mini-PC boxes. The sweet spot for running big models quietly. Studio (desktop) or MacBook Pro (laptop) both work; the Studio sustains load better."),
737
- ("Mac Studio M4 Max / Ultra, 128 GB+", "~$4,000+", dict(ram_gb=128, apple=True),
738
- "Apple M4 Max / M3 Ultra, 128-512 GB unified memory",
739
- "Capacity king: 128 GB holds 70-120B-class models, and an M3 Ultra at 512 GB holds 600B+ MoE models no other single box can. The win is capacity and quiet, not raw speed (a 5090 is faster on whatever fits its 32 GB)."),
 
 
740
  ],
741
  },
742
  {
743
  "key": "mini", "name": "Mini-PC (unified memory)", "icon": "monitor",
744
  "blurb": "Big models in a small, silent, low-power box. They fit huge models; they run them at a steady jog, not a sprint.",
745
  "tiers": [
746
- ("Ryzen AI Max+ 395, 64 GB", "~$1,500", dict(ram_gb=64, unified=True, vendor="amd"),
747
  "AMD Ryzen AI Max+ 395 'Strix Halo', 64 GB unified memory, ~256 GB/s",
748
- "16 Zen 5 cores plus a strong integrated GPU sharing 64 GB, in a tiny quiet box, no discrete card. Runs ~30B comfortably. Bandwidth is far below a discrete GPU, so big models fit and are usable but not fast. Vulkan works well; ROCm is fiddlier."),
749
- ("Ryzen AI Max+ 395, 128 GB", "~$2,400", dict(ram_gb=128, unified=True, vendor="amd"),
 
750
  "AMD Ryzen AI Max+ 395 'Strix Halo', 128 GB unified memory, ~256 GB/s",
751
- "128 GB of unified memory runs 70B-class models (AMD demos 128B in LM Studio) for far less than a Mac with the same capacity, and sips power. Best capacity-per-dollar for big-model experimentation; accept moderate speed. The DGX Spark is a CUDA-compatible alternative but costs ~2x and is slower per token."),
 
752
  ],
753
  },
754
  ]
@@ -800,7 +821,7 @@ def min_specs(usecases, mode: str = "run") -> dict:
800
  # old logic collapsed them whenever the cheapest tier
801
  # already ran everything great.
802
  built = []
803
- for i, (label, price, hw, spec_line, detail) in enumerate(tiers):
804
  spec = _spec_for_tier(hw)
805
  per_goal, all_meet, all_great = [], True, True
806
  for uc in ucs:
@@ -811,7 +832,7 @@ def min_specs(usecases, mode: str = "run") -> dict:
811
  "model": res["headline_model"] or "nothing realistic",
812
  "verdict": res["verdict"]})
813
  tier = {"label": label, "price": price, "spec": spec_line, "detail": detail,
814
- "goals": per_goal,
815
  "runs": "; ".join(f"{g['goal']}: {g['model']}" for g in per_goal)
816
  if len(per_goal) > 1 else per_goal[0]["model"]}
817
  built.append({"idx": i, "tier": tier, "all_meet": all_meet,
@@ -843,12 +864,15 @@ def min_specs(usecases, mode: str = "run") -> dict:
843
  "goals": [uc.plain_name for uc in ucs],
844
  "mode": mode,
845
  "catalogue_version": catalogue_date(),
 
846
  "note": " ".join(notes),
847
  "platforms": platforms,
848
- "disclaimer": (f"Two honest builds per platform: the cheapest that genuinely lets you "
849
- f"{verb} these goals, and the one that does it comfortably. Click any card "
850
- f"for what to look for. Prices are rough mid-2026 street figures and drift; "
851
- f"the memory math is the same conservative engine as the main check."
 
 
852
  + (" Builds cover the union of every goal you picked: each must work."
853
  if len(ucs) > 1 else "")),
854
  }
 
690
  # card. Prices are rough mid-2026 street figures (the DRAM shortage moved them),
691
  # shown as guidance, not gospel. Sources: TechPowerUp/Tom's (bandwidth), vendor
692
  # pages; software-support notes from ROCm/MLX/CUDA reporting.
693
+ # Prices below are dated, research-verified APPROXIMATIONS (US, complete systems),
694
+ # not live quotes and not hardcoded training-era guesses: each carries a `link`
695
+ # to a live price source (Apple's own config page; the vendor product page for
696
+ # the mini-PCs; a price tracker for the GPU builds) so the reader can always see
697
+ # the current number even as ours ages. A 2026 LPDDR5X/DRAM shortage is inflating
698
+ # GPU, Mac-memory and mini-PC prices, so these skew upward and drift; the link is
699
+ # the source of truth. Last checked June 2026.
700
+ _PRICE_CHECKED = "June 2026"
701
+
702
  _PLATFORMS = [
703
  {
704
  "key": "nvidia", "name": "NVIDIA PC", "icon": "brand-nvidia",
705
  "blurb": "The path of least resistance: CUDA, so every tool just works. Best if you might fine-tune.",
706
  "tiers": [
707
+ ("RTX 5060 Ti 16GB build", "$1,070-1,270", dict(ram_gb=32, vram_gb=16, vendor="nvidia"),
708
  "8-core CPU, 32 GB DDR5, RTX 5060 Ti 16GB, 1 TB NVMe",
709
+ "16 GB of VRAM is the real sweet spot: it runs 13-14B models comfortably and starts to fine-tune 7B with QLoRA. The cheapest 16 GB CUDA card, about $570 for the GPU alone in mid-2026 (above its $429 launch price on AI demand), with a narrow memory bus that makes it slower than a 5070 Ti. Desktop over laptop: more VRAM per dollar and a swappable GPU.",
710
+ "https://bestvaluegpu.com/history/new-and-used-rtx-5060-ti-16gb-price-history-and-specs/"),
711
+ ("RTX 5070 Ti build", "$1,480-1,680", dict(ram_gb=32, vram_gb=16, vendor="nvidia"),
712
  "8-core CPU, 32-64 GB DDR5, RTX 5070 Ti 16GB, 2 TB NVMe",
713
+ "Same 16 GB ceiling but much faster generation (896 GB/s). The mainstream pick for snappy local AI. The GPU alone is about $980 in mid-2026, above its $749 launch price on scarcity. A desktop card sustains load better than the throttled laptop chip.",
714
+ "https://bestvaluegpu.com/history/new-and-used-rtx-5070-ti-price-history-and-specs/"),
715
+ ("RTX 4090 / 24 GB build (used GPU)", "$2,900-3,100", dict(ram_gb=64, vram_gb=24, vendor="nvidia"),
716
  "12-core CPU, 64 GB DDR5, 24 GB GPU (RTX 4090, used), 2 TB NVMe",
717
+ "24 GB runs ~30B models comfortably and QLoRA-fine-tunes up to ~30B. The 4090 is discontinued and now trades ABOVE its $1,599 launch price (around $2,400 used) because 24 GB is in AI demand. Buy used carefully, or consider a 24 GB 50-series. 64 GB system RAM lets big models spill over.",
718
+ "https://bestvaluegpu.com/history/new-and-used-rtx-4090-price-history-and-specs/"),
719
+ ("RTX 5090 build", "$4,500-5,000", dict(ram_gb=64, vram_gb=32, vendor="nvidia"),
720
  "12-16 core CPU, 64-128 GB DDR5, RTX 5090 32GB, 2 TB NVMe",
721
+ "The fastest consumer card and the only one with 32 GB, so it runs ~30B at full speed and big diffusion models. Street prices sit near twice the $1,999 launch price (about $4,000-4,300 for the GPU alone in mid-2026) on AI demand plus the DRAM shortage. Workstation money. If you mainly fine-tune, two 24 GB cards can beat one 5090.",
722
+ "https://bestvaluegpu.com/history/new-and-used-rtx-5090-price-history-and-specs/"),
723
  ],
724
  },
725
  {
726
  "key": "amd", "name": "AMD PC", "icon": "brand-amd",
727
  "blurb": "Cheaper VRAM for inference. On Windows use the Vulkan path (LM Studio); rougher for training.",
728
  "tiers": [
729
+ ("RX 9070 XT build", "$1,150-1,500", dict(ram_gb=32, vram_gb=16, vendor="amd"),
730
  "8-core CPU, 32 GB DDR5, Radeon RX 9070 XT 16GB, 2 TB NVMe",
731
+ "16 GB at a good price; runs up to ~14B models well. The GPU alone is about $650-800 in mid-2026 (above its $599 launch). For 'open a model and chat' the AMD-vs-NVIDIA gap is mostly price. Caveat: on Windows use llama.cpp / LM Studio via Vulkan; ROCm is Linux-first and fine-tuning support lags CUDA.",
732
+ "https://bestvaluegpu.com/history/new-and-used-rx-9070-xt-price-history-and-specs/"),
733
+ ("RX 7900 XTX build", "$1,500-2,000", dict(ram_gb=64, vram_gb=24, vendor="amd"),
734
  "12-core CPU, 64 GB DDR5, Radeon RX 7900 XTX 24GB, 2 TB NVMe",
735
+ "The AMD standout for local AI: 24 GB and 960 GB/s, runs 70B at 4-bit. End-of-life now, so the card is about $1,030-1,340 new (around $800 used, the value route). Best VRAM-per-dollar at this tier. Still AMD-software caveats for training, but excellent for inference.",
736
+ "https://bestvaluegpu.com/history/new-and-used-rx-7900-xtx-price-history-and-specs/"),
737
  ],
738
  },
739
  {
740
  "key": "apple", "name": "Mac (Apple Silicon)", "icon": "brand-apple",
741
  "blurb": "Unified memory runs models no consumer GPU can hold, quietly and efficiently. Inference-focused.",
742
  "tiers": [
743
+ ("Mac mini M4, 16 GB", "$799", dict(ram_gb=16, apple=True),
744
  "Apple M4, 16 GB unified memory",
745
+ "The cheapest way into Apple Silicon AI, at Apple's $799 list (the old $599 base was dropped in May 2026). The shared memory pool lets the GPU use almost all 16 GB; runs small and mid models quietly. Buy the RAM up front: Apple memory is soldered and can never be upgraded. (The MacBook Air is now M5 and pricier.)",
746
+ "https://www.apple.com/shop/buy-mac/mac-mini"),
747
+ ("Mac mini M4 Pro, 48 GB", "$1,799-1,999", dict(ram_gb=48, apple=True),
748
+ "Apple M4 Pro, 48 GB unified memory, 273 GB/s",
749
+ "A strong quiet inference machine: 48 GB holds ~30B-class models and the M4 Pro's higher bandwidth keeps them usable. Apple dropped the 36 GB option, so the M4 Pro mini now comes as 24 or 48 GB. Weaker than NVIDIA for fine-tuning (MLX does small LoRA; real training wants CUDA).",
750
+ "https://www.apple.com/shop/buy-mac/mac-mini"),
751
+ ("Mac Studio M4 Max, 64 GB", "$2,699", dict(ram_gb=64, apple=True),
752
  "Apple M4 Max, 64 GB unified memory, 410-546 GB/s",
753
+ "64 GB of unified memory runs models a 24 GB GPU cannot load, at higher bandwidth than the mini-PC boxes. 64 GB is now the top M4 Max config (the 128 GB tier was culled in the 2026 memory shortage). The sweet spot for running big models quietly.",
754
+ "https://www.apple.com/shop/buy-mac/mac-studio"),
755
+ ("Mac Studio M3 Ultra, 96 GB", "$3,999", dict(ram_gb=96, apple=True),
756
+ "Apple M3 Ultra, 96 GB unified memory",
757
+ "Capacity king of the current lineup: 96 GB holds ~70B-class models quietly. Apple temporarily pulled the 128/256/512 GB Studio tiers in the 2026 memory shortage (expected back with the M5 Studio), so 96 GB is today's Apple ceiling. The win is capacity and quiet, not raw speed (a 5090 is faster on whatever fits its 32 GB).",
758
+ "https://www.apple.com/shop/buy-mac/mac-studio"),
759
  ],
760
  },
761
  {
762
  "key": "mini", "name": "Mini-PC (unified memory)", "icon": "monitor",
763
  "blurb": "Big models in a small, silent, low-power box. They fit huge models; they run them at a steady jog, not a sprint.",
764
  "tiers": [
765
+ ("Ryzen AI Max+ 395, 64 GB", "$1,499-1,700", dict(ram_gb=64, unified=True, vendor="amd"),
766
  "AMD Ryzen AI Max+ 395 'Strix Halo', 64 GB unified memory, ~256 GB/s",
767
+ "16 Zen 5 cores plus a strong integrated GPU sharing 64 GB, in a tiny quiet box, no discrete card. Runs ~30B comfortably. Examples: GMKtec EVO-X2 around $1,499, Framework Desktop $1,639. Bandwidth is far below a discrete GPU, so big models fit and are usable but not fast. Soldered RAM, so buy the capacity up front.",
768
+ "https://frame.work/desktop"),
769
+ ("Ryzen AI Max+ 395, 128 GB", "$1,999-2,800", dict(ram_gb=128, unified=True, vendor="amd"),
770
  "AMD Ryzen AI Max+ 395 'Strix Halo', 128 GB unified memory, ~256 GB/s",
771
+ "128 GB of unified memory runs 70B-class models for far less than a Mac with the same capacity, and sips power. Prices run from about $1,999 (GMKtec EVO-X2) to $2,459 (Framework Desktop) to $2,799 (Bosgame M5); the 2026 LPDDR5X hike landed hardest on this tier. Best capacity-per-dollar for big-model experimentation; accept moderate speed.",
772
+ "https://frame.work/desktop"),
773
  ],
774
  },
775
  ]
 
821
  # old logic collapsed them whenever the cheapest tier
822
  # already ran everything great.
823
  built = []
824
+ for i, (label, price, hw, spec_line, detail, link) in enumerate(tiers):
825
  spec = _spec_for_tier(hw)
826
  per_goal, all_meet, all_great = [], True, True
827
  for uc in ucs:
 
832
  "model": res["headline_model"] or "nothing realistic",
833
  "verdict": res["verdict"]})
834
  tier = {"label": label, "price": price, "spec": spec_line, "detail": detail,
835
+ "link": link, "price_checked": _PRICE_CHECKED, "goals": per_goal,
836
  "runs": "; ".join(f"{g['goal']}: {g['model']}" for g in per_goal)
837
  if len(per_goal) > 1 else per_goal[0]["model"]}
838
  built.append({"idx": i, "tier": tier, "all_meet": all_meet,
 
864
  "goals": [uc.plain_name for uc in ucs],
865
  "mode": mode,
866
  "catalogue_version": catalogue_date(),
867
+ "price_checked": _PRICE_CHECKED,
868
  "note": " ".join(notes),
869
  "platforms": platforms,
870
+ "disclaimer": (f"Two distinct builds per platform: the cheapest that genuinely lets you "
871
+ f"{verb} these goals, and a step up that does it with headroom. Click any "
872
+ f"card for the parts and a live price link. Prices are research-checked "
873
+ f"approximations (US, {_PRICE_CHECKED}), not live quotes; a 2026 memory "
874
+ f"shortage is pushing them up, so use the link for today's figure. The "
875
+ f"memory math is the same conservative engine as the main check."
876
  + (" Builds cover the union of every goal you picked: each must work."
877
  if len(ucs) > 1 else "")),
878
  }
static/app.js CHANGED
@@ -446,6 +446,7 @@ function renderBuy(d) {
446
  <ul class="bc-spec">${specParts(t.spec)}</ul>
447
  <div class="bc-detail-label">Why this build</div>
448
  <p>${esc(t.detail)}</p>
 
449
  </div>
450
  </div>`;
451
  };
 
446
  <ul class="bc-spec">${specParts(t.spec)}</ul>
447
  <div class="bc-detail-label">Why this build</div>
448
  <p>${esc(t.detail)}</p>
449
+ ${t.link ? `<a class="bc-link" href="${safeUrl(t.link)}" target="_blank" rel="noopener noreferrer">Check current price <span class="bc-link-meta">our estimate ${esc(t.price)}, ${esc(t.price_checked || "")}</span><span class="ic" data-ic="arrow"></span></a>` : ""}
450
  </div>
451
  </div>`;
452
  };
static/style.css CHANGED
@@ -535,6 +535,14 @@ ul.bc-spec li {
535
  ul.bc-spec li:first-child { border-top: 0; }
536
  ul.bc-spec li .ic { font-size: 16px; color: var(--accent); flex: none; }
537
  .bc-detail p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0; font-family: var(--font-body); }
 
 
 
 
 
 
 
 
538
 
539
  /* Command block - terminal */
540
  .cmd-intro { font-size: 14px; color: var(--text-secondary); margin: var(--s-2) 0 var(--s-3); font-family: var(--font-body); }
 
535
  ul.bc-spec li:first-child { border-top: 0; }
536
  ul.bc-spec li .ic { font-size: 16px; color: var(--accent); flex: none; }
537
  .bc-detail p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0; font-family: var(--font-body); }
538
+ .bc-link {
539
+ display: inline-flex; align-items: center; gap: 7px; margin-top: var(--s-3);
540
+ color: var(--accent); text-decoration: none; font-family: var(--font-crt); font-size: 15px;
541
+ border: 1px solid var(--accent-strong); border-radius: var(--r-sm); padding: 6px 10px;
542
+ }
543
+ .bc-link:hover { background: var(--accent-soft); }
544
+ .bc-link .ic { font-size: 13px; }
545
+ .bc-link-meta { color: var(--text-muted); font-size: 13px; }
546
 
547
  /* Command block - terminal */
548
  .cmd-intro { font-size: 14px; color: var(--text-secondary); margin: var(--s-2) 0 var(--s-3); font-family: var(--font-body); }