Skip to content

armgit / Edge0

Public Imported from GitHub
0

Run 35B MoE models in ~2.5 GB of RAM. Weights stream from SSD; a trained router predicts loads a step ahead. Mac, iPhone, Android, Windows supported

Python
841 B
Raw Blame
// chat/modelStatus.ts — status-light derivation. Inputs are shell snapshots only:
// the installed list + engineStore.status + loadingTier. No timers, no guessing:
// the light reflects facts alone.
import type { EngStatus } from "../api/client";

export type ModelLight = "resident" | "loading" | "installed" | "absent";

export function deriveLight(
  status: EngStatus | null,
  loadingTier: string | null,
  installed: string[],
  tier: string,
): ModelLight {
  if (!installed.includes(tier)) return "absent";
  if (status?.running && status.tier === tier) return "resident";
  if (loadingTier === tier) return "loading";
  return "installed";
}

/** Picker candidates = installed tiers (catalog/download browsing belongs to the models page). */
export function candidateModels(installed: string[]): string[] {
  return installed;
}