wenbopan commited on
Commit
a0fad7c
1 Parent(s): 008bffb

change name

Browse files
Files changed (1) hide show
  1. README.md +9 -7
README.md CHANGED
@@ -11,19 +11,21 @@ language:
11
 
12
  **The Faro chat model focuses on practicality and long-context modeling. It handles various downstream tasks with higher quality, delivering stable and reliable results even when inputs contain lengthy documents or complex instructions. Faro seamlessly works in both English and Chinese.**
13
 
14
- # Faro-Qwen-4B-100K
15
- Faro-Qwen-4B-100K is an improved [Qwen/Qwen1.5-4B-Chat](https://huggingface.co/Qwen/Qwen1.5-4B-Chat) with extensive instruction tuning on [Fusang-V1](https://huggingface.co/datasets/wenbopan/Fusang-v1). Compared to Qwen1.5-4B-Chat, Faro-Qwen-4B-100K has gained greater capability in various downstream tasks and long-context modeling thanks to the large-scale synthetic data in Fusang-V1. Faro-Qwen-4B-100K use dynamic NTK and continual training to extend its max context length to 100K.
 
 
16
 
17
  ## How to Use
18
 
19
- Faro-Qwen-4B-100K uses chatml template. I recommend using vLLM for long inputs.
20
 
21
  ```python
22
  import io
23
  import requests
24
  from PyPDF2 import PdfReader
25
  from vllm import LLM, SamplingParams
26
- llm = LLM(model="wenbopan/Faro-Qwen-4B-100K")
27
  pdf_data = io.BytesIO(requests.get("https://arxiv.org/pdf/2303.08774.pdf").content)
28
  document = "".join(page.extract_text() for page in PdfReader(pdf_data).pages) # 100 pages
29
  question = f"{document}\n\nAccording to the paper, what is the parameter count of GPT-4?"
@@ -37,8 +39,8 @@ print(output[0].outputs[0].text)
37
 
38
  ```python
39
  from transformers import AutoModelForCausalLM, AutoTokenizer
40
- model = AutoModelForCausalLM.from_pretrained('wenbopan/Faro-Qwen-4B-100K', device_map="cuda")
41
- tokenizer = AutoTokenizer.from_pretrained('wenbopan/Faro-Qwen-4B-100K')
42
  messages = [
43
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
44
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
@@ -50,4 +52,4 @@ response = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
50
 
51
  </details>
52
 
53
- For more info please refer to [wenbopan/Faro-Yi-9B-200K](https://huggingface.co/wenbopan/Faro-Yi-9B-200K)
 
11
 
12
  **The Faro chat model focuses on practicality and long-context modeling. It handles various downstream tasks with higher quality, delivering stable and reliable results even when inputs contain lengthy documents or complex instructions. Faro seamlessly works in both English and Chinese.**
13
 
14
+ # Faro-Qwen-4B
15
+ Faro-Qwen-4B is an improved [Qwen/Qwen1.5-4B-Chat](https://huggingface.co/Qwen/Qwen1.5-4B-Chat) with extensive instruction tuning on [Fusang-V1](https://huggingface.co/datasets/wenbopan/Fusang-v1). Compared to Qwen1.5-4B-Chat, Faro-Qwen-4B has gained greater capability in various downstream tasks and long-context modeling thanks to the large-scale synthetic data in Fusang-V1.
16
+
17
+ Faro-Qwen-4B uses dynamic NTK and continual training to extend its max context length to 100K. However, due to the lack of Dynamic NTK supports for`Qwen2ForCausalLM` in vLLM, inference on text longer than 32K requires using native `transformers` implementations.
18
 
19
  ## How to Use
20
 
21
+ Faro-Qwen-4B uses chatml template. I recommend using vLLM for long inputs.
22
 
23
  ```python
24
  import io
25
  import requests
26
  from PyPDF2 import PdfReader
27
  from vllm import LLM, SamplingParams
28
+ llm = LLM(model="wenbopan/Faro-Qwen-4B")
29
  pdf_data = io.BytesIO(requests.get("https://arxiv.org/pdf/2303.08774.pdf").content)
30
  document = "".join(page.extract_text() for page in PdfReader(pdf_data).pages) # 100 pages
31
  question = f"{document}\n\nAccording to the paper, what is the parameter count of GPT-4?"
 
39
 
40
  ```python
41
  from transformers import AutoModelForCausalLM, AutoTokenizer
42
+ model = AutoModelForCausalLM.from_pretrained('wenbopan/Faro-Qwen-4B', device_map="cuda")
43
+ tokenizer = AutoTokenizer.from_pretrained('wenbopan/Faro-Qwen-4B')
44
  messages = [
45
  {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
46
  {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
 
52
 
53
  </details>
54
 
55
+ For more info please refer to [wenbopan/Faro-Yi-9B](https://huggingface.co/wenbopan/Faro-Yi-9B)