yuyijiong commited on
Commit
53e6aaa
1 Parent(s): 9f854bc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -0
README.md CHANGED
@@ -9,6 +9,7 @@ pipeline_tag: text-generation
9
  ---
10
  [LongAlpaca](https://huggingface.co/Yukang/LongAlpaca-7B)通过对 llama2-chat 进行少量长文本数据的微调,展现出了优秀的长文本对话能力。\
11
  LongAlpaca-7b-chinese 和 LongAlpaca 使用类似的训练方法:先使用线性位置插值,然后通过少量长文本数据的微调,使其获得优秀的长文本对话能力。\
 
12
  此模型由atom-7b-chat经过lora微调得到,通过线性位置插值,将文本长度从4k扩展到32k,可以完成上万字的多文档检索、论文总结等任务,已经能满足绝大部分需要,而短对话能力几乎没有下降。\
13
  使用方法:
14
  ```python
@@ -23,6 +24,7 @@ tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
23
  # use auto mode, automatically select precision based on the device.
24
  model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", load_in_8bit=True).eval()
25
 
 
26
  question="中国的首都是什么?"
27
  input_text = "<s>Human: " + question + "\n</s><s>Assistant: "
28
  input_ids = tokenizer(input_text, return_tensors='pt').input_ids.to(model.device)
 
9
  ---
10
  [LongAlpaca](https://huggingface.co/Yukang/LongAlpaca-7B)通过对 llama2-chat 进行少量长文本数据的微调,展现出了优秀的长文本对话能力。\
11
  LongAlpaca-7b-chinese 和 LongAlpaca 使用类似的训练方法:先使用线性位置插值,然后通过少量长文本数据的微调,使其获得优秀的长文本对话能力。\
12
+ 使用的数据集与LongAlpaca较为类似,但增加了多文档问答的数据。
13
  此模型由atom-7b-chat经过lora微调得到,通过线性位置插值,将文本长度从4k扩展到32k,可以完成上万字的多文档检索、论文总结等任务,已经能满足绝大部分需要,而短对话能力几乎没有下降。\
14
  使用方法:
15
  ```python
 
24
  # use auto mode, automatically select precision based on the device.
25
  model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", load_in_8bit=True).eval()
26
 
27
+
28
  question="中国的首都是什么?"
29
  input_text = "<s>Human: " + question + "\n</s><s>Assistant: "
30
  input_ids = tokenizer(input_text, return_tensors='pt').input_ids.to(model.device)