ssz1111 commited on
Commit
4f7377b
·
verified ·
1 Parent(s): 8d90096

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -15,3 +15,15 @@ Specifically, HMG attempts to measure the difficulty of generating corresponding
15
  Also, the role of CAM is to measure the difficulty of understanding the long input contexts due to long-range dependencies by evaluating whether the model’s attention is focused on important segments.
16
  Built upon both proposed methods, we select the most challenging samples as the influential data to effectively frame the long-range dependencies, thereby achieving better performance of LLMs.
17
  Comprehensive experiments indicate that GATEAU effectively identifies samples enriched with long-range dependency relations and the model trained on these selected samples exhibits better instruction-following and long-context understanding capabilities.
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  Also, the role of CAM is to measure the difficulty of understanding the long input contexts due to long-range dependencies by evaluating whether the model’s attention is focused on important segments.
16
  Built upon both proposed methods, we select the most challenging samples as the influential data to effectively frame the long-range dependencies, thereby achieving better performance of LLMs.
17
  Comprehensive experiments indicate that GATEAU effectively identifies samples enriched with long-range dependency relations and the model trained on these selected samples exhibits better instruction-following and long-context understanding capabilities.
18
+
19
+ A simple demo for deployment of the model:
20
+ ```python
21
+ from transformers import AutoTokenizer, AutoModelForCausalLM
22
+ import torch
23
+ tokenizer = AutoTokenizer.from_pretrained("ssz1111/GATEAU-1k-10k", trust_remote_code=True)
24
+ model = AutoModelForCausalLM.from_pretrained("ssz1111/GATEAU-1k-10k", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
25
+ model = model.eval()
26
+ query = "\n\n Hello."
27
+ response, history = model.chat(tokenizer, query, history=[], max_new_tokens=512, temperature=1)
28
+ print(response)
29
+ ```