/ Модель

Характеристики

Параметры
2,9 млрд
Лицензия
Apache 2.0
Архитектура
mamba2 · dense
Базовая модель
mamba2-1.3b
Библиотека
sentence-transformers
Опубликована
19 апр 2026

llama-embed-mamba2-1.3b

ЭмбеддингиТекст → embedding10 профессий

Многоязычная модель Dynatrace на базе Mamba-2 для получения текстовых эмбеддингов с эффективной обработкой длинных последовательностей.

59скачиваний за 30 дней5лайковвеса обновлены19 мая 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

llama-embed-mamba2-1.3b — модель векторных представлений текста, разработанная Dynatrace Open Source на основе state-spaces/mamba2-1.3b. Она воспроизводит процедуру обучения e5-mistral-7b-instruct и предназначена для поиска по смыслу, кластеризации, классификации и других задач сравнения текстов.

Модель использует рекуррентную архитектуру Mamba-2, содержит 2,9 млрд параметров и выдаёт эмбеддинги. Вертикальная обработка блоками позволяет выполнять инференс с постоянным потреблением памяти независимо от длины последовательности; вычислительная сложность при этом линейна по длине входа. В README приведены результаты MTEB Multilingual v2 — 55,2, MTEB English v2 — 64,3 и LongEmbed — 40,8.

Модель принимает текст и предназначена для многоязычных задач, с отдельно приведёнными результатами для английского языка; основной язык не выделен. Для длинных входов требуется вертикальная обработка блоками, а для использования указана зависимость от transformers версии 5.5.0 или новее. Лицензия — Apache-2.0; обучение частично использовало синтетические данные, созданные Llama 3.1 70B.

Сценарии применения

  • поиск документов по смыслу
  • сравнение сходства предложений
  • кластеризация текстов по тематике
  • классификация текстов по эмбеддингам
  • кодирование длинных текстов в условиях ограниченной памяти

Ограничения

Для использования требуется transformers версии 5.5.0 или новее. Вертикальная обработка длинных последовательностей требует выбирать размер блока, кратный 256; результаты MTEB для английского ниже показателей e5-mistral-7b-instruct.

Для каких профессий подходит10

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

llama-embed-mamba2-1.3b

llama-embed-mamba2-1.3b is a general-purpose text embedding model that reproduces the e5-mistral-7b-instruct training procedure on top of state-spaces/mamba2-1.3b, a recurrent (state space model) architecture. It achieves embedding quality competitive with e5-mistral-7b-instruct and similarly trained transformer-based models while offering linear-time computational complexity and constant-memory inference through a novel vertically chunked inference strategy. This makes it substantially more efficient for long sequences and suitable for memory-constrained environments.

A larger variant is available as llama-embed-mamba2-7b.

[!Note] Built with Llama. This model was partially trained on synthetic data generated with Llama 3.1 70B. See License for details.

Performance

Aggregated task-mean benchmark results compared to the original e5-mistral-7b-instruct. For detailed results, see our paper.

ModelMTEB(Multilingual, v2)MTEB(eng, v2)LongEmbed
llama-embed-mamba2-1.3b (this model)55.264.340.8
llama-embed-mamba2-7b59.465.244.5
e5-mistral-7b-instruct60.268.043.7

Vertically Chunked Inference

This model supports vertically chunked inference, which achieves constant memory usage regardless of input sequence length. Instead of processing the full sequence through one layer at a time (standard horizontal inference), this approach:

  1. Partitions the input into fixed-size vertical chunks
  2. Processes each chunk through all model layers before advancing to the next
  3. Maintains the recurrent states across chunks, preserving full context

Parallelization benefits saturate at comparatively small chunk sizes, so processing in fixed-size blocks incurs negligible runtime overhead while dramatically reducing memory consumption. This makes the model particularly advantageous for long documents, resource-constrained environments, and large-batch processing where transformer memory requirements become prohibitive. Additional information can be found in our paper.

Usage

[!IMPORTANT] Requires transformers>=5.5.0 due to a breaking change to the cache of Mamba2 introduced in v5.5.0 (transformers#44950).

To utilize the efficient kernel implementations enabling vertically chunked inference, the following libraries must be installed in addition to sentence-transformers/transformers:

pip install kernels einops

Sentence Transformers

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("dynatrace-oss/llama-embed-mamba2-1.3b", trust_remote_code=True)

queries = [
    "Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery: What is a state space model?",
]
documents = [
    "A state space model (SSM) is a mathematical framework that describes a system using state variables.",
    "Embedding models map text to dense vector representations that capture semantic meaning.",
]

query_embeddings = model.encode(queries)
document_embeddings = model.encode(documents)

similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)

