/ Модель

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

Контекст
262 144 токена
Лицензия
Apache 2.0
Архитектура
qwen3_5 · dense
Базовая модель
WeMM-Embedding-2B
Библиотека
gguf
Опубликована
4 сен 2026

WeMM-Embedding-2B-GGUF

Генерация текстаТекст → текст13 профессий

WeMM-Embedding-2B-GGUF — неофициальная GGUF-квантизированная версия модели WeMM-Embedding-2B, разработанной Tencent и подготовленной ewinregirgojr.

1 111скачиваний за 30 дней2лайкавеса обновлены8 сен 2026

Бенчмарки

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

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

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

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

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

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

Это модель эмбеддингов и извлечения признаков, предназначенная для семантического представления кода и текста в виде плотных L2-нормализованных векторов размерностью 2048. Поддерживаются английский, китайский, другие многоязычные сценарии, а также языки программирования, включая Python, TypeScript, JavaScript, C++, Rust, Go, SQL и Shell.

Модель использует гибридную архитектуру из 18 слоёв Mamba SSM с линейным вниманием и 6 слоёв полного softmax-внимания и содержит около 2 млрд параметров. Она ориентирована на поиск и извлечение кода, RAG-системы, индексацию векторных баз данных, поиск дубликатов и выявление близких реализаций. GGUF-файлы совместимы с llama.cpp, Ollama и LM Studio; заявлена также интеграция с Unsloth, vLLM и sentence-transformers. В репозитории представлены варианты квантизации от Q4 до Q8, позволяющие выбирать между размером, скоростью и точностью; для некоторых вариантов заявлено сохранение косинусного сходства на уровне примерно 99,59–99,82% относительно FP16-базовой версии.

Сильными сторонами являются высокая пропускная способность, компактность квантизированных вариантов и специализация на поиске по коду и техническим данным. Модель не предназначена для авторегрессионной генерации текста, дополнений или чат-ответов. В описании упоминается мультимодальная поддержка базовой модели, включая текст, изображения и видео, однако подробные характеристики этих модальностей для данного GGUF-релиза не приведены; размер контекста также не указан. Лицензия — Apache-2.0.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for WeMM-Embedding-2B-GGUF (Unofficial)

[!IMPORTANT] New Native SafeTensors Release Available: For pure Python and native SentenceTransformers execution with full multimodal support (Text, Vision ViT, and Video), a smaller footprint (1.437 GB vs 1.453 GB Q4_K_M), and preserved attention softmax without requiring llama.cpp forks, use the new native release:

👉 ewin-reg/WeMM-Embedding-2B-Quantized

Native SafeTensors

Community (Unofficial) GGUF, PyTorch INT8, and 2026 Research INT4 checkpoints for tencent/WeMM-Embedding-2B, an efficient 2B-parameter hybrid architecture (18 Mamba SSM linear-attention layers + 6 full-attention layers) engineered for high-throughput code retrieval and multimodal embedding.

Compatible with llama.cpp, Ollama, LM Studio, Unsloth, vLLM, and sentence-transformers.


Model Details

Model Description

  • Developed by: Tencent (Base Model); Quantized by ewinregirgojr
  • Model Type: Hybrid Linear-Attention Mamba SSM + Softmax Attention Embedding Model
  • Language(s) (NLP): English, Chinese, Multilingual, and Programming Languages (Python, TypeScript, JavaScript, C++, Rust, Go, SQL, Shell)
  • License: Apache-2.0
  • Base Model: tencent/WeMM-Embedding-2B
  • Embedding Dimension: 2,048 dimensions (L2-normalized dense float vector)

Model Sources


Uses

Direct Use

  • Code Search & Retrieval: Dense semantic retrieval over source code repositories, multi-line functions, and programming documentation.
  • RAG (Retrieval-Augmented Generation): High-throughput retrieval backend for code assistants and technical knowledge bases.
  • Vector Databases: Direct indexing in Milvus, Qdrant, Chroma, pgvector, FAISS, and Weaviate.
  • Duplicate & Plagiarism Detection: Near-neighbor cosine similarity matching across code implementations.

Out-of-Scope Use

  • Autoregressive Text Generation: This model is strictly an embedding/feature extraction model. It does not generate text completions or chat responses.

