[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74YYHNNDWCA6BBNE1RJ092V":3,"skill-same:01M74YYHNNDWCA6BBNE1RJ092V":68},{"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":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M74YYHNNDWCA6BBNE1RJ092V","mamba-architecture",null,"Explains how to use Mamba selective state-space models (state-spaces\u002Fmamba package, Mamba-1 with d_state=16 and Mamba-2 with multi-head structure and d_state=128) for linear-time sequence modeling. Covers installation, the Mamba block, building a language model with MambaLMHeadModel, loading pretrained state-spaces checkpoints (130M to 2.8B) from HuggingFace, and benchmarking against Transformers. Use when implementing or loading Mamba models, processing very long sequences without a KV cache, building streaming applications, choosing between Mamba-1 and Mamba-2, or fixing install and CUDA memory problems. Requires Linux and an NVIDIA GPU. Do not use for standard Transformer models, or for RWKV, RetNet, or Hyena architectures.","KalarisLabs\u002Fresearch-agent-skills","KalarisLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F300878568?v=4","01M74Y7MT23GXXC56VM6TVSXZY","Kalarislabs","01M74Y7MTQM9REXZX4SNXWX95C",132,"MIT","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmamba-architecture\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: mamba-architecture\ndescription: Explains how to use Mamba selective state-space models (state-spaces\u002Fmamba package, Mamba-1 with d_state=16 and Mamba-2 with multi-head structure and d_state=128) for linear-time sequence modeling. Covers installation, the Mamba block, building a language model with MambaLMHeadModel, loading pretrained state-spaces checkpoints (130M to 2.8B) from HuggingFace, and benchmarking against Transformers. Use when implementing or loading Mamba models, processing very long sequences without a KV cache, building streaming applications, choosing between Mamba-1 and Mamba-2, or fixing install and CUDA memory problems. Requires Linux and an NVIDIA GPU. Do not use for standard Transformer models, or for RWKV, RetNet, or Hyena architectures.\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  category: ml-training\n  maintainer: Kalaris Labs\n  tags: Model Architecture, Mamba, State Space Models, SSM, Linear Complexity, Long Context, Efficient Inference, Hardware-Aware, Alternative To Transformers\n  dependencies: mamba-ssm, torch, transformers, causal-conv1d\n---\n\n# Mamba - Selective State Space Models\n\n## Quick start\n\nMamba is a state-space model architecture achieving O(n) linear complexity for sequence modeling.\n\n**Installation**:\n```bash\n# Install causal-conv1d (optional, for efficiency)\npip install causal-conv1d>=1.4.0\n\n# Install Mamba\npip install mamba-ssm\n# Or both together\npip install mamba-ssm[causal-conv1d]\n```\n\n**Prerequisites**: Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+\n\n**Basic usage** (Mamba block):\n```python\nimport torch\nfrom mamba_ssm import Mamba\n\nbatch, length, dim = 2, 64, 16\nx = torch.randn(batch, length, dim).to(\"cuda\")\n\nmodel = Mamba(\n    d_model=dim,      # Model dimension\n    d_state=16,       # SSM state dimension\n    d_conv=4,         # Conv1d kernel size\n    expand=2          # Expansion factor\n).to(\"cuda\")\n\ny = model(x)  # O(n) complexity!\nassert y.shape == x.shape\n```\n\n## Common workflows\n\n### Workflow 1: Language model with Mamba-2\n\n**Complete LM with generation**:\n```python\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\nfrom mamba_ssm.models.config_mamba import MambaConfig\nimport torch\n\n# Configure Mamba-2 LM\nconfig = MambaConfig(\n    d_model=1024,           # Hidden dimension\n    n_layer=24,             # Number of layers\n    vocab_size=50277,       # Vocabulary size\n    ssm_cfg=dict(\n        layer=\"Mamba2\",     # Use Mamba-2\n        d_state=128,        # Larger state for Mamba-2\n        headdim=64,         # Head dimension\n        ngroups=1           # Number of groups\n    )\n)\n\nmodel = MambaLMHeadModel(config, device=\"cuda\", dtype=torch.float16)\n\n# Generate text\ninput_ids = torch.randint(0, 1000, (1, 20), device=\"cuda\", dtype=torch.long)\noutput = model.generate(\n    input_ids=input_ids,\n    max_length=100,\n    temperature=0.7,\n    top_p=0.9\n)\n```\n\n### Workflow 2: Use pretrained Mamba models\n\n**Load from HuggingFace**:\n```python\nfrom transformers import AutoTokenizer\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\n\n# Load pretrained model\nmodel_name = \"state-spaces\u002Fmamba-2.8b\"\ntokenizer = AutoTokenizer.from_pretrained(\"EleutherAI\u002Fgpt-neox-20b\")  # Use compatible tokenizer\nmodel = MambaLMHeadModel.from_pretrained(model_name, device=\"cuda\", dtype=torch.float16)\n\n# Generate\nprompt = \"The future of AI is\"\ninput_ids = tokenizer(prompt, return_tensors=\"pt\").input_ids.to(\"cuda\")\noutput_ids = model.generate(\n    input_ids=input_ids,\n    max_length=200,\n    temperature=0.7,\n    top_p=0.9,\n    repetition_penalty=1.2\n)\ngenerated_text = tokenizer.decode(output_ids[0])\nprint(generated_text)\n```\n\n**Available models**:\n- `state-spaces\u002Fmamba-130m`\n- `state-spaces\u002Fmamba-370m`\n- `state-spaces\u002Fmamba-790m`\n- `state-spaces\u002Fmamba-1.4b`\n- `state-spaces\u002Fmamba-2.8b`\n\n### Workflow 3: Mamba-1 vs Mamba-2\n\n**Mamba-1** (smaller state):\n```python\nfrom mamba_ssm import Mamba\n\nmodel = Mamba(\n    d_model=256,\n    d_state=16,      # Smaller state dimension\n    d_conv=4,\n    expand=2\n).to(\"cuda\")\n```\n\n**Mamba-2** (multi-head, larger state):\n```python\nfrom mamba_ssm import Mamba2\n\nmodel = Mamba2(\n    d_model=256,\n    d_state=128,     # Larger state dimension\n    d_conv=4,\n    expand=2,\n    headdim=64,      # Head dimension for multi-head\n    ngroups=1        # Parallel groups\n).to(\"cuda\")\n```\n\n**Key differences**:\n- **State size**: Mamba-1 (d_state=16) vs Mamba-2 (d_state=128)\n- **Architecture**: Mamba-2 has multi-head structure\n- **Normalization**: Mamba-2 uses RMSNorm\n- **Distributed**: Mamba-2 supports tensor parallelism\n\n### Workflow 4: Benchmark vs Transformers\n\n**Generation speed comparison**:\n```bash\n# Benchmark Mamba\npython benchmarks\u002Fbenchmark_generation_mamba_simple.py \\\n  --model-name \"state-spaces\u002Fmamba-2.8b\" \\\n  --prompt \"The future of machine learning is\" \\\n  --topp 0.9 --temperature 0.7 --repetition-penalty 1.2\n\n# Benchmark Transformer\npython benchmarks\u002Fbenchmark_generation_mamba_simple.py \\\n  --model-name \"EleutherAI\u002Fpythia-2.8b\" \\\n  --prompt \"The future of machine learning is\" \\\n  --topp 0.9 --temperature 0.7 --repetition-penalty 1.2\n```\n\n**Expected results**:\n- **Mamba**: 5× faster inference\n- **Memory**: No KV cache needed\n- **Scaling**: Linear with sequence length\n\n## When to use vs alternatives\n\n**Use Mamba when**:\n- Need long sequences (100K+ tokens)\n- Want faster inference than Transformers\n- Memory-constrained (no KV cache)\n- Building streaming applications\n- Linear scaling important\n\n**Advantages**:\n- **O(n) complexity**: Linear vs quadratic\n- **5× faster inference**: No attention overhead\n- **No KV cache**: Lower memory usage\n- **Million-token sequences**: Hardware-efficient\n- **Streaming**: Constant memory per token\n\n**Use alternatives instead**:\n- **Transformers**: Need best-in-class performance, have compute\n- **RWKV**: Want RNN+Transformer hybrid\n- **RetNet**: Need retention-based architecture\n- **Hyena**: Want convolution-based approach\n\n## Common issues\n\n**Issue: CUDA out of memory**\n\nReduce batch size or use gradient checkpointing:\n```python\nmodel = MambaLMHeadModel(config, device=\"cuda\", dtype=torch.float16)\nmodel.gradient_checkpointing_enable()  # Enable checkpointing\n```\n\n**Issue: Slow installation**\n\nInstall binary wheels (not source):\n```bash\npip install mamba-ssm --no-build-isolation\n```\n\n**Issue: Missing causal-conv1d**\n\nInstall separately:\n```bash\npip install causal-conv1d>=1.4.0\n```\n\n**Issue: Model not loading from HuggingFace**\n\nUse `MambaLMHeadModel.from_pretrained` (not `AutoModel`):\n```python\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\nmodel = MambaLMHeadModel.from_pretrained(\"state-spaces\u002Fmamba-2.8b\")\n```\n\n## Advanced topics\n\n**Selective SSM**: See references\u002Fselective-ssm.md for mathematical formulation, state-space equations, and how selectivity enables O(n) complexity.\n\n**Mamba-2 architecture**: See references\u002Fmamba2-details.md for multi-head structure, tensor parallelism, and distributed training setup.\n\n**Performance optimization**: See references\u002Fperformance.md for hardware-aware design, CUDA kernels, and memory efficiency techniques.\n\n## Hardware requirements\n\n- **GPU**: NVIDIA with CUDA 11.6+\n- **VRAM**:\n  - 130M model: 2GB\n  - 370M model: 4GB\n  - 790M model: 8GB\n  - 1.4B model: 14GB\n  - 2.8B model: 28GB (FP16)\n- **Inference**: 5× faster than Transformers\n- **Memory**: No KV cache (lower than Transformers)\n\n**Performance** (vs Transformers):\n- **Speed**: 5× faster inference\n- **Memory**: 50% less (no KV cache)\n- **Scaling**: Linear vs quadratic\n\n## Resources\n\n- Paper (Mamba-1): https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.00752 (Dec 2023)\n- Paper (Mamba-2): https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.21060 (May 2024)\n- GitHub: https:\u002F\u002Fgithub.com\u002Fstate-spaces\u002Fmamba ⭐ 13,000+\n- Models: https:\u002F\u002Fhuggingface.co\u002Fstate-spaces\n- Docs: Repository README and wiki\n\n## Agent operating procedure\n\n1. **Check the environment.** Check GPU type, memory and driver\u002FCUDA versions (`nvidia-smi`), framework versions, and dataset location and size.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Do a smoke run: tiny model or subset, few steps, and confirm loss decreases and checkpoints save.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Track metrics on held-out data, compare against a baseline, and record seeds, configs and hardware.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| CUDA out-of-memory | Reduce batch size, enable gradient accumulation\u002Fcheckpointing or mixed precision, or shard the model. |\n| Loss is NaN or diverges | Lower the learning rate, check data for invalid values, and enable gradient clipping. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never claim training results without logs; estimate compute cost before launching large jobs.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `rwkv-architecture`: Covers the RWKV (Receptance Weighted Key Value) architecture, an RNN\u002FTransformer hybrid with O(n) inference and no KV cache, including RWKV…\n- `optimizing-attention-flash`: Enables Flash Attention for transformer models using PyTorch native scaled_dot_product_attention (PyTorch 2.2+) or the flash-attn library,…\n","# Mamba - Selective State Space Models\n\n## Quick start\n\nMamba is a state-space model architecture achieving O(n) linear complexity for sequence modeling.\n\n**Installation**:\n```bash\n# Install causal-conv1d (optional, for efficiency)\npip install causal-conv1d>=1.4.0\n\n# Install Mamba\npip install mamba-ssm\n# Or both together\npip install mamba-ssm[causal-conv1d]\n```\n\n**Prerequisites**: Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+\n\n**Basic usage** (Mamba block):\n```python\nimport torch\nfrom mamba_ssm import Mamba\n\nbatch, length, dim = 2, 64, 16\nx = torch.randn(batch, length, dim).to(\"cuda\")\n\nmodel = Mamba(\n    d_model=dim,      # Model dimension\n    d_state=16,       # SSM state dimension\n    d_conv=4,         # Conv1d kernel size\n    expand=2          # Expansion factor\n).to(\"cuda\")\n\ny = model(x)  # O(n) complexity!\nassert y.shape == x.shape\n```\n\n## Common workflows\n\n### Workflow 1: Language model with Mamba-2\n\n**Complete LM with generation**:\n```python\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\nfrom mamba_ssm.models.config_mamba import MambaConfig\nimport torch\n\n# Configure Mamba-2 LM\nconfig = MambaConfig(\n    d_model=1024,           # Hidden dimension\n    n_layer=24,             # Number of layers\n    vocab_size=50277,       # Vocabulary size\n    ssm_cfg=dict(\n        layer=\"Mamba2\",     # Use Mamba-2\n        d_state=128,        # Larger state for Mamba-2\n        headdim=64,         # Head dimension\n        ngroups=1           # Number of groups\n    )\n)\n\nmodel = MambaLMHeadModel(config, device=\"cuda\", dtype=torch.float16)\n\n# Generate text\ninput_ids = torch.randint(0, 1000, (1, 20), device=\"cuda\", dtype=torch.long)\noutput = model.generate(\n    input_ids=input_ids,\n    max_length=100,\n    temperature=0.7,\n    top_p=0.9\n)\n```\n\n### Workflow 2: Use pretrained Mamba models\n\n**Load from HuggingFace**:\n```python\nfrom transformers import AutoTokenizer\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\n\n# Load pretrained model\nmodel_name = \"state-spaces\u002Fmamba-2.8b\"\ntokenizer = AutoTokenizer.from_pretrained(\"EleutherAI\u002Fgpt-neox-20b\")  # Use compatible tokenizer\nmodel = MambaLMHeadModel.from_pretrained(model_name, device=\"cuda\", dtype=torch.float16)\n\n# Generate\nprompt = \"The future of AI is\"\ninput_ids = tokenizer(prompt, return_tensors=\"pt\").input_ids.to(\"cuda\")\noutput_ids = model.generate(\n    input_ids=input_ids,\n    max_length=200,\n    temperature=0.7,\n    top_p=0.9,\n    repetition_penalty=1.2\n)\ngenerated_text = tokenizer.decode(output_ids[0])\nprint(generated_text)\n```\n\n**Available models**:\n- `state-spaces\u002Fmamba-130m`\n- `state-spaces\u002Fmamba-370m`\n- `state-spaces\u002Fmamba-790m`\n- `state-spaces\u002Fmamba-1.4b`\n- `state-spaces\u002Fmamba-2.8b`\n\n### Workflow 3: Mamba-1 vs Mamba-2\n\n**Mamba-1** (smaller state):\n```python\nfrom mamba_ssm import Mamba\n\nmodel = Mamba(\n    d_model=256,\n    d_state=16,      # Smaller state dimension\n    d_conv=4,\n    expand=2\n).to(\"cuda\")\n```\n\n**Mamba-2** (multi-head, larger state):\n```python\nfrom mamba_ssm import Mamba2\n\nmodel = Mamba2(\n    d_model=256,\n    d_state=128,     # Larger state dimension\n    d_conv=4,\n    expand=2,\n    headdim=64,      # Head dimension for multi-head\n    ngroups=1        # Parallel groups\n).to(\"cuda\")\n```\n\n**Key differences**:\n- **State size**: Mamba-1 (d_state=16) vs Mamba-2 (d_state=128)\n- **Architecture**: Mamba-2 has multi-head structure\n- **Normalization**: Mamba-2 uses RMSNorm\n- **Distributed**: Mamba-2 supports tensor parallelism\n\n### Workflow 4: Benchmark vs Transformers\n\n**Generation speed comparison**:\n```bash\n# Benchmark Mamba\npython benchmarks\u002Fbenchmark_generation_mamba_simple.py \\\n  --model-name \"state-spaces\u002Fmamba-2.8b\" \\\n  --prompt \"The future of machine learning is\" \\\n  --topp 0.9 --temperature 0.7 --repetition-penalty 1.2\n\n# Benchmark Transformer\npython benchmarks\u002Fbenchmark_generation_mamba_simple.py \\\n  --model-name \"EleutherAI\u002Fpythia-2.8b\" \\\n  --prompt \"The future of machine learning is\" \\\n  --topp 0.9 --temperature 0.7 --repetition-penalty 1.2\n```\n\n**Expected results**:\n- **Mamba**: 5× faster inference\n- **Memory**: No KV cache needed\n- **Scaling**: Linear with sequence length\n\n## When to use vs alternatives\n\n**Use Mamba when**:\n- Need long sequences (100K+ tokens)\n- Want faster inference than Transformers\n- Memory-constrained (no KV cache)\n- Building streaming applications\n- Linear scaling important\n\n**Advantages**:\n- **O(n) complexity**: Linear vs quadratic\n- **5× faster inference**: No attention overhead\n- **No KV cache**: Lower memory usage\n- **Million-token sequences**: Hardware-efficient\n- **Streaming**: Constant memory per token\n\n**Use alternatives instead**:\n- **Transformers**: Need best-in-class performance, have compute\n- **RWKV**: Want RNN+Transformer hybrid\n- **RetNet**: Need retention-based architecture\n- **Hyena**: Want convolution-based approach\n\n## Common issues\n\n**Issue: CUDA out of memory**\n\nReduce batch size or use gradient checkpointing:\n```python\nmodel = MambaLMHeadModel(config, device=\"cuda\", dtype=torch.float16)\nmodel.gradient_checkpointing_enable()  # Enable checkpointing\n```\n\n**Issue: Slow installation**\n\nInstall binary wheels (not source):\n```bash\npip install mamba-ssm --no-build-isolation\n```\n\n**Issue: Missing causal-conv1d**\n\nInstall separately:\n```bash\npip install causal-conv1d>=1.4.0\n```\n\n**Issue: Model not loading from HuggingFace**\n\nUse `MambaLMHeadModel.from_pretrained` (not `AutoModel`):\n```python\nfrom mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel\nmodel = MambaLMHeadModel.from_pretrained(\"state-spaces\u002Fmamba-2.8b\")\n```\n\n## Advanced topics\n\n**Selective SSM**: See references\u002Fselective-ssm.md for mathematical formulation, state-space equations, and how selectivity enables O(n) complexity.\n\n**Mamba-2 architecture**: See references\u002Fmamba2-details.md for multi-head structure, tensor parallelism, and distributed training setup.\n\n**Performance optimization**: See references\u002Fperformance.md for hardware-aware design, CUDA kernels, and memory efficiency techniques.\n\n## Hardware requirements\n\n- **GPU**: NVIDIA with CUDA 11.6+\n- **VRAM**:\n  - 130M model: 2GB\n  - 370M model: 4GB\n  - 790M model: 8GB\n  - 1.4B model: 14GB\n  - 2.8B model: 28GB (FP16)\n- **Inference**: 5× faster than Transformers\n- **Memory**: No KV cache (lower than Transformers)\n\n**Performance** (vs Transformers):\n- **Speed**: 5× faster inference\n- **Memory**: 50% less (no KV cache)\n- **Scaling**: Linear vs quadratic\n\n## Resources\n\n- Paper (Mamba-1): https:\u002F\u002Farxiv.org\u002Fabs\u002F2312.00752 (Dec 2023)\n- Paper (Mamba-2): https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.21060 (May 2024)\n- GitHub: https:\u002F\u002Fgithub.com\u002Fstate-spaces\u002Fmamba ⭐ 13,000+\n- Models: https:\u002F\u002Fhuggingface.co\u002Fstate-spaces\n- Docs: Repository README and wiki\n\n## Agent operating procedure\n\n1. **Check the environment.** Check GPU type, memory and driver\u002FCUDA versions (`nvidia-smi`), framework versions, and dataset location and size.\n2. **Pin down the inputs.** Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.\n3. **Run a small version first.** Do a smoke run: tiny model or subset, few steps, and confirm loss decreases and checkpoints save.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Track metrics on held-out data, compare against a baseline, and record seeds, configs and hardware.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| CUDA out-of-memory | Reduce batch size, enable gradient accumulation\u002Fcheckpointing or mixed precision, or shard the model. |\n| Loss is NaN or diverges | Lower the learning rate, check data for invalid values, and enable gradient clipping. |\n| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (`help()`, `--help`, official docs), adapt, and tell the user. Never invent an API. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Never claim training results without logs; estimate compute cost before launching large jobs.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `rwkv-architecture`: Covers the RWKV (Receptance Weighted Key Value) architecture, an RNN\u002FTransformer hybrid with O(n) inference and no KV cache, including RWKV…\n- `optimizing-attention-flash`: Enables Flash Attention for transformer models using PyTorch native scaled_dot_product_attention (PyTorch 2.2+) or the flash-attn library,…\n",{"name":5,"license":15,"metadata":24,"description":7},{"tags":25,"version":26,"category":27,"maintainer":28,"dependencies":29},"Model Architecture, Mamba, State Space Models, SSM, Linear Complexity, Long Context, Efficient Inference, Hardware-Aware, Alternative To Transformers","1.0.0","ml-training","Kalaris Labs","mamba-ssm, torch, transformers, causal-conv1d","main","29fe36d26127205057d5e0ed8425f6b0e9a8c13a","skills\u002Fmamba-architecture",16,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills","https:\u002F\u002Fdocs.kalarislabs.com\u002Fresearch-agent-skills","https:\u002F\u002Fgithub.com\u002FKalarisLabs","kalarislabs.com","Applied AI lab building the infrastructure for the agentic era","2026-11-14 17:49:08",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add KalarisLabs\u002Fresearch-agent-skills --skill mamba-architecture",{"tool":46,"command":47},"bunx","bunx skills add KalarisLabs\u002Fresearch-agent-skills --skill mamba-architecture",{"tool":49,"command":50},"pnpm","pnpm dlx skills add KalarisLabs\u002Fresearch-agent-skills --skill mamba-architecture","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmamba-architecture\u002FSKILL.md",true,[54,60,64],{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Farchitecture-details.md","REFERENCE","参考文档",5456,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmamba-architecture\u002Freferences\u002Farchitecture-details.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fbenchmarks.md",8120,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmamba-architecture\u002Freferences\u002Fbenchmarks.md",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Ftraining-guide.md",9012,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fmamba-architecture\u002Freferences\u002Ftraining-guide.md",[69,76,83,90,97,104],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M74Z8MGT305R11SNY5G28QH5","plos","Prepare manuscripts for PLOS journals (PLOS ONE, PLOS Biology, PLOS Computational Biology, PLOS Genetics, PLOS Medicine, PLOS Pathogens, PLOS Neglected Tropical Diseases, PLOS Global Public Health and others), covering structure, abstract and author summary, Vancouver-style references, the mandatory data availability policy, ethics and financial disclosure statements, figure requirements (PACE), the PLOS LaTeX template, reporting guidelines and PLOS ONE's publication criteria. Use when targeting any PLOS journal or checking compliance with PLOS policies.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplos\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M74Z8CCN9APXYHNQ95V1EBGT","pkpd-modeling","Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK\u002FPD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when analysing concentration-time data, deriving exposure metrics, fitting PK or PD models, or evaluating dosing regimens. Triggers include \"pharmacokinetics\", \"pharmacodynamics\", \"PK\u002FPD\", \"NCA\", \"non-compartmental\", \"AUC\", \"Cmax\", \"lambda z\", \"half-life\", \"clearance\", \"volume of distribution\", \"compartmental model\", \"population PK\", \"popPK\", \"NONMEM\", \"nlmixr2\", \"Pharmpy\", \"Monolix\", \"exposure-response\", \"Emax\", \"EC50\", \"indirect response\", \"effect compartment\", \"TMDD\", \"PBPK\", \"bioequivalence\", \"RSABE\", \"ABEL\", \"allometric scaling\", \"first-in-human\", \"MABEL\", \"drug-drug interaction\", \"DDI\", \"ICH M12\", \"concentration-QTc\", \"therapeutic drug monitoring\", \"MIPD\", and \"dosing regimen\".","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpkpd-modeling\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M74Z86YHJJ1FM3X87BHN76KZ","pinecone","Guides use of Pinecone, a managed serverless vector database, through its Python client and the LangChain and LlamaIndex integrations. Covers creating indexes, upserting and querying vectors, metadata filtering, namespaces, hybrid dense and sparse search, index management, and deleting vectors. Use when building a production RAG system on a hosted vector store, adding semantic search or recommendations without running infrastructure, isolating per-user or per-tenant data with namespaces, combining dense and sparse vectors in one query, or filtering results by metadata. Do not use for self-hosted or local stores (Chroma, Weaviate) or offline similarity search (FAISS).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpinecone\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M74Z80T6E89SAJ8MYDD0767Q","pi-agent","Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers\u002Fmodels\u002Fsettings\u002Fenvironment variables, creating Pi skills\u002Fextensions\u002Fpackages\u002Fthemes\u002Fprompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation\u002Forchestration), pi-mcp-adapter (MCP servers), pi-interview (interactive forms), and pi-web-access (web search, fetching, video understanding).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpi-agent\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74Z7WF1Y8Q3VFAQPPPRAFMV","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fphoenix-observability\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M74Z7HNEH1A2AVYR3G1X2QV6","peft-fine-tuning","Fine-tunes LLMs with Hugging Face PEFT, using LoRA, QLoRA, IA3, AdaLoRA, prefix tuning, and prompt tuning so that under 1% of parameters are trained. Covers rank, alpha, and target module selection, loading and merging adapters, multi-adapter serving, and integration with TRL SFTTrainer, Axolotl, and vLLM. Use when fine-tuning 7B-70B models on limited GPU memory, when running QLoRA on a single 24GB GPU, when choosing LoRA rank and alpha, when merging or swapping adapters on one base model, or when debugging CUDA OOM or an adapter that does not apply. Not for full fine-tuning of small models under 1B parameters or cases needing all weights updated.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpeft-fine-tuning\u002FSKILL.md",[],[]]