IP Library › Granted Patent US 12,737,545
Granted Patent B2
US 12,737,545 · App. 18/659,098 · Granted Sep 15, 2026

Length-based large language models

Inventors: Lucas Ross (Royal Oak, MI); Diana Mann (Herndon, VA)
Assignee: Ford Global Technologies, LLC
G06F40/284
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,737,545
App. No.
18/659,098
Filed
May 9, 2024
Granted
Sep 15, 2026
Kind
B2
Art Unit
2656
USPC
704/9
Abstract

A computer that includes a processor and a memory, the memory including instructions executable by the processor to receive a prompt for a large language model, the prompt including an input text and a target length. The large language model can generate an output text that includes a number of words equal to the target length within a user determined tolerance based on a length guidance embedding vector that encodes the target size.

Claims (24)

1 . A system, comprising: a computer that includes a processor and a memory, the memory including instructions executable by the processor to:

receive a prompt for a large language model, the prompt including an input text and a target length wherein the large language model is modified by adding a length guidance vector; and

generate, in the large language model, an output text that includes a number of words equal to the target length within a user determined tolerance based on the length guidance vector that encodes the target length.

2 . The system of claim 1 , wherein the input text includes more words than the target length and the output text is based on the input text.

3 . The system of claim 1 , the instructions including further instructions to receive the input text by a tokenizer that generates tokens that represent words in the input text.

4 . The system of claim 1 , wherein the large language model includes an embedding block that includes an array that includes token vectors and a position vector that encodes the position of the token vectors in the array.

5 . The system of claim 1 , wherein a decoder portion of the large language model generates elements of the length guidance vector based on the target length.

6 . The system of claim 5 , wherein the decoder portion of the large language model encodes the target length by determining a scalar multiple starting at zero at an origin of the length guidance vector and ending at one at an entry equal to the target length and sets a remainder of entries in the length guidance vector to zeros.

7 . The system of claim 6 , wherein the decoder portion of the large language model encodes the target length by determining a scalar multiple equal to a sinusoidal function starting at zero at an origin of the length guidance vector, having a value of one an entry equal to one-half the target length, and returning to 0 at the entry equal to the target length and setting a remainder of entries in the length guidance vector to zeros.

8 . The system of claim 7 , wherein the large language model receives as input a first target length and a second target length indicating a range of target lengths and the decoder portion of the large language model is modified to include a first length guidance vector and a second length guidance vector.

9 . The system of claim 8 , wherein the first length guidance vector includes a first sinusoidal function which determines a scalar multiple beginning at an origin of the first length guidance vector at zero, rises to one at one-half the first target length and falls to zero at the first target length and sets a remainder of entries in the first length guidance vector to zeros.

10 . The system of claim 9 , wherein the second length guidance vector includes a second sinusoidal function which determines a scalar multiple beginning at an origin of the second length guidance vector at zero, rises to one at one-half the second target length and falls to zero at the second target length and sets a remainder of entries in the second length guidance vector to zeros.

11 . The system of claim 10 , wherein the first length guidance vector is added to the second length guidance vector.

12 . The system of claim 1 , wherein the user determined tolerance is selected by the user and determined during training of the large language model and is configurable at inference time.

13 . A method, comprising:

receiving a prompt for a large language model, the prompt including an input text and a target length wherein the large language model is modified by adding a length guidance vector; and

generating, in the large language model, an output text that includes a number of words equal to the target length within a user determined tolerance based on the length guidance vector that encodes the target length.

14 . The method of claim 13 , wherein the input text includes more words than the target length and the output text is based on the input text.

15 . The method of claim 13 , further comprising receiving the input text by a tokenizer that generates tokens that represent words in the input text.

16 . The method of claim 13 , wherein the large language model includes an embedding block that includes an array that includes token vectors and a position vector that encodes the position of the token vectors included in the array.

17 . The method of claim 13 , wherein a decoder portion of the large language model generates elements of the length guidance vector based on the target length.

18 . The method of claim 17 , wherein the decoder portion of the large language model encodes the target length by determining a scalar multiple starting at zero at an origin of the length guidance vector and ending at one at an entry equal to the target length and sets a remainder of entries in the length guidance vector to zeros.

19 . The method of claim 18 , wherein the decoder portion of the large language model encodes the target length by determining a scalar multiple equal to a sinusoidal function starting at zero at an origin of the length guidance vector, having a value of one an entry equal to one-half the target length, and returning to zero at the entry equal to the target length and setting a remainder of entries in the length guidance vector to zeros.

20 . The method of claim 13 , wherein the large language model receives as input a first target length and a second target length indicating a range of target lengths and the decoder portion of the large language model is modified to include a first length guidance vector and a second length guidance vector.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 9, 2024
From: ROSS, LUCAS; MANN, DIANA
To: FORD GLOBAL TECHNOLOGIES, LLC
Reel/Frame 067357/0012 →
Continuity (1)
Related Publication 20250348675A1 · Nov 13, 2025
References Cited (22)
US 11295081B1 · Federico · 2022 [cited by examiner]
US 20210286951A1 · Song et al. · 2021 [cited by applicant]
US 20220138239A1 · Saito · 2022 [cited by examiner]
US 20220366140A1 · Saito · 2022 [cited by examiner]
US 20230297771A1 · Peleg et al. · 2023 [cited by applicant]
US 20230351102A1 · Tran · 2023 [cited by applicant]
US 20230359903A1 · Cefalu et al. · 2023 [cited by applicant]
US 20240193350A1 · Xie · 2024 [cited by examiner]
US 20250238677A1 · Song · 2025 [cited by examiner]
CN 115269821A · 2022 [cited by applicant]
CN 116992854A · 2023 [cited by applicant]
WO 2022221603A1 · 2022 [cited by applicant]
WO WO2024114659A1 · 2024 [cited by examiner]
Kikuchi, Yuta, et al. “Controlling output length in neural encoder-decoders.” arXiv preprint arXiv:1609.09552 (2016). (Year: 2016). [cited by examiner]
Liu, Yizhu, Qi Jia, and Kenny Zhu. “Length control in abstractive summarization by pretraining information selection.” Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (vol. 1: Lon… [cited by examiner]
Yu, Zhongyi, et al. “Lenatten: An effective length controlling unit for text summarization.” arXiv preprint arXiv:2106.00316 (2021). (Year: 2021). [cited by examiner]
Takase, Sho, and Naoaki Okazaki. “Positional encoding to control output sequence length.” arXiv preprint arXiv:1904.07418 (2019). (Year: 2019). [cited by examiner]
Nguyen, Ngoc-Khuong, et al. “AMethod of Integrating Length Constraints into Encoder-Decoder Transformer for Abstractive Text Summarization.” Intelligent Automation & Soft Computing 38.1 (2023). (Year: 2023). [cited by examiner]
Miculicich, Lesly, et al. “Summarization with precise length control.” arXiv preprint arXiv:2305.05171 (2023). (Year: 2023). [cited by examiner]
Oka, Y. et al., “Incorporating Noisy Length Constraints into Transformer with Length-aware Positional Encodings,” Proceedings of the 28th International Conference on Computational Linguistics, Dec. 8-13, 2020, 6 pages. [cited by applicant]
Sho T. et al., “Positional Encoding to Control Output Sequence Length.” arXiv:1904.07418v1 [cs.CL] Apr. 16, 2019, 6 pages. [cited by applicant]
“What is a Summarizing Tool?,” Repostseo, 2024, 8 pages. [cited by applicant]