feat: add SettingsPage with HuggingFace model search and fix flexbox layout

- Add SettingsPage component with macOS/Linear-style settings UI (sp-* classes)
- Fix HuggingFace results list squeeze: sp-card-row--full now has align-items: stretch
  overriding the inherited flex-start, ensuring children fill 100% horizontal width
- Fix sp-hf-file row layout: width 100%, grid columns for name/quant/size/download
- Fix sp-hf-name truncation: explicit overflow/ellipsis/white-space in CSS
- Add white-space: nowrap to sp-hf-size and sp-hf-quant-badge to protect secondary columns
- Add runtime-deps crate, Tailwind/PostCSS config, runtime-defaults, MessageBubble test
- Update Cargo workspace, inference-server, tauri runtime types and process handling
This commit is contained in:
Evandro Fonseca Junior committed 2026-03-30 23:35:08 -03:00
1 parent 9da25c3688
commit 01b629cb4a
41 files changed
+6864 -822

No files matched your search

+14 -9
View File
@@ -11,29 +11,34 @@ pub enum RuntimeProfile {
impl RuntimeProfile {
/// Returns sensible defaults for each profile.
///
/// `n_ctx` sets the KV cache / context window size. Larger values allow longer
/// conversations but consume more VRAM. Override at runtime with `LOCALLLM_CTX`.
/// `n_batch` controls the prefill chunk size — kept independent of `n_ctx` to
/// avoid pre-allocating the full window as a single batch buffer (OOM risk).
pub fn defaults(&self) -> ProfileDefaults {
match self {
Self::Turbo4B => ProfileDefaults {
n_gpu_layers: 999,
n_ctx: 4096,
n_batch: 512,
n_ubatch: 128,
n_ctx: 131_072, // 128 K — covers very long conversations; needs ~4 GB KV VRAM at FP16
n_batch: 2048, // prefill chunk size; independent of n_ctx
n_ubatch: 512,
flash_attn: true,
n_threads: 8,
},
Self::Balanced9B => ProfileDefaults {
n_gpu_layers: 999,
n_ctx: 2048,
n_batch: 256,
n_ubatch: 64,
n_ctx: 65_536, // 64 K
n_batch: 2048,
n_ubatch: 256,
flash_attn: true,
n_threads: 8,
},
Self::CpuFallback => ProfileDefaults {
n_gpu_layers: 0,
n_ctx: 2048,
n_batch: 128,
n_ubatch: 32,
n_ctx: 16_384, // 16 K — CPU KV cache is RAM-backed; keep conservative
n_batch: 512,
n_ubatch: 128,
flash_attn: false,
n_threads: num_cpus(),
},