lvkaokao commited on
Commit
3c645da
1 Parent(s): 90d65c3
Files changed (1) hide show
  1. README.md +69 -0
README.md CHANGED
@@ -1,3 +1,72 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
6
+ should probably proofread and complete it, then remove this comment. -->
7
+
8
+ This model is a fine-tuned model for Chat based on [mosaicml/mpt-7b](https://huggingface.co/mosaicml/mpt-7b) with **max_seq_lenght=2048** on the [instruction-dataset-for-neural-chat-v1](https://huggingface.co/datasets/Intel/instruction-dataset-for-neural-chat-v1), [databricks-dolly-15k](https://huggingface.co/datasets/databricks/databricks-dolly-15k), [HC3](https://huggingface.co/datasets/Hello-SimpleAI/HC3) and [oasst1](https://huggingface.co/datasets/OpenAssistant/oasst1) dataset.
9
+
10
+ ## Model date
11
+ Neural-chat-7b-v1.1 was trained on July 6, 2023.
12
+
13
+ ## Evaluation
14
+ We use the same evaluation metrics as [open_llm_leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) which uses [Eleuther AI Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness/tree/master), a unified framework to test generative language models on a large number of different evaluation tasks.
15
+
16
+ | Model | Average ⬆️| ARC (25-s) ⬆️ | HellaSwag (10-s) ⬆️ | MMLU (5-s) ⬆️| TruthfulQA (MC) (0-s) ⬆️ |
17
+ | --- | --- | --- | --- | --- | --- |
18
+ |[mosaicml/mpt-7b](https://huggingface.co/mosaicml/mpt-7b)| 47.4 | 47.61 | 77.56 | 31 | 33.43 |
19
+ | [mosaicml/mpt-7b-chat](https://huggingface.co/mosaicml/mpt-7b-chat) | **49.95** | 46.5 | 75.55 | 37.60 | 40.17 |
20
+ | **Ours** | **51.41** | 50.09 | 76.69 | 38.79 | 40.07 |
21
+
22
+
23
+ ## Training procedure
24
+
25
+ ### Training hyperparameters
26
+
27
+ The following hyperparameters were used during training:
28
+ - learning_rate: 1e-05
29
+ - train_batch_size: 2
30
+ - eval_batch_size: 2
31
+ - seed: 42
32
+ - distributed_type: multi-GPU
33
+ - num_devices: 4
34
+ - gradient_accumulation_steps: 8
35
+ - total_train_batch_size: 64
36
+ - total_eval_batch_size: 8
37
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
38
+ - lr_scheduler_type: linear
39
+ - lr_scheduler_warmup_ratio: 0.02
40
+ - num_epochs: 3.0
41
+
42
+ ## inference with transformers
43
+
44
+ ```shell
45
+ import transformers
46
+ model = transformers.AutoModelForCausalLM.from_pretrained(
47
+ 'Intel/neural-chat-7b-v1.1',
48
+ trust_remote_code=True
49
+ )
50
+ ```
51
+
52
+ ## Inference with INT8
53
+ Follow the instructions [link](https://github.com/intel/intel-extension-for-transformers/tree/main/examples/huggingface/pytorch/text-generation/quantization) to install the necessary dependencies. Use the below command to quantize the model using Intel Neural Compressor [link](https://github.com/intel/neural-compressor) and accelerate the inference.
54
+
55
+ ```shell
56
+ python run_generation.py \
57
+ --model Intel/neural-chat-7b-v1.1 \
58
+ --revision c8d4750ac8421303665d6ecc253950c69b56d324 \
59
+ --quantize \
60
+ --sq \
61
+ --alpha 0.95 \
62
+ --ipex
63
+ ```
64
+
65
+ ## Organizations developing the model
66
+
67
+ The NeuralChat team with members from Intel/SATG/AIA/AIPT. Core team members: Kaokao Lv, Xuhui Ren, Liang Lv, Wenxin Zhang, and Haihao Shen.
68
+
69
+ ## Useful links
70
+ * Intel Neural Compressor [link](https://github.com/intel/neural-compressor)
71
+ * Intel Extension for Transformers [link](https://github.com/intel/intel-extension-for-transformers)
72
+ * Intel Extension for PyTorch [link](https://github.com/intel/intel-extension-for-pytorch)