• bitcoinBitcoin(BTC)$80,418.003.27%
  • ethereumEthereum(ETH)$2,424.345.78%
  • tetherTether(USDT)$1.000.05%
  • binancecoinBNB(BNB)$712.561.89%
  • rippleXRP(XRP)$1.312.52%
  • usd-coinUSDC(USDC)$1.000.03%
  • solanaSolana(SOL)$95.903.33%
  • tronTRON(TRX)$0.318769-1.03%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.051.53%
  • zcashZcash(ZEC)$1,323.254.44%
  • HyperliquidHyperliquid(HYPE)$83.32-1.35%
  • dogecoinDogecoin(DOGE)$0.0765102.42%
  • moneroMonero(XMR)$635.70-0.70%
  • USDSUSDS(USDS)$1.000.02%
  • whitebitWhiteBIT Coin(WBT)$77.854.03%
  • chainlinkChainlink(LINK)$11.534.65%
  • leo-tokenLEO Token(LEO)$9.350.56%
  • cardanoCardano(ADA)$0.1970593.57%
  • stellarStellar(XLM)$0.1670282.60%
  • bitcoin-cashBitcoin Cash(BCH)$282.432.55%
  • nearNEAR Protocol(NEAR)$4.032.49%
  • uniswapUniswap(UNI)$7.623.40%
  • daiDai(DAI)$1.000.03%
  • Ethena USDeEthena USDe(USDE)$1.000.05%
  • litecoinLitecoin(LTC)$55.973.40%
  • RainRain(RAIN)$0.005847-6.88%
  • CantonCanton(CC)$0.1030494.73%
  • avalanche-2Avalanche(AVAX)$8.752.28%
  • suiSui(SUI)$0.923.31%
  • USD1USD1(USD1)$1.000.01%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.17-0.94%
  • tether-goldTether Gold(XAUT)$4,103.122.41%
  • hedera-hashgraphHedera(HBAR)$0.0726494.05%
  • quant-networkQuant(QNT)$205.595.86%
  • Global DollarGlobal Dollar(USDG)$1.000.03%
  • shiba-inuShiba Inu(SHIB)$0.0000051.42%
  • BittensorBittensor(TAO)$234.892.84%
  • paypal-usdPayPal USD(PYUSD)$1.000.02%
  • crypto-com-chainCronos(CRO)$0.0521122.86%
  • Ripple USDRipple USD(RLUSD)$1.000.03%
  • EthenaEthena(ENA)$0.180557-1.20%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.15-0.04%
  • okbOKB(OKB)$111.523.30%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • pepePepe(PEPE)$0.000005-0.58%
  • aaveAave(AAVE)$132.472.62%
  • OndoOndo(ONDO)$0.4088802.73%
  • Pump.funPump.fun(PUMP)$0.004309-0.60%
  • MemeCoreMemeCore(M)$0.84-1.33%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

MInference (Milliontokens Inference): A Training-Free Efficient Method for the Pre-Filling Stage of Long-Context LLMs Based on Dynamic Sparse Attention

July 7, 2024
in AI & Technology
Reading Time: 4 mins read
A A
MInference (Milliontokens Inference): A Training-Free Efficient Method for the Pre-Filling Stage of Long-Context LLMs Based on Dynamic Sparse Attention
ShareShareShareShareShare

The computational demands of LLMs, particularly with long prompts, hinder their practical use due to the quadratic complexity of the attention mechanism. For instance, processing a one million-token prompt with an eight-billion-parameter LLM on a single A100 GPU takes about 30 minutes for the initial stage. This leads to significant delays before the model starts generating outputs. While existing methods aim to accelerate this process, they often need to improve accuracy and efficiency. Dynamic sparse attention, which adapts to varying input patterns, can reduce this latency without extensive retraining, unlike fixed sparse methods like Longformer and BigBird.

Researchers from Microsoft Corporation and the University of Surrey have developed MInference (Million-tokens Inference), a method to speed up long-sequence processing in LLMs. By identifying three distinct attention patterns—A-shape, Vertical-Slash, and Block-Sparse—they optimize sparse calculations for GPUs. MInference dynamically builds sparse indices for these patterns during inference, significantly reducing latency without altering pre-training or needing fine-tuning. Tests on various LLMs and benchmarks, such as LLaMA-3-8B-1M and InfiniteBench, show up to a 10x speedup, cutting the pre-filling stage from 30 minutes to 3 minutes on a single A100 GPU while maintaining accuracy. 

YOU MAY ALSO LIKE

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI

Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI

