用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/mybigday/codec.cpp --skill codec-model-dev命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | codec-model-dev |
| description | Guide for adding a new codec model (GGUF conversion + ggml graph integration) in codec.cpp. |
Use this skill when adding a new model architecture or a large variant that needs GGUF conversion + ggml graphs.
Goal: all weight transforms happen during conversion, never at runtime.
scripts/converters/..model-src/ and import locally.codec.sample_rate, codec.hop_size, codec.n_q, codec.codebook_size, codec.latent_dim, codec.codebook_dimcodec.has_encoder, codec.has_decoderconv1d weights: ggml expects [k, in, out].conv_transpose_1d weights: ggml expects [k, out, in] and p0==0, d0==1; use crop for padding.Validate with a small inspection script (shape + basic stats).
Files:
src/models/<model>.h (model struct + vtable declaration)src/models/<model>.cpp (init + vtable)src/codec.cpp (register in switch-based vtable registry)Actions:
src/models/<model>.h.codec_<model>_vtable() (create_impl/destroy_impl/init/encode/decode).codec_<model>_init, load GGUF keys with safe defaults and sanity checks.codec_model (sample_rate, hop_size, n_q, etc.).graph_size callback. Default policy should be the shared exact DAG-based sizing helper unless the model truly needs something else.codec_model_vtable_for_arch() in src/codec.cpp.Files:
src/models/<model>.cppsrc/runtime/graph.cppsrc/runtime/graph_exec.cppRules:
(kind, n_frames, n_q, hop, n_in, latent_dim).kind-based graph-size heuristics.Patterns:
codec_<model>_*_tensor_name.Files:
tests/e2e/config.jsontests/e2e/runner.pyActions:
python tests/e2e/runner.py --models <name>If mismatch: