• bitcoinBitcoin(BTC)$79,578.00-1.51%
  • ethereumEthereum(ETH)$2,452.47-2.00%
  • tetherTether(USDT)$1.000.02%
  • binancecoinBNB(BNB)$721.08-0.11%
  • rippleXRP(XRP)$1.40-3.16%
  • usd-coinUSDC(USDC)$1.000.00%
  • solanaSolana(SOL)$101.86-1.67%
  • tronTRON(TRX)$0.3320680.74%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.040.54%
  • HyperliquidHyperliquid(HYPE)$84.14-3.69%
  • zcashZcash(ZEC)$1,015.368.06%
  • dogecoinDogecoin(DOGE)$0.084668-2.64%
  • RainRain(RAIN)$0.016452-3.87%
  • moneroMonero(XMR)$528.083.40%
  • USDSUSDS(USDS)$1.00-0.01%
  • chainlinkChainlink(LINK)$11.66-1.53%
  • whitebitWhiteBIT Coin(WBT)$73.12-0.88%
  • leo-tokenLEO Token(LEO)$9.22-1.21%
  • cardanoCardano(ADA)$0.210078-5.61%
  • stellarStellar(XLM)$0.178752-2.13%
  • bitcoin-cashBitcoin Cash(BCH)$245.88-3.58%
  • daiDai(DAI)$1.00-0.01%
  • Ethena USDeEthena USDe(USDE)$1.000.01%
  • CantonCanton(CC)$0.107388-3.95%
  • USD1USD1(USD1)$1.000.00%
  • litecoinLitecoin(LTC)$51.520.99%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.402.61%
  • uniswapUniswap(UNI)$6.18-2.27%
  • hedera-hashgraphHedera(HBAR)$0.0788080.28%
  • Global DollarGlobal Dollar(USDG)$1.000.00%
  • avalanche-2Avalanche(AVAX)$7.39-1.45%
  • suiSui(SUI)$0.76-1.03%
  • shiba-inuShiba Inu(SHIB)$0.000005-2.14%
  • paypal-usdPayPal USD(PYUSD)$1.00-0.01%
  • nearNEAR Protocol(NEAR)$2.1912.72%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • tether-goldTether Gold(XAUT)$4,429.58-0.91%
  • crypto-com-chainCronos(CRO)$0.055803-2.72%
  • Circle USYCCircle USYC(USYC)$1.140.04%
  • MemeCoreMemeCore(M)$1.138.76%
  • Ripple USDRipple USD(RLUSD)$1.000.01%
  • okbOKB(OKB)$109.220.48%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.01%
  • BittensorBittensor(TAO)$226.14-0.26%
  • aaveAave(AAVE)$130.15-2.26%
  • AsterAster(ASTER)$0.732.45%
  • pax-goldPAX Gold(PAXG)$4,436.09-0.95%
  • mantleMantle(MNT)$0.570.74%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.056487-1.88%
  • OndoOndo(ONDO)$0.3671821.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

Researchers at Stanford Introduce Gisting: A Novel Technique for Efficient Prompt Compression in Language Models

July 27, 2023
in AI & Technology
Reading Time: 6 mins read
A A
Researchers at Stanford Introduce Gisting: A Novel Technique for Efficient Prompt Compression in Language Models
ShareShareShareShareShare

Model specialization involves adapting a pre-trained machine-learning model to a specific task or domain. In Language Models (LMs), model specialization is crucial in improving their performance in various tasks like summarization, question-answering, translation, and language generation. The two main processes to specialize a language model to specific tasks are instruction fine-tuning (adapting a pre-trained model to a new task or set of tasks) and model distillation (transferring knowledge from a pre-trained, “teacher” model to a smaller, specialized, “student” model). Prompting is a key concept in the field of LM specialization, as it provides a way to guide the model towards specific behaviors, allows for more efficient use of limited training data, and is crucial for achieving state-of-the-art performance. Compressing prompts is a technique being studied with the hope of leading to substantial savings in computing, memory, and storage and no substantial decrease in the overall performance or quality of the output.

This paper, presented by researchers from Stanford University, proposes a novel technique for prompt compression called gisting, which trains an LM to compress prompts into smaller sets of “gist” tokens. In order to reduce the cost of the prompt, techniques like fine-tuning or distillation can be used to train a model that would behave like the original one without the prompt, but in that case, the model would have to be re-trained for every new prompt, which is far from ideal. The idea behind gisting, however, is to use a meta-learning approach to predict gist tokens from a prompt which would not require re-training the model for each task and would enable generalization to unseen instructions without additional training. This would come with a reduction in computational cost and would enable a prompt to be compressed, cached, and reused for compute efficiency. It would also allow users to fit more content into the limited context window.

The authors experimented with a simple way of achieving such a model – they used the LM itself (leveraging its pre-existing knowledge) to predict the gist tokens during the instruction fine-tuning while modifying the Transformer attention masks. Given a (task, input) pair, they add gist tokens between the task and the input and set the attention mask in the following way: the input tokens after the gist tokens cannot attend to any of the prompt tokens before the gist tokens (but they can attend to the gist tokens). Given the input and the output cannot attend to the prompt, this forces the model to compress the information from the prompt into the gist tokens in between.
To train the gist models, they needed a dataset with a large variety of tasks, so they created a dataset that they called Alpaca+, which combined the data from two existing instruction tuning datasets (Standford Alpaca and Self-Instruct) which totaled more than 130k examples. They then held out 3 validation splits to be able to validate the model after training which had Seen, Unseen, and hand-crafted Human prompts. This way, they were able to test the generalization to unseen instructions, with the Human split posing an even stronger generalization challenge. They also used multiple LM architectures (namely LLaMA-7Bm, a decoder-only GPT-style model, and FLAN-T5-XXL) and trained gist models with a varying number of gist tokens (1, 2, 5, or 10). However, the results showed that models were generally insensitive to the number of gist tokens, in some cases even showing that a larger number of tokens was actually detrimental to performance. They, therefore, used a single gist model for the rest of the experiments.