Sparse attention methods aim to improve Transformer efficiency by reducing the quadratic complexity of attention. These methods include static sparse patterns (e.g., sliding windows, dilated attention), cluster-based approaches (e.g., hash-based, kNN-based), and dynamic sparse attention. However, they typically require pre-training, limiting their direct applicability to ready-to-use LLMs. Recent approaches extend LLM context windows through staged pre-training, modified position embeddings, and external memory modules but do not reduce high inference costs. Other studies optimize pre-filling and decoding in long-context LLMs yet often involve training from scratch or substantial overhead, making them impractical for existing pre-trained models.

Attention weights in long-context LLMs are inherently sparse and dynamic. For instance, in a 128k context, retaining just the top 4k columns covers 96.8% of the total attention. However, the specific tokens attended to by each head can vary greatly with different prompts, making the attention patterns highly context-dependent. Despite this variability, these patterns often exhibit consistent structures across different layers and heads, such as A-shape, Vertical-Slash, and Block-Sparse. Leveraging these patterns, we can significantly optimize sparse computations on GPUs, reducing the computational overhead while maintaining accuracy in long-context LLMs.

The experiments conducted aim to evaluate the effectiveness and efficiency of MInference across multiple benchmarks, including InfiniteBench, RULER, and the Needle in a Haystack task, covering diverse long-context scenarios such as QA, summarization, and retrieval. Four state-of-the-art long-context language models were utilized, including LLaMA-3 and GLM-4, with greedy decoding for consistency. MInference’s performance was tested on various context lengths, demonstrating superiority in maintaining context and processing speed over competing methods. It integrates efficiently with KV cache compression techniques and significantly reduces latency, proving its practical value in optimizing long-context language model performance.

The study tackles the high computational cost and significant latency in the pre-filling stage of long-context LLMs’ attention calculations by introducing MInference. MInference speeds up this process using dynamic sparse attention with specific spatial aggregation patterns: A-shape, Vertical-Slash, and Block-Sparse. A kernel-aware method optimizes the sparse pattern for each attention head, followed by a rapid approximation to create dynamic sparse masks for different inputs, facilitating efficient sparse attention. Testing on benchmarks like InfiniteBench and RULER shows MInference maintains long-context performance while achieving up to a 10x speedup, drastically cutting latency on a single A100 GPU from 30 minutes to 3 minutes for prompts up to 1 million tokens. Similar patterns have potential in multi-modal and encoder-decoder LLMs, indicating promising pre-filling stage acceleration applications.


Check out the Paper, GitHub, and Demo. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter. 

Join our Telegram Channel and LinkedIn Group.

If you like our work, you will love our newsletter..

Don’t Forget to join our 46k+ ML SubReddit


Sana Hassan, a consulting intern at Marktechpost and dual-degree student at IIT Madras, is passionate about applying technology and AI to address real-world challenges. With a keen interest in solving practical problems, he brings a fresh perspective to the intersection of AI and real-life solutions.

🐝 Join the Fastest Growing AI Research Newsletter Read by Researchers from Google + NVIDIA + Meta + Stanford + MIT + Microsoft and many others…


Credit: Source link

ShareTweetSendSharePin

Related Posts

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI
AI & Technology

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI

November 5, 2026
Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI
AI & Technology

Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI

November 5, 2026
Snap Has More Than 30 Million Paid Subscribers Across Snapchat+ And Other Plans
AI & Technology

Snap Has More Than 30 Million Paid Subscribers Across Snapchat+ And Other Plans

November 4, 2026
Atmospheric AI Secures M Seed for Procurement Modeling Push – Unite.AI
AI & Technology

Atmospheric AI Secures $10M Seed for Procurement Modeling Push – Unite.AI

November 4, 2026
Next Post
Severe weather causes flooding across the Midwest

Severe weather causes flooding across the Midwest

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Seagate: The Real Risk Isn't Toshiba, It's The 2028 Supply Wave (Downgrade)

Seagate: The Real Risk Isn't Toshiba, It's The 2028 Supply Wave (Downgrade)

November 1, 2026
Canelo Alvarez vs. Christian Mbilli live results, round-by-round updates, ring walks for today's title fight – Yahoo Sports

Canelo Alvarez vs. Christian Mbilli live results, round-by-round updates, ring walks for today's title fight – Yahoo Sports

October 31, 2026
Newly unsealed police body camera footage shows arrest of Luigi Mangione

Newly unsealed police body camera footage shows arrest of Luigi Mangione

November 2, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!