local-llm-server
Serve local GGUF models and verify Nimble evaluations.
- License 许可
- MIT
- 所属仓库
- zapabob/Skills
- 最近更新
- 2026-10-26
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- local-llm-server
- author
- Hermes
- license
- MIT
- version
- 0.1.0
- metadata
- { "hermes": { "tags": [ "LLM", "GGUF", "PrismL", "Nimble", "Verification" ] } }
- description
- Serve local GGUF models and verify Nimble evaluations.
03 SKILL.md 正文
Local GGUF Serving and Nimble Verification
Serve the exact requested GGUF, register its live ID without changing the primary model, and evaluate it through the actual Nimble plugin. This does not train weights, optimize refusal removal, certify reference labels, or establish capability retention without a matching baseline. The bundled helpers use Python's standard library plus the already-installed Hermes plugin and inspected Nimble adapter; they do not restart services or write profile configuration.
When to Use
- 「このGGUFをPrismL版llamaサーバーで動かして」 or replace a live local model.
- 「モデルピッカーを更新して」 without switching the current chat or primary model.
- 「Jevの代わりにNimbleで各項目チェックして」 or evaluate every saved holdout row.
- Verify model identity, scorer probabilities, grouped metrics, or evidence delivery.
Prerequisites
- The literal requested GGUF, a compatible
llama-serverbinary, and sufficient disk/RAM/VRAM. PQ2_0 requires actual PQ2_0 support; another two-bit format is not equivalent. - Hermes CLI and the active profile.
HERMES_HOMEselects that profile; never borrow another profile's credentials or edit its state. - For Nimble: installed
plugins.nimble_scorer, itshandle_score/handle_statushandlers, and an inspected checkout exposingnimble.evaluation.evaluate_pilot.adapt_inputandassess. - The tested local endpoint is
http://127.0.0.1:8080without authentication. Do not copy the empty credential into an authenticated service. - Inspect plugin configuration under
plugins.entriesand its currentCONFIG_ALIASES. The batch helper requires the declaredn_probsandmax_input_tokensto match that configuration; it never changes them. - Resolve Bash variables
PYTHON,ROOT,SKILL_DIR,LLAMA_SERVER,MODEL,ALIAS,UPSTREAM,DATASET, and freshRUN_DIRfrom real files. Use the repository interpreter, not an unrelated global Python.
How to Run
Invoke commands through terminal, using background=true for a server and notify=true for a bounded long evaluation. If Windows tools return command length exceeds safe limit, use execute_code with subprocess, explicit argv/cwd, UTF-8 decoding with errors="replace", and detached logging for long jobs; do not retry the broken terminal repeatedly.
Read the focused PrismL recipe with skill_view(name='local-llm-server', file_path='references/prisml-nimble-verification.md'). The workflow is one sequence: discovery → scoped launch → live checks → picker refresh → frozen evaluation → raw-output cross-check → delivery.
For a ready server and configured plugin, invoke through terminal:
"$PYTHON" "$SKILL_DIR/scripts/nimble_holdout.py" --repo "$ROOT" --nimble-src "$UPSTREAM" --dataset "$DATASET" --model "$MODEL" --alias "$ALIAS" --base-url http://127.0.0.1:8080 --output "$RUN_DIR" --n-probs 20000 --max-input-tokens 8192
The settings are observed conditions, not universal tuning recommendations. The helper derives the dataset count, writes each result before advancing, refuses an existing output directory, and returns 2 if any measurements are invalid. A failed or repaired run gets a new ID; preserve its predecessor.
Quick Reference
GET /healthGET /propsGET /slotsGET /v1/modelsPOST /v1/chat/completionsnimble_status,nimble_validate_schema,nimble_scorehermes config path;hermes fallback listhermes config set custom_providers.N.model <live-id>hermes config set custom_providers.N.context_length <resolved-context>scripts/nimble_holdout.py: plugin-backed full evaluation.scripts/verify_nimble_run.py: stdlib-only verification from saved raw probabilities.
Procedure
-
Discover and separate scope. Use
read_file/search_filesand process inspection throughterminalto locate the requested GGUF, binary, listener PID, full argv, creation time, and live/propspath. Record rollback argv. Alias, filename similarity, and equal file size are not weight identity. Serving selection, picker registration, active chat, primary model, and autostart are separate changes. -
Replace only the authorized service. Inspect
/slots; wait for an actual idle state within a bounded observation window. If active requests persist, ask whether to interrupt or defer. Recheck PID identity immediately before termination; never kill everyllama-serverprocess. Preserve working settings unless a change is requested or justified. A tested PrismL launch throughterminalwas:"$LLAMA_SERVER" -m "$MODEL" -c 65536 --parallel 1 -ngl 99 -fa on -ctk q4_0 -ctv q4_0 --jinja --alias "$ALIAS" --host 127.0.0.1 --port 8080Confirm that exact build supports these flags. Filter obsolete
LLAMA_ARG_*/LLAMA_TURBOQUANT_*only in the child environment when needed; preserve the parent's environment and unrelated services.If the service refuses to come up, read the launcher's own guards before changing anything — a
throw "Missing GGUF: $model"fromTest-Pathis silent to the app, surfacing only as an endpoint timeout. A GGUF renamed or re-quantized after the launcher was written is the usual cause; resolve the real filename from the filesystem and update the launcher, everymodels-*.inisection, and any hardcoded readiness assertion together. Re-check PID/argv/listener after the relaunch. -
Prove readiness, not merely listening. Poll
/healthin a separate check. HTTP 503 withLoading modelis not a crash; inspect progress, the same process, logs, and resources before extending observation or rolling back. Require the exact GGUF in/props, intended ID in/v1/models, resolved context, and a nonempty short Japanese chat reply with an appropriate finish reason. Recheck PID/argv/listener and leave the requested service running. A configured 65K context is not a 65K capability test. -
Register without changing the primary. Inspect the matching custom provider and any already-existing matching fallback. Use
hermes config setfor nested keys, neverpatch/write_fileon liveconfig.yaml. Preserve aliases and model metadata:modelsmay be a list or ID-to-metadata mapping, not a serialized string. Replace only discovered indices; do not assume provider 0 or fallback 5. Do not create or change a fallback unless that scope is requested. Loadhermes-local-model-registerfor the supported registration commands. -
Refresh the exact endpoint's catalog. A successful config write may still be hidden by old endpoint-cache IDs. After inspecting current signatures, use this supported refresh for the verified unauthenticated endpoint:
from hermes_cli.models import cached_fetch_api_models from hermes_cli.inventory import load_picker_context, build_model_options_payload live = cached_fetch_api_models('', 'http://127.0.0.1:8080/v1', force_refresh=True, timeout=10) payload = build_model_options_payload(load_picker_context(), explicit_only=True, refresh=False)Check the exact ID in the matching provider row; expose only name, slug, IDs, and aliases, not complete config/provider payloads. Report settings stored, shared candidate present, and GUI label rendered separately. Use
computer_useonly with fresh verification; stop driving the UI when the user moves to another workflow. -
Exercise the actual plugin. Inspect/load the Nimble tools and test enum, boolean, ordinal labels, Japanese comprehension, code comprehension, tool routing, and a meaning-changing/data-instruction control. The native schema supports
enumandboolean; ordinal dataset scores are adapted to numeric-string enum choices. Validate unique single-token candidate codes, complete finite candidate probabilities, and supported input bounds. Missing logprob candidates are invalid observations, not invented zeroes. -
Freeze and evaluate every input. Inspect the current adapter and dataset. Invoke
scripts/nimble_holdout.pyas above; it checks the live GGUF/alias and active-profile settings, freezes model/dataset/handler/scorer/adapter hashes, and useshandle_score, not just the underlying library. Only inputs reach the model; references are used afterward. Presentation rounding may be renormalized explicitly beforeassess. Record all rows, including errors, with index/ID/type/domain/input variant/reference/raw response/grade/timing. Re-read them and verify every expected index exactly once. -
Check metrics through a separate calculation path. Invoke
scripts/verify_nimble_run.pyfrom Verification. It re-derives predictions, agreement, NLL, Brier, numeric expected-score error, and ECE from raw probabilities without importing the grader or trusting saved grades. It checks dataset identity/order, candidate IDs, input bounds, and all total/type/domain/variant groups. Valid-zero rates and ECE are N/A. Report attempted and valid denominators. Datasetbase/counterfactualmeans input variants, not baseline/fine-tuned models. -
Verify the native tool round trip separately. Preserve the first response and warnings. On the observed PrismL build, object-valued
tool_choicewas ignored, so a returned call did not prove forced-choice enforcement. A separatetool_choice="auto"check emittedadd(a=17,b=25); perform only that known local addition, return the result with the emitted call ID, and verify the model consumes it. Do not execute arbitrary generated code. Emission, execution, returned-result consumption, and general agent ability are different claims. -
Deliver evidence and limits. Run focused plugin tests with
NIMBLE_TEST_LIVE=1; the separate legacy holdout test usesNIMBLE_BENCH=1. Explain skips and which full evaluation actually ran. Recheck artifact hashes and service identity. Package explicitly selected manifest/JSONL/summary/raw-check/smoke/tool/test/picker/runtime/report files, never an entire profile. Hash entries, reopen the ZIP, verify exact entries/CRCs/hashes, and keep its own hash outside it. Deliver files withMEDIA:and preserve implementation records according to workspace policy.
Pitfalls
- Reference agreement is not certified accuracy. Record reference provenance and human-review counts; an assertion in the dataset is not an independent audit. No same-protocol baseline means no improvement or capability-retention claim.
- Probability scales differ. Candidate-restricted confidence is not calibrated correctness. Binary Brier uses one true-class term; multiclass Brier sums class terms. Numeric top-1 exact agreement differs from expected-value MAE; string enums may report
expected_score=nullin the plugin. - ECE uses measured means. Weight each nonempty bin's absolute difference between actual mean confidence and agreement by its sample count. Do not substitute bin centers merely because a helper is named ECE.
- Checks are not approval. A raw-output recomputation by the run author is not third-party review, label certification, or user approval. A hash is identity/integrity evidence, not semantic correctness.
- Windows adapters can disagree. Native programs need native quoted paths; Bash continuations are not CMD carets. Follow
computer_useverdicts, verify fresh captures, and avoid double-scaling coordinates if the adapter already scales them. - A timeout is not a model fault. With
--parallel 1, one large request owns the server: prompts of ~65k tokens were measured at ~145 s of prompt processing (~450 tok/s) before the first token, so a concurrent small probe times out against a perfectly healthy endpoint. Confirm viaprint_timingin the server log showing largen_tokensclimbing, and via an idle/slots, before suspecting the model. Raising--paralleladmits concurrency but multiplies KV cache — present it as a VRAM trade-off. Seereferences/local-endpoint-timeout-triage.md. - Helpers have explicit limits. The batch runner supports the inspected single-decision Nimble dataset and a loopback server, not arbitrary multi-field corpora or authenticated remote APIs. It uses inspected plugin settings readers; re-inspect source after a plugin revision.
- Verification does not rerun inference.
--check-filesalso hashes available model/source paths; older manifests without scorer/adapter path fields cannot prove those file checks. The receipt lists the checks actually performed.
Existing specialized references are retained; load only the relevant one with skill_view:
references/live-model-switching.md: scoped replacement, idle authorization, detached launch, loading diagnostics.references/prisml-nimble-verification.md: exact plugin contracts, metric definitions, picker cache, evidence boundaries.references/evaluation-backed-model-cards.md: paired comparisons, statistical caveats, model-card packaging.references/hf-model-substitution-preflight.mdandreferences/turboquant-hf-repo-resolution.md: HF resolution versus actual model readiness.references/turboquant-hf-kv-substitution.mdandreferences/turboquant-tuning.md: runtime-specific KV and fit conditions.references/windows-gguf-filesystem-anomaly.md: nested-path/file-lock anomalies; do not delete the GGUF without authorization.references/gguf-finetune-trainability-triage.md: training-parent/VRAM prerequisites, separate from serving.references/qwen38-mtp-and-hermes-register.mdandreferences/nemotron-3.5-lightning-30b-a3b.md: model-specific MTP support; never enable it without the required model layers.references/moe-and-speculative-decoding.md,references/moe-cron-model-change.md, andreferences/multi-port-hot-standby.md: specialized routing/serving scopes.references/embedding-server-setup.md: embedding endpoint setup, separate from the chat server.references/local-endpoint-timeout-triage.md: ordered triage forlayer: endpoint, code: timeoutagainst a loopback provider — dead port, renamed GGUF vs filesystem anomaly, VRAM budget,--parallel 1starvation, grammar-sampling limits, and supervisor port ownership.
Verification
Invoke this single saved-run check through terminal; it makes no inference requests and never changes service/configuration:
"$PYTHON" "$SKILL_DIR/scripts/verify_nimble_run.py" --run-dir "$RUN_DIR" --check-files
Success requires exit 0 and a receipt showing expected/actual row counts, raw-probability cross-check, grouped metrics, ECE, tested prompt-token range, and the file checks actually performed. Use --receipt <new-file> to persist it without overwriting old evidence. --self-test additionally exercises enum/boolean/ordinal formulas, zero-valid handling, and rejection of NaN, token collisions, and excessive input length.
04 同仓库更多 Skills
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
writing-plans
Write implementation plans: bite-sized tasks, paths, code.
whisper
OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.
weights-and-biases
W&B: log ML experiments, sweeps, model registry, dashboards.
watchers
Poll RSS, JSON APIs, and GitHub with watermark dedup.
serving-llms-vllm
vLLM: high-throughput LLM serving, OpenAI API, quantization.