wenbopan commited on
Commit
8927f30
1 Parent(s): 823a33e

change link and intro

Browse files
Files changed (1) hide show
  1. README.md +44 -8
README.md CHANGED
@@ -1,30 +1,64 @@
1
  ---
2
- language:
3
- - zh
4
- - en
5
- license: apache-2.0
6
  datasets:
7
  - wenbopan/Fusang-v1
8
  - wenbopan/OpenOrca-zh-20k
 
 
 
9
  ---
10
 
11
  ![image/webp](https://cdn-uploads.huggingface.co/production/uploads/62cd3a3691d27e60db0698b0/s21sMRxRT56c5t4M15GBP.webp)
12
 
 
 
13
  # Faro-Yi-9B
14
  Faro-Yi-9B is an improved [Yi-9B-200K](https://huggingface.co/01-ai/Yi-9B-200K) with extensive instruction tuning on [Fusang-V1](https://huggingface.co/datasets/wenbopan/Fusang-v1). Compared to Yi-9B-200K, Faro-Yi-9B has gained greater capability in various downstream tasks and long-context modeling thanks to the large-scale synthetic data in Fusang-V1.
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## Performance
17
 
18
- Faro-Yi-9B enhances its ability compared to Yi-9B-200K in most dimensions, especially in long-range modeling and bilingual (English, Chinese) understanding. Fi is competitive among all open-sourced models at around 9B parameters. Fi-9B is good at both factual tasks and preferred by LLM-judges.
 
 
19
 
20
  ### Fact-based Evaluation (Open LLM Leaderboard)
21
 
22
- | **Metric** | **MMLU** | GSM8K | **HellaSwag** | **TruthfulQA** | **Arc** | **Winogrande** |
23
  | -------------- | --------- | --------- | ------------- | -------------- | ----------- | -------------- |
24
  | **Yi-9B-200K** | 65.73 | 50.49 | 56.72 | 33.80 | 69.25 | 71.67 |
25
  | **Faro-Yi-9B** | **68.80** | **63.08** | **57.28** | **40.86** | **72.58** | 71.11 |
26
 
27
- ### Long-context Modeling (LongBench)
28
 
29
  | **Name** | **Average_zh** | **Average_en** | **Code Completion** |
30
  |----------------|----------------|----------------|---------------------|
@@ -48,4 +82,6 @@ Faro-Yi-9B enhances its ability compared to Yi-9B-200K in most dimensions, espec
48
  | **Name** | MMLU | **CMMLU** |
49
  | -------------- | --------- | --------- |
50
  | **Yi-9B-200K** | 65.73 | 71.97 |
51
- | **Faro-Yi-9B** | **68.80** | **73.28** |
 
 
 
1
  ---
2
+ license: mit
 
 
 
3
  datasets:
4
  - wenbopan/Fusang-v1
5
  - wenbopan/OpenOrca-zh-20k
6
+ language:
7
+ - zh
8
+ - en
9
  ---
10
 
11
  ![image/webp](https://cdn-uploads.huggingface.co/production/uploads/62cd3a3691d27e60db0698b0/s21sMRxRT56c5t4M15GBP.webp)
12
 
13
+ **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.**
14
+
15
  # Faro-Yi-9B
16
  Faro-Yi-9B is an improved [Yi-9B-200K](https://huggingface.co/01-ai/Yi-9B-200K) with extensive instruction tuning on [Fusang-V1](https://huggingface.co/datasets/wenbopan/Fusang-v1). Compared to Yi-9B-200K, Faro-Yi-9B has gained greater capability in various downstream tasks and long-context modeling thanks to the large-scale synthetic data in Fusang-V1.
17
 
18
+ ## How to Use
19
+
20
+ Faro-Yi-9B uses chatml template. This make it easy to set up system prompt and multi-turn conversations.
21
+
22
+ ```python
23
+ from transformers import AutoModelForCausalLM, AutoTokenizer
24
+
25
+ model = AutoModelForCausalLM.from_pretrained(
26
+ model_path,
27
+ device_map="cuda"
28
+ )
29
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
30
+
31
+ messages = [
32
+ {"role": "system", "content": "You are a helpful assistant. Always answer with a short response."},
33
+ {"role": "user", "content": "Tell me what is Pythagorean theorem like you are a pirate."}
34
+ ]
35
+ input_ids = tokenizer.apply_chat_template(
36
+ messages,
37
+ tokenize=True,
38
+ add_generation_prompt=True,
39
+ return_tensors="pt",
40
+ ).to(model.device)
41
+
42
+ generated_ids = model.generate(input_ids, max_new_tokens=512, temperature=0.5)
43
+ response = tokenizer.decode(generated_ids[0], skip_special_tokens=True)
44
+
45
+ # Aye, matey! The Pythagorean theorem is a nautical rule that helps us find the length of the third side of a triangle. It's like this: if you have a triangle with two sides, you can find the length of the third side by squaring the two sides and then adding them together. The square root of that sum will give you the length of the third side! It's useful for sailing and navigating, so you always know how far you've traveled. Remember, it's all about the sum of squares, me hearties!
46
+ ```
47
+
48
  ## Performance
49
 
50
+ Faro-Yi-9B enhances its ability compared to Yi-9B-200K in most dimensions, especially in long-range modeling and bilingual (English, Chinese) understanding. Faro is competitive among all open-sourced models at around 9B parameters.
51
+
52
+ <details> <summary>Benchmark Results</summary>
53
 
54
  ### Fact-based Evaluation (Open LLM Leaderboard)
55
 
56
+ | **Metric** | **MMLU** | **GSM8K** | **HellaSwag** | **TruthfulQA** | **Arc** | **Winogrande** |
57
  | -------------- | --------- | --------- | ------------- | -------------- | ----------- | -------------- |
58
  | **Yi-9B-200K** | 65.73 | 50.49 | 56.72 | 33.80 | 69.25 | 71.67 |
59
  | **Faro-Yi-9B** | **68.80** | **63.08** | **57.28** | **40.86** | **72.58** | 71.11 |
60
 
61
+ ### Long-context Modeling ([LongBench](https://github.com/THUDM/LongBench))
62
 
63
  | **Name** | **Average_zh** | **Average_en** | **Code Completion** |
64
  |----------------|----------------|----------------|---------------------|
 
82
  | **Name** | MMLU | **CMMLU** |
83
  | -------------- | --------- | --------- |
84
  | **Yi-9B-200K** | 65.73 | 71.97 |
85
+ | **Faro-Yi-9B** | **68.80** | **73.28** |
86
+
87
+ </details>