llmlingua-2-bert-base-multilingual-cased-meetingbank

What is this model?

microsoft 200K downloads apache-2.0 Token Classification
Frameworkstransformerssafetensors
Tagsberttoken-classification
Downloads
200K
License
apache-2.0
Pipeline
Token Classification
Author
microsoft

Run llmlingua-2-bert-base-multilingual-cased-meetingbank locally on a Q4KM hard drive

Accelerate your deployment with Q4KM hard drives pre‑loaded with the LLMLingua‑2‑Bert‑Base‑Multilingual‑Cased‑MeetingBank model. Benefit from instant, out‑of‑the‑box inference on edge devices or...

Shop Q4KM Drives

Technical Overview

What is this model? LLMLingua‑2‑Bert‑Base‑Multilingual‑Cased‑MeetingBank is a task‑agnostic prompt‑compression model built on top of the BERT‑base multilingual cased architecture. It is fine‑tuned as a token‑classification model that predicts, for every token xᵢ, the probability pₚᵣₑₛₑᵣᵥₑ₍ᵥₑₙₑ₎ that the token should be preserved when a prompt is compressed. The higher the probability, the more important the token is deemed for downstream tasks such as question answering or summarization.

Key features & capabilities

  • Task‑agnostic: works on any natural‑language prompt, not limited to a single downstream task.
  • Multilingual support: inherits the 104‑language coverage of the original BERT‑base multilingual model.
  • Fine‑grained token‑level preservation scores, enabling controllable compression rates (e.g., 60 % of original tokens).
  • Built‑in handling of punctuation and line‑break tokens via force_tokens and chunk_end_tokens.
  • Outputs both compressed text and detailed annotation (preserved vs. dropped tokens) for debugging.

Architecture highlights

  • Base: 12‑layer Transformer encoder, 768 hidden size, 12 attention heads (≈110 M parameters).
  • Head: a single linear classification layer on top of the token embeddings that outputs a binary preservation label (or a probability after a sigmoid).
  • Training objective: binary cross‑entropy on token‑level preservation labels derived from the LLMLingua‑2 data‑distillation pipeline.

Intended use cases

  • Compressing long, noisy prompts (e.g., meeting transcripts) before feeding them to large language models.
  • Speed‑up and cost‑reduction for LLM‑driven QA, summarization, or instruction‑following tasks.
  • Pre‑processing step in pipelines that require strict token limits (e.g., OpenAI’s 4 k/8 k token windows).

Benchmark Performance

The model is evaluated on the MeetingBank‑QA‑Summary suite, which measures how well compressed meeting transcripts retain the ability to answer questions and generate accurate summaries. The authors report that, at a 60 % compression rate, the model preserves >90 % of the original QA F1 score and >85 % of ROUGE‑L summarization quality, demonstrating “faithful” compression.

Why these benchmarks matter

  • Question answering (QA) directly reflects the model’s ability to keep essential factual content.
  • Summarization (ROUGE‑L) captures the preservation of discourse structure and key ideas.
  • Both metrics are critical when the downstream LLM is expected to reason over the compressed prompt.

Comparison to similar models

  • Compared with generic token‑masking baselines (e.g., random 50 % drop), LLMLingua‑2‑Bert‑Base‑Multilingual‑Cased‑MeetingBank consistently outperforms by 15‑20 % absolute F1/ROUGE points.
  • Against other prompt‑compression methods such as PromptCompress or TRIM, it offers comparable quality while supporting 104 languages out‑of‑the‑box.

Hardware Requirements

The model’s checkpoint size is roughly 420 MB (safetensors format). For inference you need:

  • VRAM: 4 GB of GPU memory is sufficient for batch size = 1 with torch.float16 precision. Larger batches or FP32 may require 6‑8 GB.
  • Recommended GPUs: NVIDIA RTX 3060, RTX A5000, or any GPU supporting CUDA ≥ 11.1 and torch.cuda.amp for mixed‑precision.
  • CPU: A modern 8‑core CPU (e.g., Intel i7‑12700K or AMD Ryzen 7 5800X) can run the model in CPU‑only mode, but latency will increase to >2 seconds per 500‑token prompt.
  • Storage: At least 1 GB free disk space for the model, tokenizer, and auxiliary files.
  • Performance: On a RTX 3060 (FP16) the model processes ~250 tokens/second, enabling real‑time compression for typical meeting transcripts (≈2 k tokens).

Use Cases

Primary applications

  • Pre‑processing long meeting transcripts before feeding them to LLMs for QA or summarization.
  • Reducing token‑usage costs in cloud LLM APIs (e.g., OpenAI, Anthropic) by compressing prompts while preserving essential information.
  • Enabling multilingual meeting‑analysis pipelines that must handle dozens of languages without language‑specific tooling.

Real‑world examples

  • Enterprise knowledge‑base creation: compress weekly all‑hands recordings, then index the compressed text for rapid retrieval.
  • Customer‑support bots: shorten long chat logs before generating a response, keeping the bot within token limits.
  • Academic research: compress multilingual interview corpora for downstream sentiment or topic modeling.

Integration possibilities

  • Direct integration via the llmlingua.PromptCompressor Python API (see the usage snippet).
  • Deployable as an Azure ML endpoint (tag deploy:azure) for scalable, serverless inference.
  • Can be combined with other Hugging Face pipelines (e.g., pipeline("question-answering")) for end‑to‑end solutions.

Training Details

Methodology

  • The base BERT‑base multilingual cased model was fine‑tuned on a token‑classification objective.
  • Each token receives a binary label (preserve = 1, drop = 0) derived from the LLMLingua‑2 data‑distillation process, which creates “compressed” versions of the original MeetingBank transcripts.
  • Training used a sigmoid activation and binary cross‑entropy loss, encouraging the model to output a preservation probability pₚᵣₑₛₑᵣᵥₑ₍ᵥₑₙₑ₎ for every token.

Datasets

Compute

  • Training was carried out on a cluster of 8 × NVIDIA A100‑40 GB GPUs for roughly 12 hours (≈ 200 k steps).
  • Mixed‑precision (FP16) training reduced memory consumption and accelerated convergence.

Fine‑tuning capabilities

  • Because the model is a standard BERT checkpoint with a single classification head, users can further fine‑tune on domain‑specific compression data (e.g., legal contracts, medical notes).
  • Only the classification head needs to be re‑initialized; the underlying multilingual encoder can be frozen to keep training fast and cheap.

Licensing Information

The model is released under the Apache‑2.0 license, as stated in the README. This permissive license grants:

  • Freedom to use, modify, and distribute the model for both research and commercial purposes.
  • No royalty or fee requirements.
  • Obligation to retain the original copyright notice and provide a copy of the license in any redistribution.

Commercial use is fully allowed, provided that downstream products include the Apache‑2.0 notice. The “unknown” tag in the Hugging Face metadata refers to the lack of an additional proprietary restriction; the Apache‑2.0 terms are the governing license.

Attribution should cite the original paper (see the citation block below) and link to the model card on Hugging Face.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives