[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AKXYSSEB5P7GR0W0QREDC7":3,"skill-same:01M7AKXYSSEB5P7GR0W0QREDC7":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M7AKXYSSEB5P7GR0W0QREDC7","sentencepiece",null,"Language-independent tokenizer treating text as raw Unicode. Supports BPE and Unigram algorithms. Fast (50k sentences\u002Fsec), lightweight (6MB memory), deterministic vocabulary. Used by T5, ALBERT, XLNet, mBART. Train on raw text without pre-tokenization. Use when you need multilingual support, CJK languages, or reproducible tokenization.","GongYuanCaiJi\u002Fdsh-claude-code-templates","GongYuanCaiJi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F129952120?v=4","01M7AK39Q4W3VPF7C1K8M58BFX","劉昱廷 Yu-Ting Liu","01M7AK39QPS2RAJKRQY0EPQJPZ",0,"MIT","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fai-research\u002Ftokenization-sentencepiece\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sentencepiece\ndescription: Language-independent tokenizer treating text as raw Unicode. Supports BPE and Unigram algorithms. Fast (50k sentences\u002Fsec), lightweight (6MB memory), deterministic vocabulary. Used by T5, ALBERT, XLNet, mBART. Train on raw text without pre-tokenization. Use when you need multilingual support, CJK languages, or reproducible tokenization.\nversion: 1.0.0\nauthor: Orchestra Research\nlicense: MIT\ntags: [Tokenization, SentencePiece, Language-Independent, BPE, Unigram, Multilingual, CJK Languages, Unicode, Deterministic, Google]\ndependencies: [sentencepiece, transformers]\n---\n\n# SentencePiece - Language-Independent Tokenization\n\nUnsupervised tokenizer that works on raw text without language-specific preprocessing.\n\n## When to use SentencePiece\n\n**Use SentencePiece when:**\n- Building multilingual models (no language-specific rules)\n- Working with CJK languages (Chinese, Japanese, Korean)\n- Need reproducible tokenization (deterministic vocabulary)\n- Want to train on raw text (no pre-tokenization needed)\n- Require lightweight deployment (6MB memory, 50k sentences\u002Fsec)\n\n**Performance**:\n- **Speed**: 50,000 sentences\u002Fsec\n- **Memory**: ~6MB for loaded model\n- **Languages**: All (language-independent)\n\n**Use alternatives instead**:\n- **HuggingFace Tokenizers**: Faster training, more flexibility\n- **tiktoken**: OpenAI models (GPT-3.5\u002F4)\n- **BERT WordPiece**: English-centric tasks\n\n## Quick start\n\n### Installation\n\n```bash\n# Python\npip install sentencepiece\n\n# C++ (requires CMake)\ngit clone https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsentencepiece.git\ncd sentencepiece\nmkdir build && cd build\ncmake .. && make -j $(nproc)\nsudo make install\n```\n\n### Train model\n\n```bash\n# Command-line (BPE with 8000 vocab)\nspm_train --input=data.txt --model_prefix=m --vocab_size=8000 --model_type=bpe\n\n# Python API\nimport sentencepiece as spm\n\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='m',\n    vocab_size=8000,\n    model_type='bpe'\n)\n```\n\n**Training time**: ~1-2 minutes for 100MB corpus\n\n### Encode and decode\n\n```python\nimport sentencepiece as spm\n\n# Load model\nsp = spm.SentencePieceProcessor(model_file='m.model')\n\n# Encode to pieces\npieces = sp.encode('This is a test', out_type=str)\nprint(pieces)  # ['▁This', '▁is', '▁a', '▁test']\n\n# Encode to IDs\nids = sp.encode('This is a test', out_type=int)\nprint(ids)  # [284, 47, 11, 1243]\n\n# Decode\ntext = sp.decode(ids)\nprint(text)  # \"This is a test\"\n```\n\n## Language-independent design\n\n### Whitespace as symbol (▁)\n\n```python\ntext = \"Hello world\"\npieces = sp.encode(text, out_type=str)\nprint(pieces)  # ['▁Hello', '▁world']\n\n# Decode preserves spaces\ndecoded = sp.decode_pieces(pieces)\nprint(decoded)  # \"Hello world\"\n```\n\n**Key principle**: Treat text as raw Unicode, whitespace = ▁ (meta symbol)\n\n## Tokenization algorithms\n\n### BPE (Byte-Pair Encoding)\n\n```python\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='bpe_model',\n    vocab_size=16000,\n    model_type='bpe'\n)\n```\n\n**Used by**: mBART\n\n### Unigram (default)\n\n```python\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='unigram_model',\n    vocab_size=8000,\n    model_type='unigram'\n)\n```\n\n**Used by**: T5, ALBERT, XLNet\n\n## Training configuration\n\n### Essential parameters\n\n```python\nspm.SentencePieceTrainer.train(\n    input='corpus.txt',\n    model_prefix='m',\n    vocab_size=32000,\n    model_type='unigram',\n    character_coverage=0.9995,  # 1.0 for CJK\n    user_defined_symbols=['[SEP]', '[CLS]'],\n    unk_piece='\u003Cunk>',\n    num_threads=16\n)\n```\n\n### Character coverage\n\n| Language Type | Coverage | Rationale |\n|---------------|----------|-----------|\n| English       | 0.9995   | Most common chars |\n| CJK (Chinese) | 1.0      | All characters needed |\n| Multilingual  | 0.9995   | Balance |\n\n## Encoding options\n\n### Subword regularization\n\n```python\n# Sample different tokenizations\nfor _ in range(3):\n    pieces = sp.encode('tokenization', out_type=str, enable_sampling=True, alpha=0.1)\n    print(pieces)\n\n# Output (different each time):\n# ['▁token', 'ization']\n# ['▁tok', 'en', 'ization']\n```\n\n**Use case**: Data augmentation for robustness.\n\n## Common patterns\n\n### T5-style training\n\n```python\nspm.SentencePieceTrainer.train(\n    input='c4_corpus.txt',\n    model_prefix='t5',\n    vocab_size=32000,\n    model_type='unigram',\n    user_defined_symbols=[f'\u003Cextra_id_{i}>' for i in range(100)],\n    unk_id=2,\n    eos_id=1,\n    pad_id=0\n)\n```\n\n### Integration with transformers\n\n```python\nfrom transformers import T5Tokenizer\n\n# T5 uses SentencePiece internally\ntokenizer = T5Tokenizer.from_pretrained('t5-base')\ninputs = tokenizer('translate English to French: Hello', return_tensors='pt')\n```\n\n## Performance benchmarks\n\n### Training speed\n\n| Corpus | BPE (16k) | Unigram (8k) |\n|--------|-----------|--------------|\n| 100 MB | 1-2 min   | 3-4 min      |\n| 1 GB   | 10-15 min | 30-40 min    |\n\n### Tokenization speed\n\n- **SentencePiece**: 50,000 sentences\u002Fsec\n- **HF Tokenizers**: 200,000 sentences\u002Fsec (4× faster)\n\n## Supported models\n\n**T5 family**: `t5-base`, `t5-large` (32k vocab, Unigram)\n**ALBERT**: `albert-base-v2` (30k vocab, Unigram)\n**XLNet**: `xlnet-base-cased` (32k vocab, Unigram)\n**mBART**: `facebook\u002Fmbart-large-50` (250k vocab, BPE)\n\n## References\n\n- **[Training Guide](references\u002Ftraining.md)** - Detailed options, corpus preparation\n- **[Algorithms](references\u002Falgorithms.md)** - BPE vs Unigram, subword regularization\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsentencepiece ⭐ 10,000+\n- **Paper**: https:\u002F\u002Farxiv.org\u002Fabs\u002F1808.06226 (EMNLP 2018)\n- **Version**: 0.2.0+\n\n\n","# SentencePiece - Language-Independent Tokenization\n\nUnsupervised tokenizer that works on raw text without language-specific preprocessing.\n\n## When to use SentencePiece\n\n**Use SentencePiece when:**\n- Building multilingual models (no language-specific rules)\n- Working with CJK languages (Chinese, Japanese, Korean)\n- Need reproducible tokenization (deterministic vocabulary)\n- Want to train on raw text (no pre-tokenization needed)\n- Require lightweight deployment (6MB memory, 50k sentences\u002Fsec)\n\n**Performance**:\n- **Speed**: 50,000 sentences\u002Fsec\n- **Memory**: ~6MB for loaded model\n- **Languages**: All (language-independent)\n\n**Use alternatives instead**:\n- **HuggingFace Tokenizers**: Faster training, more flexibility\n- **tiktoken**: OpenAI models (GPT-3.5\u002F4)\n- **BERT WordPiece**: English-centric tasks\n\n## Quick start\n\n### Installation\n\n```bash\n# Python\npip install sentencepiece\n\n# C++ (requires CMake)\ngit clone https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsentencepiece.git\ncd sentencepiece\nmkdir build && cd build\ncmake .. && make -j $(nproc)\nsudo make install\n```\n\n### Train model\n\n```bash\n# Command-line (BPE with 8000 vocab)\nspm_train --input=data.txt --model_prefix=m --vocab_size=8000 --model_type=bpe\n\n# Python API\nimport sentencepiece as spm\n\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='m',\n    vocab_size=8000,\n    model_type='bpe'\n)\n```\n\n**Training time**: ~1-2 minutes for 100MB corpus\n\n### Encode and decode\n\n```python\nimport sentencepiece as spm\n\n# Load model\nsp = spm.SentencePieceProcessor(model_file='m.model')\n\n# Encode to pieces\npieces = sp.encode('This is a test', out_type=str)\nprint(pieces)  # ['▁This', '▁is', '▁a', '▁test']\n\n# Encode to IDs\nids = sp.encode('This is a test', out_type=int)\nprint(ids)  # [284, 47, 11, 1243]\n\n# Decode\ntext = sp.decode(ids)\nprint(text)  # \"This is a test\"\n```\n\n## Language-independent design\n\n### Whitespace as symbol (▁)\n\n```python\ntext = \"Hello world\"\npieces = sp.encode(text, out_type=str)\nprint(pieces)  # ['▁Hello', '▁world']\n\n# Decode preserves spaces\ndecoded = sp.decode_pieces(pieces)\nprint(decoded)  # \"Hello world\"\n```\n\n**Key principle**: Treat text as raw Unicode, whitespace = ▁ (meta symbol)\n\n## Tokenization algorithms\n\n### BPE (Byte-Pair Encoding)\n\n```python\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='bpe_model',\n    vocab_size=16000,\n    model_type='bpe'\n)\n```\n\n**Used by**: mBART\n\n### Unigram (default)\n\n```python\nspm.SentencePieceTrainer.train(\n    input='data.txt',\n    model_prefix='unigram_model',\n    vocab_size=8000,\n    model_type='unigram'\n)\n```\n\n**Used by**: T5, ALBERT, XLNet\n\n## Training configuration\n\n### Essential parameters\n\n```python\nspm.SentencePieceTrainer.train(\n    input='corpus.txt',\n    model_prefix='m',\n    vocab_size=32000,\n    model_type='unigram',\n    character_coverage=0.9995,  # 1.0 for CJK\n    user_defined_symbols=['[SEP]', '[CLS]'],\n    unk_piece='\u003Cunk>',\n    num_threads=16\n)\n```\n\n### Character coverage\n\n| Language Type | Coverage | Rationale |\n|---------------|----------|-----------|\n| English       | 0.9995   | Most common chars |\n| CJK (Chinese) | 1.0      | All characters needed |\n| Multilingual  | 0.9995   | Balance |\n\n## Encoding options\n\n### Subword regularization\n\n```python\n# Sample different tokenizations\nfor _ in range(3):\n    pieces = sp.encode('tokenization', out_type=str, enable_sampling=True, alpha=0.1)\n    print(pieces)\n\n# Output (different each time):\n# ['▁token', 'ization']\n# ['▁tok', 'en', 'ization']\n```\n\n**Use case**: Data augmentation for robustness.\n\n## Common patterns\n\n### T5-style training\n\n```python\nspm.SentencePieceTrainer.train(\n    input='c4_corpus.txt',\n    model_prefix='t5',\n    vocab_size=32000,\n    model_type='unigram',\n    user_defined_symbols=[f'\u003Cextra_id_{i}>' for i in range(100)],\n    unk_id=2,\n    eos_id=1,\n    pad_id=0\n)\n```\n\n### Integration with transformers\n\n```python\nfrom transformers import T5Tokenizer\n\n# T5 uses SentencePiece internally\ntokenizer = T5Tokenizer.from_pretrained('t5-base')\ninputs = tokenizer('translate English to French: Hello', return_tensors='pt')\n```\n\n## Performance benchmarks\n\n### Training speed\n\n| Corpus | BPE (16k) | Unigram (8k) |\n|--------|-----------|--------------|\n| 100 MB | 1-2 min   | 3-4 min      |\n| 1 GB   | 10-15 min | 30-40 min    |\n\n### Tokenization speed\n\n- **SentencePiece**: 50,000 sentences\u002Fsec\n- **HF Tokenizers**: 200,000 sentences\u002Fsec (4× faster)\n\n## Supported models\n\n**T5 family**: `t5-base`, `t5-large` (32k vocab, Unigram)\n**ALBERT**: `albert-base-v2` (30k vocab, Unigram)\n**XLNet**: `xlnet-base-cased` (32k vocab, Unigram)\n**mBART**: `facebook\u002Fmbart-large-50` (250k vocab, BPE)\n\n## References\n\n- **[Training Guide](references\u002Ftraining.md)** - Detailed options, corpus preparation\n- **[Algorithms](references\u002Falgorithms.md)** - BPE vs Unigram, subword regularization\n\n## Resources\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fsentencepiece ⭐ 10,000+\n- **Paper**: https:\u002F\u002Farxiv.org\u002Fabs\u002F1808.06226 (EMNLP 2018)\n- **Version**: 0.2.0+\n\n\n",{"name":5,"tags":24,"author":35,"license":15,"version":36,"description":7,"dependencies":37},[25,26,27,28,29,30,31,32,33,34],"Tokenization","SentencePiece","Language-Independent","BPE","Unigram","Multilingual","CJK Languages","Unicode","Deterministic","Google","Orchestra Research","1.0.0",[5,38],"transformers","main","51493f354fd03e3f941d4df7fd64c0b8c7a2632d","skills\u002Fai-research\u002Ftokenization-sentencepiece","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi","漏洞研究、根因分析、黑箱測試｜做 AI agent 工具｜Vulnerability research, root-cause analysis, AI agent tooling","2026-08-16 02:24:07",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill sentencepiece",{"tool":52,"command":53},"bunx","bunx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill sentencepiece",{"tool":55,"command":56},"pnpm","pnpm dlx skills add GongYuanCaiJi\u002Fdsh-claude-code-templates --skill sentencepiece","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fai-research\u002Ftokenization-sentencepiece\u002FSKILL.md",true,[60,66],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Falgorithms.md","REFERENCE","参考文档",4212,"https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fai-research\u002Ftokenization-sentencepiece\u002Freferences\u002Falgorithms.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Ftraining.md",6240,"https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fai-research\u002Ftokenization-sentencepiece\u002Freferences\u002Ftraining.md",[71,78,87,94,101,108],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7ARMYTZ5D4B7N5SKFXV345V","zapier-make-patterns","No-code automation democratizes workflow building. Zapier and Make (formerly Integromat) let non-developers automate business processes without writing code. But no-code doesn't mean no-complexity - these platforms have their own patterns, pitfalls, and breaking points.  This skill covers when to use which platform, how to build reliable automations, and when to graduate to code-based solutions. Key insight: Zapier optimizes for simplicity and integrations (7000+ apps), Make optimizes for power","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fzapier-make-patterns\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":83,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7ARMX1BVNEAR98SBANMDF2V","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7ARMPR4RQ417MG1HMPGNQHH","workflow-automation","Workflow automation is the infrastructure that makes AI agents reliable. Without durable execution, a network hiccup during a 10-step payment flow means lost money and angry customers. With it, workflows resume exactly where they left off.  This skill covers the platforms (n8n, Temporal, Inngest) and patterns (sequential, parallel, orchestrator-worker) that turn brittle scripts into production-grade automation.  Key insight: The platforms make different tradeoffs. n8n optimizes for accessibility","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fworkflow-automation\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7ARMHBERDMKGDMV7K6MQ6YP","trigger-dev","Trigger.dev expert for background jobs, AI workflows, and reliable async execution with excellent developer experience and TypeScript-first design. Use when: trigger.dev, trigger dev, background task, ai background job, long running task.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Ftrigger-dev\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":19},"01M7ARME0A7KFT330Q2H25HE2B","slack-automation","Automate Slack workspace operations including messaging, search, channel management, and reaction workflows through Composio's Slack toolkit.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fslack-automation\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":19},"01M7ARM8D87V18WDG0GEZS11ZT","planning-with-files","Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.","https:\u002F\u002Fgithub.com\u002FGongYuanCaiJi\u002Fdsh-claude-code-templates\u002Fblob\u002Fmain\u002Fskills\u002Fworkflow-automation\u002Fplanning-with-files\u002FSKILL.md",[],[]]