Toolverse
All skills

mamba-architecture

by davila7

State-space model with O(n) complexity vs Transformers' O(n²). 5× faster inference, million-token sequences, no KV cache. Selective SSM with hardware-aware design. Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head). Models 130M-2.8B on HuggingFace.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
davila7
Category
Security
Views
15

About this skill

State-space model with O(n) complexity vs Transformers' O(n²). 5× faster inference, million-token sequences, no KV cache. Selective SSM with hardware-aware design. Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head). Models 130M-2.8B on HuggingFace.

How to use

  1. Zainstaluj wymagane zależności: uruchom pip install mamba-ssm[causal-conv1d], aby pobrać bibliotekę Mamba wraz z opcjonalnym modułem causal-conv1d dla lepszej wydajności. Upewnij się, że masz system Linux, kartę NVIDIA GPU, PyTorch 1.12+ i CUDA 11.6+. 2. Zaimportuj moduł Mamba w swoim skrypcie Pythona: from mamba_ssm import Mamba oraz import torch. 3. Przygotuj dane wejściowe jako tensor PyTorch o kształcie (batch, length, dim) i przenieś go na GPU za pomocą .to("cuda"). 4. Utwórz instancję modelu Mamba, określając wymiary: d_model (wymiar ukryty), d_state (wymiar stanu SSM, zazwyczaj 16 dla Mamba-1 lub 128 dla Mamba-2), d_conv (rozmiar kernela konwolucji) i expand (współczynnik ekspansji). Przenieś model na GPU. 5. Uruchom forward pass, przekazując dane wejściowe do modelu: y = model(x). Wynik y będzie miał taki sam kształt jak wejście, przetworzony z liniową złożonością. 6. Dla bardziej zaawansowanego przypadku użytku (model języka z generacją) użyj MambaLMHeadModel i MambaConfig, konfigurując parametry takie jak liczba warstw, rozmiar słownika i typ SSM (Mamba2).

Related skills

security-compliance

by davila7

Guides security professionals in implementing defense-in-depth security architectures, achieving compliance with industry frameworks (SOC2, ISO27001, GDPR, HIPAA), conducting threat modeling and risk assessments, managing security operations and incident response, and embedding

Security
1172

architect-review

by sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural

Security
2773

senior-security

by davila7

Comprehensive security engineering skill for application security, penetration testing, security architecture, and compliance auditing. Includes security assessment tools, threat modeling, crypto implementation, and security automation. Use when designing security architecture,

Security
2482

software-security

by project-codeguard

A software security skill that integrates with Project CodeGuard to help AI coding agents write secure code and prevent common vulnerabilities. Use this skill when writing, reviewing, or modifying code to ensure secure-by-default practices are followed.

Security
1678

zendesk

by vm0-ai

Zendesk Support REST API for managing tickets, users, organizations, and support operations. Use this skill to create tickets, manage users, search, and automate customer support workflows.

Security
11100

python-expert

by Shubhamsaboo

Senior Python developer expertise for writing clean, efficient, and well-documented code.\nUse when: writing Python code, optimizing Python scripts, reviewing Python code for best practices,\ndebugging Python issues, implementing type hints, or when user mentions Python, PEP 8,

Security
2777