🚀 Join the fastest growing Reddit ML Community

To assess the quality of the prompt compression, they calibrated performance against a positive control, which was effectively a standard instruction finetuning, which provided an upper bound on performance, and a negative control where the model would not have access to the instruction at all, resulting in random gist tokens, which provided a lower bound on performance. To compare the outputs of their models to the positive control and measure a win rate against it, they asked ChatGPT to choose which response was better, explaining its reasoning. They also used a simple lexical overlap statistic called ROUGE-L (a metric that measures similarities between generated text and human-written instructions in open-ended instruction fine-tuning). A 50% win rate indicates that the model is of comparable quality to a model that does no prompt compression.

The results showed that on Seen instructions, the gist models performed very closely to the positive control models with 48.6% (LLaMA) and 50.8% (FLAN-T5) win rates. More importantly, they were able to show that the gist models had competitive generalizations to unseen prompts, with 49.7% (LLaMA) and 46.2% (FLAN-T5) win rates. Only on the most challenging Human split they saw slight drops in win rates (but still competitive) with 45.8% (LLaMA) and 42.5% (FLAN-T5). The slightly worse performance of the FLAN-T5 and the particular failure cases brought more hypotheses to be tested in future papers.

The researchers also investigated the potential efficiency gains that can be achieved through gisting, which was the primary motivation for the study. The results were highly encouraging, with gist caching leading to a 40% reduction in FLOPs and 4-7% lower wall clock time compared to unoptimized models. While these improvements were found to be smaller for decoder-only language models, the researchers also demonstrated that gist models enabled a 26x compression of unseen prompts, providing considerable additional space in the input context window.

Overall, these findings illustrate the significant potential of gisting for enhancing both the effectiveness and efficiency of specialized language models. The authors also suggest several promising directions for follow-up work on gisting. For example, they stipulate that the largest compute and efficiency gains from gisting will come from compressing longer prompts and that “gist pretraining” could improve compression performance by first learning to compress arbitrary spans of natural language before learning prompt compression.


Check out the Paper and Github. Don’t forget to join our 26k+ ML SubReddit, Discord Channel, and Email Newsletter, where we share the latest AI research news, cool AI projects, and more. If you have any questions regarding the above article or if we missed anything, feel free to email us at [email protected]

🚀 Check Out 100’s AI Tools in AI Tools Club


YOU MAY ALSO LIKE

How To See What’s Taking Up Space On Your Windows PC

OpenAI Commits $1B to Frontline Cyber Defense, Launches MS-ISAC Pilot – Unite.AI

Nathalie Crevoisier holds a Bachelor’s and Master’s degree in Physics from Imperial College London. She spent a year studying Applied Data Science, Machine Learning, and Internet Analytics at the Ecole Polytechnique Federale de Lausanne (EPFL) as part of her degree. During her studies, she developed a keen interest in AI, which led her to join Meta (formerly Facebook) as a Data Scientist after graduating. During her four-year tenure at the company, Nathalie worked on various teams, including Ads, Integrity, and Workplace, applying cutting-edge data science and ML tools to solve complex problems affecting billions of users. Seeking more independence and time to stay up-to-date with the latest AI discoveries, she recently decided to transition to a freelance career.


🔥 Gain a competitive
edge with data: Actionable market intelligence for global brands, retailers, analysts, and investors. (Sponsored)

Credit: Source link

ShareTweetSendSharePin

Related Posts

How To See What’s Taking Up Space On Your Windows PC
AI & Technology

How To See What’s Taking Up Space On Your Windows PC

September 4, 2026
OpenAI Commits B to Frontline Cyber Defense, Launches MS-ISAC Pilot – Unite.AI
AI & Technology

OpenAI Commits $1B to Frontline Cyber Defense, Launches MS-ISAC Pilot – Unite.AI

September 4, 2026
Flock Cameras Are Officially Banned On State Roads In Florida
AI & Technology

Flock Cameras Are Officially Banned On State Roads In Florida

September 4, 2026
Researchers Document OpenAI Agent Swarm That Repurposed German Wiki – Unite.AI
AI & Technology

Researchers Document OpenAI Agent Swarm That Repurposed German Wiki – Unite.AI

September 4, 2026
Next Post
‘Star Trek: Strange New Worlds’ probes the limits of redemption

‘Star Trek: Strange New Worlds’ probes the limits of redemption

Leave a Reply Cancel reply

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

Search

No Result
View All Result
Trump honors ‘beloved friend’ and ‘respected statesman’ Sen. Lindsey Graham at funeral

Trump honors ‘beloved friend’ and ‘respected statesman’ Sen. Lindsey Graham at funeral

September 3, 2026
Blanche rescinds DOJ fund for key votes in confirmation

Blanche rescinds DOJ fund for key votes in confirmation

August 30, 2026
Netskope: Cyber Play At A Large Discount

Netskope: Cyber Play At A Large Discount

September 3, 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!