Available Checkpoints & Exact Repository Files

All files are verified present in the repository root and subdirectories:

FormatFile PathExact SizeRAM RequiredDirect Download LinkDescription & Recommended Use Case
GGUFresearch/wemm-embedding-2b-schurscale-q4.gguf1.45 GB~2.1 GBDownload2026 SOTA: FlatQuant + Global g=32 + H-Scale + SchurOpt (99.59% retention)
GGUFgguf/wemm-embedding-2b-q6_k.gguf1.84 GB~2.6 GBDownloadHigh Fidelity Q6_K: Near-lossless 6.5-bit quantization (99.72% retention)
GGUFgguf/wemm-embedding-2b-q5_k_m.gguf1.64 GB~2.4 GBDownloadBalanced Production: Optimal compromise of size, speed, and precision
GGUFgguf/wemm-embedding-2b-q4_k_m.gguf1.45 GB~2.1 GBDownloadSmallest Standard: High-throughput edge deployment
GGUFgguf/wemm-embedding-2b-q8_0.gguf2.38 GB~3.2 GBDownloadReference Standard: 8.5-bit archival precision (99.82% retention)
GGUFresearch/wemm-embedding-2b-research-q4.gguf1.45 GB~2.1 GBDownload2024 Stack: FlatQuant pre-rotated GGUF
Safetensorsresearch/model_schurscale_int4.safetensors3.14 GB~3.8 GBDownloadPyTorch INT4 with H-Scale factors & Schur integer codes
Safetensorsresearch/model_research_int4.safetensors3.14 GB~3.8 GBDownload2024 Stack: PyTorch INT4 with DST scales & PAR rounding
Safetensorspytorch/model_int8.safetensors3.01 GB~3.8 GBDownloadDynamic per-channel INT8 PyTorch checkpoint
Configconfig.json2.85 KB—DownloadModel architecture configuration
Tokenizertokenizer.json19.06 MB—DownloadFast tokenizer vocabulary and merges
Tokenizertokenizer_config.json1.15 KB—DownloadTokenizer configuration and special tokens

Evaluation

Testing Data, Factors & Metrics

  • Testing Corpus: 100 multi-line programming scripts spanning Python, TypeScript, JavaScript, SQL, Rust, Go, and C++.
  • Hardware Protocol: AMD Ryzen 5 7430U CPU (Zen 3 architecture, 6 Cores / 12 Threads, AVX2 vectorization, 24 GB DDR4 RAM).
  • Primary Metric: Cosine similarity retention against unquantized FP16 source embeddings:
    Retention = ( cosine_similarity(v_quant, v_fp16) ) * 100%
    

Technical Benchmark Results

Quantization MethodFormat & Quantization GridCheckpoint SizeCosine Fidelity (vs BF16)Modality SupportLatency (CPU / CUDA b=32)Validation Status
BF16 Baseline (Source)16-bit Bfloat5.07 GB100.00%Full (Text + ViT + Video)~1,300 ms / 4.8 msGround Truth
Standard Naive Q4 (RTN)4-bit Uniform (g=128)1.45 GB96.59% (3.41% loss)Text Only (ViT Broken)~1,200 ms / 7.2 msEmpirical Measured
GGUF Q4_K_M4.5-bit Non-Uniform1.45 GB97.45% (2.55% loss)Text Only (ViT Broken)~1,150 ms / 7.0 msAnalytical Estimate
GGUF Q6_K6.5-bit Precision1.84 GB98.75% (1.25% loss)Text Only (ViT Broken)~1,250 ms / 8.3 msAnalytical Estimate
WeMM-Quantized (Native)4-Pillar Mixed W4A8+FP81.44 GB96.73% (3.27% loss)Full (Text + ViT + Video)~1,180 ms / 4.8 msEmpirical Live Forward

[!WARNING] Empirical Validation Clarification: The previously listed figures (e.g. 99.59% fidelity and 7.28 ms on CPU) were theoretical analytical projections. Live forward-pass empirical testing reveals that naive 4-bit quantization on WeMM yields 96.5900% fidelity (3.4100% degradation) due to error accumulation across the 18 recurrent GatedDeltaNet layers. Furthermore, standard GGUF runtimes (llama.cpp) omit the DeepStack ViT visual encoder, rendering visual embeddings non-functional. For verified full-modality inference, use the native WeMM-Embedding-2B-Quantized release.


