Views
No views yet
forge tune my-chats.jsonl --name grandma # proven: coherent + IN-BAND on NPU
├─ LoRA fine-tune (cloud GPU) 122 s
├─ merge 3 s
├─ voice proof (model speaks first!) 5 s
├─ HF -> f16 -> Q4_K_M GGUF 20 s
└─ GGUF -> Q4NX (NPU format) 24 s
forge register (one UAC click)
flm run grandma-forge:1bforge.js / forge.bat — the CLI: tune, convert, register,
list, doctor, servemodal/tune_npu.py — the whole tune→NPU pipeline as one
Modal job (bring your own Modal account; T4 is plenty)modal/convert_q4nx.py — just the GGUF→Q4NX stage (65 s for a 1B)bin/assemble.js — downloads results and stages the FLM model folderbin/register.js + register-admin.bat — the permanent custom-model
registry that survives FLM updates (see below)registry.example.json — entry template{"messages":[{"role":"user","content":...},{"role":"assistant","content":...}]}.forge register exists)model_list.json lives in C:\Program Files\flm\ and every FLM update
resets it, silently de-registering all your custom models. Your model files
survive (they're in Documents\flm\models\) but they vanish from flm list.
Forge keeps its own user-space registry.json forever and re-merges with one
click. forge doctor tells you when an update has eaten your registrations.modal/train_ear_head.py, bring your own labeled texts), then run it locally
with bin/ear.js against FLM's /v1/embeddings (flm serve <model> --embed 1).
The embeddings come off the NPU; the head is plain JS. In our tests the
111KB head matched a fine-tuned 268MB DistilBERT on real-voice accuracy
(95.9%) and beat it on the hard boundary cases, live on a Strix Halo NPU.start.bat gives you a menu: doctor / list / register / serve / tune guide.convert.py CLI is broken at HEAD (uncommented
debug sys.argv override hijacks every invocation). Call the module API:
from q4nx import create_converter; create_converter(gguf, "").convert(q4nx_path=out, weights_type="language")einops and tqdm beyond its README list, and must run
with cwd = its repo root (relative configs/<arch>.json loads).transformers>=4.46 — the error
untagged enum ModelWrapper is that wall exactly.transformers 4.46 needs accelerate>=1.0 — the error
'AdamW' object has no attribute 'train' at step 0 is that skew.32.0.203.304 (.311
recommended). flm validate will tell you; so will forge doctor.transformers>=4.5x + sentence-transformers 5.x
and the official weights are license-gated (use the unsloth/ mirror, or
accept the Gemma license on your HF account + pass an HF_TOKEN secret)./v1/embeddings closes the TCP connection per request — retry
once on ECONNRESET (the ear runtime does).q8_0 produces repetition
garbage on the NPU even though the merged model is perfect — the q8_0
then Q4NX re-quant is a lossy double-quantization. Use Q4_K_M.f16 (not enough values to unpack — it expects pre-quantized blocks). So the GGUF must be quantized
before Q4NX, and Q4_K_M is the format proven to produce a coherent,
in-voice NPU model. Pipeline: HF → f16 → llama-quantize Q4_K_M → Q4NX.torch 2.4.1 · transformers 4.46.3 · trl 0.9.6 · peft 0.12.0 · accelerate 1.1.1 · datasets 2.21.0 · gguf · amd-quark · einops · tqdm · protobuf + a compiled llama-quantize (the Modal job builds it).