[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78T8H39VB3CW6QHZ5YSRXAT":3,"skill-same:01M78T8H39VB3CW6QHZ5YSRXAT":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":48},"01M78T8H39VB3CW6QHZ5YSRXAT","serialization",null,"Save, load, and share BERTopic models locally or on the Hugging Face Hub with safe format and dependency choices.","VectorSpaceLab\u002FAREX-Skill","VectorSpaceLab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F180637102?v=4","01M7538C5WPSJGWF7KHR4EFZ9F","01M7538C6R2GFP53NPXTCZNBRT",351,"MIT","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: serialization\ndescription: \"Save, load, and share BERTopic models locally or on the Hugging\n  Face Hub with safe format and dependency choices.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\n  package: BERTopic\n  package-version: \"0.17.4\"\n  parent-skill: bertopic\nlicense: MIT\n---\n\n# serialization\n\nUse this sub-skill when the task is about persisting an already fitted BERTopic model, reloading it locally, or publishing\u002Floading it through the Hugging Face Hub.\n\n## Route here for\n\n- `BERTopic.save(...)` and `BERTopic.load(...)` workflows.\n- Choosing among `serialization=\"safetensors\"`, `serialization=\"pytorch\"`, and `serialization=\"pickle\"`.\n- Deciding whether to include `save_ctfidf=True` for topic-term inspection after reload.\n- Deciding how to use `save_embedding_model`: a lightweight model pointer, omitting the backend, or reinjecting a backend at load time.\n- Local save\u002Fload from a pickle file or from a lightweight model directory.\n- Hub upload with `BERTopic.push_to_hf_hub(...)` and Hub loading with `BERTopic.load(\"namespace\u002Frepo\")`.\n- Serialization-side failures from `BERTopic.merge_models(...)`, such as missing `torch` or `safetensors`; route the model-combination decision itself to topic-modeling.\n\n## Route elsewhere\n\n- Training, fitting, transforming, partial fitting, topic reduction, topic merging, or outlier workflows: use the topic-modeling sub-skill.\n- Embedding backend selection, custom backend implementation, API-client setup, or precomputed embedding construction: use the embeddings-backends sub-skill.\n- c-TF-IDF or vectorizer tuning before saving: use the vectorizers-ctfidf sub-skill.\n- Representation models, custom labels, or multi-aspect labels: use the representations-labeling sub-skill.\n- Plotting, visualization, hierarchy dashboards, or figure export: use the analysis-visualization sub-skill.\n\n## Operating references\n\n1. Start with [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md) for save\u002Fload\u002Fpush signatures, format behavior, local file layout, and load-path resolution.\n2. Use [`references\u002Fworkflows.md`](references\u002Fworkflows.md) for local exact round trips, portable lightweight saves, embedding-model restoration, Hub upload\u002Fload, and local-vs-Hub decisions.\n3. Use [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) for import failures, optional dependency errors, invalid paths, credential issues, embedding-backend gaps, and version\u002Fsecurity warnings.\n4. Run [`scripts\u002Fsmoke_serialization.py`](scripts\u002Fsmoke_serialization.py) for a tiny local-only smoke check of pickle plus a lightweight format when the BERTopic runtime dependencies are available.\n\n## Minimal decision flow\n\n- If the file will only be loaded in the same trusted Python and dependency environment, `pickle` is the most complete format because it stores the full BERTopic object, including dimensionality-reduction and clustering sub-models.\n- If the model should be small, safer to share, production-oriented, or Hub-friendly, prefer `safetensors` with `save_ctfidf=True` when topic-term inspection after reload matters.\n- If `safetensors` is unavailable but `torch` is already an accepted dependency, use `pytorch`; it creates the same lightweight directory style with `.bin` weights.\n- If future `transform(...)` calls should work without passing `embeddings=`, save a SentenceTransformer-compatible model id with `save_embedding_model=\"sentence-transformers\u002F...\"` or pass a freshly constructed backend to `BERTopic.load(..., embedding_model=...)`.\n- If the backend is custom or uses external API credentials, do not expect lightweight serialization to store it; reconstruct that backend separately and inject it at load time.\n- If uploading to the Hub, use `push_to_hf_hub(...)` only after confirming `huggingface_hub` is installed and the process is authenticated or has a token.\n- If loading locally, pass an existing file or directory. If a missing path contains `\u002F`, BERTopic treats it as a Hub repo id.\n\n## Verification anchors\n\n- Local no-network save\u002Freload: fit or reuse a tiny synthetic model with precomputed embeddings, save as pickle and at least one lightweight format, reload from local file\u002Fdirectory, and assert topic counts plus representative topic metadata survive.\n- Local-vs-Hub guidance: confirm local round trips do not require Hugging Face credentials, while `push_to_hf_hub(...)` and `BERTopic.load(\"namespace\u002Frepo\")` require Hub-oriented dependencies and network\u002Fauth conditions.\n- Embedding restoration edge case: load a lightweight model once without an embedding backend and once with an explicit backend or precomputed embeddings, then document the difference in future `transform(...)` behavior.\n","# serialization\n\nUse this sub-skill when the task is about persisting an already fitted BERTopic model, reloading it locally, or publishing\u002Floading it through the Hugging Face Hub.\n\n## Route here for\n\n- `BERTopic.save(...)` and `BERTopic.load(...)` workflows.\n- Choosing among `serialization=\"safetensors\"`, `serialization=\"pytorch\"`, and `serialization=\"pickle\"`.\n- Deciding whether to include `save_ctfidf=True` for topic-term inspection after reload.\n- Deciding how to use `save_embedding_model`: a lightweight model pointer, omitting the backend, or reinjecting a backend at load time.\n- Local save\u002Fload from a pickle file or from a lightweight model directory.\n- Hub upload with `BERTopic.push_to_hf_hub(...)` and Hub loading with `BERTopic.load(\"namespace\u002Frepo\")`.\n- Serialization-side failures from `BERTopic.merge_models(...)`, such as missing `torch` or `safetensors`; route the model-combination decision itself to topic-modeling.\n\n## Route elsewhere\n\n- Training, fitting, transforming, partial fitting, topic reduction, topic merging, or outlier workflows: use the topic-modeling sub-skill.\n- Embedding backend selection, custom backend implementation, API-client setup, or precomputed embedding construction: use the embeddings-backends sub-skill.\n- c-TF-IDF or vectorizer tuning before saving: use the vectorizers-ctfidf sub-skill.\n- Representation models, custom labels, or multi-aspect labels: use the representations-labeling sub-skill.\n- Plotting, visualization, hierarchy dashboards, or figure export: use the analysis-visualization sub-skill.\n\n## Operating references\n\n1. Start with [`references\u002Fapi-reference.md`](references\u002Fapi-reference.md) for save\u002Fload\u002Fpush signatures, format behavior, local file layout, and load-path resolution.\n2. Use [`references\u002Fworkflows.md`](references\u002Fworkflows.md) for local exact round trips, portable lightweight saves, embedding-model restoration, Hub upload\u002Fload, and local-vs-Hub decisions.\n3. Use [`references\u002Ftroubleshooting.md`](references\u002Ftroubleshooting.md) for import failures, optional dependency errors, invalid paths, credential issues, embedding-backend gaps, and version\u002Fsecurity warnings.\n4. Run [`scripts\u002Fsmoke_serialization.py`](scripts\u002Fsmoke_serialization.py) for a tiny local-only smoke check of pickle plus a lightweight format when the BERTopic runtime dependencies are available.\n\n## Minimal decision flow\n\n- If the file will only be loaded in the same trusted Python and dependency environment, `pickle` is the most complete format because it stores the full BERTopic object, including dimensionality-reduction and clustering sub-models.\n- If the model should be small, safer to share, production-oriented, or Hub-friendly, prefer `safetensors` with `save_ctfidf=True` when topic-term inspection after reload matters.\n- If `safetensors` is unavailable but `torch` is already an accepted dependency, use `pytorch`; it creates the same lightweight directory style with `.bin` weights.\n- If future `transform(...)` calls should work without passing `embeddings=`, save a SentenceTransformer-compatible model id with `save_embedding_model=\"sentence-transformers\u002F...\"` or pass a freshly constructed backend to `BERTopic.load(..., embedding_model=...)`.\n- If the backend is custom or uses external API credentials, do not expect lightweight serialization to store it; reconstruct that backend separately and inject it at load time.\n- If uploading to the Hub, use `push_to_hf_hub(...)` only after confirming `huggingface_hub` is installed and the process is authenticated or has a token.\n- If loading locally, pass an existing file or directory. If a missing path contains `\u002F`, BERTopic treats it as a Hub repo id.\n\n## Verification anchors\n\n- Local no-network save\u002Freload: fit or reuse a tiny synthetic model with precomputed embeddings, save as pickle and at least one lightweight format, reload from local file\u002Fdirectory, and assert topic counts plus representative topic metadata survive.\n- Local-vs-Hub guidance: confirm local round trips do not require Hugging Face credentials, while `push_to_hf_hub(...)` and `BERTopic.load(\"namespace\u002Frepo\")` require Hub-oriented dependencies and network\u002Fauth conditions.\n- Embedding restoration edge case: load a lightweight model once without an embedding backend and once with an explicit backend or precomputed embeddings, then document the difference in future `transform(...)` behavior.\n",{"name":5,"license":14,"metadata":23,"description":7,"disable-model-invocation":28},{"package":24,"disco-role":25,"parent-skill":26,"package-version":27},"BERTopic","operating","bertopic","0.17.4",true,"main","ac3fe1afa80fb9a09775ecfb2b6cc3ba850a2db6","skills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization",27,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab","2026-09-03 10:25:21",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":28},[38,41,44],{"tool":39,"command":40},"npx","npx skills add VectorSpaceLab\u002FAREX-Skill --skill serialization",{"tool":42,"command":43},"bunx","bunx skills add VectorSpaceLab\u002FAREX-Skill --skill serialization",{"tool":45,"command":46},"pnpm","pnpm dlx skills add VectorSpaceLab\u002FAREX-Skill --skill serialization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fapi-reference.md","REFERENCE","参考文档",7724,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002Freferences\u002Fapi-reference.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Ftroubleshooting.md",7728,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002Freferences\u002Ftroubleshooting.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fworkflows.md",7834,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002Freferences\u002Fworkflows.md",{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"scripts\u002Fsmoke_serialization.py","SCRIPT","脚本",10513,"https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Frepositories\u002Frepo-skills\u002Fbertopic\u002Fsub-skills\u002Fserialization\u002Fscripts\u002Fsmoke_serialization.py",[70,78,85,92,99,106],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M799NYSH1R3RVAHSM2D88Y84","passnet-triton-opt","Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block\u002Fgrid\u002Fwarp 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.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-triton-opt\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M799NS5APEC0N1FZ7XZVW6BN","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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-solve\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M799NNY9BKSM21V5R7QVTBJX","passnet-skill","PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under .\u002Fpass_dir\u002F, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-skill\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M799NHH6NP7Z1RK77KGXAN6S","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()\u002Freplacement_args()\u002Freplacement_func() files, when a pass \"failed to match\", or when deciding how to fuse multiple kernels\u002Fops.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-pattern-fusion\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M799ND2J4WNC2PGAZ0A06NDF","passnet-orchestrate","Round\u002Fbatch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep\u002Frevert 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.","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-orchestrate\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":74,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M799N8SBTMY02ZDG2AZF5ZWE","passnet-feedback","Fast, deterministic feedback for PassNet work: pre-flight pattern\u002Fmatch 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).","https:\u002F\u002Fgithub.com\u002FVectorSpaceLab\u002FAREX-Skill\u002Fblob\u002Fmain\u002Fskills\u002Ftask-oriented\u002FPassNet\u002Fskills\u002Fpassnet-feedback\u002FSKILL.md",[],[]]