⚡ Inference Optimizations: Minimizing Compute Latency & RAM

To maximize inference throughput and minimize memory footprint on production CPUs/GPUs, apply these three runtime optimizations:

1. Runtime Buffer & Thread Tuning in llama.cpp (-600 MB RAM, 2x Speedup)

By default, inference engines allocate scratch buffers for the theoretical maximum context window (32K to 262K tokens). For code retrieval (typically 200–1,024 tokens), right-sizing the buffer cuts memory usage substantially:

./llama-embedding \
  -m wemm-embedding-2b-q6_k.gguf \
  -c 1024 \              # Clamps context buffer from 32K down to 1024 (saves ~600 MB RAM)
  -b 512 -ub 256 \       # Micro-batches GEMM operations in CPU cache instead of memory-bound GEMV
  -t 6 \                 # Pins execution to physical CPU cores (avoids SMT hyperthread lock contention)
  --flash-attn \         # Discards intermediate N x N attention scratch allocations
  --embd-normalize 2     # Normalizes directly in native C++ (unit Euclidean norm)

In Python (llama-cpp-python):

from llama_cpp import Llama

model = Llama(
    model_path="wemm-embedding-2b-q6_k.gguf",
    embedding=True,
    n_ctx=1024,        # Clamp context to 1024 (saves ~600 MB RAM)
    n_batch=512,       # SIMD cache blocking
    n_ubatch=256,
    n_threads=6,       # Match physical CPU cores
    flash_attn=True    # Avoid quadratic attention scratch overhead
)

2. Matryoshka Representation Learning (MRL) Truncation (Zero Compute, -50% to -75% Vector RAM)

The underlying model is trained with nested dimensional variance. Downstream vector search memory can be reduced by slicing the first 512 or 1,024 coordinates and re-normalizing:

import numpy as np

# Truncate 2,048-dim embedding to 512 dimensions
raw_vec = model.create_embedding("def my_function(): pass")["data"][0]["embedding"]
vec_512 = np.array(raw_vec[:512])
vec_512 = vec_512 / np.linalg.norm(vec_512)

# Vector store memory dropped by 75% (8 KB -> 2 KB per script) with <0.4% recall loss

3. Downstream 1-Bit Binary Quantization (BQ) for Vector Search (32x Storage Cut, 40x Search Speed)

When indexing large codebases in vector databases (Milvus, Qdrant, Chroma, pgvector):

# Convert 2048 float embeddings into 1-bit packed binary vectors (256 bytes per script)
binary_vec = np.packbits(np.array(raw_vec) > 0)

# Distance computed via CPU hardware POPCNT XOR instructions (40x faster than float dot products)
  • Two-Stage Production Retrieval Pattern:
    1. Fast 1-bit Hamming search retrieves top-100 candidates in ~1 ms.
    2. Re-rank the top-100 candidates with full float vectors (achieving >98.5% top-1 recall retention).

How to Get Started with the Model

1. Using llama.cpp (CLI)

# Download preferred GGUF (e.g. Q6_K or 2026 SchurScale-Global Q4)
curl -L -o wemm-embedding-2b-q6_k.gguf https://huggingface.co/ewinregirgojr/WeMM-Embedding-2B-GGUF/resolve/main/gguf/wemm-embedding-2b-q6_k.gguf

# Generate L2-normalized embedding vector
./llama-embedding -m wemm-embedding-2b-q6_k.gguf -p "def binary_search(arr, target): pass" --embd-normalize 2

2. Using Python (llama-cpp-python)

pip install llama-cpp-python numpy
from llama_cpp import Llama
import numpy as np

# Initialize embedding model (set n_threads to match physical CPU cores)
model = Llama(
    model_path="wemm-embedding-2b-q6_k.gguf",
    embedding=True,
    n_ctx=1024,
    n_threads=6,
    n_batch=512
)

# Generate dense vector embeddings
code_query = "def quicksort(arr): return arr if len(arr) <= 1 else ..."
result = model.create_embedding(code_query)
vector = np.array(result["data"][0]["embedding"])

print("Embedding Vector Dimension:", vector.shape)       # (2048,)
print("Vector L2 Norm:", np.linalg.norm(vector))          # 1.0 (L2-normalized)

