Run this model with HF Jobs
Run dynatrace-oss/chunkable-mamba2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dynatrace-oss/chunkable-mamba2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dynatrace-oss/chunkable-mamba2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use dynatrace-oss/chunkable-mamba2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dynatrace-oss/chunkable-mamba2 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dynatrace-oss/chunkable-mamba2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
The fused chunked path exposed by this repo is deprecated in favor of the upstream split chunked path introduced in transformers#46084.
chunkable-mamba2
Custom Mamba2 model and configuration classes for π€ Transformers that add support for vertically chunked inference, which processes input sequences in fixed-size vertical chunks through all model layers with constant memory usage, regardless of sequence length.
What this repository provides
ChunkableMamba2Config: extendsMamba2Configwith ause_mem_eff_pathoption for the memory-efficient CUDA kernel path.ChunkableMamba2Model: extendsMamba2Modelwith a chunkable mixer and cache that correctly propagate the recurrent states across vertical chunks.chunkable_mamba_split_conv1d_scan_combined: modifiedmamba_split_conv1d_scan_combinedkernel wrapper that passes cache parameters through the SSD scan so that conv and SSM states are properly initialized and exported during chunked inference.
Usage
This repository is designed to be referenced directly from Hugging Face model configs via auto_map, so that models can be loaded with trust_remote_code=True without any local installation:
"auto_map": {
"AutoConfig": "dynatrace-oss/chunkable-mamba2--configuration_chunkable_mamba2.ChunkableMamba2Config",
"AutoModel": "dynatrace-oss/chunkable-mamba2--modeling_chunkable_mamba2.ChunkableMamba2Model"
}
Models
This code was created for the following embedding models:
Requirements
pip install transformers==5.21.0 kernels==0.17.2 einops
License
Apache-2.0