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
- 参考文档references/api-and-cli.md6.3 KB
- 参考文档references/build-and-configure.md7.4 KB
- 参考文档references/evaluation.md6.2 KB
- 参考文档references/troubleshooting.md6.9 KB
- 参考文档references/weight-conversion.md4.7 KB
- 脚本scripts/inspect_llama_cpp_config.py13.9 KB
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
PipelineConfigYAML 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_backendselection 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
-
Choose an install profile and backend mix from
references/build-and-configure.md. -
Place weights in the expected layout or adapt a YAML config to your chosen paths.
-
Build the C bridge so
libbackbone_bridge.sois discoverable by the installedmoss_tts_delay.llama_cpppackage. -
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 -
Run one CLI smoke generation with a short sentence and
--profileonly after the config inspector reports the required path fields are present. -
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
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.
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.
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.
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.
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.
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).