THUDM / LongAlign-7B-64k

huggingface.co
Total runs: 845
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: February 01 2024
text-generation

Introduction of LongAlign-7B-64k

Model Details of LongAlign-7B-64k

LongAlign-7B-64k

🤗 [LongAlign Dataset] • 💻 [Github Repo] • 📃 [LongAlign Paper]

LongAlign is the first full recipe for LLM alignment on long context. We propose the LongAlign-10k dataset, containing 10,000 long instruction data of 8k-64k in length. We investigate on trianing strategies, namely packing (with loss weighting) and sorted batching , which are all implemented in our code. For real-world long context evaluation, we introduce LongBench-Chat that evaluate the instruction-following capability on queries of 10k-100k length.

All Models

We open-sourced the following list of models:

Model Huggingface Repo Description
LongAlign-6B-64k-base 🤗 Huggingface Repo ChatGLM3-6B with an extended 64k context window
LongAlign-6B-64k 🤗 Huggingface Repo Chat model by LongAlign training on LongAlign-6B-64k-base
LongAlign-7B-64k-base 🤗 Huggingface Repo Llama-2-7B with an extended 64k context window
LongAlign-7B-64k 🤗 Huggingface Repo Chat model by LongAlign training on LongAlign-7B-64k-base
LongAlign-13B-64k-base 🤗 Huggingface Repo Llama-2-13B with an extended 64k context window
LongAlign-13B-64k 🤗 Huggingface Repo Chat model by LongAlign training on LongAlign-13B-64k-base
ChatGLM3-6B-128k 🤗 Huggingface Repo ChatGLM3-6B with a 128k context window

Model usage

Chat prompt template for LongAlign-6B-64k:

[Round 1]

问:Hi!

答:Hello! What can I assist you today?

[Round 2]

问:What should I do if I can't sleep at night?

答:

Chat prompt template for LongAlign-7B-64k and LongAlign-13B-64k:

[INST]Hi![/INST]Hello! What can I assist you today?

[INST]What should I do if I can't sleep at night?[/INST]

ChatGLM3-6B-128k uses the same prompt template as ChatGLM3-6B .

A simple demo for deployment of the model:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("THUDM/LongAlign-6B-64k", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("THUDM/LongAlign-6B-64k", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
model = model.eval()
query = open("assets/paper.txt").read() + "\n\nPlease summarize the paper."
response, history = model.chat(tokenizer, query, history=[], max_new_tokens=512, temperature=1)
print(response)
Citation

If you find our work useful, please consider citing LongAlign:


Runs of THUDM LongAlign-7B-64k on huggingface.co

845
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About LongAlign-7B-64k huggingface.co Model

More LongAlign-7B-64k license Visit here:

https://choosealicense.com/licenses/apache-2.0

LongAlign-7B-64k huggingface.co

LongAlign-7B-64k huggingface.co is an AI model on huggingface.co that provides LongAlign-7B-64k's model effect (), which can be used instantly with this THUDM LongAlign-7B-64k model. huggingface.co supports a free trial of the LongAlign-7B-64k model, and also provides paid use of the LongAlign-7B-64k. Support call LongAlign-7B-64k model through api, including Node.js, Python, http.

LongAlign-7B-64k huggingface.co Url

https://huggingface.co/THUDM/LongAlign-7B-64k

THUDM LongAlign-7B-64k online free

LongAlign-7B-64k huggingface.co is an online trial and call api platform, which integrates LongAlign-7B-64k's modeling effects, including api services, and provides a free online trial of LongAlign-7B-64k, you can try LongAlign-7B-64k online for free by clicking the link below.

THUDM LongAlign-7B-64k online free url in huggingface.co:

https://huggingface.co/THUDM/LongAlign-7B-64k

LongAlign-7B-64k install

LongAlign-7B-64k is an open source model from GitHub that offers a free installation service, and any user can find LongAlign-7B-64k on GitHub to install. At the same time, huggingface.co provides the effect of LongAlign-7B-64k install, users can directly use LongAlign-7B-64k installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

LongAlign-7B-64k install url in huggingface.co:

https://huggingface.co/THUDM/LongAlign-7B-64k

Url of LongAlign-7B-64k

LongAlign-7B-64k huggingface.co Url

Provider of LongAlign-7B-64k huggingface.co

THUDM
ORGANIZATIONS

Other API from THUDM

huggingface.co

Total runs: 659.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 05 2024
huggingface.co

Total runs: 611.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 243.1K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 11 2025
huggingface.co

Total runs: 95.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2025
huggingface.co

Total runs: 69.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 28.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:March 03 2025
huggingface.co

Total runs: 23.6K
Run Growth: 0
Growth Rate: 0.00%
Updated:November 23 2024
huggingface.co

Total runs: 15.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 14 2025
huggingface.co

Total runs: 6.5K
Run Growth: 0
Growth Rate: 0.00%
Updated:December 19 2023
huggingface.co

Total runs: 6.0K
Run Growth: 0
Growth Rate: 0.00%
Updated:October 25 2024
huggingface.co

Total runs: 4.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:April 22 2025
huggingface.co

Total runs: 3.3K
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 2.8K
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 993
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 928
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 853
Run Growth: 0
Growth Rate: 0.00%
Updated:January 27 2025
huggingface.co

Total runs: 607
Run Growth: 0
Growth Rate: 0.00%
Updated:January 02 2025
huggingface.co

Total runs: 299
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 188
Run Growth: 0
Growth Rate: 0.00%
Updated:August 04 2024
huggingface.co

Total runs: 167
Run Growth: 0
Growth Rate: 0.00%
Updated:October 20 2023
huggingface.co

Total runs: 119
Run Growth: 0
Growth Rate: 0.00%
Updated:December 10 2024
huggingface.co

Total runs: 75
Run Growth: 0
Growth Rate: 0.00%
Updated:November 20 2023
huggingface.co

Total runs: 62
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 43
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 28
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025
huggingface.co

Total runs: 25
Run Growth: 0
Growth Rate: 0.00%
Updated:March 02 2023
huggingface.co

Total runs: 14
Run Growth: 0
Growth Rate: 0.00%
Updated:July 24 2023
huggingface.co

Total runs: 12
Run Growth: 0
Growth Rate: 0.00%
Updated:July 22 2024