LLM Token Optimization via Minimized Intermediate File Format

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large language models (LLMs) face challenges in efficiently processing and generating text due to limitations on the number of input and output tokens, which can affect cost and performance.

Innovation Solution

Utilizing an intermediate file format, such as JSON, that can be minimized without altering semantic meaning, to limit the number of input and output tokens passed to or generated by the LLM.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If more tokens are provided to the LLM for context and generation, then the accuracy and quality of text generation is improved, but the cost and processing time increase

Engineering Contradiction:
ImproveaccuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent extracts and removes unnecessary tokens from the input prompt and output generation, keeping only the essential semantic content. This is achieved through token optimization techniques that identify and eliminate redundant tokens while preserving the core meaning, thereby reducing processing time and cost without significantly compromising accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by providing only the necessary portion of context tokens required for accurate generation, rather than providing excessive tokens. The system dynamically determines the optimal token count needed for the task at hand, avoiding the overhead of processing unnecessary tokens while maintaining generation quality.

Inventive Principle:
Principle #16Partial or excessive action

2Measurement precision

If more tokens are provided to the LLM for context and generation, then the accuracy and quality of text generation is improved, but the cost increases

Engineering Contradiction:
ImproveaccuracyVSAvoidcost
Core Design Contradiction:
Measurement precisionVSLoss of energy

Solution Approach 1:

The patent extracts and removes unnecessary tokens from the input prompt and output generation, keeping only the essential semantic content. This is achieved through token optimization techniques that identify and eliminate redundant tokens while preserving the core meaning, thereby reducing processing time and cost without significantly compromising accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by providing only the necessary portion of context tokens required for accurate generation, rather than providing excessive tokens. The system dynamically determines the optimal token count needed for the task at hand, avoiding the overhead of processing unnecessary tokens while maintaining generation quality.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If the number of tokens is reduced to lower cost and improve speed, then processing efficiency is improved, but the accuracy may be compromised

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidaccuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent extracts and removes unnecessary tokens from the input prompt and output generation, keeping only the essential semantic content. This is achieved through token optimization techniques that identify and eliminate redundant tokens while preserving the core meaning, thereby reducing processing time and cost without significantly compromising accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter of token count by dynamically adjusting the number of tokens based on the specific task requirements. The system identifies the minimum necessary token count that maintains accuracy for each generation task, transforming the fixed token approach into a variable, optimized token strategy that balances efficiency and quality.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250156635A1Token optimization through minimized payload for large language models
Publication Date: 2025.05.15 SAP SE
  • US20250156635A1 patent drawing
  • US20250156635A1 patent drawing
  • US20250156635A1 patent drawing

AI summary

In an example embodiment, a solution is provided by utilizing an intermediate file format for either an input prompt to or output from a large language model (LLM) (or both). This intermediate file format is one that has the property of being minimizable, meaning that tokens contained in a file of that intermediate file format can be stripped out or otherwise removed without changing the semantic meaning of the file. The input prompt can be created in or converted to this intermediate file format and then minimized prior to being sent to the LLM for text generation. Furthermore, a system message included with the input prompt may instruct the LLM to generate text in the intermediate file format, in minimized form. A specialized parser may then be included to parse the minimized output produced by the LLM.