For long inputs, pass vertical_chunk_size to enable constant-memory inference. The value should be a multiple of 256 (the intra-layer chunk size). Recommended: largest value that fits in memory for single sequences, 256 or 512 for larger batches.

embeddings = model.encode(
    ["Your long document text here..."],
    vertical_chunk_size=512,
)

Transformers

import torch
import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("dynatrace-oss/llama-embed-mamba2-1.3b")
model = AutoModel.from_pretrained(
    "dynatrace-oss/llama-embed-mamba2-1.3b", trust_remote_code=True, torch_dtype=torch.bfloat16
).eval().cuda()

def encode(texts):
    inputs = tokenizer(texts, return_tensors="pt", padding=True).to(model.device)
    with torch.no_grad():
        outputs = model(**inputs)
    embeddings = outputs.last_hidden_state[:, -1, :]
    return F.normalize(embeddings, p=2, dim=-1)

queries = [
    "Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery: What is a state space model?",
]
documents = [
    "A state space model (SSM) is a mathematical framework that describes a system using state variables.",
    "Embedding models map text to dense vector representations that capture semantic meaning.",
]

query_embeddings = encode(queries)
document_embeddings = encode(documents)

similarities = query_embeddings @ document_embeddings.T
print(similarities)

For long inputs, process the input in vertical chunks to maintain constant memory usage. The vertical_chunk_size must be a multiple of 256 (the intra-layer chunk size).

text = "Your long document text here..."
inputs = tokenizer(text, return_tensors="pt").to(model.device)

vertical_chunk_size = 512
cache_params = None
for chunk_start in range(0, inputs["input_ids"].size(1), vertical_chunk_size):
    chunk_end = chunk_start + vertical_chunk_size
    chunk_inputs = {
        k: v[:, chunk_start:chunk_end]
        for k, v in inputs.items() if k != "attention_mask"
    }
    chunk_inputs["attention_mask"] = inputs["attention_mask"][:, :chunk_end]
    with torch.no_grad():
        outputs = model(**chunk_inputs, use_cache=True, cache_params=cache_params)
    cache_params = outputs.cache_params

embedding = outputs.last_hidden_state[:, -1, :]
embedding = F.normalize(embedding, p=2, dim=-1)

Open Source Integration Roadmap

Our goal is to integrate all necessary changes to simplify the adoption of vertically chunked inference for other models:

[!Note] ⚪ Planned | 🟡 In Progress | 🟢 Integrated

  • ⚪ mamba-ssm: Use initial_states in mamba_split_conv1d_scan_combined and export final states
  • ⚪ kernels-community: Propagate changes in mamba-ssm to its kernel hub equivalent in the kernels-community repository
  • ⚪ transformers: Use updated mamba_split_conv1d_scan_combined with cache params during inference (currently only used during training, not configurable, problems with cache)
  • ⚪ sentence-transformers: Native vertical chunking support

This list will be updated as integration progresses.

Code Repositories

The custom model and inference code used by this model is maintained in two separate repositories so that it can be shared between model checkpoints:

License

This model is licensed under the Apache License 2.0. The training dataset (open-synthetic-embeddings) is licensed under MIT.

Llama 3.1 Community License: This model was partially trained on synthetic data generated with Llama 3.1 70B. Use of this model is subject to the Llama 3.1 Community License Agreement and the Llama 3.1 Acceptable Use Policy. A copy of the Llama 3.1 license is included in the LLAMA_LICENSE file. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.

Usage Considerations

This model is intended for the generation of text embeddings for retrieval, clustering, classification, and similar tasks.

Embedding models can reflect biases present in their pretraining and fine-tuning data. Users should evaluate the model for fairness in their specific use case and combine model outputs with human verification for applications where embedding quality could materially impact individuals or decisions. This model must not be used for any application prohibited by the Llama 3.1 Acceptable Use Policy or in any manner that violates applicable laws and regulations.

Citation

If you find this model useful, consider citing our paper:

@article{grantner2026linear,
    title={Linear-Time and Constant-Memory Text Embeddings Based on Recurrent Language Models}, 
    author={Tobias Grantner and Emanuel Sallinger and Martin Flechl},
    year={2026},
    eprint={2604.18199},
    archivePrefix={arXiv},
    url={https://arxiv.org/abs/2604.18199},
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
ChunkableMamba2Model
Ревизия весов
02f5810

0 моделей