search
HomeTechnology peripheralsAI5 million token monster, read the entire 'Harry Potter' in one go! More than 1000 times longer than ChatGPT

Poor memory is the main pain point of current mainstream large-scale language models. For example, ChatGPT can only input 4096 tokens (about 3000 words). I often forget what I said before while chatting, and it is not even enough to read. of a short story.

The short input window also limits the application scenarios of the language model. For example, when summarizing a scientific paper (about 10,000 words), the article needs to be manually segmented. When it is input into the model, the associated information between different chapters is lost.

Although GPT-4 supports a maximum of 32,000 tokens and the upgraded Claude supports a maximum of 100,000 tokens, they can only alleviate the problem of insufficient brain capacity.

Recently a entrepreneurial team Magic announced that it will soon release the LTM-1 model, which can support up to 5 million token, It is about 500,000 lines of code or 5,000 files, which is 50 times higher than Claude. It can basically cover most storage needs. This is really a quantitative change that leads to a qualitative change!

The main application scenario of LTM-1 is code completion, for example, it can generate longer and more complex code suggestions.

You can also reuse and synthesize information across multiple files.

The bad news is that Magic, the developer of LTM-1, did not release the specific technical principles, but only said that it designed a brand new method the Long-term Memory Network (LTM Net).

But there is also good news. In September 2021, researchers from DeepMind and other institutions once proposed a model called ∞-former, which includes long-term memory (long- term memory (LTM) mechanism, which theoretically allows the Transformer model to have infinite memory, but it is not clear whether the two are the same technology or an improved version.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

Paper link: https://arxiv.org/pdf/2109.00301.pdf

The development team stated that although LTM Nets can see more context than GPT, the number of parameters of the LTM-1 model is much smaller than the current sota model, so it is more intelligent. Low, but continuing to increase the model size should improve the performance of LTM Nets.

Currently LTM-1 has opened alpha test applications.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

Application link: https://www.php. cn/link/bbfb937a66597d9646ad992009aee405

LTM-1 developer Magic was founded in 2022. It mainly develops products similar to GitHub Copilot, which can help software engineers write and review , debugging and modifying code, the goal is to create an AI colleague for programmers whose main competitive advantage is that the model can read longer codes.

Magic is committed to public benefit and its mission is to build and safely deploy AGI systems that exceed human capabilities. It is currently a startup company with only 10 people.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

In February this year, Magic received US$23 million in Series A financing led by CapitalG, a subsidiary of Alphabet. Investors also Including Nat Friedman, the former CEO of GitHub and co-producer of Copilot, the company's total funding currently reaches US$28 million.

Eric Steinberger, CEO and co-founder of Magic, graduated from Cambridge University with a bachelor's degree in computer science and has done machine learning research at FAIR.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

Before founding Magic, Steinberger also founded ClimateScience to help children around the world learn about the impacts of climate change.

Infinite Memory Transformer

The design of the attention mechanism in the Transformer, the core component of the language model, will cause the time complexity to increase every time the length of the input sequence is increased. Quadratic growth.

Although there are some variants of the attention mechanism, such as sparse attention, etc., to reduce the complexity of the algorithm, its complexity is still related to the input length and cannot be infinitely expanded.

∞-former The key to the long-term memory (LTM) Transformer model that can extend the input sequence to infinity is a continuous spatial attention framework that reduces the representation granularity Increase the number of memory information units (basis functions).

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

In the framework, the input sequence is represented as a "continuous signal", representing N radial basis functions ( RBF), in this way, the attention complexity of ∞-former is reduced to O(L^2 L × N), while the attention complexity of the original Transformer is O(L×(L L_LTM)), where L and L_LTM correspond to the Transformer input size and long-term memory length respectively.

This representation method has two main advantages:

#1. The context can be represented by a basis function N that is smaller than the number of tokens, reducing The computational cost of attention is reduced;

2. N can be fixed, thereby being able to represent unlimited context in memory without increasing the complexity of the attention mechanism.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

Of course, there is no free lunch in the world, and the price is the reduction of resolution: when using a smaller number of basis functions, Can result in reduced accuracy when representing the input sequence as a continuous signal.

In order to alleviate the problem of resolution reduction, researchers introduced the concept of "sticky memories", which attributes larger spaces in the LTM signal to more frequently accessed memory areas , created a concept of "permanence" in LTM, which enables the model to better capture long-term background without losing relevant information. It is also inspired by the long-term potential and plasticity of the brain.

Experimental part

In order to verify whether ∞-former can model long context, the researchers first Experiments are conducted on a synthesis task of sorting tokens by frequency in a long sequence; then experiments are conducted on language modeling and document-based dialogue generation by fine-tuning a pre-trained language model.

Sort

The input consists of a token sampled according to a probability distribution (unknown to the system) sequence, the goal is to generate tokens in descending order of frequency in the sequence

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

In order to study whether long-term memory is effectively utilized, and Transformer Whether ranking is done simply by modeling the most recent tag, the researchers designed the tag probability distribution to change over time.

There are 20 tokens in the vocabulary, and experiments were conducted with sequences of lengths of 4,000, 8,000, and 16,000 respectively. Transformer-XL and compressive transformer were used as baseline models for comparison.


5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

The experimental results can be seen that in the case of short sequence length (4,000), Transformer-XL achieves slightly higher accuracy than other models; but when the sequence length increases, its accuracy also drops rapidly, but For ∞-former, this decrease is not obvious, indicating that it has more advantages when modeling long sequences.

Language Modeling

To understand whether long-term memory can be used to extend pre-training For the language model, the researchers fine-tuned GPT-2 small on a subset of Wikitext103 and PG-19, including approximately 200 million tokens.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

The experimental results can be seen that ∞-former can reduce the confusion of Wikitext-103 and PG19, and ∞- The improvement obtained by former is larger on the PG19 dataset because books rely more on long-term memory than Wikipedia articles.

Document-based dialogue

In document-based dialogue generation, except In addition to the conversation history, the model can also obtain documents about the topic of the conversation.

In the CMU Document Grounded Conversation dataset (CMU-DoG), the conversation is about a movie, and a summary of the movie is given as an auxiliary document; considering that the conversation contains multiple different In continuous discourse, auxiliary documents are divided into parts.

To assess the usefulness of long-term memory, the researchers made the task more challenging by giving the model access to the file only before the conversation began.

After fine-tuning GPT-2 small, in order to allow the model to keep the entire document in memory, a continuous LTM (∞-former) with N=512 basis functions is used to extend GPT -2.

To evaluate the model effect, use perplexity, F1 score, Rouge-1 and Rouge-L, and Meteor indicators.

5 million token monster, read the entire Harry Potter in one go! More than 1000 times longer than ChatGPT

From the results, ∞-former and compressive Transformer can generate better corpus, although the confusion between the two The degree is basically the same, but ∞-former achieves better scores on other indicators.

The above is the detailed content of 5 million token monster, read the entire 'Harry Potter' in one go! More than 1000 times longer than ChatGPT. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
Reading The AI Index 2025: Is AI Your Friend, Foe, Or Co-Pilot?Reading The AI Index 2025: Is AI Your Friend, Foe, Or Co-Pilot?Apr 11, 2025 pm 12:13 PM

The 2025 Artificial Intelligence Index Report released by the Stanford University Institute for Human-Oriented Artificial Intelligence provides a good overview of the ongoing artificial intelligence revolution. Let’s interpret it in four simple concepts: cognition (understand what is happening), appreciation (seeing benefits), acceptance (face challenges), and responsibility (find our responsibilities). Cognition: Artificial intelligence is everywhere and is developing rapidly We need to be keenly aware of how quickly artificial intelligence is developing and spreading. Artificial intelligence systems are constantly improving, achieving excellent results in math and complex thinking tests, and just a year ago they failed miserably in these tests. Imagine AI solving complex coding problems or graduate-level scientific problems – since 2023

Getting Started With Meta Llama 3.2 - Analytics VidhyaGetting Started With Meta Llama 3.2 - Analytics VidhyaApr 11, 2025 pm 12:04 PM

Meta's Llama 3.2: A Leap Forward in Multimodal and Mobile AI Meta recently unveiled Llama 3.2, a significant advancement in AI featuring powerful vision capabilities and lightweight text models optimized for mobile devices. Building on the success o

AV Bytes: Meta's Llama 3.2, Google's Gemini 1.5, and MoreAV Bytes: Meta's Llama 3.2, Google's Gemini 1.5, and MoreApr 11, 2025 pm 12:01 PM

This week's AI landscape: A whirlwind of advancements, ethical considerations, and regulatory debates. Major players like OpenAI, Google, Meta, and Microsoft have unleashed a torrent of updates, from groundbreaking new models to crucial shifts in le

The Human Cost Of Talking To Machines: Can A Chatbot Really Care?The Human Cost Of Talking To Machines: Can A Chatbot Really Care?Apr 11, 2025 pm 12:00 PM

The comforting illusion of connection: Are we truly flourishing in our relationships with AI? This question challenged the optimistic tone of MIT Media Lab's "Advancing Humans with AI (AHA)" symposium. While the event showcased cutting-edg

Understanding SciPy Library in PythonUnderstanding SciPy Library in PythonApr 11, 2025 am 11:57 AM

Introduction Imagine you're a scientist or engineer tackling complex problems – differential equations, optimization challenges, or Fourier analysis. Python's ease of use and graphics capabilities are appealing, but these tasks demand powerful tools

3 Methods to Run Llama 3.2 - Analytics Vidhya3 Methods to Run Llama 3.2 - Analytics VidhyaApr 11, 2025 am 11:56 AM

Meta's Llama 3.2: A Multimodal AI Powerhouse Meta's latest multimodal model, Llama 3.2, represents a significant advancement in AI, boasting enhanced language comprehension, improved accuracy, and superior text generation capabilities. Its ability t

Automating Data Quality Checks with DagsterAutomating Data Quality Checks with DagsterApr 11, 2025 am 11:44 AM

Data Quality Assurance: Automating Checks with Dagster and Great Expectations Maintaining high data quality is critical for data-driven businesses. As data volumes and sources increase, manual quality control becomes inefficient and prone to errors.

Do Mainframes Have A Role In The AI Era?Do Mainframes Have A Role In The AI Era?Apr 11, 2025 am 11:42 AM

Mainframes: The Unsung Heroes of the AI Revolution While servers excel at general-purpose applications and handling multiple clients, mainframes are built for high-volume, mission-critical tasks. These powerful systems are frequently found in heavil

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)