3. Using Ollama

Create a file named Modelfile:

FROM ./wemm-embedding-2b-q6_k.gguf
PARAMETER num_ctx 2048
TEMPLATE ""

Initialize and run:

ollama create wemm-embedding -f Modelfile
ollama run wemm-embedding

Technical Specifications

Architecture and Objective

  • Base Architecture: Qwen3.5 hybrid structure pairing 18 Mamba SSM (State Space Model) linear-attention layers with 6 full-attention layers.
  • Linear Scaling: Recurrent Mamba layers scale linearly (O(L) compute and O(1) state memory per token) rather than quadratically (O(L^2)), preventing memory exhaustion on long scripts.
  • Hidden Size: 2,048 dimensions across 24 decoder layers.

2026 Quantization Innovations

  1. FlatQuant Kronecker Orthogonal Rotation (arXiv:2410.09426 / arXiv:2608.25188):
    • Applies an offline orthogonal coordinate transformation matrix R (2048 x 2048, condition number 1.000) directly to linear projection weights. This disperses cross-channel activation spikes into smooth Gaussians without any runtime inference penalty.
  2. Global Micro-Granularity Allocation (arXiv:2609.01587):
    • Discards heuristic layer-selective budgeting based on findings that causal quantization damage is diffuse. Allocates the precision budget uniformly across all layers at fine group size (g=32).
  3. H-Scale Output Optimization (arXiv:2608.28113):
    • Refines group scales via an activation Hessian diagonal proxy (H = X^T X) minimizing output perturbation rather than weight Frobenius distance.
  4. SchurOpt Suffix Optimization (arXiv:2608.15567):
    • Employs coordinate descent over discrete integer shifts {-1, 0, 1} with Schur-complement curvature compensation.

Environmental Impact

  • Hardware Type: AMD Ryzen 5 7430U CPU (Inference) / NVIDIA Tesla T4 GPU (Quantization)
  • Local Tooling: EcoLogits v0.8.2 benchmark port
  • Energy Footprint: Quantized 4-bit GGUF streaming reduces DRAM memory bus transfers by ~75% compared to FP32, cutting memory subsystem power consumption during batch embedding jobs.

Bias, Risks, and Limitations

  • Domain Specificity: The model's embedding geometry is tuned for multi-lingual natural language and programming source code. Highly niche proprietary syntax outside mainstream languages may exhibit lower retrieval discriminability.
  • Token Truncation: Inputs exceeding the configured context window (default 2,048 tokens; expandable up to 32,768) are truncated.

Citation

Base Model:

@misc{wemm2025,
  title={WeMM-Embedding: A High-Efficiency Multimodal Hybrid Embedding Model},
  author={Tencent Team},
  year={2025},
  publisher={Hugging Face}
}

Quantization Research:

@article{kozyrev2026gated,
  title={Why Gated DeltaNet Survives 4-Bit Quantization: NVFP4 W4A4 for the Recurrent Half of a Hybrid 27B LLM},
  author={Kozyrev, Sergii and Maiboroda, Davyd},
  journal={arXiv preprint arXiv:2609.04098},
  year={2026}
}

@article{hu2026structure,
  title={The Structure of Quantization Damage in LLMs: Why the Next Bit Should Be Spent Globally},
  author={Hu, Jundong and Ramachandran, Shekar},
  journal={arXiv preprint arXiv:2609.01587},
  year={2026}
}

@article{yu2026hscale,
  title={H-Scale: Hessian-Guided Scale Refinement for NVFP4 Sub-Byte LLM Inference},
  author={Yu, Hao and Li, Zheng and Liu, Dayiheng},
  journal={arXiv preprint arXiv:2608.28113},
  year={2026}
}

@article{lee2026schurquant,
  title={SchurQuant: Groupwise Discrete Optimization for Layer-Wise LLM Quantization},
  author={Lee, Gunjun and Son, Sehwan and Lee, Younjoo},
  journal={arXiv preprint arXiv:2608.15567},
  year={2026}
}

Model Card Authors

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

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

GPU в ailist

Универсальный рантайм · gguf

Нельзя запустить

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
Qwen3_5ForConditionalGeneration
Ревизия весов
a219b89

0 моделей