Views
No views yet
| 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 |

1[Round 1]
2
3问:Hi!
4
5答:Hello! What can I assist you today?
6
7[Round 2]
8
9问:What should I do if I can't sleep at night?
10
11答:1[INST]Hi![/INST]Hello! What can I assist you today?
2
3[INST]What should I do if I can't sleep at night?[/INST]1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3tokenizer = AutoTokenizer.from_pretrained("THUDM/LongAlign-6B-64k", trust_remote_code=True)
4model = AutoModelForCausalLM.from_pretrained("THUDM/LongAlign-6B-64k", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
5model = model.eval()
6query = open("assets/paper.txt").read() + "\n\nPlease summarize the paper."
7response, history = model.chat(tokenizer, query, history=[], max_new_tokens=512, temperature=1)
8print(response)