AGENT SKILL

llama-cpp-backend

Operate the torch-free and low-memory MOSS-TTS-Delay llama.cpp backend.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
llama-cpp-backend
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Operate the torch-free and low-memory MOSS-TTS-Delay llama.cpp backend.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

llama-cpp-backend

Use this sub-skill when the task is to run, configure, validate, convert weights for, or debug the MOSS-TTS-Delay llama.cpp bridge backend. This backend replaces the full Torch/Hugging Face generation stack with a GGUF Qwen3 backbone, NumPy embeddings/LM heads, delay-pattern sampling, and ONNX Runtime or TensorRT audio tokenizer decoding.

Scope

This sub-skill owns:

  • Torch-free and torch-optional install profiles for the llama.cpp backend.
  • Required GGUF, embedding, LM-head, tokenizer, ONNX, and TensorRT-engine file layout.
  • The PipelineConfig YAML contract and safe config inspection before model loading.
  • C bridge build requirements for libbackbone_bridge.so.
  • CLI and Python API generation paths for text-to-speech and reference-audio voice cloning.
  • ONNX, TensorRT, and Torch audio-tokenizer backend selection.
  • heads_backend selection for NumPy versus optional Torch LM heads.
  • Low-memory and 8 GB GPU tradeoffs.
  • Weight extraction/conversion from a full MOSS-TTS-Delay checkpoint into backbone, embeddings, LM heads, and GGUF artifacts.
  • Batch-evaluation layout and result interpretation for Seed-TTS/CV3-style suites.

Route elsewhere

  • For full Torch/Hugging Face MOSS-TTS family generation, use ../hf-family-workflows/SKILL.md.
  • For training, fine-tuning, or dataset preparation, use ../finetuning-data-prep/SKILL.md.
  • For realtime voice-agent workflows, use ../realtime-voice-agent/SKILL.md.

Fast operating path

  1. Choose an install profile and backend mix from references/build-and-configure.md.

  2. Place weights in the expected layout or adapt a YAML config to your chosen paths.

  3. Build the C bridge so libbackbone_bridge.so is discoverable by the installed moss_tts_delay.llama_cpp package.

  4. Inspect the YAML without loading models:

    python <this-skill>/scripts/inspect_llama_cpp_config.py <config.yaml>
    python <this-skill>/scripts/inspect_llama_cpp_config.py <config.yaml> --json
    
  5. Run one CLI smoke generation with a short sentence and --profile only after the config inspector reports the required path fields are present.

  6. For production runs, pin audio_backend, heads_backend, n_gpu_layers, low_memory, KV-cache type, and sampling values explicitly in the YAML or CLI overrides.

Reference map

  • references/build-and-configure.md — installs, weight layout, C bridge build, YAML profiles, and low-memory settings.
  • references/api-and-cli.md — CLI flags, Python API, config field meanings, backend behavior, and generation caveats.
  • references/weight-conversion.md — converting a full MOSS-TTS-Delay checkpoint into llama.cpp-ready artifacts.
  • references/evaluation.md — batch-eval input/output layout, tasks, summaries, and quantization-quality context.
  • references/troubleshooting.md — missing bridge/weights, ONNX/TRT/Torch backend failures, CUDA limits, downloads, and evaluation-layout failures.
  • scripts/inspect_llama_cpp_config.py — safe YAML/path checker that does not import model code or download weights.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351